diff --git a/code/datums/wires/nuclearbomb.dm b/code/datums/wires/nuclearbomb.dm index 45485c6f272..47cce60e349 100644 --- a/code/datums/wires/nuclearbomb.dm +++ b/code/datums/wires/nuclearbomb.dm @@ -30,12 +30,14 @@ var/const/NUCLEARBOMB_WIRE_SAFETY = 4 if(NUCLEARBOMB_WIRE_TIMING) if(N.timing) spawn + message_admins("[key_name_admin(usr)] pulsed a nuclear bomb's detonation wire, causing it to explode (JMP)") N.explode() if(NUCLEARBOMB_WIRE_SAFETY) N.safety = !N.safety spawn(100) N.safety = !N.safety if(N.safety == 1) + set_security_level(N.previous_level) N.visible_message("\blue The [N] quiets down.") if(!N.lighthack) if (N.icon_state == "nuclearbomb2") @@ -49,6 +51,7 @@ var/const/NUCLEARBOMB_WIRE_SAFETY = 4 if(NUCLEARBOMB_WIRE_SAFETY) if(N.timing) spawn + message_admins("[key_name_admin(usr)] cut a nuclear bomb's timing wire, causing it to explode (JMP)") N.explode() if(NUCLEARBOMB_WIRE_TIMING) if(!N.lighthack) diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index a23d3c61d2e..4566c9d9d8f 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -6,21 +6,22 @@ var/bomb_set icon = 'icons/obj/stationobjs.dmi' icon_state = "nuclearbomb0" density = 1 - var/deployable = 0.0 - var/extended = 0.0 + var/deployable = 0 + var/extended = 0 var/lighthack = 0 - var/timeleft = 120.0 - var/timing = 0.0 + var/timeleft = 120 + var/timing = 0 var/r_code = "ADMIN" var/code = "" - var/yes_code = 0.0 - var/safety = 1.0 + var/yes_code = 0 + var/safety = 1 var/obj/item/weapon/disk/nuclear/auth = null var/removal_stage = 0 // 0 is no removal, 1 is covers removed, 2 is covers open, 3 is sealant open, 4 is unwrenched, 5 is removed from bolts. var/lastentered var/is_syndicate = 0 use_power = 0 unacidable = 1 + var/previous_level = "" var/datum/wires/nuclearbomb/wires = null /obj/machinery/nuclearbomb/syndicate @@ -30,6 +31,7 @@ var/bomb_set ..() r_code = "[rand(10000, 99999.0)]"//Creates a random code upon object spawn. wires = new/datum/wires/nuclearbomb(src) + previous_level = get_security_level() /obj/machinery/nuclearbomb/Destroy() qdel(wires) @@ -53,10 +55,12 @@ var/bomb_set panel_open = 1 overlays += image(icon, "npanel_open") user << "You unscrew the control panel of [src]." + playsound(src, 'sound/items/Screwdriver.ogg', 50, 1) else panel_open = 0 overlays -= image(icon, "npanel_open") user << "You screw the control panel of [src] back on." + playsound(src, 'sound/items/Screwdriver.ogg', 50, 1) else if (panel_open == 0) user << "[src] emits a buzzing noise, the panel staying locked in." @@ -64,6 +68,7 @@ var/bomb_set panel_open = 0 overlays -= image(icon, "npanel_open") user << "You screw the control panel of [src] back on." + playsound(src, 'sound/items/Screwdriver.ogg', 50, 1) flick("nuclearbombc", src) return @@ -281,16 +286,20 @@ var/bomb_set if(!lighthack) icon_state = "nuclearbomb2" if(!safety) - bomb_set = 1//There can still be issues with this resetting when there are multiple bombs. Not a big deal though for Nuke/N + message_admins("[key_name_admin(usr)] engaged a nuclear bomb (JMP)") + set_security_level("delta") + bomb_set = 1 //There can still be issues with this resetting when there are multiple bombs. Not a big deal though for Nuke/N else bomb_set = 0 else + set_security_level(previous_level) bomb_set = 0 if(!lighthack) icon_state = "nuclearbomb1" if (href_list["safety"]) safety = !(safety) if(safety) + set_security_level(previous_level) timing = 0 bomb_set = 0 if (href_list["anchor"]) @@ -299,12 +308,15 @@ var/bomb_set visible_message("\red \The [src] makes a highly unpleasant crunching noise. It looks like the anchoring bolts have been cut.") nanomanager.update_uis(src) return - - anchored = !(anchored) - if(anchored) - visible_message("\red With a steely snap, bolts slide out of [src] and anchor it to the flooring.") + + if(!isinspace()) + anchored = !(anchored) + if(anchored) + visible_message("\red With a steely snap, bolts slide out of [src] and anchor it to the flooring.") + else + visible_message("\red The anchoring bolts slide back into the depths of [src].") else - visible_message("\red The anchoring bolts slide back into the depths of [src].") + usr << "There is nothing to anchor to!" nanomanager.update_uis(src) diff --git a/nano/templates/nuclear_bomb.tmpl b/nano/templates/nuclear_bomb.tmpl index 0eb68e9bd8e..3536d17713f 100644 --- a/nano/templates/nuclear_bomb.tmpl +++ b/nano/templates/nuclear_bomb.tmpl @@ -20,7 +20,7 @@ Used In File(s): \code\game\gamemodes\nuclear\nuclearbomb.dm Timer: {{:helper.link('On', 'play', {'timer' : 1}, data.timer ? 'selected' : '')}}{{:helper.link('Off', 'stop', {'timer' : 0}, !data.timer ? 'selected' : '')}}
- Time: {{:helper.link('--', '', {'time' : -10}, data.time <= 60 ? 'disabled' : '')}}{{:helper.link('-', '', {'time' : -1}, data.time <= 60 ? 'disabled' : '')}} {{:data.time}} {{:helper.link('+', '', {'time' : 1})}}{{:helper.link('++', '', {'time' : 10})}} + Time: {{:helper.link('--', '', {'time' : -10}, data.time <= 120 ? 'disabled' : '')}}{{:helper.link('-', '', {'time' : -1}, data.time <= 120 ? 'disabled' : '')}} {{:data.time}} {{:helper.link('+', '', {'time' : 1})}}{{:helper.link('++', '', {'time' : 10})}}
{{else}}