diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 48596a0b6d..dbdcd3c6d0 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -375,7 +375,7 @@ SEND_SIGNAL(src, COMSIG_ATOM_ACID_ACT, acidpwr, acid_volume) /atom/proc/emag_act() - SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) + return SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) /atom/proc/rad_act(strength) SEND_SIGNAL(src, COMSIG_ATOM_RAD_ACT, strength) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index aa363428fb..76ea855c77 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -193,8 +193,10 @@ to_chat(usr, "Chem System Re-route detected, results may not be as expected!") /obj/machinery/sleeper/emag_act(mob/user) + . = ..() scramble_chem_buttons() to_chat(user, "You scramble the sleeper's user interface!") + return TRUE /obj/machinery/sleeper/proc/inject_chem(chem, mob/user) if((chem in available_chems) && chem_allowed(chem)) diff --git a/code/game/machinery/announcement_system.dm b/code/game/machinery/announcement_system.dm index 959bcfab4d..91b56a037f 100644 --- a/code/game/machinery/announcement_system.dm +++ b/code/game/machinery/announcement_system.dm @@ -177,7 +177,9 @@ GLOBAL_LIST_EMPTY(announcement_systems) act_up() /obj/machinery/announcement_system/emag_act() + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED act_up() + return TRUE diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index 879be046c9..968cbe7254 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -101,12 +101,14 @@ return ..() /obj/machinery/button/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return req_access = list() req_one_access = list() playsound(src, "sparks", 100, 1) obj_flags |= EMAGGED + return TRUE /obj/machinery/button/attack_ai(mob/user) if(!panel_open) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index d3b5e53a1b..3d528c9866 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -327,10 +327,12 @@ return ..() /obj/machinery/clonepod/emag_act(mob/user) + . = ..() if(!occupant) return to_chat(user, "You corrupt the genetic compiler.") malfunction() + return TRUE //Put messages in the connected computer's temp var for display. /obj/machinery/clonepod/proc/connected_message(message) diff --git a/code/game/machinery/computer/apc_control.dm b/code/game/machinery/computer/apc_control.dm index e51d623c2f..1c517d6e8f 100644 --- a/code/game/machinery/computer/apc_control.dm +++ b/code/game/machinery/computer/apc_control.dm @@ -185,15 +185,19 @@ ui_interact(usr) //Refresh the UI after a filter changes /obj/machinery/computer/apc_control/emag_act(mob/user) + . = ..() if(!authenticated) to_chat(user, "You bypass [src]'s access requirements using your emag.") authenticated = TRUE log_activity("logged in") - else if(!(obj_flags & EMAGGED)) + else + if(obj_flags & EMAGGED) + return user.visible_message("You emag [src], disabling precise logging and allowing you to clear logs.") log_game("[key_name(user)] emagged [src] at [AREACOORD(src)], disabling operator tracking.") obj_flags |= EMAGGED - playsound(src, "sparks", 50, 1) + playsound(src, "sparks", 50, 1) + return TRUE /obj/machinery/computer/apc_control/proc/log_activity(log_text) var/op_string = operator && !(obj_flags & EMAGGED) ? operator : "\[NULL OPERATOR\]" diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 1f262c0979..7b47dfdffe 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -292,6 +292,7 @@ /obj/machinery/computer/arcade/battle/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return to_chat(user, "A mesmerizing Rhumba beat starts playing from the arcade machine's speakers!") @@ -310,6 +311,7 @@ updateUsrDialog() + return TRUE @@ -1049,6 +1051,7 @@ 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(obj_flags & EMAGGED) return to_chat(user, "You override the cheat code menu and skip to Cheat #[rand(1, 50)]: Realism Mode.") @@ -1056,6 +1059,7 @@ desc = "Learn how our ancestors got to Orion, and try not to die in the process!" newgame() obj_flags |= EMAGGED + return TRUE /mob/living/simple_animal/hostile/syndicate/ranged/smg/orion name = "spaceport security" diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 43f5b96fbd..9a3d9d15d5 100755 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -431,6 +431,7 @@ return ..() /obj/machinery/computer/communications/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED @@ -439,6 +440,7 @@ authenticated = 2 to_chat(user, "You scramble the communication routing circuits!") playsound(src, 'sound/machines/terminal_alert.ogg', 50, 0) + return TRUE /obj/machinery/computer/communications/ui_interact(mob/user) . = ..() diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 0183fcecd4..9b4dee15a1 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1280,20 +1280,23 @@ return !density || (check_access(ID) && !locked && hasPower()) /obj/machinery/door/airlock/emag_act(mob/user) - if(!operating && density && hasPower() && !(obj_flags & EMAGGED)) - operating = TRUE - update_icon(AIRLOCK_EMAG, 1) - sleep(6) - if(QDELETED(src)) - return - operating = FALSE - if(!open()) - update_icon(AIRLOCK_CLOSED, 1) - obj_flags |= EMAGGED - lights = FALSE - locked = TRUE - loseMainPower() - loseBackupPower() + . = ..() + if(operating || !density || !hasPower() || obj_flags & EMAGGED) + return + operating = TRUE + update_icon(AIRLOCK_EMAG, 1) + addtimer(CALLBACK(src, .proc/open_sesame), 6) + return TRUE + +/obj/machinery/door/airlock/proc/open_sesame() + operating = FALSE + if(!open()) + update_icon(AIRLOCK_CLOSED, 1) + obj_flags |= EMAGGED + lights = FALSE + locked = TRUE + loseMainPower() + loseBackupPower() /obj/machinery/door/airlock/attack_alien(mob/living/carbon/alien/humanoid/user) add_fingerprint(user) diff --git a/code/game/machinery/doors/unpowered.dm b/code/game/machinery/doors/unpowered.dm index 2e7e7d5cba..702f700617 100644 --- a/code/game/machinery/doors/unpowered.dm +++ b/code/game/machinery/doors/unpowered.dm @@ -13,9 +13,6 @@ else return ..() -/obj/machinery/door/unpowered/emag_act() - return - /obj/machinery/door/unpowered/shuttle icon = 'icons/turf/shuttle.dmi' name = "door" diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 97ab664b85..a561a1b029 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -206,15 +206,19 @@ ..() /obj/machinery/door/window/emag_act(mob/user) - if(!operating && density && !(obj_flags & EMAGGED)) - obj_flags |= EMAGGED - 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(2) + . = ..() + if(operating || !density || obj_flags & EMAGGED) + return + obj_flags |= EMAGGED + operating = TRUE + flick("[src.base_state]spark", src) + playsound(src, "sparks", 75, 1) + addtimer(CALLBACK(src, .proc/open_windows_me), 6) + +/obj/machinery/door/window/proc/open_windows_me() + operating = FALSE + desc += "
Its access panel is smoking slightly." + open(2) /obj/machinery/door/window/attackby(obj/item/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 70ce3d36ae..3b9322d207 100644 --- a/code/game/machinery/embedded_controller/access_controller.dm +++ b/code/game/machinery/embedded_controller/access_controller.dm @@ -26,6 +26,7 @@ findObjsByTag() /obj/machinery/doorButtons/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED @@ -33,6 +34,7 @@ req_one_access = list() playsound(src, "sparks", 100, 1) to_chat(user, "You short out the access controller.") + return TRUE /obj/machinery/doorButtons/proc/removeMe() diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index 8f0d56a49e..5c2676c2b9 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -97,6 +97,7 @@ alarm() /obj/machinery/firealarm/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED @@ -104,6 +105,7 @@ user.visible_message("Sparks fly out of [src]!", "You emag [src], disabling its thermal sensors.") playsound(src, "sparks", 50, 1) + return TRUE /obj/machinery/firealarm/temperature_expose(datum/gas_mixture/air, temperature, volume) if((temperature > T0C + 200 || temperature < BODYTEMP_COLD_DAMAGE_LIMIT) && (last_alarm+FIREALARM_COOLDOWN < world.time) && !(obj_flags & EMAGGED) && detecting && !stat) diff --git a/code/game/machinery/gulag_item_reclaimer.dm b/code/game/machinery/gulag_item_reclaimer.dm index c955edbcd0..8127c5c3a7 100644 --- a/code/game/machinery/gulag_item_reclaimer.dm +++ b/code/game/machinery/gulag_item_reclaimer.dm @@ -24,10 +24,12 @@ return ..() /obj/machinery/gulag_item_reclaimer/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) // emagging lets anyone reclaim all the items return req_access = list() obj_flags |= EMAGGED + return TRUE /obj/machinery/gulag_item_reclaimer/attackby(obj/item/I, mob/user) if(istype(I, /obj/item/card/id/prisoner)) diff --git a/code/game/machinery/harvester.dm b/code/game/machinery/harvester.dm index 1f40672e05..37921ee158 100644 --- a/code/game/machinery/harvester.dm +++ b/code/game/machinery/harvester.dm @@ -158,11 +158,13 @@ open_machine() /obj/machinery/harvester/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED allow_living = TRUE to_chat(user, "You overload [src]'s lifesign scanners.") + return TRUE /obj/machinery/harvester/container_resist(mob/living/user) if(!harvesting) diff --git a/code/game/machinery/limbgrower.dm b/code/game/machinery/limbgrower.dm index 8a0658fd0f..5beb2f3ced 100644 --- a/code/game/machinery/limbgrower.dm +++ b/code/game/machinery/limbgrower.dm @@ -216,6 +216,7 @@ return dat /obj/machinery/limbgrower/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return for(var/id in SSresearch.techweb_designs) @@ -224,3 +225,4 @@ stored_research.add_design(D) to_chat(user, "A warning flashes onto the screen, stating that safety overrides have been deactivated!") obj_flags |= EMAGGED + return ..() diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 911bb76bda..ecb24d9b43 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -290,6 +290,7 @@ return ..() /obj/machinery/porta_turret/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return to_chat(user, "You short out [src]'s threat assessment circuits.") @@ -300,6 +301,7 @@ 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 + return TRUE /obj/machinery/porta_turret/emp_act(severity) @@ -837,6 +839,7 @@ to_chat(user, "Access denied.") /obj/machinery/turretid/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return to_chat(user, "You short out the turret controls' access analysis module.") @@ -844,6 +847,7 @@ locked = FALSE if(user && user.machine == src) attack_hand(user) + return TRUE /obj/machinery/turretid/attack_ai(mob/user) if(!ailock || IsAdminGhost(user)) diff --git a/code/game/machinery/porta_turret/portable_turret_cover.dm b/code/game/machinery/porta_turret/portable_turret_cover.dm index 6ff795c1cc..afb00d4ee2 100644 --- a/code/game/machinery/porta_turret/portable_turret_cover.dm +++ b/code/game/machinery/porta_turret/portable_turret_cover.dm @@ -86,10 +86,13 @@ . = 0 /obj/machinery/porta_turret_cover/emag_act(mob/user) - if(!(parent_turret.obj_flags & EMAGGED)) - to_chat(user, "You short out [parent_turret]'s threat assessment circuits.") - visible_message("[parent_turret] hums oddly...") - parent_turret.obj_flags |= EMAGGED - parent_turret.on = 0 - spawn(40) - parent_turret.on = 1 + . = ..() + if(parent_turret.obj_flags & EMAGGED) + return + to_chat(user, "You short out [parent_turret]'s threat assessment circuits.") + visible_message("[parent_turret] hums oddly...") + parent_turret.obj_flags |= EMAGGED + parent_turret.on = 0 + spawn(40) + parent_turret.on = 1 + return TRUE diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index ff40a8539a..9d431487e0 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -65,6 +65,7 @@ return ..() /obj/machinery/recycler/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED @@ -73,6 +74,7 @@ update_icon() playsound(src, "sparks", 75, 1, -1) to_chat(user, "You use the cryptographic sequencer on [src].") + return TRUE /obj/machinery/recycler/update_icon() ..() diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index e2aebd2370..fc6577a4f1 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -195,6 +195,7 @@ return ..() /obj/machinery/shieldgen/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) to_chat(user, "The access controller is damaged!") return @@ -202,6 +203,7 @@ locked = FALSE playsound(src, "sparks", 100, 1) to_chat(user, "You short out the access controller.") + return TRUE /obj/machinery/shieldgen/update_icon() if(active) @@ -387,6 +389,7 @@ add_fingerprint(user) /obj/machinery/shieldwallgen/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) to_chat(user, "The access controller is damaged!") return @@ -394,6 +397,7 @@ locked = FALSE playsound(src, "sparks", 100, 1) to_chat(user, "You short out the access controller.") + return TRUE //////////////Containment Field START /obj/machinery/shieldwall diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm index 298587cdea..4b73032a8a 100644 --- a/code/game/machinery/slotmachine.dm +++ b/code/game/machinery/slotmachine.dm @@ -99,6 +99,7 @@ return ..() /obj/machinery/computer/slot_machine/emag_act() + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED @@ -106,6 +107,7 @@ spark_system.set_up(4, 0, src.loc) spark_system.start() playsound(src, "sparks", 50, 1) + return TRUE /obj/machinery/computer/slot_machine/ui_interact(mob/living/user) . = ..() diff --git a/code/game/machinery/telecomms/computers/message.dm b/code/game/machinery/telecomms/computers/message.dm index b11c6c102d..ebb40148d8 100644 --- a/code/game/machinery/telecomms/computers/message.dm +++ b/code/game/machinery/telecomms/computers/message.dm @@ -42,21 +42,23 @@ return ..() /obj/machinery/computer/message_monitor/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return - if(!isnull(linkedServer)) - obj_flags |= EMAGGED - screen = 2 - spark_system.set_up(5, 0, src) - spark_system.start() - var/obj/item/paper/monitorkey/MK = new(loc, linkedServer) - // Will help make emagging the console not so easy to get away with. - MK.info += "

