mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
- Fixes issue 415. The problem with the moving of the syndicate shuttle was a condition bomb_set, not being properly set in all cases, where a bomb was timing. I added the setter for the bomb_set variable in nuclearbomb/process(). So if at least ONE nuke is ticking it means the bomb is set. The bomb_set variable gets reset in the appropriate places now. The places are if either the safety is enabled again or if the timer is disabled. Enabling the safety now automatically stops the timer. The timer cannot be enabled without the safety being off.
The condition that caused the bad result before this fix was if the timer was enabled before the safety was turned off. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4470 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
/obj/machinery/nuclearbomb/process()
|
||||
if (src.timing)
|
||||
bomb_set = 1 //So long as there is one nuke timing, it means one nuke is armed.
|
||||
src.timeleft--
|
||||
if (src.timeleft <= 0)
|
||||
explode()
|
||||
@@ -116,16 +117,24 @@
|
||||
if (href_list["timer"])
|
||||
if (src.timing == -1.0)
|
||||
return
|
||||
if (src.safety)
|
||||
usr << "\red The safety is still on."
|
||||
return
|
||||
src.timing = !( src.timing )
|
||||
if (src.timing)
|
||||
src.icon_state = "nuclearbomb2"
|
||||
if(!src.safety)
|
||||
bomb_set = 1//There can still be issues with this reseting when there are multiple bombs. Not a big deal tho for Nuke/N
|
||||
else
|
||||
bomb_set = 0
|
||||
else
|
||||
src.icon_state = "nuclearbomb1"
|
||||
bomb_set = 0
|
||||
if (href_list["safety"])
|
||||
src.safety = !( src.safety )
|
||||
if(safety)
|
||||
src.timing = 0
|
||||
bomb_set = 0
|
||||
if (href_list["anchor"])
|
||||
src.anchored = !( src.anchored )
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
Reference in New Issue
Block a user