Goonstation Forums
[Feature] Security HUD - Printable Version

+- Goonstation Forums (https://forum.ss13.co)
+-- Forum: Discussion (https://forum.ss13.co/forumdisplay.php?fid=6)
+--- Forum: Patches (https://forum.ss13.co/forumdisplay.php?fid=30)
+---- Forum: Implemented (https://forum.ss13.co/forumdisplay.php?fid=31)
+---- Thread: [Feature] Security HUD (/showthread.php?tid=6691)



[Feature] Security HUD - Grayshift - 07-04-2016

https://github.com/goonstation/goonstation-2016/compare/goonstation-2016-byond510...Grayshift:SecHUD?expand=1

This is a high tech pair of sunglasses that sec officers will start with. It functions similarly to the prodocs.

People set to arrest in the security records will show with a red !! icon.
People without weapon permits carrying contraband will get an orange C icon. Contraband follows the same rules the Securitrons use.
People set to paroled will have a yellow P icon.


RE: [Feature] Security HUD - Noah Buttes - 07-04-2016

Can incarcerated people also get some kind of marker too?


RE: [Feature] Security HUD - Erik - 07-04-2016

Yes! I recall you posting about this in IRC, the code looks alright but i do have some suggestions if you don't mind!

  • 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.
  • I would suggest not using the colon operator to seek variables, you could easily replace that with a istype(variable, path)  and then typecast.
  • I would suggest changing the if(contrabandLevel) to if(contrabandLevel > 0)



RE: [Feature] Security HUD - Frank_Stein - 07-04-2016

This would be incredibly useful, though it might be good to have it limited to three pairs easily accessible on station by default, one in the Sec gear room, one for the HoS, and one for the detective. More could either be in the armory, or produced by mechanics

Reason being, I think if every officer had a pair available to them, they might be less inclined to coordinate over radio and PDA


RE: [Feature] Security HUD - Noah Buttes - 07-04-2016

(07-04-2016, 10:38 AM)Frank_Stein Wrote: This would be incredibly useful, though it might be good to have it limited to three pairs easily accessible on station by default, one in the Sec gear room, one for the HoS, and one for the detective. More could either be in the armory, or produced by mechanics

Reason being, I think if every officer had a pair available to them, they might be less inclined to coordinate over radio and PDA

Why would they be less inclined to communicate?


RE: [Feature] Security HUD - Frank_Stein - 07-04-2016

Overconfidence, I think. Seeing someone suspicious with an !! over their head and being like "Time to nab em" rather than having to ask other officers if the shady looking guy going into maintenance has any reports against them. Not to mention how the system could be exploitable by a creative traitor or a rogue AI to get Security harassing innocent people.


RE: [Feature] Security HUD - Noah Buttes - 07-04-2016

(07-04-2016, 11:24 AM)Frank_Stein Wrote: Not to mention how the system could be exploitable by a creative traitor or a rogue AI to get Security harassing innocent people.

That doesn't sounds like a bad thing at all.

The best kind of traitor is one who gets people to unwittingly do the dirty work themselves.


RE: [Feature] Security HUD - Grayshift - 07-05-2016

I have implemented Erik's suggestions, though I'm unsure as to the reasoning behind them.


RE: [Feature] Security HUD - Erik - 07-06-2016

(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



RE: [Feature] Security HUD - Noah Buttes - 07-06-2016

(07-06-2016, 08:56 AM)ErikHanson Wrote:
(07-05-2016, 03:38 PM)Grayshift Wrote: I have implemented Erik's suggestions, though I'm unsure as to the reasoning behind them.
[*]You can read more about appearance churn here: http://www.byond.com/forum/?post=2081779
"This means that every time you change an appearance-related value, you are actually telling the engine to search every appearance currently in existence to find a match, or if none exists, to create one."

That sounds horribly inefficient.


RE: [Feature] Security HUD - atomic1fire - 07-06-2016

(07-04-2016, 10:38 AM)Frank_Stein Wrote: This would be incredibly useful, though it might be good to have it limited to three pairs easily accessible on station by default, one in the Sec gear room, one for the HoS, and one for the detective. More could either be in the armory, or produced by mechanics

Reason being, I think if every officer had a pair available to them, they might be less inclined to coordinate over radio and PDA

True story, on another not goon server I somehow managed to set a security officer to arrest using sec glasses and watched one officer stun and handcuff another because "They were set to arrest"

They didn't check the "Major Crimes: Fart" until later.

I like the idea of sec goggles but maybe they could get some generic template crimes and then let them elaborate. E.g a menu that lets them choose from a list, or other. It's easy to flag someone as "Homicide" or "assault" and then elaborate later.

Assuming you can edit security records and not just view their status.


RE: [Feature] Security HUD - Dabir - 07-06-2016

(07-06-2016, 08:56 AM)ErikHanson Wrote:
(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 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

Hang on, isn't any nonzero value true?


RE: [Feature] Security HUD - Wire - 07-08-2016

(07-06-2016, 01:39 PM)Dabir Wrote: Hang on, isn't any nonzero value true?

It is, Erik was mistaken + high as balls. The rest of his stuff looks legit though.