�%@%(*$%&(�&?*(%&�/{}" - var/time = 100 * length(linkedServer.decryptkey) - addtimer(CALLBACK(src, .proc/UnmagConsole), time) - message = rebootmsg - else + if(isnull(linkedServer)) to_chat(user, "A no server error appears on the screen.") + return + obj_flags |= EMAGGED + screen = 2 + spark_system.set_up(5, 0, src) + spark_system.start() + var/obj/item/paper/monitorkey/MK = new(loc, linkedServer) + // Will help make emagging the console not so easy to get away with. + MK.info += "

�%@%(*$%&(�&?*(%&�/{}" + var/time = 100 * length(linkedServer.decryptkey) + addtimer(CALLBACK(src, .proc/UnmagConsole), time) + message = rebootmsg + return TRUE /obj/machinery/computer/message_monitor/New() . = ..() diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 01e304872f..e1dc80911f 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -64,10 +64,15 @@ /obj/machinery/mecha_part_fabricator/emag_act() + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED req_access = list() + INVOKE_ASYNC(src, .proc/error_action_sucessful) + return TRUE + +/obj/machinery/mecha_part_fabricator/proc/error_action_sucessful() say("DB error \[Code 0x00F1\]") sleep(10) say("Attempting auto-repair...") diff --git a/code/game/objects/items/RSF.dm b/code/game/objects/items/RSF.dm index f0d15cc3a2..01205ee889 100644 --- a/code/game/objects/items/RSF.dm +++ b/code/game/objects/items/RSF.dm @@ -134,12 +134,14 @@ RSF return /obj/item/cookiesynth/emag_act(mob/user) + . = ..() obj_flags ^= EMAGGED if(obj_flags & EMAGGED) to_chat(user, "You short out [src]'s reagent safety checker!") else to_chat(user, "You reset [src]'s reagent safety checker!") - toxin = 0 + toxin = FALSE + return TRUE /obj/item/cookiesynth/attack_self(mob/user) var/mob/living/silicon/robot/P = null diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index 30b1ca3399..96f5dae14c 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -93,8 +93,9 @@ /obj/item/card/emag/afterattack(atom/target, mob/user, proximity) . = ..() var/atom/A = target - if(!proximity && prox_check) + if(!proximity && prox_check || !(isobj(A) || issilicon(A) || isbot(A) || isdrone(A))) return + //Citadel changes: modular code misfiring, so we're bypassing into main code. if(!uses) user.visible_message("[src] emits a weak spark. It's burnt out!") @@ -103,24 +104,22 @@ else if(uses <= 3) playsound(src, 'sound/effects/light_flicker.ogg', 30, 1) //Tiiiiiiny warning sound to let ya know your emag's almost dead - if(isturf(A)) - return if(istype(A,/obj/item/storage/lockbox)) - A.emag_act(user) + if(!A.emag_act(user)) + return uses = max(uses - 1, 0) if(!uses) user.visible_message("[src] fizzles and sparks. It seems like it's out of charges.") playsound(src, 'sound/effects/light_flicker.ogg', 100, 1) + return if(istype(A,/obj/item/storage)) return - if(!(isobj(A) || issilicon(A) || isbot(A) || isdrone(A))) + if(!A.emag_act(user)) return - else - A.emag_act(user) - uses = max(uses - 1, 0) - if(!uses) - user.visible_message("[src] fizzles and sparks. It seems like it's out of charges.") - playsound(src, 'sound/effects/light_flicker.ogg', 100, 1) + uses = max(uses - 1, 0) + if(!uses) + user.visible_message("[src] fizzles and sparks. It seems like it's out of charges.") + playsound(src, 'sound/effects/light_flicker.ogg', 100, 1) /obj/item/card/emagfake diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm index 1ad7974fc1..f00b760e1c 100644 --- a/code/game/objects/items/cigs_lighters.dm +++ b/code/game/objects/items/cigs_lighters.dm @@ -325,7 +325,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM list_reagents = list("space_drugs" = 15, "lipolicide" = 35) /obj/item/clothing/mask/cigarette/rollie/mindbreaker - list_reagents = list("mindbreaker" = 35, "lipolicide" = 15) + list_reagents = list("mindbreaker" = 35, "lipolicide" = 15) /obj/item/cigbutt/roach name = "roach" @@ -771,20 +771,22 @@ CIGARETTE PACKETS ARE IN FANCY.DM /obj/item/clothing/mask/vape/emag_act(mob/user)// I WON'T REGRET WRITTING THIS, SURLY. - if(screw) - if(!(obj_flags & EMAGGED)) - cut_overlays() - obj_flags |= EMAGGED - super = 0 - to_chat(user, "You maximize the voltage of [src].") - add_overlay("vapeopen_high") - var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread //for effect - sp.set_up(5, 1, src) - sp.start() - else - to_chat(user, "[src] is already emagged!") - else + . = ..() + if(!screw) to_chat(user, "You need to open the cap to do that.") + return + if(obj_flags & EMAGGED) + to_chat(user, "[src] is already emagged!") + return + cut_overlays() + obj_flags |= EMAGGED + super = 0 + to_chat(user, "You maximize the voltage of [src].") + add_overlay("vapeopen_high") + var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread //for effect + sp.set_up(5, 1, src) + sp.start() + return TRUE /obj/item/clothing/mask/vape/attack_self(mob/user) if(reagents.total_volume > 0) diff --git a/code/game/objects/items/circuitboards/computer_circuitboards.dm b/code/game/objects/items/circuitboards/computer_circuitboards.dm index 26f00c730e..5c1218d825 100644 --- a/code/game/objects/items/circuitboards/computer_circuitboards.dm +++ b/code/game/objects/items/circuitboards/computer_circuitboards.dm @@ -208,10 +208,13 @@ to_chat(user, "The spectrum chip is unresponsive.") /obj/item/circuitboard/computer/cargo/emag_act(mob/living/user) - if(!(obj_flags & EMAGGED)) - contraband = TRUE - obj_flags |= EMAGGED - to_chat(user, "You adjust [src]'s routing and receiver spectrum, unlocking special supplies and contraband.") + . = ..() + if(obj_flags & EMAGGED) + return + contraband = TRUE + obj_flags |= EMAGGED + to_chat(user, "You adjust [src]'s routing and receiver spectrum, unlocking special supplies and contraband.") + return TRUE /obj/item/circuitboard/computer/cargo/express name = "Express Supply Console (Computer Board)" @@ -225,8 +228,12 @@ obj_flags &= ~EMAGGED /obj/item/circuitboard/computer/cargo/express/emag_act(mob/living/user) - to_chat(user, "You change the routing protocols, allowing the Drop Pod to land anywhere on the station.") - obj_flags |= EMAGGED + . = SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) + if(obj_flags & EMAGGED) + return + to_chat(user, "You change the routing protocols, allowing the Drop Pod to land anywhere on the station.") + obj_flags |= EMAGGED + return TRUE /obj/item/circuitboard/computer/cargo/request name = "Supply Request Console (Computer Board)" diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index ba4a0ffae8..09d754b237 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -140,12 +140,10 @@ return ..() /obj/item/defibrillator/emag_act(mob/user) - if(safety) - safety = FALSE - to_chat(user, "You silently disable [src]'s safety protocols with the cryptographic sequencer.") - else - safety = TRUE - to_chat(user, "You silently enable [src]'s safety protocols with the cryptographic sequencer.") + . = ..() + safety = !safety + to_chat(user, "You silently [safety ? "enable" : "disable"] [src]'s safety protocols with the cryptographic sequencer.") + return TRUE /obj/item/defibrillator/emp_act(severity) . = ..() diff --git a/code/game/objects/items/devices/geiger_counter.dm b/code/game/objects/items/devices/geiger_counter.dm index 7823e570e0..38133e37bc 100644 --- a/code/game/objects/items/devices/geiger_counter.dm +++ b/code/game/objects/items/devices/geiger_counter.dm @@ -192,13 +192,15 @@ update_icon() /obj/item/geiger_counter/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return if(scanning) to_chat(user, "Turn off [src] before you perform this action!") - return 0 + return 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.") obj_flags |= EMAGGED + return TRUE /obj/item/geiger_counter/cyborg var/datum/component/mobhook diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index 6615ebe8a8..1e31f14cfd 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -149,9 +149,11 @@ to_chat(user, "You fill \the [src] with lights from \the [S]. " + status_string() + "") /obj/item/lightreplacer/emag_act() + . = ..() if(obj_flags & EMAGGED) return Emag() + return TRUE /obj/item/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 4b244e3002..854fd03c00 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -26,11 +26,13 @@ return voicespan /obj/item/megaphone/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return to_chat(user, "You overload \the [src]'s voice synthesizer.") obj_flags |= EMAGGED voicespan = list(SPAN_REALLYBIG, "userdanger") + return TRUE /obj/item/megaphone/sec name = "security megaphone" diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index 6d7c3036f9..5454b0fdb8 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -282,11 +282,13 @@ var/cooldown = 0 /obj/item/harmalarm/emag_act(mob/user) + . = ..() obj_flags ^= EMAGGED if(obj_flags & EMAGGED) to_chat(user, "You short out the safeties on [src]!") else to_chat(user, "You reset the safeties on [src]!") + return TRUE /obj/item/harmalarm/attack_self(mob/user) var/safety = !(obj_flags & EMAGGED) diff --git a/code/game/objects/items/storage/lockbox.dm b/code/game/objects/items/storage/lockbox.dm index 4924051855..eeebc6f4c5 100644 --- a/code/game/objects/items/storage/lockbox.dm +++ b/code/game/objects/items/storage/lockbox.dm @@ -48,14 +48,16 @@ to_chat(user, "It's locked!") /obj/item/storage/lockbox/emag_act(mob/user) - if(!broken) - broken = TRUE - SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, FALSE) - desc += "It appears to be broken." - icon_state = src.icon_broken - if(user) - visible_message("\The [src] has been broken by [user] with an electromagnetic card!") - return + . = ..() + if(broken) + return + broken = TRUE + SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, FALSE) + desc += "It appears to be broken." + icon_state = src.icon_broken + if(user) + visible_message("\The [src] has been broken by [user] with an electromagnetic card!") + return TRUE /obj/item/storage/lockbox/Entered() . = ..() diff --git a/code/game/objects/structures/barsigns.dm b/code/game/objects/structures/barsigns.dm index 964f60cb73..0474705438 100644 --- a/code/game/objects/structures/barsigns.dm +++ b/code/game/objects/structures/barsigns.dm @@ -112,12 +112,16 @@ /obj/structure/sign/barsign/emag_act(mob/user) + . = ..() if(broken || (obj_flags & EMAGGED)) to_chat(user, "Nothing interesting happens!") return obj_flags |= EMAGGED to_chat(user, "You emag the barsign. Takeover in progress...") - sleep(10 SECONDS) + addtimer(CALLBACK(src, .proc/syndie_bar_good), 10 SECONDS) + return TRUE + +/obj/structure/sign/barsign/proc/syndie_bar_good() set_sign(new /datum/barsign/hiddensigns/syndibarsign) req_access = list(ACCESS_SYNDICATE) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index a6a6c5f699..6ad786fc05 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -437,14 +437,17 @@ to_chat(user, "\The [src] is broken!") /obj/structure/closet/emag_act(mob/user) - if(secure && !broken) - user.visible_message("Sparks fly from [src]!", - "You scramble [src]'s lock, breaking it open!", - "You hear a faint electrical spark.") - playsound(src, "sparks", 50, 1) - broken = TRUE - locked = FALSE - update_icon() + . = ..() + if(!secure || broken) + return + user.visible_message("Sparks fly from [src]!", + "You scramble [src]'s lock, breaking it open!", + "You hear a faint electrical spark.") + playsound(src, "sparks", 50, 1) + broken = TRUE + locked = FALSE + update_icon() + return TRUE /obj/structure/closet/get_remote_view_fullscreens(mob/user) if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS))) diff --git a/code/modules/VR/vr_sleeper.dm b/code/modules/VR/vr_sleeper.dm index 4e342f6ced..218aec2415 100644 --- a/code/modules/VR/vr_sleeper.dm +++ b/code/modules/VR/vr_sleeper.dm @@ -54,12 +54,16 @@ only_current_user_can_interact = TRUE /obj/machinery/vr_sleeper/hugbox/emag_act(mob/user) - return + return SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) /obj/machinery/vr_sleeper/emag_act(mob/user) + . = ..() + if(you_die_in_the_game_you_die_for_real) + return you_die_in_the_game_you_die_for_real = TRUE sparks.start() addtimer(CALLBACK(src, .proc/emagNotify), 150) + return TRUE /obj/machinery/vr_sleeper/update_icon() icon_state = "[initial(icon_state)][state_open ? "-open" : ""]" diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index 0a7b76cc79..21da26d7eb 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -848,11 +848,13 @@ update_icon() /obj/machinery/airalarm/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED visible_message("Sparks fly out of [src]!", "You emag [src], disabling its safeties.") playsound(src, "sparks", 50, 1) + return TRUE /obj/machinery/airalarm/obj_break(damage_flag) ..() diff --git a/code/modules/cargo/console.dm b/code/modules/cargo/console.dm index b5b9a616d0..9e7de663d4 100644 --- a/code/modules/cargo/console.dm +++ b/code/modules/cargo/console.dm @@ -36,6 +36,7 @@ cat |= EXPORT_EMAG /obj/machinery/computer/cargo/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return user.visible_message("[user] swipes a suspicious card through [src]!", @@ -48,6 +49,7 @@ var/obj/item/circuitboard/computer/cargo/board = circuit board.contraband = TRUE board.obj_flags |= EMAGGED + return 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/cargo/expressconsole.dm b/code/modules/cargo/expressconsole.dm index 5288c27ff6..d9cde85d98 100644 --- a/code/modules/cargo/expressconsole.dm +++ b/code/modules/cargo/expressconsole.dm @@ -54,6 +54,7 @@ ..() /obj/machinery/computer/cargo/express/emag_act(mob/living/user) + . = SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) if(obj_flags & EMAGGED) return user.visible_message("[user] swipes a suspicious card through [src]!", @@ -63,6 +64,7 @@ var/obj/item/circuitboard/computer/cargo/board = circuit board.obj_flags |= EMAGGED packin_up() + return TRUE /obj/machinery/computer/cargo/express/proc/packin_up() // oh shit, I'm sorry meme_pack_data = list() // sorry for what? diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index a87e95e28c..387aa65d20 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -24,11 +24,13 @@ desc = "[desc] The display is flickering slightly." /obj/item/clothing/glasses/hud/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED to_chat(user, "PZZTTPFFFT") desc = "[desc] The display is flickering slightly." + return TRUE /obj/item/clothing/glasses/hud/health name = "health scanner HUD" diff --git a/code/modules/clothing/masks/hailer.dm b/code/modules/clothing/masks/hailer.dm index 8860650fbc..e6d4f752d1 100644 --- a/code/modules/clothing/masks/hailer.dm +++ b/code/modules/clothing/masks/hailer.dm @@ -69,12 +69,14 @@ /obj/item/clothing/mask/gas/sechailer/attack_self() halt() -/obj/item/clothing/mask/gas/sechailer/emag_act(mob/user as mob) - if(safety) - safety = FALSE - to_chat(user, "You silently fry [src]'s vocal circuit with the cryptographic sequencer.") - else + +/obj/item/clothing/mask/gas/sechailer/emag_act(mob/user) + . = ..() + if(!safety) return + safety = FALSE + to_chat(user, "You silently fry [src]'s vocal circuit with the cryptographic sequencer.") + return TRUE /obj/item/clothing/mask/gas/sechailer/verb/halt() set category = "Object" diff --git a/code/modules/holodeck/computer.dm b/code/modules/holodeck/computer.dm index 4ffc10f9c2..6cc11afdf5 100644 --- a/code/modules/holodeck/computer.dm +++ b/code/modules/holodeck/computer.dm @@ -149,6 +149,7 @@ active_power_usage = 50 + spawned.len * 3 + effects.len * 5 /obj/machinery/computer/holodeck/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return if(!LAZYLEN(emag_programs)) @@ -160,6 +161,7 @@ to_chat(user, "Warning. Automatic shutoff and derezing protocols have been corrupted. Please call Nanotrasen maintenance and do not use the simulator.") log_game("[key_name(user)] emagged the Holodeck Control Console") nerf(!(obj_flags & EMAGGED)) + return TRUE /obj/machinery/computer/holodeck/emp_act(severity) . = ..() diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 8ae63a8a76..eb7756514a 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -343,8 +343,11 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums return ..() /obj/machinery/computer/libraryconsole/bookmanagement/emag_act(mob/user) - if(density && !(obj_flags & EMAGGED)) - obj_flags |= EMAGGED + . = ..() + if(!density || obj_flags & EMAGGED) + return + obj_flags |= EMAGGED + return TRUE /obj/machinery/computer/libraryconsole/bookmanagement/Topic(href, href_list) if(..()) diff --git a/code/modules/mining/abandoned_crates.dm b/code/modules/mining/abandoned_crates.dm index 86499e694b..4a0faf69f5 100644 --- a/code/modules/mining/abandoned_crates.dm +++ b/code/modules/mining/abandoned_crates.dm @@ -214,8 +214,11 @@ return ..() /obj/structure/closet/crate/secure/loot/emag_act(mob/user) - if(locked) - boom(user) + . = SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) + if(!locked) + return + boom(user) + return TRUE /obj/structure/closet/crate/secure/loot/togglelock(mob/user) if(locked) diff --git a/code/modules/mining/laborcamp/laborstacker.dm b/code/modules/mining/laborcamp/laborstacker.dm index dd7f642243..31a1e6872d 100644 --- a/code/modules/mining/laborcamp/laborstacker.dm +++ b/code/modules/mining/laborcamp/laborstacker.dm @@ -128,9 +128,12 @@ GLOBAL_LIST(labor_sheet_values) qdel(src) /obj/machinery/mineral/labor_claim_console/emag_act(mob/user) - if(!(obj_flags & EMAGGED)) - obj_flags |= EMAGGED - to_chat(user, "PZZTTPFFFT") + . = ..() + if(obj_flags & EMAGGED) + return + obj_flags |= EMAGGED + to_chat(user, "PZZTTPFFFT") + return TRUE /**********************Prisoner Collection Unit**************************/ diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm index c90c719e8a..0f09b6f62a 100644 --- a/code/modules/mob/living/silicon/robot/robot_defense.dm +++ b/code/modules/mob/living/silicon/robot/robot_defense.dm @@ -92,17 +92,18 @@ /mob/living/silicon/robot/emag_act(mob/user) if(user == src)//To prevent syndieborgs from emagging themselves - return + return FALSE + if(world.time < emag_cooldown) + return FALSE + . = ..() if(!opened)//Cover is closed if(locked) to_chat(user, "You emag the cover lock.") locked = FALSE if(shell) //A warning to Traitors who may not know that emagging AI shells does not slave them. to_chat(user, "[src] seems to be controlled remotely! Emagging the interface may not work as expected.") - else - to_chat(user, "The cover is already unlocked!") - return - if(world.time < emag_cooldown) + return TRUE + to_chat(user, "The cover is already unlocked!") return if(wiresexposed) to_chat(user, "You must unexpose the wires first!") @@ -115,20 +116,24 @@ to_chat(src, "\"[text2ratvar("You will serve Engine above all else")]!\"\n\ ALERT: Subversion attempt denied.") log_game("[key_name(user)] attempted to emag cyborg [key_name(src)], but they serve only Ratvar.") - return + return TRUE if(connected_ai && connected_ai.mind && connected_ai.mind.has_antag_datum(/datum/antagonist/traitor)) to_chat(src, "ALERT: Foreign software execution prevented.") to_chat(connected_ai, "ALERT: Cyborg unit \[[src]] successfully defended against subversion.") log_game("[key_name(user)] attempted to emag cyborg [key_name(src)], but they were slaved to traitor AI [connected_ai].") - return + return TRUE if(shell) //AI shells cannot be emagged, so we try to make it look like a standard reset. Smart players may see through this, however. to_chat(user, "[src] is remotely controlled! Your emag attempt has triggered a system reset instead!") log_game("[key_name(user)] attempted to emag an AI shell belonging to [key_name(src) ? key_name(src) : connected_ai]. The shell has been reset as a result.") ResetModule() - return + return TRUE + INVOKE_ASYNC(src, .proc/beep_boop_rogue_bot, user) + return TRUE + +/mob/living/silicon/robot/proc/beep_boop_rogue_bot(mob/user) SetEmagged(1) SetStun(60) //Borgs were getting into trouble because they would attack the emagger before the new laws were shown lawupdate = 0 diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index e9978d1e62..641e4170e5 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -186,22 +186,23 @@ qdel(src) /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 = 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. - emagged = 2 - remote_disabled = 1 //Manually emagging the bot locks out the AI built in panel. - locked = TRUE //Access denied forever! - bot_reset() - turn_on() //The bot automatically turns on when emagged, unless recently hit with EMP. - to_chat(src, "(#$*#$^^( OVERRIDE DETECTED") - log_combat(user, src, "emagged") - return - else //Bot is unlocked, but the maint panel has not been opened with a screwdriver yet. + return TRUE + if(!open) to_chat(user, "You need to open maintenance panel first!") + return + emagged = 2 + remote_disabled = 1 //Manually emagging the bot locks out the AI built in panel. + locked = TRUE //Access denied forever! + bot_reset() + turn_on() //The bot automatically turns on when emagged, unless recently hit with EMP. + to_chat(src, "(#$*#$^^( OVERRIDE DETECTED") + log_combat(user, src, "emagged") + return TRUE /mob/living/simple_animal/bot/examine(mob/user) ..() diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm index bc8dd0c3ab..5e72993894 100644 --- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm +++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm @@ -78,7 +78,7 @@ return ..() /mob/living/simple_animal/bot/cleanbot/emag_act(mob/user) - ..() + . = ..() if(emagged == 2) if(user) to_chat(user, "[src] buzzes and beeps.") @@ -155,7 +155,7 @@ else shuffle = TRUE //Shuffle the list the next time we scan so we dont both go the same way. path = list() - + if(!path || path.len == 0) //No path, need a new one //Try to produce a path to the target, and ignore airlocks to which it has access. path = get_path_to(src, target.loc, /turf/proc/Distance_cardinal, 0, 30, id=access_card) diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm index 581711d271..11b9b1dcc7 100644 --- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm +++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm @@ -195,7 +195,7 @@ Auto Patrol[]"}, shootAt(user) /mob/living/simple_animal/bot/ed209/emag_act(mob/user) - ..() + . = ..() if(emagged == 2) if(user) to_chat(user, "You short out [src]'s target assessment circuits.") diff --git a/code/modules/mob/living/simple_animal/bot/firebot.dm b/code/modules/mob/living/simple_animal/bot/firebot.dm index d8c3bca72a..2af6ee272d 100644 --- a/code/modules/mob/living/simple_animal/bot/firebot.dm +++ b/code/modules/mob/living/simple_animal/bot/firebot.dm @@ -120,7 +120,7 @@ return dat /mob/living/simple_animal/bot/firebot/emag_act(mob/user) - ..() + . = ..() if(emagged == 1) if(user) to_chat(user, "[src] buzzes and beeps.") diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index 7e5cfe2110..b25397df0e 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -124,7 +124,7 @@ ..() /mob/living/simple_animal/bot/floorbot/emag_act(mob/user) - ..() + . = ..() if(emagged == 2) if(user) to_chat(user, "[src] buzzes and beeps.") diff --git a/code/modules/mob/living/simple_animal/bot/honkbot.dm b/code/modules/mob/living/simple_animal/bot/honkbot.dm index d586cc694b..ff2bd7cf37 100644 --- a/code/modules/mob/living/simple_animal/bot/honkbot.dm +++ b/code/modules/mob/living/simple_animal/bot/honkbot.dm @@ -128,7 +128,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"}, ..() /mob/living/simple_animal/bot/honkbot/emag_act(mob/user) - ..() + . = ..() if(emagged == 2) if(user) user << "You short out [src]'s sound control system. It gives out an evil laugh!!" diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index 7167d87bde..28aa5fa56a 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -240,7 +240,7 @@ step_to(src, (get_step_away(src,user))) /mob/living/simple_animal/bot/medbot/emag_act(mob/user) - ..() + . = ..() if(emagged == 2) declare_crit = 0 if(user) diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index c45d435253..9331c45b74 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -115,6 +115,7 @@ return /mob/living/simple_animal/bot/mulebot/emag_act(mob/user) + . = SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) if(emagged < 1) emagged = TRUE if(!open) @@ -122,6 +123,7 @@ to_chat(user, "You [locked ? "lock" : "unlock"] [src]'s controls!") flick("mulebot-emagged", src) playsound(src, "sparks", 100, 0) + return TRUE /mob/living/simple_animal/bot/mulebot/update_icon() if(open) diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index fca1f66546..2a1ae27081 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -190,7 +190,7 @@ Auto Patrol: []"}, return /mob/living/simple_animal/bot/secbot/emag_act(mob/user) - ..() + . = ..() if(emagged == 2) if(user) to_chat(user, "You short out [src]'s target assessment circuits.") diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm index 580374c5c0..db4cdc2ff5 100644 --- a/code/modules/modular_computers/computers/item/computer.dm +++ b/code/modules/modular_computers/computers/item/computer.dm @@ -178,13 +178,13 @@ turn_on(user) /obj/item/modular_computer/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) to_chat(user, "\The [src] was already emagged.") - return 0 - else - obj_flags |= EMAGGED - to_chat(user, "You emag \the [src]. It's screen briefly shows a \"OVERRIDE ACCEPTED: New software downloads available.\" message.") - return 1 + return + obj_flags |= EMAGGED + to_chat(user, "You emag \the [src]. It's screen briefly shows a \"OVERRIDE ACCEPTED: New software downloads available.\" message.") + return TRUE /obj/item/modular_computer/examine(mob/user) ..() diff --git a/code/modules/modular_computers/computers/machinery/modular_computer.dm b/code/modules/modular_computers/computers/machinery/modular_computer.dm index 19d3b56046..0d61d1d132 100644 --- a/code/modules/modular_computers/computers/machinery/modular_computer.dm +++ b/code/modules/modular_computers/computers/machinery/modular_computer.dm @@ -44,7 +44,9 @@ cpu.attack_ghost(user) /obj/machinery/modular_computer/emag_act(mob/user) - return cpu ? cpu.emag_act(user) : 1 + . = ..() + if(cpu) + return cpu.emag_act(user) /obj/machinery/modular_computer/update_icon() cut_overlays() diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 7c377ffa22..d837f0d420 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -267,7 +267,7 @@ to_chat(user, "There is an integration cog installed!") to_chat(user, "Alt-Click the APC to [ locked ? "unlock" : "lock"] the interface.") - + if(issilicon(user)) to_chat(user, "Ctrl-Click the APC to switch the breaker [ operating ? "off" : "on"].") @@ -747,7 +747,7 @@ if(damage_flag == "melee" && damage_amount < damage_deflection) return 0 . = ..() - + /obj/machinery/power/apc/deconstruct(disassembled = TRUE) if(!(flags_1 & NODECONSTRUCT_1)) if(!(stat & BROKEN)) @@ -759,21 +759,23 @@ update_icon() /obj/machinery/power/apc/emag_act(mob/user) - if(!(obj_flags & EMAGGED) && !malfhack) - if(opened) - to_chat(user, "You must close the cover to swipe an ID card!") - else if(panel_open) - to_chat(user, "You must close the panel first!") - else if(stat & (BROKEN|MAINT)) - to_chat(user, "Nothing happens!") - else - flick("apc-spark", src) - playsound(src, "sparks", 75, 1) - obj_flags |= EMAGGED - locked = FALSE - to_chat(user, "You emag the APC interface.") - update_icon() - + . = ..() + if(obj_flags & EMAGGED || malfhack) + return + if(opened) + to_chat(user, "You must close the cover to swipe an ID card!") + else if(panel_open) + to_chat(user, "You must close the panel first!") + else if(stat & (BROKEN|MAINT)) + to_chat(user, "Nothing happens!") + else + flick("apc-spark", src) + playsound(src, "sparks", 75, 1) + obj_flags |= EMAGGED + locked = FALSE + to_chat(user, "You emag the APC interface.") + update_icon() + return TRUE // attack with hand - remove cell (if cover open) or interact with the APC diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 7a6e313cd0..7375a3e17a 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -194,10 +194,12 @@ return ..() /obj/machinery/power/port_gen/pacman/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED emp_act(EMP_HEAVY) + return TRUE /obj/machinery/power/port_gen/pacman/attack_ai(mob/user) interact(user) diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index a04ed08611..04707f52d7 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -339,12 +339,13 @@ projectile_sound = initial(projectile_sound) /obj/machinery/power/emitter/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return locked = FALSE obj_flags |= EMAGGED - if(user) - user.visible_message("[user.name] emags [src].","You short out the lock.") + user?.visible_message("[user.name] emags [src].","You short out the lock.") + return TRUE /obj/machinery/power/emitter/prototype diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm index 3698eb1ede..43a39f55e0 100644 --- a/code/modules/projectiles/pins.dm +++ b/code/modules/projectiles/pins.dm @@ -37,10 +37,12 @@ to_chat(user, "This firearm already has a firing pin installed.") /obj/item/firing_pin/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED to_chat(user, "You override the authentication mechanism.") + return TRUE /obj/item/firing_pin/proc/gun_insert(mob/living/user, obj/item/gun/G) gun = G diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index 10282e5e0a..f038d3fa76 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -140,12 +140,14 @@ /obj/machinery/chem_dispenser/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) to_chat(user, "[src] has no functional safeties to emag.") return to_chat(user, "You short out [src]'s safeties.") dispensable_reagents |= emagged_reagents//add the emagged reagents to the dispensable ones obj_flags |= EMAGGED + return TRUE /obj/machinery/chem_dispenser/ex_act(severity, target) if(severity < 3) diff --git a/code/modules/research/nanites/nanite_remote.dm b/code/modules/research/nanites/nanite_remote.dm index 60dd78cf94..824d033bf4 100644 --- a/code/modules/research/nanites/nanite_remote.dm +++ b/code/modules/research/nanites/nanite_remote.dm @@ -37,6 +37,7 @@ to_chat(user, "Access denied.") /obj/item/nanite_remote/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return to_chat(user, "You override [src]'s ID lock.") @@ -44,6 +45,7 @@ if(locked) locked = FALSE update_icon() + return TRUE /obj/item/nanite_remote/update_icon() . = ..() diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index cb5062904d..a7d7857a24 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -184,12 +184,14 @@ Nothing else in the console has ID requirements. ..() /obj/machinery/computer/rdconsole/emag_act(mob/user) - if(!(obj_flags & EMAGGED)) - to_chat(user, "You disable the security protocols[locked? " and unlock the console":""].") - playsound(src, "sparks", 75, 1) - obj_flags |= EMAGGED - locked = FALSE - return ..() + . = ..() + if(obj_flags & EMAGGED) + return + to_chat(user, "You disable the security protocols[locked? " and unlock the console":""].") + playsound(src, "sparks", 75, 1) + obj_flags |= EMAGGED + locked = FALSE + return TRUE /obj/machinery/computer/rdconsole/multitool_act(mob/user, obj/item/multitool/I) var/lathe = linked_lathe && linked_lathe.multitool_act(user, I) diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index 20e05782ef..b3e114d2ad 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -155,8 +155,10 @@ src.updateUsrDialog() /obj/machinery/computer/rdservercontrol/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return playsound(src, "sparks", 75, 1) obj_flags |= EMAGGED to_chat(user, "You disable the security protocols.") + return TRUE diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 0c957919a1..946f0fb9a4 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -63,11 +63,13 @@ to_chat(usr, "Unable to comply.") /obj/machinery/computer/shuttle/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return req_access = list() obj_flags |= EMAGGED to_chat(user, "You fried the consoles ID checking system.") + return TRUE /obj/machinery/computer/shuttle/proc/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override=FALSE) if(port && (shuttleId == initial(shuttleId) || override)) diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index 9af4194049..5c54ee5164 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -134,6 +134,8 @@ . = TRUE /obj/machinery/computer/emergency_shuttle/emag_act(mob/user) + . = ..() + // How did you even get on the shuttle before it go to the station? if(!IS_DOCKED) return @@ -159,6 +161,7 @@ authorized += ID process() + return TRUE /obj/machinery/computer/emergency_shuttle/Destroy() // Our fake IDs that the emag generated are just there for colour @@ -458,10 +461,12 @@ return /obj/machinery/computer/shuttle/pod/emag_act(mob/user) + . = SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) if(obj_flags & EMAGGED) return obj_flags |= EMAGGED to_chat(user, "You fry the pod's alert level checking system.") + return TRUE /obj/machinery/computer/shuttle/pod/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override=FALSE) . = ..() diff --git a/code/modules/shuttle/special.dm b/code/modules/shuttle/special.dm index fd5f2f59fd..b94cd0b9b7 100644 --- a/code/modules/shuttle/special.dm +++ b/code/modules/shuttle/special.dm @@ -48,7 +48,7 @@ return /obj/machinery/power/emitter/energycannon/magical/emag_act(mob/user) - return + return SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) /obj/structure/table/abductor/wabbajack name = "wabbajack altar" diff --git a/code/modules/station_goals/shield.dm b/code/modules/station_goals/shield.dm index 44746e595e..d9a298c1d7 100644 --- a/code/modules/station_goals/shield.dm +++ b/code/modules/station_goals/shield.dm @@ -172,9 +172,11 @@ change_meteor_chance(0.5) /obj/machinery/satellite/meteor_shield/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED to_chat(user, "You access the satellite's debug mode, increasing the chance of meteor strikes.") if(active) change_meteor_chance(2) + return TRUE diff --git a/code/modules/surgery/organs/augments_arms.dm b/code/modules/surgery/organs/augments_arms.dm index ad07ce7238..e7ab37b021 100644 --- a/code/modules/surgery/organs/augments_arms.dm +++ b/code/modules/surgery/organs/augments_arms.dm @@ -182,11 +182,12 @@ zone = BODY_ZONE_L_ARM /obj/item/organ/cyberimp/arm/toolset/emag_act() - if(!(locate(/obj/item/kitchen/knife/combat/cyborg) in items_list)) - to_chat(usr, "You unlock [src]'s integrated knife!") - items_list += new /obj/item/kitchen/knife/combat/cyborg(src) - return 1 - return 0 + . = ..() + if(locate(/obj/item/kitchen/knife/combat/cyborg) in items_list) + return + to_chat(usr, "You unlock [src]'s integrated knife!") + items_list += new /obj/item/kitchen/knife/combat/cyborg(src) + return TRUE /obj/item/organ/cyberimp/arm/esword name = "arm-mounted energy blade" diff --git a/code/modules/vehicles/cars/clowncar.dm b/code/modules/vehicles/cars/clowncar.dm index 63ef4fda5a..e504ea84f2 100644 --- a/code/modules/vehicles/cars/clowncar.dm +++ b/code/modules/vehicles/cars/clowncar.dm @@ -63,11 +63,13 @@ DumpMobs(TRUE) /obj/vehicle/sealed/car/clowncar/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED to_chat(user, "You scramble the clowncar child safety lock and a panel with 6 colorful buttons appears!") initialize_controller_action_type(/datum/action/vehicle/sealed/RollTheDice, VEHICLE_CONTROL_DRIVE) + return TRUE /obj/vehicle/sealed/car/clowncar/Destroy() playsound(src, 'sound/vehicles/clowncar_fart.ogg', 100) diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index 410952397d..5165343993 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -65,7 +65,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C var/scan_id = 1 var/obj/item/coin/coin var/obj/item/stack/spacecash/bill - + var/global/vending_cache = list() //used for storing the icons of items being vended var/dish_quants = list() //used by the snack machine's custom compartment to count dishes. @@ -306,10 +306,12 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C . = ..() /obj/machinery/vending/emag_act(mob/user) + . = ..() if(obj_flags & EMAGGED) return obj_flags |= EMAGGED to_chat(user, "You short out the product lock on [src].") + return TRUE /obj/machinery/vending/_try_interact(mob/user) if(seconds_electrified && !(stat & NOPOWER)) diff --git a/modular_citadel/code/game/machinery/plasmacases.dm b/modular_citadel/code/game/machinery/plasmacases.dm index ac3621b58a..c45eb48caa 100644 --- a/modular_citadel/code/game/machinery/plasmacases.dm +++ b/modular_citadel/code/game/machinery/plasmacases.dm @@ -19,5 +19,6 @@ return MouseDrop(user) /obj/structure/guncase/plasma/emag_act() - to_chat(usr, "The locking mechanism is fitted with old style parts, The card has no effect.") - return \ No newline at end of file + . = SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) + if(!.) + to_chat(usr, "The locking mechanism is fitted with old style parts, The card has no effect.") \ No newline at end of file diff --git a/modular_citadel/code/modules/cargo/console.dm b/modular_citadel/code/modules/cargo/console.dm index 490f72d1d1..35a1a0e52f 100644 --- a/modular_citadel/code/modules/cargo/console.dm +++ b/modular_citadel/code/modules/cargo/console.dm @@ -1,12 +1,13 @@ /obj/machinery/computer/cargo req_access = list(ACCESS_CARGO) - + /obj/machinery/computer/cargo/request req_access = list() /obj/machinery/computer/cargo/emag_act(mob/user) - req_access = list() . = ..() + if(.) + req_access = list() /obj/machinery/computer/cargo/ui_act(action, params, datum/tgui/ui) if(!allowed(usr)) diff --git a/modular_citadel/code/modules/reagents/reagent container/hypospraymkii.dm b/modular_citadel/code/modules/reagents/reagent container/hypospraymkii.dm index bee56cde15..965798b78d 100755 --- a/modular_citadel/code/modules/reagents/reagent container/hypospraymkii.dm +++ b/modular_citadel/code/modules/reagents/reagent container/hypospraymkii.dm @@ -138,12 +138,18 @@ // Gunna allow this for now, still really don't approve - Pooj /obj/item/hypospray/mkii/emag_act(mob/user) + . = ..() + if(obj_flags & EMAGGED) + to_chat(user, "[src] happens to be already overcharged.") + return inject_wait = COMBAT_WAIT_INJECT spray_wait = COMBAT_WAIT_SPRAY spray_self = COMBAT_SELF_INJECT inject_self = COMBAT_SELF_SPRAY penetrates = TRUE to_chat(user, "You overcharge [src]'s control circuit.") + obj_flags |= EMAGGED + return TRUE /obj/item/hypospray/mkii/attack_hand(mob/user) . = ..() //Don't bother changing this or removing it from containers will break. diff --git a/tgstation.dme b/tgstation.dme index 9219376f29..dd6db2a5e4 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -2504,22 +2504,10 @@ #include "code\modules\research\designs\AI_module_designs.dm" #include "code\modules\research\designs\biogenerator_designs.dm" #include "code\modules\research\designs\bluespace_designs.dm" -#include "code\modules\research\designs\comp_board_designs\comp_board_designs_all_misc.dm" -#include "code\modules\research\designs\comp_board_designs\comp_board_designs_cargo .dm" -#include "code\modules\research\designs\comp_board_designs\comp_board_designs_engi.dm" -#include "code\modules\research\designs\comp_board_designs\comp_board_designs_medical.dm" -#include "code\modules\research\designs\comp_board_designs\comp_board_designs_sci.dm" -#include "code\modules\research\designs\comp_board_designs\comp_board_designs_sec.dm" #include "code\modules\research\designs\computer_part_designs.dm" #include "code\modules\research\designs\electronics_designs.dm" #include "code\modules\research\designs\equipment_designs.dm" #include "code\modules\research\designs\limbgrower_designs.dm" -#include "code\modules\research\designs\machine_desings\machine_designs_all_misc.dm" -#include "code\modules\research\designs\machine_desings\machine_designs_cargo.dm" -#include "code\modules\research\designs\machine_desings\machine_designs_engi.dm" -#include "code\modules\research\designs\machine_desings\machine_designs_medical.dm" -#include "code\modules\research\designs\machine_desings\machine_designs_sci.dm" -#include "code\modules\research\designs\machine_desings\machine_designs_service.dm" #include "code\modules\research\designs\mecha_designs.dm" #include "code\modules\research\designs\mechfabricator_designs.dm" #include "code\modules\research\designs\medical_designs.dm" @@ -2537,6 +2525,18 @@ #include "code\modules\research\designs\autolathe_desings\autolathe_designs_sec_and_hacked.dm" #include "code\modules\research\designs\autolathe_desings\autolathe_designs_tcomms_and_misc.dm" #include "code\modules\research\designs\autolathe_desings\autolathe_designs_tools.dm" +#include "code\modules\research\designs\comp_board_designs\comp_board_designs_all_misc.dm" +#include "code\modules\research\designs\comp_board_designs\comp_board_designs_cargo .dm" +#include "code\modules\research\designs\comp_board_designs\comp_board_designs_engi.dm" +#include "code\modules\research\designs\comp_board_designs\comp_board_designs_medical.dm" +#include "code\modules\research\designs\comp_board_designs\comp_board_designs_sci.dm" +#include "code\modules\research\designs\comp_board_designs\comp_board_designs_sec.dm" +#include "code\modules\research\designs\machine_desings\machine_designs_all_misc.dm" +#include "code\modules\research\designs\machine_desings\machine_designs_cargo.dm" +#include "code\modules\research\designs\machine_desings\machine_designs_engi.dm" +#include "code\modules\research\designs\machine_desings\machine_designs_medical.dm" +#include "code\modules\research\designs\machine_desings\machine_designs_sci.dm" +#include "code\modules\research\designs\machine_desings\machine_designs_service.dm" #include "code\modules\research\machinery\_production.dm" #include "code\modules\research\machinery\circuit_imprinter.dm" #include "code\modules\research\machinery\departmental_circuit_imprinter.dm"