Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Feature] Security HUD
#9
(07-05-2016, 03:38 PM)Grayshift Wrote: I have implemented Erik's suggestions, though I'm unsure as to the reasoning behind them.

I'm sorry for being vague! I'll explain my reasonings behind the suggested changes.
  • I would suggest not using the colon operator to seek variables, you could easily replace that with a istype(variable, path) and then typecast.
    • the : operator basically overrides type checking, and will compile even if the variable was changed or does not exist.
    • The following should be reasonably safe and sound. https://totallynotmy.website/bfd-.txt
  • I would suggest changing the if(contrabandLevel) to if(contrabandLevel > 0)
    • The former would only trigger if the contraband level would equal one, which would only happen if the user was wearing single contraband item with a low contraband value
  • You are updating the icon_state for the arrestIcon each Life() tick, I'd suggest checking for changes first, and then updating the icon_state only when there are changes to prevent appearance churn.
    • The initial implementation you did would cause each mob to update their security overlay each time Life() was ticked, this would even happen if there where no required updates,
    • You can read more about appearance churn here: http://www.byond.com/forum/?post=2081779
Reply


Messages In This Thread
[Feature] Security HUD - by Grayshift - 07-04-2016, 08:54 AM
RE: [Feature] Security HUD - by Noah Buttes - 07-04-2016, 10:28 AM
RE: [Feature] Security HUD - by Erik - 07-04-2016, 10:36 AM
RE: [Feature] Security HUD - by Frank_Stein - 07-04-2016, 10:38 AM
RE: [Feature] Security HUD - by Noah Buttes - 07-04-2016, 11:15 AM
RE: [Feature] Security HUD - by atomic1fire - 07-06-2016, 01:30 PM
RE: [Feature] Security HUD - by Frank_Stein - 07-04-2016, 11:24 AM
RE: [Feature] Security HUD - by Noah Buttes - 07-04-2016, 11:26 AM
RE: [Feature] Security HUD - by Grayshift - 07-05-2016, 03:38 PM
RE: [Feature] Security HUD - by Erik - 07-06-2016, 08:56 AM
RE: [Feature] Security HUD - by Noah Buttes - 07-06-2016, 09:14 AM
RE: [Feature] Security HUD - by Dabir - 07-06-2016, 01:39 PM
RE: [Feature] Security HUD - by Wire - 07-08-2016, 09:29 AM

Forum Jump:


Users browsing this thread: 5 Guest(s)