Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Feature] Security HUD
#1
https://github.com/goonstation/goonstati...D?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.
Reply
#2
Can incarcerated people also get some kind of marker too?
Reply
#3
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)
Reply
#4
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
Reply
#5
(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?
Reply
#6
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.
Reply
#7
(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.
Reply
#8
I have implemented Erik's suggestions, though I'm unsure as to the reasoning behind them.
Reply
#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
#10
(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.
Reply
#11
(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.
Reply
#12
(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?
Reply
#13
(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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)