diff --git a/code/game/machinery/announcement_system.dm b/code/game/machinery/announcement_system.dm
index 58031f0a3c..5b5c9bee34 100644
--- a/code/game/machinery/announcement_system.dm
+++ b/code/game/machinery/announcement_system.dm
@@ -177,6 +177,7 @@ GLOBAL_LIST_EMPTY(announcement_systems)
..(severity)
/obj/machinery/announcement_system/emag_act()
- if(!emagged)
- emagged = TRUE
- act_up()
+ if(emagged)
+ return
+ emagged = TRUE
+ act_up()
diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm
index ce81c1c6b7..f6ff372fbb 100644
--- a/code/game/machinery/buttons.dm
+++ b/code/game/machinery/buttons.dm
@@ -103,9 +103,12 @@
return ..()
/obj/machinery/button/emag_act(mob/user)
- req_access = list()
- req_one_access = list()
- playsound(src.loc, "sparks", 100, 1)
+ if(emagged)
+ return
+ req_access = null
+ req_one_access = null
+ playsound(src, "sparks", 100, 1)
+ emagged = TRUE
/obj/machinery/button/attack_ai(mob/user)
if(!panel_open)
diff --git a/code/game/machinery/computer/apc_control.dm b/code/game/machinery/computer/apc_control.dm
index a102c9bd8a..811a34f0ad 100644
--- a/code/game/machinery/computer/apc_control.dm
+++ b/code/game/machinery/computer/apc_control.dm
@@ -192,7 +192,7 @@
logs = list()
interact(usr) //Refresh the UI after a filter changes
-/obj/machinery/computer/apc_control/emag_act(mob/living/user)
+/obj/machinery/computer/apc_control/emag_act(mob/user)
if(emagged)
return
user.visible_message("You emag [src], disabling precise logging and allowing you to clear logs.")
diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm
index 0ad69125af..286de0bcb8 100644
--- a/code/game/machinery/computer/arcade.dm
+++ b/code/game/machinery/computer/arcade.dm
@@ -297,22 +297,23 @@
/obj/machinery/computer/arcade/battle/emag_act(mob/user)
- if(!emagged)
- temp = "If you die in the game, you die for real!"
- player_hp = 30
- player_mp = 10
- enemy_hp = 45
- enemy_mp = 20
- gameover = FALSE
- blocked = FALSE
+ if(emagged)
+ return
+ temp = "If you die in the game, you die for real!"
+ player_hp = 30
+ player_mp = 10
+ enemy_hp = 45
+ enemy_mp = 20
+ gameover = FALSE
+ blocked = FALSE
- emagged = TRUE
+ emagged = TRUE
- enemy_name = "Cuban Pete"
- name = "Outbomb Cuban Pete"
+ enemy_name = "Cuban Pete"
+ name = "Outbomb Cuban Pete"
- updateUsrDialog()
+ updateUsrDialog()
@@ -1041,12 +1042,13 @@
desc = "Learn how our ancestors got to Orion, and have fun in the process!"
/obj/machinery/computer/arcade/orion_trail/emag_act(mob/user)
- if(!emagged)
- to_chat(user, "You override the cheat code menu and skip to Cheat #[rand(1, 50)]: Realism Mode.")
- name = "The Orion Trail: Realism Edition"
- desc = "Learn how our ancestors got to Orion, and try not to die in the process!"
- newgame()
- emagged = TRUE
+ if(emagged)
+ return
+ to_chat(user, "You override the cheat code menu and skip to Cheat #[rand(1, 50)]: Realism Mode.")
+ name = "The Orion Trail: Realism Edition"
+ desc = "Learn how our ancestors got to Orion, and try not to die in the process!"
+ newgame()
+ emagged = TRUE
/mob/living/simple_animal/hostile/syndicate/ranged/orion
name = "Spaceport Security"
diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm
index 41e85cf626..ee4008b44b 100755
--- a/code/game/machinery/computer/communications.dm
+++ b/code/game/machinery/computer/communications.dm
@@ -398,12 +398,13 @@
return ..()
/obj/machinery/computer/communications/emag_act(mob/user)
- if(!emagged)
- src.emagged = TRUE
- if(authenticated == 1)
- authenticated = 2
- to_chat(user, "You scramble the communication routing circuits!")
- playsound(src, 'sound/machines/terminal_alert.ogg', 50, 0)
+ if(emagged)
+ return
+ emagged = TRUE
+ if(authenticated == 1)
+ authenticated = 2
+ to_chat(user, "You scramble the communication routing circuits!")
+ playsound(src, 'sound/machines/terminal_alert.ogg', 50, 0)
/obj/machinery/computer/communications/attack_hand(mob/user)
if(..())
@@ -459,7 +460,7 @@
dat += "
\[ Change Alert Level \]"
dat += "
\[ Emergency Maintenance Access \]"
dat += "
\[ Request Nuclear Authentication Codes \]"
- if(src.emagged == 0)
+ if(!emagged)
dat += "
\[ Send Message to Centcom \]"
else
dat += "
\[ Send Message to \[UNKNOWN\] \]"
diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm
index 4d08920195..26a7d3b729 100644
--- a/code/game/machinery/computer/message.dm
+++ b/code/game/machinery/computer/message.dm
@@ -40,21 +40,22 @@
return ..()
/obj/machinery/computer/message_monitor/emag_act(mob/user)
- if(!emagged)
- if(!isnull(src.linkedServer))
- emagged = TRUE
- screen = 2
- spark_system.set_up(5, 0, src)
- src.spark_system.start()
- var/obj/item/weapon/paper/monitorkey/MK = new/obj/item/weapon/paper/monitorkey
- MK.loc = src.loc
- // Will help make emagging the console not so easy to get away with.
- MK.info += "
�%@%(*$%&(�&?*(%&�/{}"
- var/time = 100 * length(src.linkedServer.decryptkey)
- addtimer(CALLBACK(src, .proc/UnmagConsole), time)
- message = rebootmsg
- else
- to_chat(user, "A no server error appears on the screen.")
+ if(emagged)
+ return
+ if(!isnull(src.linkedServer))
+ emagged = TRUE
+ screen = 2
+ spark_system.set_up(5, 0, src)
+ src.spark_system.start()
+ var/obj/item/weapon/paper/monitorkey/MK = new/obj/item/weapon/paper/monitorkey
+ MK.loc = src.loc
+ // Will help make emagging the console not so easy to get away with.
+ MK.info += "
�%@%(*$%&(�&?*(%&�/{}"
+ var/time = 100 * length(src.linkedServer.decryptkey)
+ addtimer(CALLBACK(src, .proc/UnmagConsole), time)
+ message = rebootmsg
+ else
+ to_chat(user, "A no server error appears on the screen.")
/obj/machinery/computer/message_monitor/Initialize()
..()
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index ef27815d99..35d021e80c 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -206,13 +206,14 @@
/obj/machinery/door/window/emag_act(mob/user)
if(!operating && density && !emagged)
+ emagged = TRUE
operating = TRUE
flick("[src.base_state]spark", src)
+ playsound(src, "sparks", 75, 1)
sleep(6)
operating = FALSE
desc += "
Its access panel is smoking slightly."
open()
- emagged = TRUE
/obj/machinery/door/window/attackby(obj/item/weapon/I, mob/living/user, params)
diff --git a/code/game/machinery/embedded_controller/access_controller.dm b/code/game/machinery/embedded_controller/access_controller.dm
index afa9283b95..c23f4d0ba8 100644
--- a/code/game/machinery/embedded_controller/access_controller.dm
+++ b/code/game/machinery/embedded_controller/access_controller.dm
@@ -27,12 +27,13 @@
findObjsByTag()
/obj/machinery/doorButtons/emag_act(mob/user)
- if(!emagged)
- emagged = TRUE
- req_access = list()
- req_one_access = list()
- playsound(src.loc, "sparks", 100, 1)
- to_chat(user, "You short out the access controller.")
+ if(emagged)
+ return
+ emagged = TRUE
+ req_access = list()
+ req_one_access = list()
+ playsound(src, "sparks", 100, 1)
+ to_chat(user, "You short out the access controller.")
/obj/machinery/doorButtons/proc/removeMe()
diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm
index 9977a6124e..8c5eb87965 100644
--- a/code/game/machinery/firealarm.dm
+++ b/code/game/machinery/firealarm.dm
@@ -78,12 +78,13 @@
..()
/obj/machinery/firealarm/emag_act(mob/user)
- if(!emagged)
- emagged = TRUE
- if(user)
- user.visible_message("Sparks fly out of the [src]!",
- "You emag [src], disabling its thermal sensors.")
- playsound(src.loc, 'sound/effects/sparks4.ogg', 50, 1)
+ if(emagged)
+ return
+ emagged = TRUE
+ if(user)
+ user.visible_message("Sparks fly out of the [src]!",
+ "You emag [src], disabling its thermal sensors.")
+ playsound(src, "sparks", 50, 1)
/obj/machinery/firealarm/temperature_expose(datum/gas_mixture/air, temperature, volume)
if(!emagged && detecting && !stat && (temperature > T0C + 200 || temperature < BODYTEMP_COLD_DAMAGE_LIMIT))
diff --git a/code/game/machinery/gulag_item_reclaimer.dm b/code/game/machinery/gulag_item_reclaimer.dm
index 7248bc92fd..af138cf3ac 100644
--- a/code/game/machinery/gulag_item_reclaimer.dm
+++ b/code/game/machinery/gulag_item_reclaimer.dm
@@ -25,9 +25,10 @@
return ..()
/obj/machinery/gulag_item_reclaimer/emag_act(mob/user)
- if(!emagged) // emagging lets anyone reclaim all the items
- req_access = list()
- emagged = TRUE
+ if(emagged) // emagging lets anyone reclaim all the items
+ return
+ req_access = list()
+ emagged = TRUE
/obj/machinery/gulag_item_reclaimer/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/card/id/prisoner))
diff --git a/code/game/machinery/limbgrower.dm b/code/game/machinery/limbgrower.dm
index 889c74bc54..60fd945a12 100644
--- a/code/game/machinery/limbgrower.dm
+++ b/code/game/machinery/limbgrower.dm
@@ -25,7 +25,6 @@
var/datum/research/files
var/selected_category
var/screen = 1
- var/emag = FALSE //Gives access to other cool stuff
var/list/categories = list(
"human",
@@ -178,7 +177,7 @@
dat += "
| [C] | " @@ -233,10 +232,10 @@ return dat /obj/machinery/limbgrower/emag_act(mob/user) - if(emag==TRUE) + if(emagged) return for(var/datum/design/D in files.possible_designs) if((D.build_type & LIMBGROWER) && ("special" in D.category)) files.AddDesign2Known(D) - to_chat(user, "A warning flashes onto the screen, stating that safety overrides have been deactivated") - emag = TRUE + to_chat(user, "A warning flashes onto the screen, stating that safety overrides have been deactivated!") + emagged = TRUE diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 8dd0d13b9e..3f5944c03e 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -282,15 +282,16 @@ return ..() /obj/machinery/porta_turret/emag_act(mob/user) - if(!emagged) - to_chat(user, "You short out [src]'s threat assessment circuits.") - visible_message("[src] hums oddly...") - emagged = TRUE - controllock = 1 - on = FALSE //turns off the turret temporarily - update_icon() - sleep(60) //6 seconds for the traitor to gtfo of the area before the turret decides to ruin his shit - on = TRUE //turns it back on. The cover popUp() popDown() are automatically called in process(), no need to define it here + if(emagged) + return + to_chat(user, "You short out [src]'s threat assessment circuits.") + visible_message("[src] hums oddly...") + emagged = TRUE + controllock = 1 + on = FALSE //turns off the turret temporarily + update_icon() + sleep(60) //6 seconds for the traitor to gtfo of the area before the turret decides to ruin his shit + on = TRUE //turns it back on. The cover popUp() popDown() are automatically called in process(), no need to define it here /obj/machinery/porta_turret/emp_act(severity) @@ -717,12 +718,13 @@ to_chat(user, "Access denied.") /obj/machinery/turretid/emag_act(mob/user) - if(!emagged) - to_chat(user, "You short out the turret controls' access analysis module.") - emagged = TRUE - locked = FALSE - if(user && user.machine == src) - attack_hand(user) + if(emagged) + return + to_chat(user, "You short out the turret controls' access analysis module.") + emagged = TRUE + locked = FALSE + if(user && user.machine == src) + attack_hand(user) /obj/machinery/turretid/attack_ai(mob/user) if(!ailock || IsAdminGhost(user)) diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index 6e04988be1..1c3ba36028 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -73,13 +73,14 @@ return ..() /obj/machinery/recycler/emag_act(mob/user) - if(!emagged) - emagged = TRUE - if(safety_mode) - safety_mode = FALSE - update_icon() - playsound(src.loc, "sparks", 75, 1, -1) - to_chat(user, "You use the cryptographic sequencer on the [src.name].") + if(emagged) + return + emagged = TRUE + if(safety_mode) + safety_mode = FALSE + update_icon() + playsound(src, "sparks", 75, 1, -1) + to_chat(user, "You use the cryptographic sequencer on the [src].") /obj/machinery/recycler/update_icon() ..() diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index 60342abaed..42fdb417ee 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -192,7 +192,6 @@ /obj/machinery/shieldgen/emag_act() if(!(stat & BROKEN)) stat |= BROKEN - obj_integrity = 0 update_icon() /obj/machinery/shieldgen/update_icon() diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm index 4981e51f20..e72e65f99a 100644 --- a/code/game/machinery/slotmachine.dm +++ b/code/game/machinery/slotmachine.dm @@ -101,12 +101,13 @@ return ..() /obj/machinery/computer/slot_machine/emag_act() - if(!emagged) - emagged = TRUE - var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() - spark_system.set_up(4, 0, src.loc) - spark_system.start() - playsound(src.loc, "sparks", 50, 1) + if(emagged) + return + emagged = TRUE + var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() + spark_system.set_up(4, 0, src.loc) + spark_system.start() + playsound(src, "sparks", 50, 1) /obj/machinery/computer/slot_machine/attack_hand(mob/living/user) . = ..() //Sanity checks. diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index a247f1e209..824aa30326 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -383,9 +383,10 @@ ..() /obj/machinery/vending/emag_act(mob/user) - if(!emagged) - emagged = 1 - to_chat(user, "You short out the product lock on [src].") + if(emagged) + return + emagged = TRUE + to_chat(user, "You short out the product lock on [src].") /obj/machinery/vending/attack_ai(mob/user) return attack_hand(user) diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index f7b0e9b877..a1aa38e91e 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -86,8 +86,8 @@ /obj/machinery/mecha_part_fabricator/emag_act() if(emagged) return - - emagged = FALSE + emagged = TRUE + req_access = null say("DB error \[Code 0x00F1\]") sleep(10) say("Attempting auto-repair...") @@ -95,8 +95,7 @@ say("User DB corrupted \[Code 0x00FA\]. Truncating data structure...") sleep(30) say("User DB truncated. Please contact your Nanotrasen system operator for future assistance.") - req_access = null - emagged = TRUE + /obj/machinery/mecha_part_fabricator/proc/output_parts_list(set_name) var/output = "" diff --git a/code/game/objects/items/devices/geiger_counter.dm b/code/game/objects/items/devices/geiger_counter.dm index 0691f2d822..c13df1da15 100644 --- a/code/game/objects/items/devices/geiger_counter.dm +++ b/code/game/objects/items/devices/geiger_counter.dm @@ -144,12 +144,13 @@ update_icon() /obj/item/device/geiger_counter/emag_act(mob/user) - if(!emagged) - if(scanning) - to_chat(user, "Turn off [src] before you perform this action!") - return 0 - to_chat(user, "You override [src]'s radiation storing protocols. It will now generate small doses of radiation, and stored rads are now projected into creatures you scan.") - emagged = TRUE + if(emagged) + return + if(scanning) + to_chat(user, "Turn off [src] before you perform this action!") + return 0 + to_chat(user, "You override [src]'s radiation storing protocols. It will now generate small doses of radiation, and stored rads are now projected into creatures you scan.") + emagged = TRUE #undef RAD_LEVEL_NORMAL #undef RAD_LEVEL_MODERATE diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index 4f2508bff4..1f0177e48e 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -148,8 +148,9 @@ to_chat(user, "You fill \the [src] with lights from \the [S]. " + status_string() + "") /obj/item/device/lightreplacer/emag_act() - if(!emagged) - Emag() + if(emagged) + return + Emag() /obj/item/device/lightreplacer/attack_self(mob/user) to_chat(user, status_string()) diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index d07153810f..f10bd13fd6 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -18,6 +18,8 @@ return voicespan /obj/item/device/megaphone/emag_act(mob/user) + if(emagged) + return to_chat(user, "You overload \the [src]'s voice synthesizer.") emagged = TRUE voicespan = list(SPAN_REALLYBIG, "userdanger") diff --git a/code/game/objects/items/weapons/storage/lockbox.dm b/code/game/objects/items/weapons/storage/lockbox.dm index 66a6661a0d..59e1a8c877 100644 --- a/code/game/objects/items/weapons/storage/lockbox.dm +++ b/code/game/objects/items/weapons/storage/lockbox.dm @@ -56,6 +56,7 @@ if(user) visible_message("\The [src] has been broken by [user] with an electromagnetic card!") return + /obj/item/weapon/storage/lockbox/show_to(mob/user) if(locked) to_chat(user, "It's locked!") diff --git a/code/game/objects/structures/barsigns.dm b/code/game/objects/structures/barsigns.dm index bd9fe8be2f..1eb67449da 100644 --- a/code/game/objects/structures/barsigns.dm +++ b/code/game/objects/structures/barsigns.dm @@ -118,13 +118,11 @@ if(broken || emagged) to_chat(user, "Nothing interesting happens!") return + emagged = TRUE + req_access = list(GLOB.access_syndicate) to_chat(user, "You emag the barsign. Takeover in progress...") sleep(100) //10 seconds set_sign(new /datum/barsign/hiddensigns/syndibarsign) - emagged = TRUE - req_access = list(GLOB.access_syndicate) - - /obj/structure/sign/barsign/proc/pick_sign() diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 1d0bc26818..17d6b7bf24 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -415,7 +415,7 @@ user.visible_message("Sparks fly from [src]!", "You scramble [src]'s lock, breaking it open!", "You hear a faint electrical spark.") - playsound(src.loc, 'sound/effects/sparks4.ogg', 50, 1) + playsound(src, "sparks", 50, 1) broken = 1 locked = FALSE update_icon() diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index c61212671c..7e968160c2 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -714,8 +714,8 @@ if(emagged) return emagged = TRUE - visible_message("Sparks fly out of the [src]!", "You emag the [src], disabling its safeties.") - playsound(src.loc, 'sound/effects/sparks4.ogg', 50, 1) + visible_message("Sparks fly out of [src]!", "You emag [src], disabling its safeties.") + playsound(src, "sparks", 50, 1) /obj/machinery/airalarm/obj_break(damage_flag) ..() diff --git a/code/modules/cargo/console.dm b/code/modules/cargo/console.dm index 82a42f8f05..e21f9b7ed2 100644 --- a/code/modules/cargo/console.dm +++ b/code/modules/cargo/console.dm @@ -24,18 +24,19 @@ contraband = board.contraband emagged = board.emagged -/obj/machinery/computer/cargo/emag_act(mob/living/user) - if(!emagged) - user.visible_message("[user] swipes a suspicious card through [src]!", - "You adjust [src]'s routing and receiver spectrum, unlocking special supplies and contraband.") +/obj/machinery/computer/cargo/emag_act(mob/user) + if(emagged) + return + user.visible_message("[user] swipes a suspicious card through [src]!", + "You adjust [src]'s routing and receiver spectrum, unlocking special supplies and contraband.") - emagged = TRUE - contraband = TRUE + emagged = TRUE + contraband = TRUE - // This also permamently sets this on the circuit board - var/obj/item/weapon/circuitboard/computer/cargo/board = circuit - board.contraband = TRUE - board.emagged = TRUE + // This also permamently sets this on the circuit board + var/obj/item/weapon/circuitboard/computer/cargo/board = circuit + board.contraband = TRUE + board.emagged = TRUE /obj/machinery/computer/cargo/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index 8b4e3f0fbd..e50835a74c 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -18,15 +18,17 @@ H.remove_hud_from(user) /obj/item/clothing/glasses/hud/emp_act(severity) - if(emagged == 0) - emagged = TRUE - desc = "[desc] The display is flickering slightly." + if(emagged) + return + emagged = TRUE + desc = "[desc] The display is flickering slightly." /obj/item/clothing/glasses/hud/emag_act(mob/user) - if(emagged == 0) - emagged = TRUE - to_chat(user, "PZZTTPFFFT") - desc = "[desc] The display is flickering slightly." + if(emagged) + return + emagged = TRUE + to_chat(user, "PZZTTPFFFT") + desc = "[desc] The display is flickering slightly." /obj/item/clothing/glasses/hud/health name = "health scanner HUD" diff --git a/code/modules/holodeck/computer.dm b/code/modules/holodeck/computer.dm index 960ba6497d..b03c55e97a 100644 --- a/code/modules/holodeck/computer.dm +++ b/code/modules/holodeck/computer.dm @@ -154,7 +154,7 @@ if(!LAZYLEN(emag_programs)) to_chat(user, "[src] does not seem to have a card swipe port. It must be an inferior model.") return - playsound(src, 'sound/effects/sparks4.ogg', 75, 1) + playsound(src, "sparks", 75, 1) emagged = TRUE to_chat(user, "You vastly increase projector power and override the safety and security protocols.") to_chat(user, "Warning. Automatic shutoff and derezing protocols have been corrupted. Please call Nanotrasen maintenance and do not use the simulator.") diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 9355b7b9ef..c96ca72b26 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -169,7 +169,7 @@ /mob/living/simple_animal/bot/emag_act(mob/user) if(locked) //First emag application unlocks the bot's interface. Apply a screwdriver to use the emag again. locked = FALSE - emagged = TRUE + emagged = 1 to_chat(user, "You bypass [src]'s controls.") return if(!locked && open) //Bot panel is unlocked by ID or emag, and the panel is screwed open. Ready for emagging. diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index a0399d2b2c..2a9e52de56 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -245,6 +245,7 @@ to_chat(user, "You short out [src]'s reagent synthesis circuits.") audible_message("[src] buzzes oddly!") flick("medibot_spark", src) + playsound(src, "sparks", 75, 1) if(user) oldpatient = user diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index d6c8eb5cd6..158b86aae7 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -119,7 +119,7 @@ locked = !locked to_chat(user, "You [locked ? "lock" : "unlock"] the [src]'s controls!") flick("mulebot-emagged", src) - playsound(loc, 'sound/effects/sparks1.ogg', 100, 0) + playsound(src, "sparks", 100, 0) /mob/living/simple_animal/bot/mulebot/update_icon() if(open) diff --git a/code/modules/ninja/suit/ninjaDrainAct.dm b/code/modules/ninja/suit/ninjaDrainAct.dm index 2577f84a98..2ad2d7b4cb 100644 --- a/code/modules/ninja/suit/ninjaDrainAct.dm +++ b/code/modules/ninja/suit/ninjaDrainAct.dm @@ -52,6 +52,7 @@ They *could* go in their appropriate files, but this is supposed to be modular if(!emagged) flick("apc-spark", G) + playsound(loc, "sparks", 50, 1) emagged = TRUE locked = FALSE update_icon() diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index a6ba729eed..c6409c28e3 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -612,6 +612,7 @@ to_chat(user, "Nothing happens!") else flick("apc-spark", src) + playsound(src, "sparks", 75, 1) emagged = TRUE locked = FALSE to_chat(user, "You emag the APC interface.") diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 40d5222a28..c5fcc2b018 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -216,9 +216,10 @@ return ..() /obj/machinery/power/port_gen/pacman/emag_act(mob/user) - if(!emagged) - emagged = TRUE - emp_act(EMP_HEAVY) + if(emagged) + return + emagged = TRUE + emp_act(EMP_HEAVY) /obj/machinery/power/port_gen/pacman/attack_hand(mob/user) ..() diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 152989dc15..1b7b8a1b3f 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -342,11 +342,12 @@ return ..() /obj/machinery/power/emitter/emag_act(mob/user) - if(!emagged) - locked = FALSE - emagged = TRUE - if(user) - user.visible_message("[user.name] emags the [src.name].","You short out the lock.") + if(emagged) + return + locked = FALSE + emagged = TRUE + if(user) + user.visible_message("[user.name] emags the [src].","You short out the lock.") /obj/machinery/power/emitter/prototype diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm index 2e46b50f31..72a0b2ea8d 100644 --- a/code/modules/projectiles/pins.dm +++ b/code/modules/projectiles/pins.dm @@ -39,9 +39,10 @@ to_chat(user, "This firearm already has a firing pin installed.") /obj/item/device/firing_pin/emag_act(mob/user) - if(!emagged) - emagged = TRUE - to_chat(user, "You override the authentication mechanism.") + if(emagged) + return + emagged = TRUE + to_chat(user, "You override the authentication mechanism.") /obj/item/device/firing_pin/proc/gun_insert(mob/living/user, obj/item/weapon/gun/G) gun = G diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 4826ecaeb1..e2d8a64958 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -150,10 +150,11 @@ won't update every console in existence) but it's more of a hassle to do. Also, /obj/machinery/computer/rdconsole/emag_act(mob/user) - if(!emagged) - playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) - emagged = TRUE - to_chat(user, "You disable the security protocols") + if(emagged) + return + playsound(src, "sparks", 75, 1) + emagged = TRUE + to_chat(user, "You disable the security protocols") /obj/machinery/computer/rdconsole/Topic(href, href_list) if(..()) diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index 67123a7575..959818836d 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -316,10 +316,11 @@ src.updateUsrDialog() /obj/machinery/computer/rdservercontrol/emag_act(mob/user) - if(!emagged) - playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) - emagged = TRUE - to_chat(user, "You you disable the security protocols.") + if(emagged) + return + playsound(src, "sparks", 75, 1) + emagged = TRUE + to_chat(user, "You you disable the security protocols.") /obj/machinery/r_n_d/server/robotics name = "Robotics R&D Server" diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 9b60a27ecc..179f1e7d0a 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -72,8 +72,9 @@ to_chat(usr, "Unable to comply.") /obj/machinery/computer/shuttle/emag_act(mob/user) - if(!emagged) - src.req_access = list() - emagged = TRUE - to_chat(user, "You fried the consoles ID checking system.") + if(emagged) + return + req_access = null + emagged = TRUE + to_chat(user, "You fried the consoles ID checking system.") diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index 51552294d6..20bb1aa462 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -448,9 +448,10 @@ return /obj/machinery/computer/shuttle/pod/emag_act(mob/user) - if(!emagged) - emagged = TRUE - to_chat(user, "You fry the pod's alert level checking system.") + if(emagged) + return + emagged = TRUE + to_chat(user, "You fry the pod's alert level checking system.") /obj/docking_port/stationary/random name = "escape pod" diff --git a/code/modules/station_goals/shield.dm b/code/modules/station_goals/shield.dm index f9f24a4fb4..1543f7615a 100644 --- a/code/modules/station_goals/shield.dm +++ b/code/modules/station_goals/shield.dm @@ -176,7 +176,8 @@ change_meteor_chance(0.5) /obj/machinery/satellite/meteor_shield/emag_act() - if(!emagged) - emagged = TRUE - if(active) - change_meteor_chance(2) + if(emagged) + return + emagged = TRUE + if(active) + change_meteor_chance(2)