Posts: 445 
	Threads: 68 
	Joined: Mar 2014
	
	 
 
	
		
		
		07-04-2016, 08:54 AM 
(This post was last modified: 07-05-2016, 03:37 PM by Grayshift. Edited 1 time in total.)
	
	 
	
		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.
	  
	
	
	
	
 
 
	
	
	
		
	Posts: 2,722 
	Threads: 143 
	Joined: Sep 2012
	
 BYOND Username: Powmonkey
	 
 
	
	
		Can incarcerated people also get some kind of marker too?
	 
	
	
	
	
 
 
	
	
	
		
	Posts: 770 
	Threads: 157 
	Joined: Jul 2015
	
 BYOND Username:  ErikHanson
	 
 
	
	
		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)
 
 
 
	 
	
	
	
	
 
 
	
	
	
		
	Posts: 5,856 
	Threads: 308 
	Joined: May 2014
	
	 
 
	
		
		
		07-04-2016, 10:38 AM 
(This post was last modified: 07-04-2016, 10:40 AM by Frank_Stein. Edited 1 time in total.)
	
	 
	
		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
	 
	
	
	
	
 
 
	
	
	
		
	Posts: 2,722 
	Threads: 143 
	Joined: Sep 2012
	
 BYOND Username: Powmonkey
	 
 
	
	
		 (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?
	  
	
	
	
	
 
 
	
	
	
		
	Posts: 5,856 
	Threads: 308 
	Joined: May 2014
	
	 
 
	
	
		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.
	 
	
	
	
	
 
 
	
	
	
		
	Posts: 2,722 
	Threads: 143 
	Joined: Sep 2012
	
 BYOND Username: Powmonkey
	 
 
	
	
		 (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.
	  
	
	
	
	
 
 
	
	
	
		
	Posts: 445 
	Threads: 68 
	Joined: Mar 2014
	
	 
 
	
	
		I have implemented Erik's suggestions, though I'm unsure as to the reasoning behind them.
	 
	
	
	
	
 
 
	
	
	
		
	Posts: 770 
	Threads: 157 
	Joined: Jul 2015
	
 BYOND Username:  ErikHanson
	 
 
	
	
		 (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
 
 
 
 
 
	 
	
	
	
	
 
 
	
	
	
		
	Posts: 2,722 
	Threads: 143 
	Joined: Sep 2012
	
 BYOND Username: Powmonkey
	 
 
	
		
		
		07-06-2016, 09:14 AM 
(This post was last modified: 07-06-2016, 09:14 AM by Noah Buttes. Edited 2 times in total.)
	
	 
	
		 (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.
	  
	
	
	
	
 
 
	
	
	
		
	Posts: 2,556 
	Threads: 120 
	Joined: Sep 2012
	
	 
 
	
		
		
		07-06-2016, 01:30 PM 
(This post was last modified: 07-06-2016, 09:27 PM by atomic1fire. Edited 2 times in total.)
	
	 
	
		 (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.
	  
	
	
	
	
 
 
	
	
	
		
	Posts: 699 
	Threads: 155 
	Joined: Sep 2013
	
	 
 
	
		
		
		07-06-2016, 01:39 PM 
(This post was last modified: 07-06-2016, 01:39 PM by Dabir. Edited 1 time in total.)
	
	 
	
		 (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?
	  
	
	
	
	
 
 
	
	
	
		
	Posts: 784 
	Threads: 45 
	Joined: Jan 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.
	  
	
	
	
	
 
 
	 
 |