From 2194511f08e208c5aef00f83974c8dd78c8a6a58 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Sun, 23 Jul 2023 15:56:43 -0700 Subject: [PATCH 01/42] literal misinformation --- yogstation/code/modules/uplink/uplink_item.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yogstation/code/modules/uplink/uplink_item.dm b/yogstation/code/modules/uplink/uplink_item.dm index efcf21d19a5c..c965de9c4d80 100644 --- a/yogstation/code/modules/uplink/uplink_item.dm +++ b/yogstation/code/modules/uplink/uplink_item.dm @@ -51,7 +51,7 @@ /datum/uplink_item/stealthy_weapons/door_charge name = "Explosive Airlock Charge" desc = "A small, easily concealable device. It can be applied to an open airlock panel, booby-trapping it. \ - The next person to use that airlock will trigger an explosion, knocking them down and destroying \ + The next person to open that airlock will trigger an explosion, knocking them down and destroying \ the airlock maintenance panel." item = /obj/item/doorCharge cost = 2 From aef4702fe7c8ace34c12a87fdf226671ffaf3bd9 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Sun, 23 Jul 2023 15:57:38 -0700 Subject: [PATCH 02/42] objs, comsigs, bitfields & proc --- .../dcs/signals/signals_atom/signals_atom_x_act.dm | 2 ++ code/__DEFINES/obj_flags.dm | 1 + code/_globalvars/bitfields.dm | 1 + code/game/atoms.dm | 8 ++++++++ 4 files changed, 12 insertions(+) diff --git a/code/__DEFINES/dcs/signals/signals_atom/signals_atom_x_act.dm b/code/__DEFINES/dcs/signals/signals_atom/signals_atom_x_act.dm index b9cf29bf2d47..01072cbc968c 100644 --- a/code/__DEFINES/dcs/signals/signals_atom/signals_atom_x_act.dm +++ b/code/__DEFINES/dcs/signals/signals_atom/signals_atom_x_act.dm @@ -22,6 +22,8 @@ #define COMSIG_ATOM_ACID_ACT "atom_acid_act" ///from base of atom/emag_act(): (/mob/user) #define COMSIG_ATOM_EMAG_ACT "atom_emag_act" +///from base of atom/cmag_act(): (/mob/user) +#define COMSIG_ATOM_CMAG_ACT "atom_cmag_act" ///! from base of atom/rad_act(intensity, collectable_radiation) #define COMSIG_ATOM_RAD_ACT "atom_rad_act" ///from base of atom/narsie_act(): () diff --git a/code/__DEFINES/obj_flags.dm b/code/__DEFINES/obj_flags.dm index 95cd895fc5d2..c4e2559be391 100644 --- a/code/__DEFINES/obj_flags.dm +++ b/code/__DEFINES/obj_flags.dm @@ -10,6 +10,7 @@ #define UNIQUE_RENAME (1<<6) // can you customize the description/name of the thing? #define USES_TGUI (1<<7) //put on things that use tgui on ui_interact instead of custom/old UI. #define FROZEN (1<<8) +#define CMAGGED (1<<9) // If you add new ones, be sure to add them to /obj/Initialize as well for complete mapping support diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index 6e8423789d10..ec1ab8e47d98 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -32,6 +32,7 @@ GLOBAL_LIST_INIT(bitfields, list( "UNIQUE_RENAME" = UNIQUE_RENAME, "USES_TGUI" = USES_TGUI, "FROZEN" = FROZEN, + "CMAGGED" = CMAGGED, ), "datum_flags" = list( "DF_USE_TAG" = DF_USE_TAG, diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 7ab71e2f9895..edd476fa8e3d 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -790,6 +790,14 @@ /atom/proc/emag_act() SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) +/** + * Respond to a cmag being used on our atom + * + * Default behaviour is to send COMSIG_ATOM_CMAG_ACT and return + */ +/atom/proc/cmag_act() + SEND_SIGNAL(src, COMSIG_ATOM_CMAG_ACT) + /** * Respond to a radioactive wave hitting this atom * From da16a69d92d2d8aa40177d311596a5ea9c3a2305 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Sun, 23 Jul 2023 15:58:44 -0700 Subject: [PATCH 03/42] consistent --- code/game/machinery/decontamination.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/decontamination.dm b/code/game/machinery/decontamination.dm index db881eab3bea..fc2ede0dd6be 100644 --- a/code/game/machinery/decontamination.dm +++ b/code/game/machinery/decontamination.dm @@ -249,7 +249,7 @@ /obj/machinery/decontamination_unit/examine(mob/user) . = ..() if(obj_flags & EMAGGED) - . += span_warning("Its maintenance panel is smoking slightly.") + . += span_warning("The maintenance panel is smoking slightly.") if(in_range(user, src) || isobserver(user)) if (contents.len >= max_n_of_items) . += span_notice("The status display reads: Inventory full! Please remove items or upgrade the parts of this storage unit.") From 3318d3e1baafbc4e2793afbc2e1c5dc6e935ea44 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Sun, 23 Jul 2023 16:50:27 -0700 Subject: [PATCH 04/42] add cmag item --- code/game/objects/items/cards_ids.dm | 32 ++++++++++++++++++++++------ code/modules/uplink/uplink_items.dm | 7 ++++++ 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index 6c7c2cc5ca78..03bccfb13721 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -67,10 +67,16 @@ lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi' item_flags = NO_MAT_REDEMPTION | NOBLUDGEON - var/max_charges = 5 // How many charges can the emag hold? - var/charges = 5 // How many charges does the emag start with? - var/recharge_rate = 0.4 // How fast charges are regained (per second) - var/prox_check = TRUE //If the emag requires you to be in range + /// How many charges can the emag hold? + var/max_charges = 5 + /// How many charges does the emag start with? + var/charges = 5 + /// How fast (in seconds) does charges increase by 1? + var/recharge_rate = 0.4 + /// Does usage require you to be in range? + var/prox_check = TRUE + /// Is this the funny verison of the emag? Usage will cause different set of interactions (of the funny variety)! + var/clown_version = FALSE /obj/item/card/emag/Initialize(mapload) . = ..() @@ -108,9 +114,13 @@ if(charges < 1) to_chat(user, span_danger("\The [src] is still recharging!")) return - log_combat(user, A, "attempted to emag") + log_combat(user, A, "attempted to [clown_version ? "cmag" : "emag"]") charges-- - A.emag_act(user) + // TODO: Consider refunding a charge if it fails/does nothing since it'll use up a charge regardless of success or failure. + if(clown_version) + A.cmag_act(user) + else + A.emag_act(user) /obj/item/card/emag/bluespace name = "bluespace cryptographic sequencer" @@ -154,6 +164,16 @@ target.emag_act(user) emagging = FALSE +/obj/item/card/emag/cmag + desc = "It's a card coated in a slurry of electromagnetic bananium." + name = "jestographic sequencer" + color = rgb(255, 0, 85) // TODO: If there is a cool sprite for this funny emag, please add. Otherwise, it will be a recolored emag. + clown_version = TRUE + +/obj/item/card/emag/cmag/Initialize(mapload) + . = ..() + AddComponent(/datum/component/slippery, 8 SECONDS, GALOSHES_DONT_HELP)// It wouldn't be funny if it couldn't slip! + /obj/item/card/emagfake desc = "It's a card with a magnetic strip attached to some circuitry. Closer inspection shows that this card is a poorly made replica, with a \"DonkCo\" logo stamped on the back." name = "cryptographic sequencer" diff --git a/code/modules/uplink/uplink_items.dm b/code/modules/uplink/uplink_items.dm index 4c66661e984d..c7c502772b00 100644 --- a/code/modules/uplink/uplink_items.dm +++ b/code/modules/uplink/uplink_items.dm @@ -2607,6 +2607,13 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) cost = 10 restricted_roles = list("Station Engineer","Atmospheric Technician","Network Admin","Chief Engineer") +/datum/uplink_item/role_restricted/cmag + name = "Jestographic Sequencer" + desc = "The jestographic sequencer, also known as a cmag, is a small card that inverts the access on any door it's used on. Perfect for locking command out of their own departments. Honk!" + item = /obj/item/card/emag/cmag + cost = 4 // Not as destructive as the emag. In addition, currently does not have many features. Increase if cmag can do more impactful things. + restricted_roles = list("Clown") + // Pointless /datum/uplink_item/badass category = "(Pointless) Badassery" From b1d190eed3937f05a08f7a71d4927b46a3e20626 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Sun, 23 Jul 2023 17:24:31 -0700 Subject: [PATCH 05/42] ai no interact w/ cmag --- code/_onclick/ai.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index e1ed79d14053..bd596b8e165c 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -131,14 +131,14 @@ /* Airlocks */ /obj/machinery/door/airlock/AICtrlClick() // Bolts doors - if(obj_flags & EMAGGED) + if((obj_flags & EMAGGED) || (obj_flags & CMAGGED)) return toggle_bolt(usr) add_hiddenprint(usr) /obj/machinery/door/airlock/AIAltClick() // Eletrifies doors. - if(obj_flags & EMAGGED) + if((obj_flags & EMAGGED) || (obj_flags & CMAGGED)) return if(!secondsElectrified) @@ -147,14 +147,14 @@ shock_restore(usr) /obj/machinery/door/airlock/AIShiftClick() // Opens and closes doors! - if(obj_flags & EMAGGED) + if((obj_flags & EMAGGED) || (obj_flags & CMAGGED)) return user_toggle_open(usr) add_hiddenprint(usr) /obj/machinery/door/airlock/AICtrlShiftClick() // Sets/Unsets Emergency Access Override - if(obj_flags & EMAGGED) + if((obj_flags & EMAGGED) || (obj_flags & CMAGGED)) return toggle_emergency(usr) From 5e5e6ec6ffb4ae249ad9d4c8b048529a14b4ba8e Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Sun, 23 Jul 2023 17:30:36 -0700 Subject: [PATCH 06/42] consistent --- yogstation/code/game/objects/structures/fireaxe.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yogstation/code/game/objects/structures/fireaxe.dm b/yogstation/code/game/objects/structures/fireaxe.dm index 183eb87d48b8..042b47938787 100644 --- a/yogstation/code/game/objects/structures/fireaxe.dm +++ b/yogstation/code/game/objects/structures/fireaxe.dm @@ -100,7 +100,7 @@ src.add_fingerprint(user) obj_flags |= EMAGGED - desc += "
[span_warning("Its access panel is smoking slightly.")]" + desc += "
[span_warning("The access panel is smoking slightly.")]" playsound(loc, "sound/machines/locktoggle.ogg", 30, 1, -3) locked = 0 From 1b3a655fd9d9919072abd7508265fbdd2f47af44 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Sun, 23 Jul 2023 17:35:46 -0700 Subject: [PATCH 07/42] functionality --- code/game/machinery/doors/airlock.dm | 96 +++++++++++++++++-------- code/game/machinery/doors/door.dm | 89 +++++++++++++++-------- code/game/machinery/doors/windowdoor.dm | 65 +++++++++++------ 3 files changed, 171 insertions(+), 79 deletions(-) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 823e43116e0a..bef24a2a73e1 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -475,18 +475,22 @@ return if(ismecha(AM)) var/obj/mecha/mecha = AM - if(density) - if(mecha.occupant) - if(world.time - mecha.occupant.last_bumped <= 10) - return - mecha.occupant.last_bumped = world.time - if(locked && (allowed(mecha.occupant) || check_access_list(mecha.operation_req_access)) && aac) - aac.request_from_door(src) + if(!density) // Somehow bumped into it while it's already open. + return + var/has_access = (obj_flags & CMAGGED) ? !check_access_list(mecha.operation_req_access) : check_access_list(mecha.operation_req_access) + if(mecha.occupant) + if(world.time - mecha.occupant.last_bumped <= 10) return - if(mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access))) - open() - else - do_animate("deny") + mecha.occupant.last_bumped = world.time + // If there is an occupant, check their access too. + has_access = (obj_flags & CMAGGED) ? cmag_allowed(mecha.occupant) && has_access : allowed(mecha.occupant) || has_access + if(aac && locked && has_access) + aac.request_from_door(src) + return + if(has_access) + open() + else + do_animate("deny") return . = ..() @@ -507,13 +511,14 @@ if(G.siemens_coefficient)//not insulated new /datum/hallucination/shock(H) return + var/allowed = (obj_flags & CMAGGED) ? cmag_allowed(user) : allowed(user) if (cyclelinkedairlock) - if (!shuttledocked && !emergency && !cyclelinkedairlock.shuttledocked && !cyclelinkedairlock.emergency && allowed(user)) + if (!shuttledocked && !emergency && !cyclelinkedairlock.shuttledocked && !cyclelinkedairlock.emergency && allowed) if(cyclelinkedairlock.operating) cyclelinkedairlock.delayed_close_requested = TRUE else addtimer(CALLBACK(cyclelinkedairlock, PROC_REF(close)), 2) - if(locked && allowed(user) && aac) + if(locked && aac && allowed) aac.request_from_door(src) return ..() @@ -782,7 +787,9 @@ /obj/machinery/door/airlock/examine(mob/user) . = ..() if(obj_flags & EMAGGED) - . += span_warning("Its access panel is smoking slightly.") + . += span_warning("The access panel is smoking slightly.") + if(obj_flags & CMAGGED) + . += span_warning("The access panel is coated in yellow ooze...") if(charge && !panel_open && in_range(user, src)) . += span_warning("The maintenance panel seems haphazardly fastened.") if(charge && panel_open) @@ -826,10 +833,23 @@ if(!canAIControl(user)) if(canAIHack()) hack(user) - return else to_chat(user, span_warning("Airlock AI control has been blocked with a firewall. Unable to hack.")) - if(obj_flags & EMAGGED) + return + if((obj_flags & EMAGGED) || (obj_flags & CMAGGED)) + to_chat(user, span_warning("Unable to interface: Airlock is unresponsive.")) + return + if(detonated) + to_chat(user, span_warning("Unable to interface. Airlock control panel damaged.")) + return + + ui_interact(user) + +/obj/machinery/door/airlock/attack_robot(mob/user) + if(!canAIControl(user)) + to_chat(user, span_warning("Airlock AI control has been blocked. Unable to access.")) // Hacking should be AI-exclusive. + return + if((obj_flags & EMAGGED) || (obj_flags & CMAGGED)) to_chat(user, span_warning("Unable to interface: Airlock is unresponsive.")) return if(detonated) @@ -894,7 +914,8 @@ return attack_hand(user) /obj/machinery/door/airlock/attack_hand(mob/user) - if(locked && allowed(user) && aac) + var/allowed = (obj_flags & CMAGGED) ? cmag_allowed(user) : allowed(user) + if(locked && allowed && aac) aac.request_from_door(src) . = TRUE else @@ -1506,20 +1527,33 @@ 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(state = AIRLOCK_EMAG, override = TRUE) - sleep(0.6 SECONDS) - if(QDELETED(src)) - return - operating = FALSE - if(!open()) - update_icon(state = AIRLOCK_CLOSED, override = TRUE) - obj_flags |= EMAGGED - lights = FALSE - locked = TRUE - loseMainPower() - loseBackupPower() + if(operating || !density || !hasPower() || (obj_flags & EMAGGED)) + return + operating = TRUE + update_icon(state = AIRLOCK_EMAG, override = TRUE) + sleep(0.6 SECONDS) + if(QDELETED(src)) + return + operating = FALSE + if(!open()) // Something prevented it from being opened. For example, bolted/welded shut. + update_icon(state = AIRLOCK_CLOSED, override = TRUE) + obj_flags |= EMAGGED + lights = FALSE + locked = TRUE + loseMainPower() + loseBackupPower() + +/obj/machinery/door/airlock/cmag_act(mob/user) + if(operating || !density || !hasPower() || (obj_flags & CMAGGED)) + return + operating = TRUE + update_icon(state = AIRLOCK_EMAG, override = TRUE) + sleep(0.6 SECONDS) + if(QDELETED(src)) + return + operating = FALSE + update_icon(state = AIRLOCK_CLOSED, override = TRUE) + obj_flags |= CMAGGED /obj/machinery/door/airlock/attack_alien(mob/living/carbon/alien/humanoid/user) add_fingerprint(user) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 64f9755c36b7..c6708b2e8d0d 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -57,6 +57,7 @@ var/unres_sides = 0 // door open speed. var/open_speed = 0.5 SECONDS + COOLDOWN_DECLARE(cmagsound_cooldown) /obj/machinery/door/examine(mob/user) . = ..() @@ -129,24 +130,34 @@ if(ismecha(AM)) var/obj/mecha/mecha = AM - if(density) - if(mecha.occupant) - if(world.time - mecha.occupant.last_bumped <= 10) - return - mecha.occupant.last_bumped = world.time - if(mecha.occupant && (src.allowed(mecha.occupant) || src.check_access_list(mecha.operation_req_access))) - open() - else - do_animate("deny") + if(!density) + return + // If an empty mech somehow bumps into something that it has access to, it should open: + var/has_access = (obj_flags & CMAGGED) ? !check_access_list(mecha.operation_req_access) : check_access_list(mecha.operation_req_access) + if(mecha.occupant) + if(world.time - mecha.occupant.last_bumped <= 10) + return + mecha.occupant.last_bumped = world.time + // If there is an occupant, check their access too. + has_access = (obj_flags & CMAGGED) ? cmag_allowed(mecha.occupant) && has_access : allowed(mecha.occupant) || has_access + if(has_access) + open() + else + if(obj_flags & CMAGGED) + try_play_cmagsound() + do_animate("deny") return if(isitem(AM)) var/obj/item/I = AM if(!density || (I.w_class < WEIGHT_CLASS_NORMAL && !LAZYLEN(I.GetAccess()))) return - if(check_access(I)) + var/has_access = obj_flags & CMAGGED ? !check_access(I) : check_access(I) + if(has_access) open() else + if(obj_flags & CMAGGED) + try_play_cmagsound() do_animate("deny") return @@ -164,18 +175,7 @@ return !opacity //yogs end /obj/machinery/door/proc/bumpopen(mob/user) - if(operating) - return - src.add_fingerprint(user) - if(!src.requiresID()) - user = null - - if(density && !(obj_flags & EMAGGED)) - if(allowed(user)) - open() - else - do_animate("deny") - return + return try_to_activate_door(user) /obj/machinery/door/attack_hand(mob/user) . = ..() @@ -194,14 +194,41 @@ return if(!requiresID()) user = null //so allowed(user) always succeeds - if(allowed(user)) - if(density) - open() - else + if(obj_flags & CMAGGED) + if(ishuman(user)) + var/mob/living/carbon/human/H = user + var/obj/item/card/id/idcard = H.get_idcard() + if(!idcard?.assignment) // You cannot game the inverted access by taking off your ID or wearing a blank ID. + if(density) + to_chat(H, span_warning("The airlock speaker chuckles: 'What's wrong, pal? Lost your ID? Nyuk nyuk nyuk!'")) // We also will include this too. + try_play_cmagsound() + do_animate("deny") + return FALSE + if(!cmag_allowed(user)) + try_play_cmagsound() + if(density) + do_animate("deny") + return FALSE + if(!density) close() + else + open() return TRUE - if(density) - do_animate("deny") + if(!allowed(user)) + if(density) + do_animate("deny") + return FALSE + + if(!density) + close() + else + open() + return TRUE + +/obj/machinery/door/proc/try_play_cmagsound() + if(COOLDOWN_FINISHED(src, cmagsound_cooldown)) + playsound(loc, 'sound/machines/honkbot_evil_laugh.ogg', 25, TRUE, ignore_walls = FALSE) + COOLDOWN_START(src, cmagsound_cooldown, 1 SECONDS) /obj/machinery/door/allowed(mob/M) if(emergency) @@ -210,6 +237,12 @@ return TRUE return ..() +/// Returns the opposite of '/allowed', but makes exceptions for things like IsAdminGhost(). +/obj/machinery/door/proc/cmag_allowed(mob/M) + if(IsAdminGhost(M)) + return TRUE + return !allowed(M) + /obj/machinery/door/proc/unrestricted_side(mob/M) //Allows for specific side of airlocks to be unrestrected (IE, can exit maint freely, but need access to enter) return get_dir(src, M) & unres_sides diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 834aa255a5e4..47f3ead7901d 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -65,17 +65,22 @@ close() /obj/machinery/door/window/Bumped(atom/movable/AM) - if( operating || !density ) + if(operating || !density) return - if (!( ismob(AM) )) - if(ismecha(AM)) + if(!(ismob(AM))) + if(!ismecha(AM)) var/obj/mecha/mecha = AM - if(mecha.occupant && allowed(mecha.occupant)) + var/has_access = (obj_flags & CMAGGED) ? !check_access_list(mecha.operation_req_access) : check_access_list(mecha.operation_req_access) + if(mecha.occupant) // If there is an occupant, check their access too. + has_access = (obj_flags & CMAGGED) ? cmag_allowed(mecha.occupant) && has_access : allowed(mecha.occupant) || has_access + if(has_access) open_and_close() - else - do_animate("deny") + return + if(obj_flags & CMAGGED) + try_play_cmagsound() + do_animate("deny") return - if (!( SSticker )) + if(!(SSticker)) return var/mob/M = AM if(M.restrained() || ((isdrone(M) || iscyborg(M)) && M.stat)) @@ -89,11 +94,13 @@ if(!requiresID()) user = null - if(allowed(user)) + var/allowed = (obj_flags & CMAGGED) ? cmag_allowed(user) : allowed(user) + if(allowed) open_and_close() - else - do_animate("deny") - return + return + if(obj_flags & CMAGGED) + try_play_cmagsound() + do_animate("deny") /obj/machinery/door/window/CanAllowThrough(atom/movable/mover, turf/target) . = ..() @@ -210,15 +217,33 @@ ..() /obj/machinery/door/window/emag_act(mob/user) - if(!operating && density && !(obj_flags & EMAGGED)) - obj_flags |= EMAGGED - operating = TRUE - flick("[base_state]spark", src) - playsound(src, "sparks", 75, 1) - sleep(0.6 SECONDS) - operating = FALSE - desc += "
[span_warning("Its access panel is smoking slightly.")]" - open(2) + if(operating || !density || (obj_flags & CMAGGED)) + return + obj_flags |= EMAGGED + operating = TRUE + flick("[base_state]spark", src) + playsound(src, "sparks", 75, 1) + sleep(0.6 SECONDS) + if(QDELETED(src)) + return + operating = FALSE + open(2) + +/obj/machinery/door/window/cmag_act(mob/user) + if(operating || !density || (obj_flags & CMAGGED)) + return + obj_flags |= CMAGGED + operating = TRUE + flick("[base_state]spark", src) + playsound(src, "sparks", 75, 1) + operating = FALSE + +/obj/machinery/door/window/examine(mob/user) + . = ..() + if(obj_flags & EMAGGED) + . += span_warning("The access panel is smoking slightly.") + if(obj_flags & CMAGGED) + . += span_warning("The access panel is coated in yellow ooze...") /obj/machinery/door/window/attackby(obj/item/I, mob/living/user, params) From 71f5f959dcbae4877e9bd18b677354c7f3bde656 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Sun, 23 Jul 2023 18:55:00 -0700 Subject: [PATCH 08/42] all done. after = fixes/more features --- code/game/objects/items/clown_items.dm | 35 ++++++++++++++++---------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/code/game/objects/items/clown_items.dm b/code/game/objects/items/clown_items.dm index f3ae6e3a40cf..25933eba19c7 100644 --- a/code/game/objects/items/clown_items.dm +++ b/code/game/objects/items/clown_items.dm @@ -102,21 +102,22 @@ //So this is a workaround. This also makes more sense from an IC standpoint. ~Carn if(user.client && ((target in user.client.screen) && !user.is_holding(target))) to_chat(user, span_warning("You need to take that [target.name] off before cleaning it!")) - else if(istype(target, /obj/effect/decal/cleanable)) + return + if(istype(target, /obj/effect/decal/cleanable)) user.visible_message("[user] begins to scrub \the [target.name] out with [src].", span_warning("You begin to scrub \the [target.name] out with [src]...")) if(do_after(user, src.cleanspeed, target)) to_chat(user, span_notice("You scrub \the [target.name] out.")) qdel(target) decreaseUses(user) - - else if(ishuman(target) && user.zone_selected == BODY_ZONE_PRECISE_MOUTH) + return + if(ishuman(target) && user.zone_selected == BODY_ZONE_PRECISE_MOUTH) var/mob/living/carbon/human/H = user user.visible_message(span_warning("\the [user] washes \the [target]'s mouth out with [src.name]!"), span_notice("You wash \the [target]'s mouth out with [src.name]!")) //washes mouth out with soap sounds better than 'the soap' here if(user.zone_selected == "mouth") H.lip_style = null //removes lipstick H.update_body() decreaseUses(user) return - else if(istype(target, /obj/structure/window)) + if(istype(target, /obj/structure/window)) user.visible_message("[user] begins to clean \the [target.name] with [src]...", span_notice("You begin to clean \the [target.name] with [src]...")) if(do_after(user, src.cleanspeed, target)) to_chat(user, span_notice("You clean \the [target.name].")) @@ -128,17 +129,25 @@ qdel(iter_blood) our_window.bloodied = FALSE decreaseUses(user) - else - user.visible_message("[user] begins to clean \the [target.name] with [src]...", span_notice("You begin to clean \the [target.name] with [src]...")) - if(do_after(user, src.cleanspeed, target)) - to_chat(user, span_notice("You clean \the [target.name].")) - target.wash(CLEAN_SCRUB) - target.remove_atom_colour(WASHABLE_COLOUR_PRIORITY) - target.wash_cream() - decreaseUses(user) + return + if(istype(target, /obj/machinery/door)) + var/obj/machinery/door/door = target + if(door.obj_flags && CMAGGED) + user.visible_message("[user] starts to clean the ooze off \the [door.name]'s access panel.", "You start to clean the ooze off \the [door.name]'s access panel.") + if(do_after(user, src.cleanspeed, door)) + to_chat(span_notice(" You clean the ooze off [src]'s access panel.")) + door.obj_flags -= CMAGGED + decreaseUses(user) + return + user.visible_message("[user] begins to clean \the [target.name] with [src]...", span_notice("You begin to clean \the [target.name] with [src]...")) + if(do_after(user, src.cleanspeed, target)) + to_chat(user, span_notice("You clean \the [target.name].")) + target.wash(CLEAN_SCRUB) + target.remove_atom_colour(WASHABLE_COLOUR_PRIORITY) + target.wash_cream() + decreaseUses(user) return - /* * Bike Horns */ From bba2d926bd025060086b5c80da27516972015b42 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Sun, 23 Jul 2023 19:19:33 -0700 Subject: [PATCH 09/42] 5 to SOOTH the balance council --- code/modules/uplink/uplink_items.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/uplink/uplink_items.dm b/code/modules/uplink/uplink_items.dm index c7c502772b00..453851bf2966 100644 --- a/code/modules/uplink/uplink_items.dm +++ b/code/modules/uplink/uplink_items.dm @@ -2611,7 +2611,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) name = "Jestographic Sequencer" desc = "The jestographic sequencer, also known as a cmag, is a small card that inverts the access on any door it's used on. Perfect for locking command out of their own departments. Honk!" item = /obj/item/card/emag/cmag - cost = 4 // Not as destructive as the emag. In addition, currently does not have many features. Increase if cmag can do more impactful things. + cost = 5 // Not as "destructive" as the emag. 5 TCs is likely not a fair pricing given: A) less features than normal emag, B) role-restricted, C) funny-themed. restricted_roles = list("Clown") // Pointless From cd0fd5d58aefab6e072fc44694e45e27f8290399 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Sun, 23 Jul 2023 20:09:43 -0700 Subject: [PATCH 10/42] use sprite --- code/game/objects/items/cards_ids.dm | 4 ++-- yogstation/icons/obj/card.dmi | Bin 10994 -> 14157 bytes 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index 03bccfb13721..74185008efa4 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -167,12 +167,12 @@ /obj/item/card/emag/cmag desc = "It's a card coated in a slurry of electromagnetic bananium." name = "jestographic sequencer" - color = rgb(255, 0, 85) // TODO: If there is a cool sprite for this funny emag, please add. Otherwise, it will be a recolored emag. + icon_state = "cmag" clown_version = TRUE /obj/item/card/emag/cmag/Initialize(mapload) . = ..() - AddComponent(/datum/component/slippery, 8 SECONDS, GALOSHES_DONT_HELP)// It wouldn't be funny if it couldn't slip! + AddComponent(/datum/component/slippery, 8 SECONDS, GALOSHES_DONT_HELP) // It wouldn't be funny if it couldn't slip! /obj/item/card/emagfake desc = "It's a card with a magnetic strip attached to some circuitry. Closer inspection shows that this card is a poorly made replica, with a \"DonkCo\" logo stamped on the back." diff --git a/yogstation/icons/obj/card.dmi b/yogstation/icons/obj/card.dmi index 050d9d43fdcf260d1010b4be0ee4e23033f11978..28cceca2a94fc94b60a942c63ce65c592f4fbee8 100644 GIT binary patch literal 14157 zcmb`ucT^Km`z|_!Dn&qw0zyEMBGQ{k2}OGEy$I5)^cDypRS*>wkt#(xsPvYgC@H`cesRe-#GJ-%G+)mISX%`?W*tO_0%(M!=FBQ z^ZKdZW>~GYan0sa2j_rPhmw*2>^Jp<00r}`8{a#p^{20LKvs^6ugr@@iMXco-Kk68 z@cHy~SL&4RgAQlrmvY` z(855Go+e>CrP7C8L|f713E!HaGP0(>G_^JW`}fCUr|(r0C4;bEzj6U*>lleju`nK2 zwU@)0WDdD8H_ZbhvDX(12L?&2jE_Qk<{PomZI;jnzsu&t4Rf;qfEUoct7Z{duv-`t z%VN1OfMVGT=;=-?(RuW>CF3V&&>PB24}J-V3~f^;usbq8)HDrnQdMO(6@w(+YO_=` zeG1p?4q|B$HBn2;_~}YUW^W=yYcp(CG7?34_3gfZ;RL^-fXnxj!yg*b(u4c=J>o{A zzUK`p=~-E^UrOhfeE+434E&D!3h+MVmyiN<_%CGA1DA9mEQi38ygXqkX=%;6u z0Xe#ZU5xDEHa=f|K!z^uH|9jPh~4iox1yG*DYLc114^c@TfAljJx`#&Fm5```oa8{ z+)aj{uI2XS06l$uU44Bw?AG*)7m6Z_E;7jRBTj1CDH3=6vtG8as2mKpfA_F)p
  • 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 literal 10994 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 Date: Sun, 23 Jul 2023 20:10:42 -0700 Subject: [PATCH 11/42] lol nvm decrease to 4 --- code/modules/uplink/uplink_items.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/uplink/uplink_items.dm b/code/modules/uplink/uplink_items.dm index 453851bf2966..efabc813189f 100644 --- a/code/modules/uplink/uplink_items.dm +++ b/code/modules/uplink/uplink_items.dm @@ -2611,7 +2611,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) name = "Jestographic Sequencer" desc = "The jestographic sequencer, also known as a cmag, is a small card that inverts the access on any door it's used on. Perfect for locking command out of their own departments. Honk!" item = /obj/item/card/emag/cmag - cost = 5 // Not as "destructive" as the emag. 5 TCs is likely not a fair pricing given: A) less features than normal emag, B) role-restricted, C) funny-themed. + cost = 4 // Not as "destructive" as the emag. In addition, less features than the normal emag. Increase price once more impact features are added. restricted_roles = list("Clown") // Pointless From fd5c82c40723c078fe65ff3091a9b4a740a6ec6b Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Sun, 23 Jul 2023 20:20:45 -0700 Subject: [PATCH 12/42] -ful --- code/modules/uplink/uplink_items.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/uplink/uplink_items.dm b/code/modules/uplink/uplink_items.dm index efabc813189f..d1d7d220807a 100644 --- a/code/modules/uplink/uplink_items.dm +++ b/code/modules/uplink/uplink_items.dm @@ -2611,7 +2611,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) name = "Jestographic Sequencer" desc = "The jestographic sequencer, also known as a cmag, is a small card that inverts the access on any door it's used on. Perfect for locking command out of their own departments. Honk!" item = /obj/item/card/emag/cmag - cost = 4 // Not as "destructive" as the emag. In addition, less features than the normal emag. Increase price once more impact features are added. + cost = 4 // Not as "destructive" as the emag. In addition, less features than the normal emag. Increase price once more impactful features are added. restricted_roles = list("Clown") // Pointless From 4e84e348ceec5c914a2485d400a844c44a3d43c3 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Sun, 23 Jul 2023 20:21:47 -0700 Subject: [PATCH 13/42] why was this flipped --- code/game/machinery/doors/windowdoor.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 47f3ead7901d..545a1c427286 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -68,7 +68,7 @@ if(operating || !density) return if(!(ismob(AM))) - if(!ismecha(AM)) + if(ismecha(AM)) var/obj/mecha/mecha = AM var/has_access = (obj_flags & CMAGGED) ? !check_access_list(mecha.operation_req_access) : check_access_list(mecha.operation_req_access) if(mecha.occupant) // If there is an occupant, check their access too. From 8cfd2d18e559a6e7e44204f615461bb9eead372c Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Sun, 23 Jul 2023 20:26:44 -0700 Subject: [PATCH 14/42] forgot a laugh here --- code/game/machinery/doors/airlock.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index bef24a2a73e1..e88095f5f567 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -490,6 +490,8 @@ if(has_access) open() else + if(obj_flags & CMAGGED) + try_play_cmagsound() do_animate("deny") return . = ..() From 613818639f470b318f1109a8637070f308990bb7 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Wed, 26 Jul 2023 23:28:53 -0700 Subject: [PATCH 15/42] conversion pt.1 --- code/modules/mob/living/carbon/human/species_types/ethereal.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/species_types/ethereal.dm b/code/modules/mob/living/carbon/human/species_types/ethereal.dm index 3e5aae56dd8f..cb83bc6eaf10 100644 --- a/code/modules/mob/living/carbon/human/species_types/ethereal.dm +++ b/code/modules/mob/living/carbon/human/species_types/ethereal.dm @@ -111,7 +111,7 @@ if(EMP_HEAVY) addtimer(CALLBACK(src, PROC_REF(stop_emp), H), 200, TIMER_UNIQUE|TIMER_OVERRIDE) //We're out for 20 seconds -/datum/species/ethereal/spec_emag_act(mob/living/carbon/human/H, mob/user) +/datum/species/ethereal/spec_emag_act(mob/living/carbon/human/H, mob/user, obj/item/card/emag/emag_card) if(emageffect) return emageffect = TRUE From e26108cffe78e8428ca48651a4c399139d162700 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Wed, 26 Jul 2023 23:29:10 -0700 Subject: [PATCH 16/42] conversion, uh next --- .../signals_atom/signals_atom_x_act.dm | 4 +--- code/game/atoms.dm | 24 ++++++------------- code/game/machinery/Sleeper.dm | 4 +++- code/game/machinery/airlock_cycle_control.dm | 4 +++- code/game/machinery/announcement_system.dm | 3 ++- code/game/machinery/autolathe.dm | 4 +++- code/game/machinery/buttons.dm | 4 +++- code/game/machinery/cloning.dm | 4 +++- code/game/machinery/computer/apc_control.dm | 4 +++- code/game/machinery/computer/arcade.dm | 8 +++++-- .../game/machinery/computer/communications.dm | 4 +++- code/game/machinery/computer/security.dm | 4 +++- code/game/machinery/decontamination.dm | 4 +++- code/game/machinery/doors/airlock.dm | 18 ++++---------- code/game/machinery/doors/unpowered.dm | 4 ++-- code/game/machinery/doors/windowdoor.dm | 18 +++++++------- .../embedded_controller/access_controller.dm | 4 +++- code/game/machinery/fat_sucker.dm | 4 +++- code/game/machinery/firealarm.dm | 4 +++- code/game/machinery/gulag_item_reclaimer.dm | 4 +++- code/game/machinery/harvester.dm | 4 +++- code/game/machinery/lightswitch.dm | 4 +++- code/game/machinery/limbgrower.dm | 4 +++- code/game/machinery/medical_kiosk.dm | 6 +++-- .../machinery/porta_turret/portable_turret.dm | 8 +++++-- .../porta_turret/portable_turret_cover.dm | 4 +++- code/game/machinery/recycler.dm | 4 +++- code/game/machinery/scan_gate.dm | 4 +++- code/game/machinery/shieldgen.dm | 8 +++++-- code/game/machinery/slotmachine.dm | 4 +++- code/game/machinery/stasis.dm | 4 +++- .../machinery/telecomms/computers/message.dm | 4 +++- .../machinery/telecomms/telecomunications.dm | 4 +++- code/game/mecha/mech_fabricator.dm | 4 +++- code/game/objects/items/RSF.dm | 4 +++- code/game/objects/items/cards_ids.dm | 8 ++----- code/game/objects/items/cigs_lighters.dm | 4 +++- .../circuitboards/computer_circuitboards.dm | 12 ++++++---- code/game/objects/items/defib.dm | 4 +++- .../objects/items/devices/geiger_counter.dm | 4 +++- .../objects/items/devices/lightreplacer.dm | 4 +++- code/game/objects/items/devices/megaphone.dm | 4 +++- code/game/objects/items/robot/robot_items.dm | 4 +++- code/game/objects/items/storage/lockbox.dm | 4 +++- code/game/objects/structures/barsigns.dm | 4 +++- .../structures/crates_lockers/closets.dm | 4 +++- code/game/objects/structures/fireaxe.dm | 4 +++- code/modules/VR/vr_sleeper.dm | 6 +++-- .../revenant/revenant_abilities.dm | 4 ++-- .../atmospherics/machinery/airalarm.dm | 4 +++- code/modules/cargo/bounty_console.dm | 4 +++- code/modules/cargo/console.dm | 4 +++- code/modules/cargo/expressconsole.dm | 4 +++- code/modules/clothing/glasses/hud.dm | 4 +++- code/modules/clothing/masks/hailer.dm | 4 +++- code/modules/events/ion_storm.dm | 2 +- .../goals/station_goals/bluespace_tap.dm | 4 +++- code/modules/goals/station_goals/shield.dm | 4 +++- code/modules/holodeck/computer.dm | 4 +++- code/modules/library/lib_machines.dm | 4 +++- code/modules/mining/abandoned_crates.dm | 4 +++- code/modules/mining/laborcamp/laborstacker.dm | 4 +++- .../mob/living/carbon/human/human_defense.dm | 6 +++-- .../mob/living/carbon/human/species.dm | 2 +- .../living/carbon/human/species_types/IPC.dm | 2 +- .../management/ai_controlpanel.dm | 4 +++- .../management/resource_distribution.dm | 4 +++- .../mob/living/silicon/robot/robot_defense.dm | 4 +++- .../mob/living/simple_animal/bot/atmosbot.dm | 4 +++- .../mob/living/simple_animal/bot/bot.dm | 4 +++- .../mob/living/simple_animal/bot/cleanbot.dm | 4 +++- .../mob/living/simple_animal/bot/ed209bot.dm | 4 +++- .../mob/living/simple_animal/bot/firebot.dm | 4 +++- .../mob/living/simple_animal/bot/floorbot.dm | 4 +++- .../mob/living/simple_animal/bot/honkbot.dm | 4 +++- .../mob/living/simple_animal/bot/medbot.dm | 4 +++- .../mob/living/simple_animal/bot/mulebot.dm | 4 +++- .../mob/living/simple_animal/bot/secbot.dm | 4 +++- .../mob/living/simple_animal/friendly/dog.dm | 4 +++- .../simple_animal/friendly/spiderbot.dm | 6 +++-- .../computers/item/computer.dm | 4 +++- .../computers/item/tablet/tablet.dm | 4 +++- .../computers/machinery/modular_computer.dm | 6 +++-- code/modules/ninja/energy_katana.dm | 2 +- code/modules/pai/card.dm | 6 +++-- code/modules/pai/pai.dm | 4 ++-- code/modules/paperwork/ticketmachine.dm | 4 +++- code/modules/power/apc.dm | 4 +++- code/modules/power/port_gen.dm | 4 +++- code/modules/power/singularity/emitter.dm | 4 +++- code/modules/projectiles/pins.dm | 4 +++- .../chemistry/machinery/chem_dispenser.dm | 4 +++- .../modules/research/nanites/nanite_remote.dm | 4 +++- code/modules/research/rdconsole.dm | 4 +++- code/modules/research/server.dm | 4 +++- code/modules/shuttle/computer.dm | 4 +++- code/modules/shuttle/emergency.dm | 8 +++++-- code/modules/shuttle/ferry.dm | 4 +++- code/modules/shuttle/special.dm | 4 ++-- .../spells/spell_types/conjure/ed_swarm.dm | 4 ++-- code/modules/surgery/organs/augments_arms.dm | 4 +++- code/modules/vehicles/cars/clowncar.dm | 4 +++- code/modules/vehicles/motorized_wheelchair.dm | 4 +++- code/modules/vending/_vending.dm | 4 +++- .../code/game/machinery/computer/arcade.dm | 4 +++- .../telecomms/computers/traffic_control.dm | 4 +++- .../code/game/objects/items/cards_ids.dm | 4 +++- .../game/objects/items/holotool/holotool.dm | 4 +++- yogstation/code/game/objects/items/plushes.dm | 4 +++- yogstation/code/game/objects/items/tools.dm | 4 +++- .../code/game/objects/structures/fireaxe.dm | 4 +++- .../code/modules/clothing/suits/nerd.dm | 4 +++- .../species_types/preternis/preternis.dm | 4 +++- .../living/simple_animal/friendly/clowncat.dm | 6 +++-- yogstation/code/modules/power/hugbox.dm | 4 +++- .../particle_accelerator/particle_control.dm | 4 +++- .../code/modules/power/stationarybike.dm | 4 +++- yogstation/code/modules/power/validhunter.dm | 4 +++- 118 files changed, 372 insertions(+), 181 deletions(-) diff --git a/code/__DEFINES/dcs/signals/signals_atom/signals_atom_x_act.dm b/code/__DEFINES/dcs/signals/signals_atom/signals_atom_x_act.dm index 01072cbc968c..b88753f47d6e 100644 --- a/code/__DEFINES/dcs/signals/signals_atom/signals_atom_x_act.dm +++ b/code/__DEFINES/dcs/signals/signals_atom/signals_atom_x_act.dm @@ -20,10 +20,8 @@ #define COMPONENT_CANCEL_BLOB_ACT (1<<0) ///from base of atom/acid_act(): (acidpwr, acid_volume) #define COMSIG_ATOM_ACID_ACT "atom_acid_act" -///from base of atom/emag_act(): (/mob/user) +///from base of atom/emag_act(): (/mob/user, /obj/item/card/emag) #define COMSIG_ATOM_EMAG_ACT "atom_emag_act" -///from base of atom/cmag_act(): (/mob/user) -#define COMSIG_ATOM_CMAG_ACT "atom_cmag_act" ///! from base of atom/rad_act(intensity, collectable_radiation) #define COMSIG_ATOM_RAD_ACT "atom_rad_act" ///from base of atom/narsie_act(): () diff --git a/code/game/atoms.dm b/code/game/atoms.dm index c843b19b9c66..035152fd7601 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -91,9 +91,6 @@ var/base_pixel_x = 0 ///Default pixel y shifting for the atom's icon. var/base_pixel_y = 0 - ///the base icon state used for anything that changes their icon state. - var/base_icon_state - ///Mobs that are currently do_after'ing this atom, to be cleared from on Destroy() var/list/targeted_by @@ -408,10 +405,6 @@ /atom/proc/is_drainable() return reagents && (reagents.flags & DRAINABLE) -/// Can this atom spill its reagents -/atom/proc/is_spillable() - return reagents && (reagents.flags & SPILLABLE) - /// Are you allowed to drop this atom /atom/proc/AllowDrop() return FALSE @@ -792,18 +785,15 @@ /** * Respond to an emag being used on our atom * - * Default behaviour is to send COMSIG_ATOM_EMAG_ACT and return - */ -/atom/proc/emag_act() - SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) - -/** - * Respond to a cmag being used on our atom + * Args: + * * mob/user: The mob that used the emag. Nullable. + * * obj/item/card/emag/emag_card: The emag that was used. Nullable. * - * Default behaviour is to send COMSIG_ATOM_CMAG_ACT and return + * Returns: + * TRUE if the emag had any effect, falsey otherwise. */ -/atom/proc/cmag_act() - SEND_SIGNAL(src, COMSIG_ATOM_CMAG_ACT) +/atom/proc/emag_act(mob/user, obj/item/card/emag/emag_card) + return (SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT, user, emag_card)) /** * Respond to a radioactive wave hitting this atom diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 8f6ba6f432b6..72b9f6d9a0b2 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -120,7 +120,9 @@ if(is_operational() && occupant) open_machine() -/obj/machinery/sleeper/emag_act(mob/user) +/obj/machinery/sleeper/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return to_chat(user, span_danger("You disable the chemical injection inhibitors on the sleeper...")) diff --git a/code/game/machinery/airlock_cycle_control.dm b/code/game/machinery/airlock_cycle_control.dm index fc62172ae40e..b483836db224 100644 --- a/code/game/machinery/airlock_cycle_control.dm +++ b/code/game/machinery/airlock_cycle_control.dm @@ -786,7 +786,9 @@ . = ..() update_cycle_icon() -/obj/machinery/advanced_airlock_controller/emag_act(mob/user) +/obj/machinery/advanced_airlock_controller/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return obj_flags |= EMAGGED diff --git a/code/game/machinery/announcement_system.dm b/code/game/machinery/announcement_system.dm index 692bf18f87ac..76e0e42b310b 100644 --- a/code/game/machinery/announcement_system.dm +++ b/code/game/machinery/announcement_system.dm @@ -170,7 +170,8 @@ GLOBAL_LIST_EMPTY(announcement_systems) if(!(stat & (NOPOWER|BROKEN)) && !(. & EMP_PROTECT_SELF)) act_up() -/obj/machinery/announcement_system/emag_act() + +/obj/machinery/announcement_system/emag_act(mob/user, obj/item/card/emag/emag_card) if(obj_flags & EMAGGED) return obj_flags |= EMAGGED diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 662394bc1061..8a4c5ab5a567 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -311,7 +311,9 @@ . = ..() adjust_hacked(TRUE) -/obj/machinery/autolathe/emag_act(mob/user) +/obj/machinery/autolathe/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return obj_flags |= EMAGGED diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index 0b4197a8ba15..7f1698678837 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -133,7 +133,9 @@ else return ..() -/obj/machinery/button/emag_act(mob/user) +/obj/machinery/button/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return req_access = list() diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index bf8621f5ef17..5ba466d9025f 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -435,7 +435,9 @@ GLOBAL_VAR_INIT(clones, 0) else return ..() -/obj/machinery/clonepod/emag_act(mob/user) +/obj/machinery/clonepod/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(!occupant) return to_chat(user, span_warning("You corrupt the genetic compiler.")) diff --git a/code/game/machinery/computer/apc_control.dm b/code/game/machinery/computer/apc_control.dm index 9150858e5757..642630d53e86 100644 --- a/code/game/machinery/computer/apc_control.dm +++ b/code/game/machinery/computer/apc_control.dm @@ -181,7 +181,9 @@ var/setTo = target.operating ? "On" : "Off" log_activity("Turned APC [target.area.name]'s breaker [setTo]") -/obj/machinery/computer/apc_control/emag_act(mob/user) +/obj/machinery/computer/apc_control/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return obj_flags |= EMAGGED diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 8de6a30640d6..a437c36a48f2 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -330,7 +330,9 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list( return -/obj/machinery/computer/arcade/battle/emag_act(mob/user) +/obj/machinery/computer/arcade/battle/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return to_chat(user, span_warning("A mesmerizing Rhumba beat starts playing from the arcade machine's speakers!")) @@ -1086,7 +1088,9 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list( name = "The Orion Trail" desc = "Learn how our ancestors planned to colonize Orion, and have fun in the process!" -/obj/machinery/computer/arcade/orion_trail/emag_act(mob/user) +/obj/machinery/computer/arcade/orion_trail/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return to_chat(user, span_notice("You override the cheat code menu and skip to Cheat #[rand(1, 50)]: Realism Mode.")) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 2895becc2d95..5dec6e7900b7 100755 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -81,7 +81,9 @@ else return ..() -/obj/machinery/computer/communications/emag_act(mob/user) +/obj/machinery/computer/communications/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if (obj_flags & EMAGGED) return obj_flags |= EMAGGED diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 03ebd90fc623..31c61246dcfd 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -846,7 +846,9 @@ //Cancel silicon alert after 1 minute addtimer(CALLBACK(SILICON, TYPE_PROC_REF(/mob/living/silicon, cancelAlarm),"Burglar",src,alarmed), 600) -/obj/machinery/computer/secure_data/emag_act(mob/user) +/obj/machinery/computer/secure_data/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return var/name if(ishuman(user)) var/mob/living/carbon/human/human_user = user diff --git a/code/game/machinery/decontamination.dm b/code/game/machinery/decontamination.dm index fc2ede0dd6be..97e4d8542319 100644 --- a/code/game/machinery/decontamination.dm +++ b/code/game/machinery/decontamination.dm @@ -169,7 +169,9 @@ s.start() electrocute_mob(user, src, src, 1, TRUE) -/obj/machinery/decontamination_unit/emag_act(mob/user) +/obj/machinery/decontamination_unit/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) to_chat(user, span_warning("[src] has no functional safeties to emag.")) return diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index f15ac061b06d..a4e65d2169be 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1528,7 +1528,7 @@ //Airlock is passable if it is open (!density), bot has access, and is not bolted shut or powered off) return !density || (check_access(ID) && !locked && hasPower()) -/obj/machinery/door/airlock/emag_act(mob/user) +/obj/machinery/door/airlock/emag_act(mob/user, obj/item/card/emag/emag_card) if(operating || !density || !hasPower() || (obj_flags & EMAGGED)) return operating = TRUE @@ -1537,6 +1537,10 @@ if(QDELETED(src)) return operating = FALSE + if(istype(emag_card, /obj/item/card/emag/cmag)) + update_icon(state = AIRLOCK_CLOSED, override = TRUE) + obj_flags |= CMAGGED + return if(!open()) // Something prevented it from being opened. For example, bolted/welded shut. update_icon(state = AIRLOCK_CLOSED, override = TRUE) obj_flags |= EMAGGED @@ -1545,18 +1549,6 @@ loseMainPower() loseBackupPower() -/obj/machinery/door/airlock/cmag_act(mob/user) - if(operating || !density || !hasPower() || (obj_flags & CMAGGED)) - return - operating = TRUE - update_icon(state = AIRLOCK_EMAG, override = TRUE) - sleep(0.6 SECONDS) - if(QDELETED(src)) - return - operating = FALSE - update_icon(state = AIRLOCK_CLOSED, override = TRUE) - obj_flags |= CMAGGED - /obj/machinery/door/airlock/attack_alien(mob/living/carbon/alien/humanoid/user) add_fingerprint(user) if(isElectrified()) diff --git a/code/game/machinery/doors/unpowered.dm b/code/game/machinery/doors/unpowered.dm index 4ff4bd15d714..0f7fd4ec4da7 100644 --- a/code/game/machinery/doors/unpowered.dm +++ b/code/game/machinery/doors/unpowered.dm @@ -13,7 +13,7 @@ else return ..() -/obj/machinery/door/unpowered/emag_act() +/obj/machinery/door/unpowered/emag_act(mob/user, obj/item/card/emag/emag_card) return /obj/machinery/door/unpowered/shuttle @@ -22,4 +22,4 @@ icon_state = "door1" opacity = 1 density = TRUE - explosion_block = 1 \ No newline at end of file + explosion_block = 1 diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 545a1c427286..5e5c82397d92 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -216,9 +216,16 @@ take_damage(round(exposed_volume / 200), BURN, 0, 0) ..() -/obj/machinery/door/window/emag_act(mob/user) +/obj/machinery/door/window/emag_act(mob/user, obj/item/card/emag/emag_card) if(operating || !density || (obj_flags & CMAGGED)) return + if(istype(emag_card, /obj/item/card/emag/cmag)) + obj_flags |= CMAGGED + operating = TRUE + flick("[base_state]spark", src) + playsound(src, "sparks", 75, 1) + operating = FALSE + return obj_flags |= EMAGGED operating = TRUE flick("[base_state]spark", src) @@ -229,15 +236,6 @@ operating = FALSE open(2) -/obj/machinery/door/window/cmag_act(mob/user) - if(operating || !density || (obj_flags & CMAGGED)) - return - obj_flags |= CMAGGED - operating = TRUE - flick("[base_state]spark", src) - playsound(src, "sparks", 75, 1) - operating = FALSE - /obj/machinery/door/window/examine(mob/user) . = ..() if(obj_flags & EMAGGED) diff --git a/code/game/machinery/embedded_controller/access_controller.dm b/code/game/machinery/embedded_controller/access_controller.dm index 1a2fb972d1d7..3a76f96ed014 100644 --- a/code/game/machinery/embedded_controller/access_controller.dm +++ b/code/game/machinery/embedded_controller/access_controller.dm @@ -25,7 +25,9 @@ /obj/machinery/doorButtons/LateInitialize() findObjsByTag() -/obj/machinery/doorButtons/emag_act(mob/user) +/obj/machinery/doorButtons/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return obj_flags |= EMAGGED diff --git a/code/game/machinery/fat_sucker.dm b/code/game/machinery/fat_sucker.dm index 729601badbdf..ca67605ffa02 100644 --- a/code/game/machinery/fat_sucker.dm +++ b/code/game/machinery/fat_sucker.dm @@ -203,7 +203,9 @@ if(default_deconstruction_crowbar(I)) return TRUE -/obj/machinery/fat_sucker/emag_act(mob/living/user) +/obj/machinery/fat_sucker/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return start_at = 100 diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index 17177a7124b7..596e9878213e 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -104,7 +104,9 @@ if(prob(50 / severity)) alarm() -/obj/machinery/firealarm/emag_act(mob/user) +/obj/machinery/firealarm/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return obj_flags |= EMAGGED diff --git a/code/game/machinery/gulag_item_reclaimer.dm b/code/game/machinery/gulag_item_reclaimer.dm index 428b2e6f4f09..50a58f4756e0 100644 --- a/code/game/machinery/gulag_item_reclaimer.dm +++ b/code/game/machinery/gulag_item_reclaimer.dm @@ -23,7 +23,9 @@ inserted_id = null return ..() -/obj/machinery/gulag_item_reclaimer/emag_act(mob/user) +/obj/machinery/gulag_item_reclaimer/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) // emagging lets anyone reclaim all the items return req_access = list() diff --git a/code/game/machinery/harvester.dm b/code/game/machinery/harvester.dm index f008b7c21f06..297f1601df85 100644 --- a/code/game/machinery/harvester.dm +++ b/code/game/machinery/harvester.dm @@ -156,7 +156,9 @@ visible_message(span_notice("[usr] pries open \the [src]."), span_notice("You pry open [src].")) open_machine() -/obj/machinery/harvester/emag_act(mob/user) +/obj/machinery/harvester/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return obj_flags |= EMAGGED diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index d930835cfb75..719329bbdb8e 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -76,7 +76,9 @@ electrocute_mob(user, get_area(src), src, 0.7, TRUE) -/obj/machinery/light_switch/emag_act(mob/user) +/obj/machinery/light_switch/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) to_chat(user, span_warning("Nothing new seems to happen when you swipe the emag.")) return diff --git a/code/game/machinery/limbgrower.dm b/code/game/machinery/limbgrower.dm index 50a6847414dd..5b286dfcf566 100644 --- a/code/game/machinery/limbgrower.dm +++ b/code/game/machinery/limbgrower.dm @@ -302,7 +302,9 @@ return TRUE /// Emagging a limbgrower allows you to build synthetic armblades. -/obj/machinery/limbgrower/emag_act(mob/user) +/obj/machinery/limbgrower/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return for(var/design_id in SSresearch.techweb_designs) diff --git a/code/game/machinery/medical_kiosk.dm b/code/game/machinery/medical_kiosk.dm index d567f70eed7b..cfa3993a62d9 100644 --- a/code/game/machinery/medical_kiosk.dm +++ b/code/game/machinery/medical_kiosk.dm @@ -135,8 +135,10 @@ qdel(scanner_wand) return ..() -/obj/machinery/medical_kiosk/emag_act(mob/user) - ..() +/obj/machinery/medical_kiosk/emag_act(mob/user, obj/item/card/emag/emag_card) + ..() // Why? + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return if(user) diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 4b8e6f00a424..04831b6f36e8 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -276,7 +276,9 @@ else return ..() -/obj/machinery/porta_turret/emag_act(mob/user) +/obj/machinery/porta_turret/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return to_chat(user, span_warning("You short out [src]'s threat assessment circuits.")) @@ -867,7 +869,9 @@ else to_chat(user, span_warning("Access denied.")) -/obj/machinery/turretid/emag_act(mob/user) +/obj/machinery/turretid/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return to_chat(user, span_danger("You short out the turret controls' access analysis module.")) diff --git a/code/game/machinery/porta_turret/portable_turret_cover.dm b/code/game/machinery/porta_turret/portable_turret_cover.dm index fcfdad3df641..27cc2d6ee988 100644 --- a/code/game/machinery/porta_turret/portable_turret_cover.dm +++ b/code/game/machinery/porta_turret/portable_turret_cover.dm @@ -87,7 +87,9 @@ /obj/machinery/porta_turret_cover/can_be_overridden() . = 0 -/obj/machinery/porta_turret_cover/emag_act(mob/user) +/obj/machinery/porta_turret_cover/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(!(parent_turret.obj_flags & EMAGGED)) to_chat(user, span_notice("You short out [parent_turret]'s threat assessment circuits.")) visible_message("[parent_turret] hums oddly...") diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index 1611bef65ea3..5f03b4686a99 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -61,7 +61,9 @@ return return ..() -/obj/machinery/recycler/emag_act(mob/user) +/obj/machinery/recycler/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return obj_flags |= EMAGGED diff --git a/code/game/machinery/scan_gate.dm b/code/game/machinery/scan_gate.dm index 046557a8814c..75dd57b08ac4 100644 --- a/code/game/machinery/scan_gate.dm +++ b/code/game/machinery/scan_gate.dm @@ -82,7 +82,9 @@ else return ..() -/obj/machinery/scanner_gate/emag_act(mob/user) +/obj/machinery/scanner_gate/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return locked = FALSE diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index 332e2de1ef04..13d853229bc8 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -194,7 +194,9 @@ else return ..() -/obj/machinery/shieldgen/emag_act(mob/user) +/obj/machinery/shieldgen/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) to_chat(user, span_warning("The access controller is damaged!")) return @@ -387,7 +389,9 @@ update_activity() add_fingerprint(user) -/obj/machinery/shieldwallgen/emag_act(mob/user) +/obj/machinery/shieldwallgen/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) to_chat(user, span_warning("The access controller is damaged!")) return diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm index 265fd3106a48..298262be05e8 100644 --- a/code/game/machinery/slotmachine.dm +++ b/code/game/machinery/slotmachine.dm @@ -119,7 +119,9 @@ else return ..() -/obj/machinery/computer/slot_machine/emag_act() +/obj/machinery/computer/slot_machine/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return obj_flags |= EMAGGED diff --git a/code/game/machinery/stasis.dm b/code/game/machinery/stasis.dm index 401360aa8d1b..2da7ff8eccef 100644 --- a/code/game/machinery/stasis.dm +++ b/code/game/machinery/stasis.dm @@ -209,7 +209,9 @@ else ..() -/obj/machinery/stasis/emag_act(mob/user) +/obj/machinery/stasis/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) to_chat(user, span_warning("The stasis bed's safeties are already overridden!")) return diff --git a/code/game/machinery/telecomms/computers/message.dm b/code/game/machinery/telecomms/computers/message.dm index 374fd9f2ae09..8cf5ff34268a 100644 --- a/code/game/machinery/telecomms/computers/message.dm +++ b/code/game/machinery/telecomms/computers/message.dm @@ -47,7 +47,9 @@ else return ..() -/obj/machinery/computer/message_monitor/emag_act(mob/user) +/obj/machinery/computer/message_monitor/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return if(!isnull(linkedServer)) diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index 1883a21ee23f..ffe727a878c7 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -198,7 +198,9 @@ GLOBAL_LIST_EMPTY(telecomms_list) /obj/machinery/telecomms/proc/de_emp() stat &= ~EMPED -/obj/machinery/telecomms/emag_act() +/obj/machinery/telecomms/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return obj_flags |= EMAGGED visible_message(span_notice("Sparks fly out of the [src]!")) traffic += 50 diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 2144bdb71243..19169b53b189 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -765,7 +765,9 @@ return FALSE return TRUE -/obj/machinery/mecha_part_fabricator/emag_act(mob/user) +/obj/machinery/mecha_part_fabricator/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) to_chat(user, span_warning("[src] has no functional safeties to emag.")) return diff --git a/code/game/objects/items/RSF.dm b/code/game/objects/items/RSF.dm index 6a36a7cb64e1..f9b63148b3c4 100644 --- a/code/game/objects/items/RSF.dm +++ b/code/game/objects/items/RSF.dm @@ -182,7 +182,9 @@ RSF /obj/item/rsf/cookiesynth/attackby() return -/obj/item/rsf/cookiesynth/emag_act(mob/user) +/obj/item/rsf/cookiesynth/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return obj_flags ^= EMAGGED if(obj_flags & EMAGGED) to_chat(user, span_warning("You short out [src]'s reagent safety checker!")) diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index 74185008efa4..03ea52570db1 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -117,10 +117,7 @@ log_combat(user, A, "attempted to [clown_version ? "cmag" : "emag"]") charges-- // TODO: Consider refunding a charge if it fails/does nothing since it'll use up a charge regardless of success or failure. - if(clown_version) - A.cmag_act(user) - else - A.emag_act(user) + A.emag_act(user, src) /obj/item/card/emag/bluespace name = "bluespace cryptographic sequencer" @@ -161,14 +158,13 @@ to_chat(user, span_notice("The cheap circuitry isn't strong enough to subvert this!")) emagging = FALSE return - target.emag_act(user) + target.emag_act(user, src) emagging = FALSE /obj/item/card/emag/cmag desc = "It's a card coated in a slurry of electromagnetic bananium." name = "jestographic sequencer" icon_state = "cmag" - clown_version = TRUE /obj/item/card/emag/cmag/Initialize(mapload) . = ..() diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm index 42b4b0e3112a..5352ae440a11 100644 --- a/code/game/objects/items/cigs_lighters.dm +++ b/code/game/objects/items/cigs_lighters.dm @@ -864,7 +864,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM ..() -/obj/item/clothing/mask/vape/emag_act(mob/user)// I WON'T REGRET WRITTING THIS, SURLY. +/obj/item/clothing/mask/vape/emag_act(mob/user, obj/item/card/emag/emag_card)// I WON'T REGRET WRITTING THIS, SURLY. + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(screw) if(!(obj_flags & EMAGGED)) cut_overlays() diff --git a/code/game/objects/items/circuitboards/computer_circuitboards.dm b/code/game/objects/items/circuitboards/computer_circuitboards.dm index b8ad9044010f..22f4fd790d69 100644 --- a/code/game/objects/items/circuitboards/computer_circuitboards.dm +++ b/code/game/objects/items/circuitboards/computer_circuitboards.dm @@ -487,7 +487,9 @@ else to_chat(user, span_notice("The spectrum chip is unresponsive.")) -/obj/item/circuitboard/computer/cargo/emag_act(mob/living/user) +/obj/item/circuitboard/computer/cargo/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(!(obj_flags & EMAGGED)) contraband = TRUE obj_flags |= EMAGGED @@ -504,9 +506,11 @@ to_chat(user, span_notice("You reset the routing protocols to: \"factory defaults\".")) obj_flags &= ~EMAGGED -/obj/item/circuitboard/computer/cargo/express/emag_act(mob/living/user) - to_chat(user, span_notice("You change the routing protocols, allowing the Drop Pod to land anywhere on the station.")) - obj_flags |= EMAGGED +/obj/item/circuitboard/computer/cargo/express/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return + to_chat(user, span_notice("You change the routing protocols, allowing the Drop Pod to land anywhere on the station.")) + obj_flags |= EMAGGED /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 b666ae3b887a..4f67848d92bb 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -140,7 +140,9 @@ else return ..() -/obj/item/defibrillator/emag_act(mob/user) +/obj/item/defibrillator/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(safety) safety = FALSE to_chat(user, span_warning("You silently disable [src]'s safety protocols with the cryptographic sequencer.")) diff --git a/code/game/objects/items/devices/geiger_counter.dm b/code/game/objects/items/devices/geiger_counter.dm index 215a06b610be..da3a6b7403e8 100644 --- a/code/game/objects/items/devices/geiger_counter.dm +++ b/code/game/objects/items/devices/geiger_counter.dm @@ -178,7 +178,9 @@ to_chat(usr, span_notice("You flush [src]'s radiation counts, resetting it to normal.")) update_appearance(UPDATE_ICON) -/obj/item/geiger_counter/emag_act(mob/user) +/obj/item/geiger_counter/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return if(scanning) diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index 4c550782183d..250f88400b56 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -142,7 +142,9 @@ to_chat(user, span_notice("You fill \the [src] with lights from \the [S]. " + status_string() + "")) -/obj/item/lightreplacer/emag_act() +/obj/item/lightreplacer/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return Emag() diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index 7e06311398d4..89a51ce90588 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -63,7 +63,9 @@ playsound(loc, 'sound/items/megaphone.ogg', 100, 0, 1) speech_args[SPEECH_SPANS] |= voicespan -/obj/item/megaphone/emag_act(mob/user) +/obj/item/megaphone/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return to_chat(user, span_warning("You overload \the [src]'s voice synthesizer.")) diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index f3ebeb372907..243c1d8b60c3 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -299,7 +299,9 @@ icon_state = "megaphone" var/cooldown = 0 -/obj/item/harmalarm/emag_act(mob/user) +/obj/item/harmalarm/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return obj_flags ^= EMAGGED if(obj_flags & EMAGGED) to_chat(user, "You short out the safeties on [src]!") diff --git a/code/game/objects/items/storage/lockbox.dm b/code/game/objects/items/storage/lockbox.dm index 88a0cdd65df8..219bcbfc0f80 100644 --- a/code/game/objects/items/storage/lockbox.dm +++ b/code/game/objects/items/storage/lockbox.dm @@ -50,7 +50,9 @@ to_chat(user, span_danger("Access Denied.")) return -/obj/item/storage/lockbox/emag_act(mob/user) +/obj/item/storage/lockbox/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(!broken) broken = TRUE SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, FALSE) diff --git a/code/game/objects/structures/barsigns.dm b/code/game/objects/structures/barsigns.dm index 38236af658f7..4d66f24e0b4b 100644 --- a/code/game/objects/structures/barsigns.dm +++ b/code/game/objects/structures/barsigns.dm @@ -112,7 +112,9 @@ set_sign(new /datum/barsign/hiddensigns/empbarsign) broken = TRUE -/obj/structure/sign/barsign/emag_act(mob/user) +/obj/structure/sign/barsign/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(broken) to_chat(user, span_warning("Nothing interesting happens!")) return diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index d20a88cf3c18..a835a072e61e 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -523,7 +523,9 @@ GLOBAL_LIST_EMPTY(lockers) else if(secure && broken) to_chat(user, span_warning("\The [src] is broken!")) -/obj/structure/closet/emag_act(mob/user) +/obj/structure/closet/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(secure && !broken) user.visible_message(span_warning("Sparks fly from [src]!"), span_warning("You scramble [src]'s lock, breaking it open!"), diff --git a/code/game/objects/structures/fireaxe.dm b/code/game/objects/structures/fireaxe.dm index c584efd74012..cb94d77970a1 100644 --- a/code/game/objects/structures/fireaxe.dm +++ b/code/game/objects/structures/fireaxe.dm @@ -288,7 +288,9 @@ trigger_alarm() //already checks for alert var toggle_lock(user) -/obj/structure/fireaxecabinet/bridge/spare/emag_act(mob/user) +/obj/structure/fireaxecabinet/bridge/spare/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return . = ..() if(!.) return diff --git a/code/modules/VR/vr_sleeper.dm b/code/modules/VR/vr_sleeper.dm index 8b5a342b8abd..3a8fc50a3239 100644 --- a/code/modules/VR/vr_sleeper.dm +++ b/code/modules/VR/vr_sleeper.dm @@ -53,10 +53,12 @@ flags_1 = NODECONSTRUCT_1 only_current_user_can_interact = TRUE -/obj/machinery/vr_sleeper/hugbox/emag_act(mob/user) +/obj/machinery/vr_sleeper/hugbox/emag_act(mob/user, obj/item/card/emag/emag_card) return -/obj/machinery/vr_sleeper/emag_act(mob/user) +/obj/machinery/vr_sleeper/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return you_die_in_the_game_you_die_for_real = TRUE sparks.start() addtimer(CALLBACK(src, PROC_REF(emagNotify)), 150) diff --git a/code/modules/antagonists/revenant/revenant_abilities.dm b/code/modules/antagonists/revenant/revenant_abilities.dm index c32ebe515243..9bfa29fcb981 100644 --- a/code/modules/antagonists/revenant/revenant_abilities.dm +++ b/code/modules/antagonists/revenant/revenant_abilities.dm @@ -315,7 +315,7 @@ new /obj/effect/temp_visual/revenant(bot.loc) bot.locked = FALSE bot.open = TRUE - bot.emag_act(caster) + bot.emag_act(caster, null) for(var/mob/living/carbon/human/human in victim) if(human == caster) continue @@ -331,7 +331,7 @@ if(prob(20)) if(prob(50)) new /obj/effect/temp_visual/revenant(thing.loc) - thing.emag_act(caster) + thing.emag_act(caster, null) // Only works on cyborgs, not AI! for(var/mob/living/silicon/robot/cyborg in victim) playsound(cyborg, 'sound/machines/warning-buzzer.ogg', 50, TRUE) diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index bb8793b623d6..cc309685a378 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -846,7 +846,9 @@ to_chat(user, span_danger("Access denied.")) return -/obj/machinery/airalarm/emag_act(mob/user) +/obj/machinery/airalarm/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return obj_flags |= EMAGGED diff --git a/code/modules/cargo/bounty_console.dm b/code/modules/cargo/bounty_console.dm index fc6891985393..97d2c4ff59fa 100644 --- a/code/modules/cargo/bounty_console.dm +++ b/code/modules/cargo/bounty_console.dm @@ -31,7 +31,9 @@
    • Reward: [B.reward_string()]
    • Completed: [B.completion_string()]
    "} -/obj/machinery/computer/bounty/emag_act(mob/user) +/obj/machinery/computer/bounty/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return to_chat(user, span_warning("You adjust the antenna on \The [src], tuning it to a syndicate frequency.")) diff --git a/code/modules/cargo/console.dm b/code/modules/cargo/console.dm index b09cd169f262..2d1533736fb0 100644 --- a/code/modules/cargo/console.dm +++ b/code/modules/cargo/console.dm @@ -42,7 +42,9 @@ if(obj_flags & EMAGGED) . |= EXPORT_EMAG -/obj/machinery/computer/cargo/emag_act(mob/user) +/obj/machinery/computer/cargo/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return user.visible_message(span_warning("[user] swipes a suspicious card through [src]!"), diff --git a/code/modules/cargo/expressconsole.dm b/code/modules/cargo/expressconsole.dm index a0d8c22af791..86c7c049438e 100644 --- a/code/modules/cargo/expressconsole.dm +++ b/code/modules/cargo/expressconsole.dm @@ -53,7 +53,9 @@ to_chat(user, span_notice("[src] is already linked to [sb].")) ..() -/obj/machinery/computer/cargo/express/emag_act(mob/living/user) +/obj/machinery/computer/cargo/express/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return user.visible_message(span_warning("[user] swipes a suspicious card through [src]!"), diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index f65cb9d9086c..8136448a89be 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -23,7 +23,9 @@ obj_flags |= EMAGGED desc = "[desc] The display is flickering slightly." -/obj/item/clothing/glasses/hud/emag_act(mob/user) +/obj/item/clothing/glasses/hud/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return obj_flags |= EMAGGED diff --git a/code/modules/clothing/masks/hailer.dm b/code/modules/clothing/masks/hailer.dm index 13460c6433a3..70680401ec6a 100644 --- a/code/modules/clothing/masks/hailer.dm +++ b/code/modules/clothing/masks/hailer.dm @@ -129,7 +129,9 @@ else adjustmask(user) -/obj/item/clothing/mask/gas/sechailer/emag_act(mob/user as mob) +/obj/item/clothing/mask/gas/sechailer/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) obj_flags |= EMAGGED to_chat(user, span_warning("You silently fry [src]'s vocal circuit with the cryptographic sequencer.")) diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm index 3a3dbd8f6534..c32d6b00e9f0 100644 --- a/code/modules/events/ion_storm.dm +++ b/code/modules/events/ion_storm.dm @@ -60,7 +60,7 @@ if(botEmagChance) for(var/mob/living/simple_animal/bot/bot in GLOB.alive_mob_list) if(prob(botEmagChance)) - bot.emag_act() + bot.emag_act(null, null) /*/proc/generate_ion_law() //yogs - start mirrored in the yogs folder //Threats are generally bad things, silly or otherwise. Plural. diff --git a/code/modules/goals/station_goals/bluespace_tap.dm b/code/modules/goals/station_goals/bluespace_tap.dm index 0caca8c1b0f1..e03b836bbafe 100644 --- a/code/modules/goals/station_goals/bluespace_tap.dm +++ b/code/modules/goals/station_goals/bluespace_tap.dm @@ -407,7 +407,9 @@ ui.open() //emaging provides slightly more points but at much greater risk -/obj/machinery/power/bluespace_tap/emag_act(mob/living/user as mob) +/obj/machinery/power/bluespace_tap/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(emagged) return emagged = TRUE diff --git a/code/modules/goals/station_goals/shield.dm b/code/modules/goals/station_goals/shield.dm index bbdc0c018aaa..d9d88496d5d5 100644 --- a/code/modules/goals/station_goals/shield.dm +++ b/code/modules/goals/station_goals/shield.dm @@ -170,7 +170,9 @@ if(active && (obj_flags & EMAGGED)) change_meteor_chance(0.5) -/obj/machinery/satellite/meteor_shield/emag_act(mob/user) +/obj/machinery/satellite/meteor_shield/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return obj_flags |= EMAGGED diff --git a/code/modules/holodeck/computer.dm b/code/modules/holodeck/computer.dm index fca8768d9fd6..faaa7a07ea24 100644 --- a/code/modules/holodeck/computer.dm +++ b/code/modules/holodeck/computer.dm @@ -163,7 +163,9 @@ active_power_usage = 50 + spawned.len * 3 + effects.len * 5 -/obj/machinery/computer/holodeck/emag_act(mob/user) +/obj/machinery/computer/holodeck/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return if(!LAZYLEN(emag_programs)) diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index df14cfc41513..db0153913597 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -297,7 +297,9 @@ GLOBAL_LIST_EMPTY(checkouts) cooldown = world.time + PRINTER_COOLDOWN -/obj/machinery/computer/libraryconsole/emag_act(mob/user) +/obj/machinery/computer/libraryconsole/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return obj_flags ^= EMAGGED if(obj_flags & EMAGGED) to_chat(user, "You short out the safeties on [src]!") diff --git a/code/modules/mining/abandoned_crates.dm b/code/modules/mining/abandoned_crates.dm index 13adbf0f75c5..da884ba354ee 100644 --- a/code/modules/mining/abandoned_crates.dm +++ b/code/modules/mining/abandoned_crates.dm @@ -224,7 +224,9 @@ return return ..() -/obj/structure/closet/crate/secure/loot/emag_act(mob/user) +/obj/structure/closet/crate/secure/loot/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(locked) boom(user) diff --git a/code/modules/mining/laborcamp/laborstacker.dm b/code/modules/mining/laborcamp/laborstacker.dm index 5537815845e8..ed6f77802db3 100644 --- a/code/modules/mining/laborcamp/laborstacker.dm +++ b/code/modules/mining/laborcamp/laborstacker.dm @@ -118,7 +118,9 @@ GLOBAL_LIST(labor_sheet_values) if(stacking_machine) stacking_machine.console = src -/obj/machinery/mineral/labor_claim_console/emag_act(mob/user) +/obj/machinery/mineral/labor_claim_console/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(!(obj_flags & EMAGGED)) obj_flags |= EMAGGED to_chat(user, span_warning("PZZTTPFFFT")) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index c576f2fdebff..80f3f42f6943 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -539,9 +539,11 @@ if(.) electrocution_animation(40) -/mob/living/carbon/human/emag_act(mob/user) +/mob/living/carbon/human/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return .=..() - dna?.species.spec_emag_act(src, user) + dna?.species.spec_emag_act(src, user, emag_card) /mob/living/carbon/human/emp_act(severity) dna?.species.spec_emp_act(src, severity) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index dc0238f96c0a..31f266e67f45 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1504,7 +1504,7 @@ GLOBAL_LIST_EMPTY(features_by_species) /datum/species/proc/spec_emp_act(mob/living/carbon/human/H, severity) return -/datum/species/proc/spec_emag_act(mob/living/carbon/human/H, mob/user) +/datum/species/proc/spec_emag_act(mob/living/carbon/human/H, mob/user, obj/item/card/emag/emag_card) return /datum/species/proc/spec_electrocute_act(mob/living/carbon/human/H, shock_damage, obj/source, siemens_coeff = 1, safety = 0, override = 0, tesla_shock = 0, illusion = 0, stun = TRUE) diff --git a/code/modules/mob/living/carbon/human/species_types/IPC.dm b/code/modules/mob/living/carbon/human/species_types/IPC.dm index 4deeede3356c..6af0a9f78c2f 100644 --- a/code/modules/mob/living/carbon/human/species_types/IPC.dm +++ b/code/modules/mob/living/carbon/human/species_types/IPC.dm @@ -327,7 +327,7 @@ C.visible_message(span_danger("[user] attempts to pour [O] down [C]'s port!"), \ span_userdanger("[user] attempts to pour [O] down [C]'s port!")) -/datum/species/ipc/spec_emag_act(mob/living/carbon/human/H, mob/user) +/datum/species/ipc/spec_emag_act(mob/living/carbon/human/H, mob/user, obj/item/card/emag/emag_card) if(H == user)//no emagging yourself return for(var/datum/brain_trauma/hypnosis/ipc/trauma in H.get_traumas()) diff --git a/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm b/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm index 682e629b444d..261d882eebc5 100644 --- a/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm +++ b/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm @@ -89,7 +89,9 @@ GLOBAL_VAR_INIT(ai_control_code, random_nukecode(6)) return ..() -/obj/machinery/computer/ai_control_console/emag_act(mob/user) +/obj/machinery/computer/ai_control_console/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return to_chat(user, span_warning("You bypass the access restrictions")) diff --git a/code/modules/mob/living/silicon/ai/decentralized/management/resource_distribution.dm b/code/modules/mob/living/silicon/ai/decentralized/management/resource_distribution.dm index 1bbd36bb6573..7eb2a9fca0d5 100644 --- a/code/modules/mob/living/silicon/ai/decentralized/management/resource_distribution.dm +++ b/code/modules/mob/living/silicon/ai/decentralized/management/resource_distribution.dm @@ -14,7 +14,9 @@ circuit = /obj/item/circuitboard/computer/ai_resource_distribution -/obj/machinery/computer/ai_resource_distribution/emag_act(mob/user) +/obj/machinery/computer/ai_resource_distribution/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return to_chat(user, span_warning("You bypass the access restrictions")) diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm index 6befab4d519b..73a8e7fc7bac 100644 --- a/code/modules/mob/living/silicon/robot/robot_defense.dm +++ b/code/modules/mob/living/silicon/robot/robot_defense.dm @@ -83,7 +83,9 @@ Stun(60) -/mob/living/silicon/robot/emag_act(mob/user) +/mob/living/silicon/robot/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(user == src)//To prevent syndieborgs from emagging themselves return if(!opened)//Cover is closed diff --git a/code/modules/mob/living/simple_animal/bot/atmosbot.dm b/code/modules/mob/living/simple_animal/bot/atmosbot.dm index d1aff575409a..f924a42d8e86 100644 --- a/code/modules/mob/living/simple_animal/bot/atmosbot.dm +++ b/code/modules/mob/living/simple_animal/bot/atmosbot.dm @@ -62,7 +62,9 @@ text_dehack = "You detect errors in [name] and reset his programming." text_dehack_fail = "[name] is not responding to reset commands!" -/mob/living/simple_animal/bot/atmosbot/emag_act(mob/user) +/mob/living/simple_animal/bot/atmosbot/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return . = ..() if(emagged == 2) audible_message("[src] ominously whirs....") diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 818611232a38..750e5dbe638c 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -200,7 +200,9 @@ /mob/living/simple_animal/bot/proc/explode() qdel(src) -/mob/living/simple_animal/bot/emag_act(mob/user) +/mob/living/simple_animal/bot/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(locked) //First emag application unlocks the bot's interface. Apply a screwdriver to use the emag again. locked = FALSE emagged = 1 diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm index 1d463b331060..3f898e7cec58 100644 --- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm +++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm @@ -78,7 +78,9 @@ else return ..() -/mob/living/simple_animal/bot/cleanbot/emag_act(mob/user) +/mob/living/simple_animal/bot/cleanbot/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return ..() if(emagged == 2) if(user) diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm index 90441684ade8..0728b4fc3a47 100644 --- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm +++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm @@ -194,7 +194,9 @@ Auto Patrol[]"}, if(lasercolor)//To make up for the fact that lasertag bots don't hunt shootAt(user) -/mob/living/simple_animal/bot/ed209/emag_act(mob/user) +/mob/living/simple_animal/bot/ed209/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return ..() if(emagged == 2) if(user) diff --git a/code/modules/mob/living/simple_animal/bot/firebot.dm b/code/modules/mob/living/simple_animal/bot/firebot.dm index f23f711e00b6..1d35d63d72fd 100644 --- a/code/modules/mob/living/simple_animal/bot/firebot.dm +++ b/code/modules/mob/living/simple_animal/bot/firebot.dm @@ -119,7 +119,9 @@ return dat -/mob/living/simple_animal/bot/firebot/emag_act(mob/user) +/mob/living/simple_animal/bot/firebot/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return ..() if(emagged == 2) if(user) diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index 2313094685e2..948153070d4b 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -128,7 +128,9 @@ else ..() -/mob/living/simple_animal/bot/floorbot/emag_act(mob/user) +/mob/living/simple_animal/bot/floorbot/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return ..() if(emagged == 2) if(user) diff --git a/code/modules/mob/living/simple_animal/bot/honkbot.dm b/code/modules/mob/living/simple_animal/bot/honkbot.dm index 7de5fcadff37..5280bad42c9b 100644 --- a/code/modules/mob/living/simple_animal/bot/honkbot.dm +++ b/code/modules/mob/living/simple_animal/bot/honkbot.dm @@ -125,7 +125,9 @@ Maintenance panel panel is [open ? "opened" : "closed"]"}, addtimer(CALLBACK(src, PROC_REF(react_buzz)), 5) ..() -/mob/living/simple_animal/bot/honkbot/emag_act(mob/user) +/mob/living/simple_animal/bot/honkbot/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return ..() if(emagged == 2) if(user) diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index e38f4bd6c3bd..47812934701f 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -255,7 +255,9 @@ if(health < current_health) //if medbot took some damage step_to(src, (get_step_away(src,user))) -/mob/living/simple_animal/bot/medbot/emag_act(mob/user) +/mob/living/simple_animal/bot/medbot/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return ..() if(emagged == 2) declare_crit = 0 diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index c9aa2c2700d5..c0f0eb8bec44 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -115,7 +115,9 @@ update_appearance(UPDATE_ICON) return -/mob/living/simple_animal/bot/mulebot/emag_act(mob/user) +/mob/living/simple_animal/bot/mulebot/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(emagged < 1) emagged = TRUE 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 c92b01854abf..880bda1864f1 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -200,7 +200,9 @@ Auto Patrol: []"}, if(special_retaliate_after_attack(user)) return -/mob/living/simple_animal/bot/secbot/emag_act(mob/user) +/mob/living/simple_animal/bot/secbot/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return ..() if(emagged == 2) if(user) diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm index 7c716d50b181..c9ccb237d0ca 100644 --- a/code/modules/mob/living/simple_animal/friendly/dog.dm +++ b/code/modules/mob/living/simple_animal/friendly/dog.dm @@ -74,7 +74,9 @@ animal_species = /mob/living/simple_animal/pet/dog/corgi/borgi nofur = TRUE -/mob/living/simple_animal/pet/dog/corgi/borgi/emag_act(user as mob) +/mob/living/simple_animal/pet/dog/corgi/borgi/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(!emagged) emagged = TRUE visible_message(span_warning("[user] swipes a card through [src]."), span_notice("You overload [src]s internal reactor.")) diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index a276f50f18a7..34626f625f44 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -110,8 +110,10 @@ M.forceMove(src) job = "Spider Bot" -/mob/living/simple_animal/spiderbot/emag_act(mob/user) - if (emagged) +/mob/living/simple_animal/spiderbot/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return + if(emagged) to_chat(user, span_warning("[src] is already overloaded - better run.")) return else diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm index cace6dbe8401..444bc3c38d2c 100644 --- a/code/modules/modular_computers/computers/item/computer.dm +++ b/code/modules/modular_computers/computers/item/computer.dm @@ -235,7 +235,9 @@ if(response == "Yes") turn_on(user) -/obj/item/modular_computer/emag_act(mob/user) +/obj/item/modular_computer/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(!enabled) to_chat(user, "You'd need to turn the [src] on first.") return FALSE diff --git a/code/modules/modular_computers/computers/item/tablet/tablet.dm b/code/modules/modular_computers/computers/item/tablet/tablet.dm index f372b776d531..587bc3e8af5e 100644 --- a/code/modules/modular_computers/computers/item/tablet/tablet.dm +++ b/code/modules/modular_computers/computers/item/tablet/tablet.dm @@ -90,7 +90,9 @@ light_color = COLOR_RED -/obj/item/modular_computer/tablet/nukeops/emag_act(mob/user) +/obj/item/modular_computer/tablet/nukeops/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(!enabled) to_chat(user, "You'd need to turn the [src] on first.") return FALSE diff --git a/code/modules/modular_computers/computers/machinery/modular_computer.dm b/code/modules/modular_computers/computers/machinery/modular_computer.dm index bd30abb85358..ac9c1e0eed51 100644 --- a/code/modules/modular_computers/computers/machinery/modular_computer.dm +++ b/code/modules/modular_computers/computers/machinery/modular_computer.dm @@ -69,11 +69,13 @@ if(cpu) cpu.attack_ghost(user) -/obj/machinery/modular_computer/emag_act(mob/user) +/obj/machinery/modular_computer/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(!cpu) to_chat(user, "You'd need to turn the [src] on first.") return FALSE - return (cpu.emag_act(user)) + return (cpu.emag_act(user, emag_card)) /obj/machinery/modular_computer/update_icon(updates=ALL) . = ..() diff --git a/code/modules/ninja/energy_katana.dm b/code/modules/ninja/energy_katana.dm index 83d559175094..d9e8b5d45794 100644 --- a/code/modules/ninja/energy_katana.dm +++ b/code/modules/ninja/energy_katana.dm @@ -53,7 +53,7 @@ spark_system.start() playsound(user, "sparks", 50, 1) playsound(user, 'sound/weapons/blade1.ogg', 50, 1) - target.emag_act(user) + target.emag_act(user, null) /obj/item/energy_katana/pickup(mob/living/carbon/human/user) . = ..() diff --git a/code/modules/pai/card.dm b/code/modules/pai/card.dm index 6ec83b0daa82..9e0c4d54ea6f 100644 --- a/code/modules/pai/card.dm +++ b/code/modules/pai/card.dm @@ -43,9 +43,11 @@ QDEL_NULL(pai) return ..() -/obj/item/pai_card/emag_act(mob/user) +/obj/item/pai_card/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(pai) - pai.handle_emag(user) + pai.handle_emag(user, emag_card) /obj/item/pai_card/emp_act(severity) . = ..() diff --git a/code/modules/pai/pai.dm b/code/modules/pai/pai.dm index ea62ccef1a4e..c27cc513b85f 100644 --- a/code/modules/pai/pai.dm +++ b/code/modules/pai/pai.dm @@ -149,8 +149,8 @@ GLOB.pai_list.Remove(src) return ..() -/mob/living/silicon/pai/emag_act(mob/user) - handle_emag(user) +/mob/living/silicon/pai/emag_act(mob/user, obj/item/card/emag/emag_card) + handle_emag(user, emag_card) /mob/living/silicon/pai/examine(mob/user) . = ..() diff --git a/code/modules/paperwork/ticketmachine.dm b/code/modules/paperwork/ticketmachine.dm index 7c77eaaee889..608c7b9b9fc0 100644 --- a/code/modules/paperwork/ticketmachine.dm +++ b/code/modules/paperwork/ticketmachine.dm @@ -61,7 +61,9 @@ tickets[screenNum].audible_message(span_rose("\the [tickets[screenNum]] dings!"),hearing_distance=1) playsound(tickets[screenNum], 'sound/machines/twobeep_high.ogg', 10, 0 ,1-world.view) //The sound travels world.view+extraRange tiles. This last value is the extra range, which means the total range will be 1. -/obj/machinery/ticket_machine/emag_act(mob/user) //Emag the ticket machine to dispense burning tickets, as well as randomize its customer number to destroy the HOP's mind. +/obj/machinery/ticket_machine/emag_act(mob/user, obj/item/card/emag/emag_card) //Emag the ticket machine to dispense burning tickets, as well as randomize its customer number to destroy the HOP's mind. + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return to_chat(user, span_warning("You overload [src]'s bureaucratic logic circuitry to its MAXIMUM setting.")) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 4268464d1769..a2d12d629785 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -864,7 +864,9 @@ visible_message(span_warning("The APC cover is knocked down!")) update_appearance(UPDATE_ICON) -/obj/machinery/power/apc/emag_act(mob/user) +/obj/machinery/power/apc/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(!(obj_flags & EMAGGED) && !malfhack) if(opened) to_chat(user, span_warning("You must close the cover to swipe an ID card!")) diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 95601ccc3b3a..702e05195582 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -206,7 +206,9 @@ return return ..() -/obj/machinery/power/port_gen/pacman/emag_act(mob/user) +/obj/machinery/power/port_gen/pacman/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return obj_flags |= EMAGGED diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 645516266611..2ed19f5ad840 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -375,7 +375,9 @@ projectile_type = initial(projectile_type) projectile_sound = initial(projectile_sound) -/obj/machinery/power/emitter/emag_act(mob/user) +/obj/machinery/power/emitter/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return locked = FALSE diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm index dbe96a173d3d..3470aaaafa6f 100644 --- a/code/modules/projectiles/pins.dm +++ b/code/modules/projectiles/pins.dm @@ -39,7 +39,9 @@ else to_chat(user, "This firearm already has a firing pin installed.") -/obj/item/firing_pin/emag_act(mob/user) +/obj/item/firing_pin/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return obj_flags |= EMAGGED diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index d3d6176835d8..f4e5d90b357c 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -156,7 +156,9 @@ var/mutable_appearance/beaker_overlay = display_beaker() . += beaker_overlay -/obj/machinery/chem_dispenser/emag_act(mob/user) +/obj/machinery/chem_dispenser/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) to_chat(user, span_warning("[src] has no functional safeties to emag.")) return diff --git a/code/modules/research/nanites/nanite_remote.dm b/code/modules/research/nanites/nanite_remote.dm index 842afaa2ec7e..ad6ac9f6bf62 100644 --- a/code/modules/research/nanites/nanite_remote.dm +++ b/code/modules/research/nanites/nanite_remote.dm @@ -37,7 +37,9 @@ else to_chat(user, span_warning("Access denied.")) -/obj/item/nanite_remote/emag_act(mob/user) +/obj/item/nanite_remote/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return to_chat(user, span_warning("You override [src]'s ID lock.")) diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index e667b58b87ae..ea7d7e68d91a 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -201,7 +201,9 @@ Nothing else in the console has ID requirements. linked_imprinter = null ..() -/obj/machinery/computer/rdconsole/emag_act(mob/user) +/obj/machinery/computer/rdconsole/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(!(obj_flags & EMAGGED)) to_chat(user, span_notice("You disable the security protocols[locked? " and unlock the console":""].")) playsound(src, "sparks", 75, 1) diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index ed8f1453ab1f..0b5d2ef6a7cf 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -201,7 +201,9 @@ . = ..() src.updateUsrDialog() -/obj/machinery/computer/rdservercontrol/emag_act(mob/user) +/obj/machinery/computer/rdservercontrol/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return playsound(src, "sparks", 75, 1) diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 93998c08e31b..874d723885ff 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -127,7 +127,9 @@ to_chat(GLOB.permissions.admins, "FERRY: [ADMIN_LOOKUPFLW(usr)] (Move Ferry) is requesting to move the transport ferry to CentCom.") return TRUE -/obj/machinery/computer/shuttle/emag_act(mob/user) +/obj/machinery/computer/shuttle/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return req_access = list() diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index ada242f152b2..0fd623c67c3c 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -155,7 +155,9 @@ [TIME_LEFT] seconds", system_error, alert=TRUE) . = TRUE -/obj/machinery/computer/emergency_shuttle/emag_act(mob/user) +/obj/machinery/computer/emergency_shuttle/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return // How did you even get on the shuttle before it go to the station? if(!IS_DOCKED) return @@ -502,7 +504,9 @@ AddElement(/datum/element/update_icon_blocker) return ..() -/obj/machinery/computer/shuttle/pod/emag_act(mob/user) +/obj/machinery/computer/shuttle/pod/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return ENABLE_BITFIELD(obj_flags, EMAGGED) diff --git a/code/modules/shuttle/ferry.dm b/code/modules/shuttle/ferry.dm index 9e30e3e7761a..dd56c47653da 100644 --- a/code/modules/shuttle/ferry.dm +++ b/code/modules/shuttle/ferry.dm @@ -9,7 +9,9 @@ var/allow_silicons = FALSE var/allow_emag = FALSE -/obj/machinery/computer/shuttle/ferry/emag_act(mob/user) +/obj/machinery/computer/shuttle/ferry/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(!allow_emag) to_chat(user, span_warning("[src]'s security firewall is far too powerful for you to bypass.")) return FALSE diff --git a/code/modules/shuttle/special.dm b/code/modules/shuttle/special.dm index 92c89d7d3662..ed7189fb6027 100644 --- a/code/modules/shuttle/special.dm +++ b/code/modules/shuttle/special.dm @@ -48,7 +48,7 @@ /obj/machinery/power/emitter/energycannon/magical/ex_act(severity) return -/obj/machinery/power/emitter/energycannon/magical/emag_act(mob/user) +/obj/machinery/power/emitter/energycannon/magical/emag_act(mob/user, obj/item/card/emag/emag_card) return /obj/structure/table/abductor/wabbajack @@ -251,7 +251,7 @@ /obj/machinery/scanner_gate/luxury_shuttle/attackby(obj/item/W, mob/user, params) return -/obj/machinery/scanner_gate/luxury_shuttle/emag_act(mob/user) +/obj/machinery/scanner_gate/luxury_shuttle/emag_act(mob/user, obj/item/card/emag/emag_card) return #define LUXURY_MESSAGE_COOLDOWN 100 diff --git a/code/modules/spells/spell_types/conjure/ed_swarm.dm b/code/modules/spells/spell_types/conjure/ed_swarm.dm index 6ccd29f9ab23..a692b5e5f6fc 100644 --- a/code/modules/spells/spell_types/conjure/ed_swarm.dm +++ b/code/modules/spells/spell_types/conjure/ed_swarm.dm @@ -15,7 +15,7 @@ summoned_bot.name = "Wizard's Justicebot" summoned_bot.declare_arrests = FALSE - summoned_bot.emag_act(owner) + summoned_bot.emag_act(owner, null) summoned_bot.projectile = /obj/item/projectile/beam/laser - summoned_bot.shoot_sound = 'sound/weapons/laser.ogg' \ No newline at end of file + summoned_bot.shoot_sound = 'sound/weapons/laser.ogg' diff --git a/code/modules/surgery/organs/augments_arms.dm b/code/modules/surgery/organs/augments_arms.dm index c2702e38e037..334c6306ae56 100644 --- a/code/modules/surgery/organs/augments_arms.dm +++ b/code/modules/surgery/organs/augments_arms.dm @@ -214,7 +214,9 @@ UnregisterSignal(linkedhandler, COMSIG_ITEM_PREDROPPED) . = ..() -/obj/item/organ/cyberimp/arm/toolset/emag_act() +/obj/item/organ/cyberimp/arm/toolset/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(!(locate(/obj/item/kitchen/knife/combat/cyborg) in items_list)) to_chat(usr, span_notice("You unlock [src]'s integrated knife!")) items_list += new /obj/item/kitchen/knife/combat/cyborg(src) diff --git a/code/modules/vehicles/cars/clowncar.dm b/code/modules/vehicles/cars/clowncar.dm index 50f7fb0dbc35..bd6e2fefc437 100644 --- a/code/modules/vehicles/cars/clowncar.dm +++ b/code/modules/vehicles/cars/clowncar.dm @@ -81,7 +81,9 @@ DumpMobs(TRUE) log_combat(src, A, "crashed into", null, "dumping all passengers") -/obj/vehicle/sealed/car/clowncar/emag_act(mob/user) +/obj/vehicle/sealed/car/clowncar/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return obj_flags |= EMAGGED diff --git a/code/modules/vehicles/motorized_wheelchair.dm b/code/modules/vehicles/motorized_wheelchair.dm index 487649cc2d7a..4664243624de 100644 --- a/code/modules/vehicles/motorized_wheelchair.dm +++ b/code/modules/vehicles/motorized_wheelchair.dm @@ -163,7 +163,9 @@ visible_message(span_danger("[src] crashes into [M], sending [H] flying!")) playsound(src, 'sound/effects/bang.ogg', 50, TRUE) -/obj/vehicle/ridden/wheelchair/motorized/emag_act(mob/user) +/obj/vehicle/ridden/wheelchair/motorized/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if((obj_flags & EMAGGED) || !panel_open) return to_chat(user, span_warning("A bomb appears in [src], what the fuck?")) diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index 124bb3aa9431..9482cf7f8a94 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -660,7 +660,9 @@ GLOBAL_LIST_EMPTY(vending_products) update_canister() . = ..() -/obj/machinery/vending/emag_act(mob/user) +/obj/machinery/vending/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return obj_flags |= EMAGGED diff --git a/yogstation/code/game/machinery/computer/arcade.dm b/yogstation/code/game/machinery/computer/arcade.dm index dca71e710146..e35f3e9e487c 100644 --- a/yogstation/code/game/machinery/computer/arcade.dm +++ b/yogstation/code/game/machinery/computer/arcade.dm @@ -146,7 +146,9 @@ to_chat(user, span_notice("You don't have any stored tickets!")) return TRUE -/obj/machinery/computer/arcade/minesweeper/emag_act(mob/user) +/obj/machinery/computer/arcade/minesweeper/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return desc = "An arcade machine that generates grids. It's clunking and sparking everywhere, almost as if threatening to explode at any moment!" diff --git a/yogstation/code/game/machinery/telecomms/computers/traffic_control.dm b/yogstation/code/game/machinery/telecomms/computers/traffic_control.dm index cadd5c0669c9..3771ee54f365 100644 --- a/yogstation/code/game/machinery/telecomms/computers/traffic_control.dm +++ b/yogstation/code/game/machinery/telecomms/computers/traffic_control.dm @@ -290,7 +290,9 @@ else ..() -/obj/machinery/computer/telecomms/traffic/emag_act(mob/user) +/obj/machinery/computer/telecomms/traffic/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(!emagged) playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) emagged = TRUE diff --git a/yogstation/code/game/objects/items/cards_ids.dm b/yogstation/code/game/objects/items/cards_ids.dm index c3c7be199b35..6cb0cdf67261 100644 --- a/yogstation/code/game/objects/items/cards_ids.dm +++ b/yogstation/code/game/objects/items/cards_ids.dm @@ -68,7 +68,9 @@ /obj/item/card/id/captains_spare icon_state = "id_gold" -/obj/item/card/emag/emag_act(mob/user) +/obj/item/card/emag/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return var/otherEmag = user.get_active_held_item() if(!otherEmag) return diff --git a/yogstation/code/game/objects/items/holotool/holotool.dm b/yogstation/code/game/objects/items/holotool/holotool.dm index e8f16d8de0cb..0cc001a4989f 100644 --- a/yogstation/code/game/objects/items/holotool/holotool.dm +++ b/yogstation/code/game/objects/items/holotool/holotool.dm @@ -138,7 +138,9 @@ if(new_tool) switch_tool(user, new_tool) -/obj/item/holotool/emag_act(mob/user) +/obj/item/holotool/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return to_chat(user, span_danger("ZZT- ILLEGAL BLUEPRINT UNLOCKED- CONTACT !#$@^%$# NANOTRASEN SUPPORT-@*%$^%!")) diff --git a/yogstation/code/game/objects/items/plushes.dm b/yogstation/code/game/objects/items/plushes.dm index 74c528239e98..1fada5cfe07a 100644 --- a/yogstation/code/game/objects/items/plushes.dm +++ b/yogstation/code/game/objects/items/plushes.dm @@ -42,7 +42,9 @@ target = null visible_message(span_notice("[src] looks disinterested.")) -/obj/item/toy/plush/goatplushie/angry/emag_act(mob/user) +/obj/item/toy/plush/goatplushie/angry/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if (obj_flags&EMAGGED) visible_message(span_notice("[src] already looks angry enough, you shouldn't anger it more.")) return diff --git a/yogstation/code/game/objects/items/tools.dm b/yogstation/code/game/objects/items/tools.dm index 1f26e2a8aa74..a93c51f31696 100644 --- a/yogstation/code/game/objects/items/tools.dm +++ b/yogstation/code/game/objects/items/tools.dm @@ -202,7 +202,9 @@ /obj/item/jawsoflife/jimmy/proc/pump_cooldown() is_pumping = FALSE -/obj/item/jawsoflife/jimmy/emag_act(mob/user) +/obj/item/jawsoflife/jimmy/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) to_chat(user, span_warning("Nothing new seems to happen when you swipe the emag.")) return diff --git a/yogstation/code/game/objects/structures/fireaxe.dm b/yogstation/code/game/objects/structures/fireaxe.dm index 042b47938787..eb33d59eeaba 100644 --- a/yogstation/code/game/objects/structures/fireaxe.dm +++ b/yogstation/code/game/objects/structures/fireaxe.dm @@ -88,7 +88,9 @@ locked = !locked update_appearance(UPDATE_ICON) -/obj/structure/fireaxecabinet/emag_act(mob/user) +/obj/structure/fireaxecabinet/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return //this allows you to emag the fireaxe cabinet, unlocking it immediately. if(obj_flags & EMAGGED) return diff --git a/yogstation/code/modules/clothing/suits/nerd.dm b/yogstation/code/modules/clothing/suits/nerd.dm index a1f1a94c230b..233eb9020611 100644 --- a/yogstation/code/modules/clothing/suits/nerd.dm +++ b/yogstation/code/modules/clothing/suits/nerd.dm @@ -79,7 +79,9 @@ addtimer(CALLBACK(src, PROC_REF(process_sound_queue)), sound_delay) -/obj/item/clothing/suit/armor/nerd/emag_act(mob/user) +/obj/item/clothing/suit/armor/nerd/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return if(owner) diff --git a/yogstation/code/modules/mob/living/carbon/human/species_types/preternis/preternis.dm b/yogstation/code/modules/mob/living/carbon/human/species_types/preternis/preternis.dm index 0cc9d569e339..c1e4126192b9 100644 --- a/yogstation/code/modules/mob/living/carbon/human/species_types/preternis/preternis.dm +++ b/yogstation/code/modules/mob/living/carbon/human/species_types/preternis/preternis.dm @@ -153,7 +153,9 @@ adjust_charge - take a positive or negative value to adjust the charge level /datum/species/preternis/has_heavy_gravity() return (..() || lockdown) -/datum/species/preternis/spec_emag_act(mob/living/carbon/human/H, mob/user) +/datum/species/preternis/spec_emag_act(mob/living/carbon/human/H, mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return . = ..() if(emag_lvl == 2) return diff --git a/yogstation/code/modules/mob/living/simple_animal/friendly/clowncat.dm b/yogstation/code/modules/mob/living/simple_animal/friendly/clowncat.dm index c06764b4c1ea..21275fead68d 100644 --- a/yogstation/code/modules/mob/living/simple_animal/friendly/clowncat.dm +++ b/yogstation/code/modules/mob/living/simple_animal/friendly/clowncat.dm @@ -19,7 +19,9 @@ visible_message("[name] lets out a honk!") playsound(src, pick(meows), 100) -/mob/living/simple_animal/pet/cat/clown/emag_act(mob/user) +/mob/living/simple_animal/pet/cat/clown/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(emagged == FALSE) emagged = TRUE do_sparks(8, FALSE, loc) @@ -31,4 +33,4 @@ visible_message("[name] pukes up a banana hairball!") playsound(get_turf(src), 'sound/effects/splat.ogg', 100, 1) new /obj/item/grown/bananapeel(get_turf(src)) - new /obj/effect/decal/cleanable/vomit(get_turf(src)) \ No newline at end of file + new /obj/effect/decal/cleanable/vomit(get_turf(src)) diff --git a/yogstation/code/modules/power/hugbox.dm b/yogstation/code/modules/power/hugbox.dm index c4e2ef4f1b42..af4041a1a9f0 100644 --- a/yogstation/code/modules/power/hugbox.dm +++ b/yogstation/code/modules/power/hugbox.dm @@ -11,7 +11,9 @@ var/power_per_hug = 1000000 -/obj/machinery/power/hugbox_engine/emag_act(mob/user) +/obj/machinery/power/hugbox_engine/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return obj_flags |= EMAGGED diff --git a/yogstation/code/modules/power/singularity/particle_accelerator/particle_control.dm b/yogstation/code/modules/power/singularity/particle_accelerator/particle_control.dm index 554048023299..c56a23f38a8a 100644 --- a/yogstation/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/yogstation/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -1,7 +1,9 @@ /obj/machinery/particle_accelerator/control_box active_power_usage = 5000 // The power usage when at lvl 0 -/obj/machinery/particle_accelerator/control_box/emag_act(mob/user) +/obj/machinery/particle_accelerator/control_box/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return to_chat(user, span_danger("The laws of physics no longer apply in the future, god help you...")) diff --git a/yogstation/code/modules/power/stationarybike.dm b/yogstation/code/modules/power/stationarybike.dm index c9225daaeb92..6312ca554cb4 100644 --- a/yogstation/code/modules/power/stationarybike.dm +++ b/yogstation/code/modules/power/stationarybike.dm @@ -21,7 +21,9 @@ . = ..() . +=span_notice("It is generating [generating]kw of power.") -/obj/machinery/power/stationarybike/emag_act(mob/user) +/obj/machinery/power/stationarybike/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return obj_flags |= EMAGGED diff --git a/yogstation/code/modules/power/validhunter.dm b/yogstation/code/modules/power/validhunter.dm index 8bbf585d4db2..71cb4ee2ff3e 100644 --- a/yogstation/code/modules/power/validhunter.dm +++ b/yogstation/code/modules/power/validhunter.dm @@ -40,7 +40,9 @@ return TRUE -/obj/machinery/power/validhunter_engine/emag_act(mob/user) +/obj/machinery/power/validhunter_engine/emag_act(mob/user, obj/item/card/emag/emag_card) + if(istype(emag_card, /obj/item/card/emag/cmag)) + return if(obj_flags & EMAGGED) return From c0169e1e581a026ac6ba48bf731131ad5dd394a0 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Wed, 26 Jul 2023 23:36:56 -0700 Subject: [PATCH 17/42] how do i even delete this?? --- code/game/atoms.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 035152fd7601..31cef153f9c4 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -91,6 +91,8 @@ var/base_pixel_x = 0 ///Default pixel y shifting for the atom's icon. var/base_pixel_y = 0 + ///the base icon state used for anything that changes their icon state. + var/base_icon_state ///Mobs that are currently do_after'ing this atom, to be cleared from on Destroy() var/list/targeted_by @@ -405,6 +407,10 @@ /atom/proc/is_drainable() return reagents && (reagents.flags & DRAINABLE) +/// Can this atom spill its reagents +/atom/proc/is_spillable() + return reagents && (reagents.flags & SPILLABLE) + /// Are you allowed to drop this atom /atom/proc/AllowDrop() return FALSE From c5f174475db9cd1ee471f82ab660e14842185ee5 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Thu, 27 Jul 2023 01:19:52 -0700 Subject: [PATCH 18/42] true false everywhere --- code/modules/mob/living/simple_animal/bot/mulebot.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index c0f0eb8bec44..25a0db15265e 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -117,7 +117,7 @@ /mob/living/simple_animal/bot/mulebot/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE if(emagged < 1) emagged = TRUE if(!open) From 5bbfad13fc0e609e1350eddeb92f22c003ee6312 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Thu, 27 Jul 2023 01:19:58 -0700 Subject: [PATCH 19/42] EVERYWHERE --- code/game/machinery/Sleeper.dm | 7 ++-- code/game/machinery/airlock_cycle_control.dm | 7 ++-- code/game/machinery/announcement_system.dm | 7 ++-- code/game/machinery/autolathe.dm | 10 ++--- code/game/machinery/buttons.dm | 9 ++--- code/game/machinery/cloning.dm | 7 ++-- code/game/machinery/computer/apc_control.dm | 7 ++-- code/game/machinery/computer/arcade.dm | 20 +++------- .../game/machinery/computer/communications.dm | 7 ++-- code/game/machinery/computer/security.dm | 22 +++++------ code/game/machinery/decontamination.dm | 9 +++-- code/game/machinery/doors/airlock.dm | 13 +++++-- code/game/machinery/doors/windowdoor.dm | 9 +++-- .../embedded_controller/access_controller.dm | 9 ++--- code/game/machinery/fat_sucker.dm | 9 ++--- code/game/machinery/firealarm.dm | 7 ++-- code/game/machinery/gulag_item_reclaimer.dm | 9 ++--- code/game/machinery/harvester.dm | 7 ++-- code/game/machinery/lightswitch.dm | 5 ++- code/game/machinery/limbgrower.dm | 7 ++-- code/game/machinery/medical_kiosk.dm | 8 ++-- .../machinery/porta_turret/portable_turret.dm | 21 +++++----- .../porta_turret/portable_turret_cover.dm | 21 ++++++---- code/game/machinery/recycler.dm | 9 ++--- code/game/machinery/scan_gate.dm | 7 ++-- code/game/machinery/shieldgen.dm | 10 +++-- code/game/machinery/slotmachine.dm | 7 ++-- code/game/machinery/stasis.dm | 5 ++- .../machinery/telecomms/computers/message.dm | 31 ++++++++------- .../machinery/telecomms/telecomunications.dm | 3 +- code/game/mecha/mech_fabricator.dm | 6 ++- code/game/objects/items/RSF.dm | 3 +- code/game/objects/items/cards_ids.dm | 18 ++++----- code/game/objects/items/cigs_lighters.dm | 28 +++++++------- .../circuitboards/computer_circuitboards.dm | 21 +++++----- code/game/objects/items/defib.dm | 3 +- .../objects/items/devices/geiger_counter.dm | 13 +++---- .../objects/items/devices/lightreplacer.dm | 21 ++++------ code/game/objects/items/devices/megaphone.dm | 11 +++--- code/game/objects/items/robot/robot_items.dm | 12 +++--- code/game/objects/items/storage/lockbox.dm | 21 +++++----- code/game/objects/structures/barsigns.dm | 12 ++++-- .../structures/crates_lockers/closets.dm | 22 ++++++----- code/game/objects/structures/fireaxe.dm | 6 +-- code/modules/VR/vr_sleeper.dm | 5 ++- .../atmospherics/machinery/airalarm.dm | 7 ++-- code/modules/cargo/bounty_console.dm | 10 +++-- code/modules/cargo/console.dm | 7 ++-- code/modules/cargo/expressconsole.dm | 9 ++--- code/modules/clothing/glasses/hud.dm | 9 ++--- code/modules/clothing/masks/hailer.dm | 10 ++--- .../goals/station_goals/bluespace_tap.dm | 9 ++--- code/modules/goals/station_goals/shield.dm | 7 ++-- code/modules/holodeck/computer.dm | 11 +++--- code/modules/library/lib_machines.dm | 3 +- code/modules/mining/abandoned_crates.dm | 8 ++-- code/modules/mining/laborcamp/laborstacker.dm | 12 +++--- .../mob/living/carbon/human/human_defense.dm | 7 ++-- .../mob/living/carbon/human/species.dm | 2 +- .../living/carbon/human/species_types/IPC.dm | 9 +++-- .../carbon/human/species_types/ethereal.dm | 4 +- .../management/ai_controlpanel.dm | 11 +++--- .../management/resource_distribution.dm | 11 +++--- .../mob/living/silicon/robot/robot_defense.dm | 36 +++++++++--------- .../mob/living/simple_animal/bot/atmosbot.dm | 2 - .../mob/living/simple_animal/bot/bot.dm | 21 +++++----- .../mob/living/simple_animal/bot/cleanbot.dm | 4 +- .../mob/living/simple_animal/bot/ed209bot.dm | 4 +- .../mob/living/simple_animal/bot/firebot.dm | 4 +- .../mob/living/simple_animal/bot/floorbot.dm | 4 +- .../mob/living/simple_animal/bot/honkbot.dm | 4 +- .../mob/living/simple_animal/bot/secbot.dm | 4 +- .../mob/living/simple_animal/friendly/dog.dm | 12 +++--- .../simple_animal/friendly/spiderbot.dm | 23 ++++++----- .../computers/item/computer.dm | 2 +- .../computers/item/tablet/tablet.dm | 2 +- .../computers/machinery/modular_computer.dm | 2 +- code/modules/pai/card.dm | 7 ++-- code/modules/pai/pai.dm | 2 +- code/modules/paperwork/ticketmachine.dm | 7 ++-- code/modules/power/apc.dm | 35 ++++++++--------- code/modules/power/port_gen.dm | 6 +-- code/modules/power/singularity/emitter.dm | 8 ++-- code/modules/projectiles/pins.dm | 9 ++--- .../chemistry/machinery/chem_dispenser.dm | 7 ++-- .../modules/research/nanites/nanite_remote.dm | 9 ++--- code/modules/research/rdconsole.dm | 14 +++---- code/modules/research/server.dm | 7 ++-- code/modules/shuttle/computer.dm | 9 ++--- code/modules/shuttle/emergency.dm | 13 +++---- code/modules/shuttle/ferry.dm | 2 +- code/modules/surgery/organs/augments_arms.dm | 2 +- code/modules/vehicles/cars/clowncar.dm | 9 ++--- code/modules/vehicles/motorized_wheelchair.dm | 6 +-- code/modules/vending/_vending.dm | 9 ++--- .../code/game/machinery/computer/arcade.dm | 7 ++-- .../telecomms/computers/traffic_control.dm | 11 +++--- .../code/game/objects/items/cards_ids.dm | 18 ++++----- .../game/objects/items/holotool/holotool.dm | 8 ++-- yogstation/code/game/objects/items/plushes.dm | 7 ++-- yogstation/code/game/objects/items/tools.dm | 6 +-- .../code/game/objects/structures/fireaxe.dm | 38 +++++++++---------- .../code/modules/clothing/suits/nerd.dm | 6 +-- .../species_types/preternis/preternis.dm | 7 ++-- .../living/simple_animal/friendly/clowncat.dm | 9 ++--- yogstation/code/modules/power/hugbox.dm | 9 ++--- .../particle_accelerator/particle_control.dm | 8 ++-- .../code/modules/power/stationarybike.dm | 11 +++--- yogstation/code/modules/power/validhunter.dm | 9 ++--- 109 files changed, 523 insertions(+), 573 deletions(-) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 72b9f6d9a0b2..3dec0e15e20f 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -121,12 +121,11 @@ open_machine() /obj/machinery/sleeper/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE to_chat(user, span_danger("You disable the chemical injection inhibitors on the sleeper...")) obj_flags |= EMAGGED + return TRUE /obj/machinery/sleeper/MouseDrop_T(mob/target, mob/user) if(user.stat || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !user.IsAdvancedToolUser()) diff --git a/code/game/machinery/airlock_cycle_control.dm b/code/game/machinery/airlock_cycle_control.dm index b483836db224..1e1867bcba11 100644 --- a/code/game/machinery/airlock_cycle_control.dm +++ b/code/game/machinery/airlock_cycle_control.dm @@ -787,13 +787,12 @@ update_cycle_icon() /obj/machinery/advanced_airlock_controller/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE obj_flags |= EMAGGED visible_message(span_warning("Sparks fly out of [src]!"), span_notice("You emag [src], disabling its safeties.")) playsound(src, "sparks", 50, 1) + return TRUE /obj/machinery/advanced_airlock_controller/obj_break(damage_flag) ..() diff --git a/code/game/machinery/announcement_system.dm b/code/game/machinery/announcement_system.dm index 76e0e42b310b..d833e35e6170 100644 --- a/code/game/machinery/announcement_system.dm +++ b/code/game/machinery/announcement_system.dm @@ -160,10 +160,11 @@ GLOBAL_LIST_EMPTY(announcement_systems) /obj/machinery/announcement_system/proc/act_up() //does funny breakage stuff if(!obj_break()) // if badmins flag this unbreakable or its already broken - return + return FALSE arrival = pick("#!@%ERR-34%2 CANNOT LOCAT@# JO# F*LE!", "CRITICAL ERROR 99.", "ERR)#: DA#AB@#E NOT F(*ND!") newhead = pick("OV#RL()D: \[UNKNOWN??\] DET*#CT)D!", "ER)#R - B*@ TEXT F*O(ND!", "AAS.exe is not responding. NanoOS is searching for a solution to the problem.") + return TRUE /obj/machinery/announcement_system/emp_act(severity) . = ..() @@ -173,6 +174,6 @@ GLOBAL_LIST_EMPTY(announcement_systems) /obj/machinery/announcement_system/emag_act(mob/user, obj/item/card/emag/emag_card) if(obj_flags & EMAGGED) - return + return FALSE obj_flags |= EMAGGED - act_up() + return act_up() diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 8a4c5ab5a567..1c47d8388e68 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -312,15 +312,15 @@ adjust_hacked(TRUE) /obj/machinery/autolathe/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED) ) + return FALSE obj_flags |= EMAGGED if(!hacked) adjust_hacked(TRUE) playsound(src, "sparks", 75, TRUE, -1) - to_chat(user, span_notice("You use the cryptographic sequencer on [src].")) + if(user) + to_chat(user, span_notice("You use the cryptographic sequencer on [src].")) + return TRUE //Called when the object is constructed by an autolathe //Has a reference to the autolathe so you can do !!FUN!! things with hacked lathes diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index 7f1698678837..b827cee0940d 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -134,15 +134,14 @@ return ..() /obj/machinery/button/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE 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) return attack_hand(user) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 5ba466d9025f..29ebfa73c7ea 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -436,15 +436,14 @@ GLOBAL_VAR_INIT(clones, 0) return ..() /obj/machinery/clonepod/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(!occupant) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || !occupant) + return FALSE to_chat(user, span_warning("You corrupt the genetic compiler.")) malfunction() add_fingerprint(user) log_cloning("[key_name(user)] emagged [src] at [AREACOORD(src)], causing it to malfunction.") log_combat(user, src, "emagged", null, occupant ? "[occupant] inside, killing them via malfunction." : null) + 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 642630d53e86..1db84d312f18 100644 --- a/code/game/machinery/computer/apc_control.dm +++ b/code/game/machinery/computer/apc_control.dm @@ -182,13 +182,12 @@ log_activity("Turned APC [target.area.name]'s breaker [setTo]") /obj/machinery/computer/apc_control/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE obj_flags |= EMAGGED log_game("[key_name(user)] emagged [src] at [AREACOORD(src)]") playsound(src, "sparks", 50, TRUE) + return TRUE /obj/machinery/computer/apc_control/proc/log_activity(log_text) if(!should_log) diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index a437c36a48f2..1737a675996a 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -331,10 +331,8 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list( /obj/machinery/computer/arcade/battle/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE to_chat(user, span_warning("A mesmerizing Rhumba beat starts playing from the arcade machine's speakers!")) temp = "If you die in the game, you die for real!" player_hp = 30 @@ -343,16 +341,11 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list( enemy_mp = 20 gameover = FALSE blocked = FALSE - obj_flags |= EMAGGED - enemy_name = "Cuban Pete" name = "Outbomb Cuban Pete" - - updateUsrDialog() - - + return TRUE // *** THE ORION TRAIL ** // @@ -1089,15 +1082,14 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list( desc = "Learn how our ancestors planned to colonize Orion, and have fun in the process!" /obj/machinery/computer/arcade/orion_trail/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE to_chat(user, span_notice("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 planned to colonize 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 5dec6e7900b7..b3b69d86aa17 100755 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -82,15 +82,14 @@ return ..() /obj/machinery/computer/communications/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if (obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE obj_flags |= EMAGGED if (authenticated) authorize_access = get_all_accesses() to_chat(user, span_danger("You scramble the communication routing circuits!")) playsound(src, 'sound/machines/terminal_alert.ogg', 50, 0) + return TRUE /obj/machinery/computer/communications/ui_act(action, list/params) var/static/list/approved_states = list(STATE_BUYING_SHUTTLE, STATE_CHANGING_STATUS, STATE_MAIN, STATE_MESSAGES) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 31c61246dcfd..603c245e59cf 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -848,7 +848,7 @@ /obj/machinery/computer/secure_data/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE var/name if(ishuman(user)) var/mob/living/carbon/human/human_user = user @@ -857,18 +857,18 @@ name = "[ID.registered_name]" else name = "Unknown" - if(issilicon(user)) name = "[user.name]" - - if(!logged_in) - logged_in = TRUE - to_chat(user, span_warning("You override [src]'s ID lock.")) - trigger_alarm() - playsound(src, 'sound/effects/alert.ogg', 50, TRUE) - var/area/A = get_area(loc) - radio.talk_into(src, "Alert: security breach alarm triggered in [A.map_name]!! Unauthorized access by [name] of [src]!!", sec_freq) - radio.talk_into(src, "Alert: security breach alarm triggered in [A.map_name]!! Unauthorized access by [name] of [src]!!", command_freq) + if(logged_in) + return FALSE // What was the point then? + logged_in = TRUE + to_chat(user, span_warning("You override [src]'s ID lock.")) + trigger_alarm() + playsound(src, 'sound/effects/alert.ogg', 50, TRUE) + var/area/A = get_area(loc) + radio.talk_into(src, "Alert: security breach alarm triggered in [A.map_name]!! Unauthorized access by [name] of [src]!!", sec_freq) + radio.talk_into(src, "Alert: security breach alarm triggered in [A.map_name]!! Unauthorized access by [name] of [src]!!", command_freq) + return TRUE /obj/machinery/computer/secure_data/emp_act(severity) . = ..() diff --git a/code/game/machinery/decontamination.dm b/code/game/machinery/decontamination.dm index 97e4d8542319..56314f20fd39 100644 --- a/code/game/machinery/decontamination.dm +++ b/code/game/machinery/decontamination.dm @@ -171,19 +171,20 @@ /obj/machinery/decontamination_unit/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE if(obj_flags & EMAGGED) to_chat(user, span_warning("[src] has no functional safeties to emag.")) - return + return FALSE if(!state_open) if(!panel_open) to_chat(user, span_warning("Open the panel first.")) - return + return FALSE else - return + return FALSE to_chat(user, span_warning("You short out [src]'s safeties.")) uv_emagged = TRUE obj_flags |= EMAGGED + return TRUE /obj/machinery/decontamination_unit/relaymove(mob/user) if(locked) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 24cf9e23aaa1..822a79439bb0 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1530,17 +1530,22 @@ /obj/machinery/door/airlock/emag_act(mob/user, obj/item/card/emag/emag_card) if(operating || !density || !hasPower() || (obj_flags & EMAGGED)) - return + return FALSE operating = TRUE update_icon(state = AIRLOCK_EMAG, override = TRUE) - sleep(0.6 SECONDS) + addtimer(CALLBACK(src, PROC_REF(finish_emag_act), user, emag_card), 0.6 SECONDS) + return TRUE + +/obj/machinery/door/airlock/proc/finish_emag_act(mob/user, obj/item/card/emag/emag_card) if(QDELETED(src)) return operating = FALSE - if(istype(emag_card, /obj/item/card/emag/cmag)) + + if(istype(emag_card, /obj/item/card/emag/cmag)) // Clown behavior. update_icon(state = AIRLOCK_CLOSED, override = TRUE) obj_flags |= CMAGGED - return + return TRUE + if(!open()) // Something prevented it from being opened. For example, bolted/welded shut. update_icon(state = AIRLOCK_CLOSED, override = TRUE) obj_flags |= EMAGGED diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 5e5c82397d92..d2c4abcf0fd8 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -218,19 +218,22 @@ /obj/machinery/door/window/emag_act(mob/user, obj/item/card/emag/emag_card) if(operating || !density || (obj_flags & CMAGGED)) - return + return FALSE if(istype(emag_card, /obj/item/card/emag/cmag)) obj_flags |= CMAGGED operating = TRUE flick("[base_state]spark", src) playsound(src, "sparks", 75, 1) operating = FALSE - return + return TRUE obj_flags |= EMAGGED operating = TRUE flick("[base_state]spark", src) playsound(src, "sparks", 75, 1) - sleep(0.6 SECONDS) + addtimer(CALLBACK(src, PROC_REF(finish_emag_act), user, emag_card), 0.6 SECONDS) + return TRUE + +/obj/machinery/door/window/proc/finish_emag_act(mob/user, obj/item/card/emag/emag_card) if(QDELETED(src)) return operating = FALSE diff --git a/code/game/machinery/embedded_controller/access_controller.dm b/code/game/machinery/embedded_controller/access_controller.dm index 3a76f96ed014..19567f270580 100644 --- a/code/game/machinery/embedded_controller/access_controller.dm +++ b/code/game/machinery/embedded_controller/access_controller.dm @@ -26,16 +26,15 @@ findObjsByTag() /obj/machinery/doorButtons/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE obj_flags |= EMAGGED req_access = list() req_one_access = list() playsound(src, "sparks", 100, 1) to_chat(user, span_warning("You short out the access controller.")) - + return TRUE + /obj/machinery/doorButtons/proc/removeMe() return diff --git a/code/game/machinery/fat_sucker.dm b/code/game/machinery/fat_sucker.dm index ca67605ffa02..6b02d408835c 100644 --- a/code/game/machinery/fat_sucker.dm +++ b/code/game/machinery/fat_sucker.dm @@ -204,11 +204,10 @@ return TRUE /obj/machinery/fat_sucker/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE + obj_flags |= EMAGGED start_at = 100 stop_at = 0 to_chat(user, span_notice("You remove the access restrictions and lower the automatic ejection threshold!")) - obj_flags |= EMAGGED + return TRUE diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index 72d563297891..49c7505e0ec3 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -105,16 +105,15 @@ alarm() /obj/machinery/firealarm/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE obj_flags |= EMAGGED update_appearance(UPDATE_ICON) if(user) user.visible_message(span_warning("Sparks fly out of [src]!"), span_notice("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) var/turf/open/T = get_turf(src) diff --git a/code/game/machinery/gulag_item_reclaimer.dm b/code/game/machinery/gulag_item_reclaimer.dm index 50a58f4756e0..334683c72b71 100644 --- a/code/game/machinery/gulag_item_reclaimer.dm +++ b/code/game/machinery/gulag_item_reclaimer.dm @@ -24,12 +24,11 @@ return ..() /obj/machinery/gulag_item_reclaimer/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) // emagging lets anyone reclaim all the items - return - req_access = list() + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE obj_flags |= EMAGGED + req_access = list() // Emagging lets anyone reclaim all the items. + 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 f2fb7a465784..317fbb8acf66 100644 --- a/code/game/machinery/harvester.dm +++ b/code/game/machinery/harvester.dm @@ -157,13 +157,12 @@ open_machine() /obj/machinery/harvester/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE obj_flags |= EMAGGED allow_living = TRUE to_chat(user, span_warning("You overload [src]'s lifesign scanners.")) + return TRUE /obj/machinery/harvester/container_resist(mob/living/user) if(!harvesting) diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index 719329bbdb8e..855c69a42bcf 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -78,11 +78,12 @@ /obj/machinery/light_switch/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE if(obj_flags & EMAGGED) to_chat(user, span_warning("Nothing new seems to happen when you swipe the emag.")) - return + return FALSE to_chat(user, span_notice("You swipe the emag on the light switch. ")) if(user.can_hear()) to_chat(user, span_notice("The light switch gives off a soft hum.")) obj_flags |= EMAGGED + return TRUE diff --git a/code/game/machinery/limbgrower.dm b/code/game/machinery/limbgrower.dm index 5b286dfcf566..489e042a7569 100644 --- a/code/game/machinery/limbgrower.dm +++ b/code/game/machinery/limbgrower.dm @@ -303,10 +303,8 @@ /// Emagging a limbgrower allows you to build synthetic armblades. /obj/machinery/limbgrower/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE for(var/design_id in SSresearch.techweb_designs) var/datum/design/found_design = SSresearch.techweb_design_by_id(design_id) if((found_design.build_type & LIMBGROWER) && ("emagged" in found_design.category)) @@ -314,3 +312,4 @@ to_chat(user, span_warning("A warning flashes onto the screen, stating that safety overrides have been deactivated!")) obj_flags |= EMAGGED update_static_data(user) + return TRUE diff --git a/code/game/machinery/medical_kiosk.dm b/code/game/machinery/medical_kiosk.dm index ec27252b85b7..a664a93de83e 100644 --- a/code/game/machinery/medical_kiosk.dm +++ b/code/game/machinery/medical_kiosk.dm @@ -136,11 +136,8 @@ return ..() /obj/machinery/medical_kiosk/emag_act(mob/user, obj/item/card/emag/emag_card) - ..() // Why? - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE if(user) user.visible_message("[user] waves a suspicious card by the [src]'s biometric scanner!", "You overload the sensory electronics, the diagnostic readouts start jittering across the screen..") @@ -148,6 +145,7 @@ var/obj/item/circuitboard/computer/cargo/board = circuit board.obj_flags |= EMAGGED //Mirrors emag status onto the board as well. pandemonium = TRUE + return TRUE /obj/machinery/medical_kiosk/examine(mob/user) . = ..() diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 04831b6f36e8..70e0ffbcbfd1 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -277,19 +277,21 @@ return ..() /obj/machinery/porta_turret/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE to_chat(user, span_warning("You short out [src]'s threat assessment circuits.")) visible_message("[src] hums oddly...") obj_flags |= EMAGGED controllock = TRUE on = FALSE //turns off the turret temporarily update_appearance(UPDATE_ICON) - sleep(6 SECONDS) //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 + addtimer(CALLBACK(src, PROC_REF(finish_emag_act), user, emag_card), 6 SECONDS) // 6 seconds to get away. + return TRUE +/obj/machinery/porta_turret/proc/finish_emag_act(mob/user, obj/item/card/emag/emag_card) + if(QDELETED(src)) + return + 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) . = ..() @@ -870,15 +872,14 @@ to_chat(user, span_warning("Access denied.")) /obj/machinery/turretid/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE to_chat(user, span_danger("You short out the turret controls' access analysis module.")) obj_flags |= EMAGGED 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 27cc2d6ee988..824cb52e274e 100644 --- a/code/game/machinery/porta_turret/portable_turret_cover.dm +++ b/code/game/machinery/porta_turret/portable_turret_cover.dm @@ -88,12 +88,17 @@ . = 0 /obj/machinery/porta_turret_cover/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) + if(istype(emag_card, /obj/item/card/emag/cmag) || (parent_turret.obj_flags & EMAGGED)) + return FALSE + to_chat(user, span_notice("You short out [parent_turret]'s threat assessment circuits.")) + visible_message("[parent_turret] hums oddly...") + parent_turret.obj_flags |= EMAGGED + parent_turret.on = 0 + addtimer(CALLBACK(src, PROC_REF(finish_emag_act), user, emag_card), 4 SECONDS) // 4 seconds to get away. + return TRUE + +/obj/machinery/porta_turret_cover/proc/finish_emag_act(mob/user, obj/item/card/emag/emag_card) + if(QDELETED(parent_turret)) return - if(!(parent_turret.obj_flags & EMAGGED)) - to_chat(user, span_notice("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 + parent_turret.on = 1 + return TRUE diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index 5f03b4686a99..17d99f37d1f2 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -62,17 +62,16 @@ return ..() /obj/machinery/recycler/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || obj_flags & EMAGGED) + return FALSE obj_flags |= EMAGGED if(safety_mode) safety_mode = FALSE update_appearance(UPDATE_ICON) playsound(src, "sparks", 75, TRUE, -1) to_chat(user, span_notice("You use the cryptographic sequencer on [src].")) - + return TRUE + /obj/machinery/recycler/update_icon_state() . = ..() var/is_powered = !(stat & (BROKEN|NOPOWER)) diff --git a/code/game/machinery/scan_gate.dm b/code/game/machinery/scan_gate.dm index 75dd57b08ac4..cd5bfa5a1c99 100644 --- a/code/game/machinery/scan_gate.dm +++ b/code/game/machinery/scan_gate.dm @@ -83,14 +83,13 @@ return ..() /obj/machinery/scanner_gate/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE locked = FALSE req_access = list() obj_flags |= EMAGGED to_chat(user, span_notice("You fry the ID checking system.")) + return TRUE /obj/machinery/scanner_gate/proc/perform_scan(mob/living/M) var/beep = FALSE diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index 13d853229bc8..515e6ee7241e 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -196,14 +196,15 @@ /obj/machinery/shieldgen/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE if(obj_flags & EMAGGED) to_chat(user, span_warning("The access controller is damaged!")) - return + return FALSE obj_flags |= EMAGGED locked = FALSE playsound(src, "sparks", 100, 1) to_chat(user, span_warning("You short out the access controller.")) + return TRUE /obj/machinery/shieldgen/update_icon_state() . = ..() @@ -391,14 +392,15 @@ /obj/machinery/shieldwallgen/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE if(obj_flags & EMAGGED) to_chat(user, span_warning("The access controller is damaged!")) - return + return FALSE obj_flags |= EMAGGED locked = FALSE playsound(src, "sparks", 100, 1) to_chat(user, span_warning("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 298262be05e8..de97175c3ab5 100644 --- a/code/game/machinery/slotmachine.dm +++ b/code/game/machinery/slotmachine.dm @@ -120,15 +120,14 @@ return ..() /obj/machinery/computer/slot_machine/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE obj_flags |= EMAGGED 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) + return TRUE /obj/machinery/computer/slot_machine/ui_interact(mob/living/user) . = ..() diff --git a/code/game/machinery/stasis.dm b/code/game/machinery/stasis.dm index 2da7ff8eccef..aa1b5df32141 100644 --- a/code/game/machinery/stasis.dm +++ b/code/game/machinery/stasis.dm @@ -211,9 +211,10 @@ /obj/machinery/stasis/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE if(obj_flags & EMAGGED) to_chat(user, span_warning("The stasis bed's safeties are already overridden!")) - return + return FALSE to_chat(user, span_notice("You override the stasis bed's safeties!")) obj_flags |= EMAGGED + return TRUE diff --git a/code/game/machinery/telecomms/computers/message.dm b/code/game/machinery/telecomms/computers/message.dm index 8cf5ff34268a..75aec2922182 100644 --- a/code/game/machinery/telecomms/computers/message.dm +++ b/code/game/machinery/telecomms/computers/message.dm @@ -48,23 +48,22 @@ return ..() /obj/machinery/computer/message_monitor/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return - if(!isnull(linkedServer)) - obj_flags |= EMAGGED - screen = MSG_MON_SCREEN_HACKED - 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_REF(UnmagConsole)), time) - message = rebootmsg - else + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE + if(isnull(linkedServer)) to_chat(user, span_notice("A no server error appears on the screen.")) + return FALSE + obj_flags |= EMAGGED + screen = MSG_MON_SCREEN_HACKED + 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_REF(UnmagConsole)), time) + message = rebootmsg + return TRUE /obj/machinery/computer/message_monitor/New() ..() diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index ffe727a878c7..ba094aad1458 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -200,7 +200,8 @@ GLOBAL_LIST_EMPTY(telecomms_list) /obj/machinery/telecomms/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE obj_flags |= EMAGGED visible_message(span_notice("Sparks fly out of the [src]!")) traffic += 50 + return TRUE diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 19169b53b189..c67f4b6b928d 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -767,15 +767,17 @@ /obj/machinery/mecha_part_fabricator/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE if(obj_flags & EMAGGED) to_chat(user, span_warning("[src] has no functional safeties to emag.")) - return + return FALSE do_sparks(1, FALSE, src) to_chat(user, span_notice("You short out [src]'s safeties.")) authorization_override = TRUE obj_flags |= EMAGGED update_static_data(user) + return TRUE + /obj/machinery/mecha_part_fabricator/maint link_on_init = FALSE diff --git a/code/game/objects/items/RSF.dm b/code/game/objects/items/RSF.dm index f9b63148b3c4..bc98575c9ab9 100644 --- a/code/game/objects/items/RSF.dm +++ b/code/game/objects/items/RSF.dm @@ -184,12 +184,13 @@ RSF /obj/item/rsf/cookiesynth/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE obj_flags ^= EMAGGED if(obj_flags & EMAGGED) to_chat(user, span_warning("You short out [src]'s reagent safety checker!")) else to_chat(user, span_warning("You reset [src]'s reagent safety checker!")) + return TRUE /obj/item/rsf/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 03ea52570db1..f2fd0e22ac54 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -114,10 +114,9 @@ if(charges < 1) to_chat(user, span_danger("\The [src] is still recharging!")) return - log_combat(user, A, "attempted to [clown_version ? "cmag" : "emag"]") - charges-- - // TODO: Consider refunding a charge if it fails/does nothing since it'll use up a charge regardless of success or failure. - A.emag_act(user, src) + log_combat(user, A, "attempted to emag") + if(A.emag_act(user, src)) + charges-- /obj/item/card/emag/bluespace name = "bluespace cryptographic sequencer" @@ -144,21 +143,18 @@ emagging = TRUE if(do_after(user, rand(5, 10) SECONDS, target)) charges-- - if (prob(40)) + if(prob(40)) to_chat(user, span_notice("[src] emits a puff of smoke, but nothing happens.")) emagging = FALSE return - if (prob(5)) + if(prob(5)) var/mob/living/M = user M.adjust_fire_stacks(1) M.ignite_mob() to_chat(user, span_danger("The card shorts out and catches fire in your hands!")) log_combat(user, target, "attempted to emag") - if(istype(target, /obj/machinery/computer/bounty)) //we can't have nice things - to_chat(user, span_notice("The cheap circuitry isn't strong enough to subvert this!")) - emagging = FALSE - return - target.emag_act(user, src) + if(!target.emag_act(user, src)) + charges++ // No charge usage if they fail (likely because either no interaction or already emagged). emagging = FALSE /obj/item/card/emag/cmag diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm index 5352ae440a11..6e2ae51c765e 100644 --- a/code/game/objects/items/cigs_lighters.dm +++ b/code/game/objects/items/cigs_lighters.dm @@ -866,21 +866,21 @@ CIGARETTE PACKETS ARE IN FANCY.DM /obj/item/clothing/mask/vape/emag_act(mob/user, obj/item/card/emag/emag_card)// I WON'T REGRET WRITTING THIS, SURLY. if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(screw) - if(!(obj_flags & EMAGGED)) - cut_overlays() - obj_flags |= EMAGGED - super = 0 - to_chat(user, span_warning("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, span_warning("[src] is already emagged!")) - else + return FALSE + if(!screw) to_chat(user, span_notice("You need to open the cap to do that.")) + return FALSE + if(obj_flags & EMAGGED) + to_chat(user, span_warning("[src] is already emagged!")) + return FALSE + cut_overlays() + obj_flags |= EMAGGED + super = 0 + to_chat(user, span_warning("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() /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 22f4fd790d69..0bd45620e9e6 100644 --- a/code/game/objects/items/circuitboards/computer_circuitboards.dm +++ b/code/game/objects/items/circuitboards/computer_circuitboards.dm @@ -488,13 +488,13 @@ to_chat(user, span_notice("The spectrum chip is unresponsive.")) /obj/item/circuitboard/computer/cargo/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(!(obj_flags & EMAGGED)) - contraband = TRUE - obj_flags |= EMAGGED - to_chat(user, span_notice("You adjust [src]'s routing and receiver spectrum, unlocking special supplies and contraband.")) - + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE + contraband = TRUE + obj_flags |= EMAGGED + to_chat(user, span_notice("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)" build_path = /obj/machinery/computer/cargo/express @@ -507,10 +507,11 @@ obj_flags &= ~EMAGGED /obj/item/circuitboard/computer/cargo/express/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - to_chat(user, span_notice("You change the routing protocols, allowing the Drop Pod to land anywhere on the station.")) + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE obj_flags |= EMAGGED + to_chat(user, span_notice("You change the routing protocols, allowing the Drop Pod to land anywhere on the station.")) + 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 4f67848d92bb..54c525ab5c78 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -142,13 +142,14 @@ /obj/item/defibrillator/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE if(safety) safety = FALSE to_chat(user, span_warning("You silently disable [src]'s safety protocols with the cryptographic sequencer.")) else safety = TRUE to_chat(user, span_notice("You silently enable [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 da3a6b7403e8..160191d6e598 100644 --- a/code/game/objects/items/devices/geiger_counter.dm +++ b/code/game/objects/items/devices/geiger_counter.dm @@ -179,17 +179,14 @@ update_appearance(UPDATE_ICON) /obj/item/geiger_counter/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE if(scanning) to_chat(user, span_warning("Turn off [src] before you perform this action!")) - return 0 - to_chat(user, span_warning("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.")) + return FALSE obj_flags |= EMAGGED - - + to_chat(user, span_warning("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.")) + return TRUE /obj/item/geiger_counter/cyborg var/mob/listeningTo diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index 250f88400b56..4153a3ca3b59 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -143,11 +143,13 @@ to_chat(user, span_notice("You fill \the [src] with lights from \the [S]. " + status_string() + "")) /obj/item/lightreplacer/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return - Emag() + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE + obj_flags |= EMAGGED + name = "shortcircuited [initial(name)]" + playsound(src.loc, "sparks", 100, 1) + update_appearance(UPDATE_ICON) + return TRUE /obj/item/lightreplacer/attack_self(mob/user) for(var/obj/machinery/light/target in user.loc) @@ -221,15 +223,6 @@ to_chat(U, span_warning("There is a working [target.fitting] already inserted!")) return -/obj/item/lightreplacer/proc/Emag() - obj_flags ^= EMAGGED - playsound(src.loc, "sparks", 100, 1) - if(obj_flags & EMAGGED) - name = "shortcircuited [initial(name)]" - else - name = initial(name) - update_appearance(UPDATE_ICON) - /obj/item/lightreplacer/proc/CanUse(mob/living/user) src.add_fingerprint(user) if(uses > 0) diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index 89a51ce90588..c87f02c96512 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -64,14 +64,13 @@ speech_args[SPEECH_SPANS] |= voicespan /obj/item/megaphone/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return - to_chat(user, span_warning("You overload \the [src]'s voice synthesizer.")) + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE obj_flags |= EMAGGED voicespan = list(SPAN_REALLYBIG, "userdanger") - + to_chat(user, span_warning("You overload \the [src]'s voice synthesizer.")) + return TRUE + /obj/item/megaphone/sec name = "security megaphone" icon_state = "megaphone-sec" diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index 243c1d8b60c3..56e4b05cdc24 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -301,12 +301,14 @@ /obj/item/harmalarm/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE 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]!") + if(user) + 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 219bcbfc0f80..47192ba67c0b 100644 --- a/code/game/objects/items/storage/lockbox.dm +++ b/code/game/objects/items/storage/lockbox.dm @@ -51,16 +51,15 @@ return /obj/item/storage/lockbox/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - 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(span_warning("\The [src] has been broken by [user] with an electromagnetic card!")) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || broken) + return FALSE + 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(span_warning("\The [src] has been broken by [user] with an electromagnetic card!")) + return TRUE /obj/item/storage/lockbox/Entered() . = ..() @@ -81,7 +80,7 @@ /obj/item/storage/lockbox/emp_act(severity) switch(severity) if(EMP_HEAVY) - emag_act() + emag_act(null, null) if(EMP_LIGHT) if(prob(60)) var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED) diff --git a/code/game/objects/structures/barsigns.dm b/code/game/objects/structures/barsigns.dm index 4d66f24e0b4b..2f08d82f6bc5 100644 --- a/code/game/objects/structures/barsigns.dm +++ b/code/game/objects/structures/barsigns.dm @@ -114,14 +114,18 @@ /obj/structure/sign/barsign/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE if(broken) to_chat(user, span_warning("Nothing interesting happens!")) - return + return FALSE to_chat(user, span_notice("You load an illegal barsign into the memory buffer...")) - sleep(10 SECONDS) - chosen_sign = set_sign(new /datum/barsign/hiddensigns/syndibarsign) + addtimer(CALLBACK(src, PROC_REF(finish_emag_act), user, emag_card), 10 SECONDS) + return TRUE +/obj/machinery/door/window/proc/finish_emag_act(mob/user, obj/item/card/emag/emag_card) + if(QDELETED(src)) + return + chosen_sign = set_sign(new /datum/barsign/hiddensigns/syndibarsign) /obj/structure/sign/barsign/proc/pick_sign(mob/user) var/picked_name = input(user, "Available Signage", "Bar Sign", name) as null|anything in get_bar_names() diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index a835a072e61e..61e6417538bf 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -525,16 +525,18 @@ GLOBAL_LIST_EMPTY(lockers) /obj/structure/closet/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(secure && !broken) - user.visible_message(span_warning("Sparks fly from [src]!"), - span_warning("You scramble [src]'s lock, breaking it open!"), - span_italics("You hear a faint electrical spark.")) - playsound(src, "sparks", 50, 1) - broken = TRUE - locked = FALSE - update_appearance(UPDATE_ICON) - + return FALSE + if(!secure || broken) + return FALSE + user.visible_message(span_warning("Sparks fly from [src]!"), + span_warning("You scramble [src]'s lock, breaking it open!"), + span_italics("You hear a faint electrical spark.")) + playsound(src, "sparks", 50, 1) + broken = TRUE + locked = FALSE + update_appearance(UPDATE_ICON) + return TRUE + /obj/structure/closet/get_remote_view_fullscreens(mob/user) if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS))) user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/impaired, 1) diff --git a/code/game/objects/structures/fireaxe.dm b/code/game/objects/structures/fireaxe.dm index cb94d77970a1..f1e980ca95fc 100644 --- a/code/game/objects/structures/fireaxe.dm +++ b/code/game/objects/structures/fireaxe.dm @@ -289,13 +289,11 @@ toggle_lock(user) /obj/structure/fireaxecabinet/bridge/spare/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return . = ..() if(!.) - return + return FALSE trigger_alarm() - + return TRUE /obj/structure/fireaxecabinet/fishingrod name = "fishing cabinet" diff --git a/code/modules/VR/vr_sleeper.dm b/code/modules/VR/vr_sleeper.dm index 3a8fc50a3239..a2cb7ca25e9e 100644 --- a/code/modules/VR/vr_sleeper.dm +++ b/code/modules/VR/vr_sleeper.dm @@ -58,11 +58,12 @@ /obj/machinery/vr_sleeper/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE you_die_in_the_game_you_die_for_real = TRUE sparks.start() addtimer(CALLBACK(src, PROC_REF(emagNotify)), 150) - + return TRUE + /obj/machinery/vr_sleeper/update_icon_state() . = ..() 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 cc309685a378..02ba84312779 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -847,13 +847,12 @@ return /obj/machinery/airalarm/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE obj_flags |= EMAGGED visible_message(span_warning("Sparks fly out of [src]!"), span_notice("You emag [src], disabling its safeties.")) playsound(src, "sparks", 50, 1) + return TRUE /obj/machinery/airalarm/deconstruct(disassembled = TRUE) if(!(flags_1 & NODECONSTRUCT_1)) diff --git a/code/modules/cargo/bounty_console.dm b/code/modules/cargo/bounty_console.dm index 97d2c4ff59fa..938fc7fe661d 100644 --- a/code/modules/cargo/bounty_console.dm +++ b/code/modules/cargo/bounty_console.dm @@ -32,13 +32,15 @@
  • Completed: [B.completion_string()]
  • "} /obj/machinery/computer/bounty/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE + if(istype(emag_card, /obj/item/card/emag/improvised)) // We can't have nice things. + to_chat(user, span_notice("The cheap circuitry isn't strong enough to subvert this!")) + return FALSE to_chat(user, span_warning("You adjust the antenna on \The [src], tuning it to a syndicate frequency.")) obj_flags |= EMAGGED do_sparks(8, FALSE, loc) + return TRUE /obj/machinery/computer/bounty/proc/get_list_to_use() if(obj_flags & EMAGGED) diff --git a/code/modules/cargo/console.dm b/code/modules/cargo/console.dm index 2d1533736fb0..4c229cb86eea 100644 --- a/code/modules/cargo/console.dm +++ b/code/modules/cargo/console.dm @@ -43,10 +43,8 @@ . |= EXPORT_EMAG /obj/machinery/computer/cargo/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE user.visible_message(span_warning("[user] swipes a suspicious card through [src]!"), span_notice("You adjust [src]'s routing and receiver spectrum, unlocking special supplies and contraband.")) @@ -58,6 +56,7 @@ board.contraband = TRUE board.obj_flags |= EMAGGED update_static_data(user) + return TRUE /obj/machinery/computer/cargo/ui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) diff --git a/code/modules/cargo/expressconsole.dm b/code/modules/cargo/expressconsole.dm index 86c7c049438e..7fa7c884470e 100644 --- a/code/modules/cargo/expressconsole.dm +++ b/code/modules/cargo/expressconsole.dm @@ -54,17 +54,16 @@ ..() /obj/machinery/computer/cargo/express/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE user.visible_message(span_warning("[user] swipes a suspicious card through [src]!"), span_notice("You change the routing protocols, allowing the Supply Pod to land anywhere on the station.")) obj_flags |= EMAGGED - // This also sets this on the circuit board + // This also sets this on the circuit board. 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 8136448a89be..41c5aa7e02a6 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -24,14 +24,13 @@ desc = "[desc] The display is flickering slightly." /obj/item/clothing/glasses/hud/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE obj_flags |= EMAGGED to_chat(user, span_warning("PZZTTPFFFT")) desc = "[desc] The display is flickering slightly." - + return TRUE + /obj/item/clothing/glasses/hud/health name = "health scanner HUD" desc = "A heads-up display that scans the humans in view and provides accurate data about their health status." diff --git a/code/modules/clothing/masks/hailer.dm b/code/modules/clothing/masks/hailer.dm index 70680401ec6a..bdb83ff03784 100644 --- a/code/modules/clothing/masks/hailer.dm +++ b/code/modules/clothing/masks/hailer.dm @@ -130,12 +130,12 @@ adjustmask(user) /obj/item/clothing/mask/gas/sechailer/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) + if(istype(emag_card, /obj/item/card/emag/cmag) || obj_flags & EMAGGED) return - if(obj_flags & EMAGGED) - obj_flags |= EMAGGED - to_chat(user, span_warning("You silently fry [src]'s vocal circuit with the cryptographic sequencer.")) - + obj_flags |= EMAGGED + to_chat(user, span_warning("You silently fry [src]'s vocal circuit with the cryptographic sequencer.")) + return TRUE + /obj/item/clothing/mask/gas/sechailer/handle_speech(datum/source, mob/speech_args) if(!voicetoggled) return diff --git a/code/modules/goals/station_goals/bluespace_tap.dm b/code/modules/goals/station_goals/bluespace_tap.dm index e03b836bbafe..7763f6cefdff 100644 --- a/code/modules/goals/station_goals/bluespace_tap.dm +++ b/code/modules/goals/station_goals/bluespace_tap.dm @@ -408,15 +408,14 @@ //emaging provides slightly more points but at much greater risk /obj/machinery/power/bluespace_tap/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(emagged) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || emagged) + return FALSE emagged = TRUE do_sparks(5, FALSE, src) if(user) user.visible_message("[user] overrides the safety protocols of [src].", "You override the safety protocols.") - + return TRUE + /obj/structure/spawner/nether/bluespace_tap spawn_time = 30 SECONDS max_mobs = 5 //Dont' want them overrunning the station diff --git a/code/modules/goals/station_goals/shield.dm b/code/modules/goals/station_goals/shield.dm index d9d88496d5d5..7095c658d93c 100644 --- a/code/modules/goals/station_goals/shield.dm +++ b/code/modules/goals/station_goals/shield.dm @@ -171,11 +171,10 @@ change_meteor_chance(0.5) /obj/machinery/satellite/meteor_shield/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE obj_flags |= EMAGGED to_chat(user, span_notice("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/holodeck/computer.dm b/code/modules/holodeck/computer.dm index faaa7a07ea24..404033cdc644 100644 --- a/code/modules/holodeck/computer.dm +++ b/code/modules/holodeck/computer.dm @@ -164,20 +164,19 @@ active_power_usage = 50 + spawned.len * 3 + effects.len * 5 /obj/machinery/computer/holodeck/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE if(!LAZYLEN(emag_programs)) to_chat(user, "[src] does not seem to have a card swipe port. It must be an inferior model.") - return + return FALSE playsound(src, "sparks", 75, 1) obj_flags |= EMAGGED to_chat(user, span_warning("You vastly increase projector power and override the safety and security protocols.")) say("Warning. Automatic shutoff and derezzing 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) . = ..() if(. & EMP_PROTECT_SELF) diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index db0153913597..88d324b232e2 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -299,12 +299,13 @@ GLOBAL_LIST_EMPTY(checkouts) /obj/machinery/computer/libraryconsole/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE 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 /* * Cachedbook datum diff --git a/code/modules/mining/abandoned_crates.dm b/code/modules/mining/abandoned_crates.dm index da884ba354ee..34126439a1b5 100644 --- a/code/modules/mining/abandoned_crates.dm +++ b/code/modules/mining/abandoned_crates.dm @@ -225,10 +225,10 @@ return ..() /obj/structure/closet/crate/secure/loot/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(locked) - boom(user) + if(istype(emag_card, /obj/item/card/emag/cmag) || !locked) + return FALSE + boom(user) // Did you expect the "anti-tamper system" to not work? + 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 ed6f77802db3..33c68b595bb8 100644 --- a/code/modules/mining/laborcamp/laborstacker.dm +++ b/code/modules/mining/laborcamp/laborstacker.dm @@ -119,12 +119,12 @@ GLOBAL_LIST(labor_sheet_values) stacking_machine.console = src /obj/machinery/mineral/labor_claim_console/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(!(obj_flags & EMAGGED)) - obj_flags |= EMAGGED - to_chat(user, span_warning("PZZTTPFFFT")) - + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE + obj_flags |= EMAGGED + to_chat(user, span_warning("PZZTTPFFFT")) + return TRUE + /**********************Prisoner Collection Unit**************************/ /obj/machinery/mineral/stacking_machine/laborstacker diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 80f3f42f6943..6ec950d770e7 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -541,9 +541,10 @@ /mob/living/carbon/human/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return - .=..() - dna?.species.spec_emag_act(src, user, emag_card) + return FALSE + . = ..() + if(dna) + return dna.species.spec_emag_act(src, user, emag_card) /mob/living/carbon/human/emp_act(severity) dna?.species.spec_emp_act(src, severity) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 5283f3a92c58..733b08f53693 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1505,7 +1505,7 @@ GLOBAL_LIST_EMPTY(features_by_species) return /datum/species/proc/spec_emag_act(mob/living/carbon/human/H, mob/user, obj/item/card/emag/emag_card) - return + return FALSE /datum/species/proc/spec_electrocute_act(mob/living/carbon/human/H, shock_damage, obj/source, siemens_coeff = 1, safety = 0, override = 0, tesla_shock = 0, illusion = 0, stun = TRUE) return diff --git a/code/modules/mob/living/carbon/human/species_types/IPC.dm b/code/modules/mob/living/carbon/human/species_types/IPC.dm index 5b179042e806..f4b74fd75e02 100644 --- a/code/modules/mob/living/carbon/human/species_types/IPC.dm +++ b/code/modules/mob/living/carbon/human/species_types/IPC.dm @@ -328,13 +328,14 @@ span_userdanger("[user] attempts to pour [O] down [C]'s port!")) /datum/species/ipc/spec_emag_act(mob/living/carbon/human/H, mob/user, obj/item/card/emag/emag_card) - if(H == user)//no emagging yourself - return + if(H == user) // No emagging yourself. That would be terrible. + return FALSE for(var/datum/brain_trauma/hypnosis/ipc/trauma in H.get_traumas()) - return + return FALSE H.SetUnconscious(10 SECONDS) H.gain_trauma(/datum/brain_trauma/hypnosis/ipc, TRAUMA_RESILIENCE_SURGERY) - + return TRUE + /*------------------------ ipc martial arts stuff diff --git a/code/modules/mob/living/carbon/human/species_types/ethereal.dm b/code/modules/mob/living/carbon/human/species_types/ethereal.dm index cb83bc6eaf10..ea01ab0d1302 100644 --- a/code/modules/mob/living/carbon/human/species_types/ethereal.dm +++ b/code/modules/mob/living/carbon/human/species_types/ethereal.dm @@ -113,13 +113,13 @@ /datum/species/ethereal/spec_emag_act(mob/living/carbon/human/H, mob/user, obj/item/card/emag/emag_card) if(emageffect) - return + return FALSE emageffect = TRUE to_chat(user, span_notice("You tap [H] on the back with your card.")) H.visible_message(span_danger("[H] starts flickering in an array of colors!")) handle_emag(H) addtimer(CALLBACK(src, PROC_REF(stop_emag), H), 300, TIMER_UNIQUE|TIMER_OVERRIDE) //Disco mode for 30 seconds! This doesn't affect the ethereal at all besides either annoying some players, or making someone look badass. - + return TRUE /datum/species/ethereal/spec_life(mob/living/carbon/human/H) .=..() diff --git a/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm b/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm index 261d882eebc5..ffcaef53f763 100644 --- a/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm +++ b/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm @@ -90,13 +90,12 @@ GLOBAL_VAR_INIT(ai_control_code, random_nukecode(6)) return ..() /obj/machinery/computer/ai_control_console/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return - to_chat(user, span_warning("You bypass the access restrictions")) - authenticated = TRUE + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE obj_flags |= EMAGGED + authenticated = TRUE + to_chat(user, span_warning("You bypass the access restrictions.")) + return TRUE /obj/machinery/computer/ai_control_console/process() if(stat & (BROKEN|NOPOWER|EMPED)) diff --git a/code/modules/mob/living/silicon/ai/decentralized/management/resource_distribution.dm b/code/modules/mob/living/silicon/ai/decentralized/management/resource_distribution.dm index 7eb2a9fca0d5..858534e232b9 100644 --- a/code/modules/mob/living/silicon/ai/decentralized/management/resource_distribution.dm +++ b/code/modules/mob/living/silicon/ai/decentralized/management/resource_distribution.dm @@ -15,13 +15,12 @@ /obj/machinery/computer/ai_resource_distribution/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return - to_chat(user, span_warning("You bypass the access restrictions")) - authenticated = TRUE + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE obj_flags |= EMAGGED + authenticated = TRUE + to_chat(user, span_warning("You bypass the access restrictions.")) + return TRUE /obj/machinery/computer/ai_resource_distribution/ui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm index 73a8e7fc7bac..28304c2ae8ef 100644 --- a/code/modules/mob/living/silicon/robot/robot_defense.dm +++ b/code/modules/mob/living/silicon/robot/robot_defense.dm @@ -85,23 +85,23 @@ /mob/living/silicon/robot/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(user == src)//To prevent syndieborgs from emagging themselves - return - if(!opened)//Cover is closed - if(locked) - to_chat(user, span_notice("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, span_boldwarning("[src] seems to be controlled remotely! Emagging the interface may not work as expected.")) - else + return FALSE + if(user == src) // To prevent syndieborgs from emagging themselves. + return FALSE + if(!opened) // Cover is closed. + if(!locked) to_chat(user, span_warning("The cover is already unlocked!")) - return + return FALSE + to_chat(user, span_notice("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, span_boldwarning("[src] seems to be controlled remotely! Emagging the interface may not work as expected.")) + return TRUE if(world.time < emag_cooldown) - return + return FALSE if(wiresexposed) to_chat(user, span_warning("You must unexpose the wires first!")) - return + return FALSE to_chat(user, span_notice("You emag [src]'s interface.")) emag_cooldown = world.time + 100 @@ -110,20 +110,20 @@ to_chat(src, "[span_nezbere("\"[text2ratvar("You will serve Engine above all else")]!\"")]\n\ [span_danger("ALERT: Subversion attempt denied.")]") log_game("[key_name(user)] attempted to emag cyborg [key_name(src)], but they serve only Ratvar.") - return + return TRUE // Technically a failure, but they got information out of it so... success! if(connected_ai && connected_ai.mind && connected_ai.mind.has_antag_datum(/datum/antagonist/traitor)) to_chat(src, span_danger("ALERT: Foreign software execution prevented.")) logevent("ALERT: Foreign software execution prevented.") to_chat(connected_ai, span_danger("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 // Don't want to let them on. - 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. + 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, span_danger("[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 SetEmagged(1) SetStun(60) //Borgs were getting into trouble because they would attack the emagger before the new laws were shown @@ -170,7 +170,7 @@ laws.associate(src) update_icons() - + return TRUE /mob/living/silicon/robot/blob_act(obj/structure/blob/B) if(stat != DEAD) diff --git a/code/modules/mob/living/simple_animal/bot/atmosbot.dm b/code/modules/mob/living/simple_animal/bot/atmosbot.dm index f924a42d8e86..8f08df2f4041 100644 --- a/code/modules/mob/living/simple_animal/bot/atmosbot.dm +++ b/code/modules/mob/living/simple_animal/bot/atmosbot.dm @@ -63,8 +63,6 @@ text_dehack_fail = "[name] is not responding to reset commands!" /mob/living/simple_animal/bot/atmosbot/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return . = ..() if(emagged == 2) audible_message("[src] ominously whirs....") diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 3d72c250cd02..930f96797d71 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -202,23 +202,24 @@ /mob/living/simple_animal/bot/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(locked) //First emag application unlocks the bot's interface. Apply a screwdriver to use the emag again. + return FALSE + 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, span_notice("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. + return TRUE + if(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! + 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. + turn_on() // The bot automatically turns on when emagged, unless recently hit with EMP. to_chat(src, span_userdanger("(#$*#$^^( OVERRIDE DETECTED")) log_combat(user, src, "emagged") - return - else //Bot is unlocked, but the maint panel has not been opened with a screwdriver yet. - to_chat(user, span_warning("You need to open maintenance panel first!")) + return TRUE + // Bot is unlocked, but the maint panel has not been opened with a screwdriver yet. + to_chat(user, span_warning("You need to open maintenance panel first!")) + return FALSE /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 3f898e7cec58..dddfdf3e3585 100644 --- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm +++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm @@ -79,9 +79,7 @@ return ..() /mob/living/simple_animal/bot/cleanbot/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - ..() + . = ..() if(emagged == 2) if(user) to_chat(user, span_danger("[src] buzzes and beeps.")) diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm index 0728b4fc3a47..e1e6ea686366 100644 --- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm +++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm @@ -195,9 +195,7 @@ Auto Patrol[]"}, shootAt(user) /mob/living/simple_animal/bot/ed209/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - ..() + . = ..() if(emagged == 2) if(user) to_chat(user, span_warning("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 1d35d63d72fd..c4ecf844cbe9 100644 --- a/code/modules/mob/living/simple_animal/bot/firebot.dm +++ b/code/modules/mob/living/simple_animal/bot/firebot.dm @@ -120,9 +120,7 @@ return dat /mob/living/simple_animal/bot/firebot/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - ..() + . = ..() if(emagged == 2) if(user) to_chat(user, span_danger("[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 948153070d4b..c0c624ae27c0 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -129,9 +129,7 @@ ..() /mob/living/simple_animal/bot/floorbot/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - ..() + . = ..() if(emagged == 2) if(user) to_chat(user, span_danger("[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 5280bad42c9b..488d4e0c47e6 100644 --- a/code/modules/mob/living/simple_animal/bot/honkbot.dm +++ b/code/modules/mob/living/simple_animal/bot/honkbot.dm @@ -126,9 +126,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"}, ..() /mob/living/simple_animal/bot/honkbot/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - ..() + . = ..() if(emagged == 2) if(user) user << span_danger("You short out [src]'s sound control system. It gives out an evil laugh!!") diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index 880bda1864f1..5fda0a228377 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -201,9 +201,7 @@ Auto Patrol: []"}, return /mob/living/simple_animal/bot/secbot/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - ..() + . = ..() if(emagged == 2) if(user) to_chat(user, span_danger("You short out [src]'s target assessment circuits.")) diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm index ccea95b40867..b28c8db9b5e8 100644 --- a/code/modules/mob/living/simple_animal/friendly/dog.dm +++ b/code/modules/mob/living/simple_animal/friendly/dog.dm @@ -75,12 +75,12 @@ nofur = TRUE /mob/living/simple_animal/pet/dog/corgi/borgi/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(!emagged) - emagged = TRUE - visible_message(span_warning("[user] swipes a card through [src]."), span_notice("You overload [src]s internal reactor.")) - addtimer(CALLBACK(src, PROC_REF(explode)), 1000) + if(istype(emag_card, /obj/item/card/emag/cmag) || emagged) + return FALSE + emagged = TRUE + visible_message(span_warning("[user] swipes a card through [src]."), span_notice("You overload [src]s internal reactor.")) + addtimer(CALLBACK(src, PROC_REF(explode)), 1000) + return TRUE /mob/living/simple_animal/pet/dog/corgi/borgi/proc/explode() visible_message(span_warning("[src] makes an odd whining noise.")) diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index 34626f625f44..5e9319ef9272 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -112,20 +112,19 @@ /mob/living/simple_animal/spiderbot/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE if(emagged) to_chat(user, span_warning("[src] is already overloaded - better run.")) - return - else - emagged = 1 - to_chat(user, span_notice("You short out the security protocols and overload [src]'s cell, priming it to explode in a short time.")) - spawn(100) - to_chat(src, span_warning("Your cell seems to be outputting a lot of power...")) - spawn(200) - to_chat(src, span_warning("Internal heat sensors are spiking! Something is badly wrong with your cell!")) - spawn(300) - explode() - return + return FALSE + emagged = 1 + to_chat(user, span_notice("You short out the security protocols and overload [src]'s cell, priming it to explode in a short time.")) + spawn(100) + to_chat(src, span_warning("Your cell seems to be outputting a lot of power...")) + spawn(200) + to_chat(src, span_warning("Internal heat sensors are spiking! Something is badly wrong with your cell!")) + spawn(300) + explode() + return TRUE /mob/living/simple_animal/spiderbot/proc/explode() //When emagged. visible_message(span_warning("[src] makes an odd warbling noise, fizzles, and explodes.")) diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm index 444bc3c38d2c..feeb480095a5 100644 --- a/code/modules/modular_computers/computers/item/computer.dm +++ b/code/modules/modular_computers/computers/item/computer.dm @@ -237,7 +237,7 @@ /obj/item/modular_computer/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE if(!enabled) to_chat(user, "You'd need to turn the [src] on first.") return FALSE diff --git a/code/modules/modular_computers/computers/item/tablet/tablet.dm b/code/modules/modular_computers/computers/item/tablet/tablet.dm index 587bc3e8af5e..cb8b536ec7b1 100644 --- a/code/modules/modular_computers/computers/item/tablet/tablet.dm +++ b/code/modules/modular_computers/computers/item/tablet/tablet.dm @@ -92,7 +92,7 @@ /obj/item/modular_computer/tablet/nukeops/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE if(!enabled) to_chat(user, "You'd need to turn the [src] on first.") return FALSE diff --git a/code/modules/modular_computers/computers/machinery/modular_computer.dm b/code/modules/modular_computers/computers/machinery/modular_computer.dm index ac9c1e0eed51..a15879cd8ee8 100644 --- a/code/modules/modular_computers/computers/machinery/modular_computer.dm +++ b/code/modules/modular_computers/computers/machinery/modular_computer.dm @@ -71,7 +71,7 @@ /obj/machinery/modular_computer/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE if(!cpu) to_chat(user, "You'd need to turn the [src] on first.") return FALSE diff --git a/code/modules/pai/card.dm b/code/modules/pai/card.dm index 9e0c4d54ea6f..b024c7082ae0 100644 --- a/code/modules/pai/card.dm +++ b/code/modules/pai/card.dm @@ -45,9 +45,10 @@ /obj/item/pai_card/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(pai) - pai.handle_emag(user, emag_card) + return FALSE + if(!pai) + return FALSE + return pai.handle_emag(user, emag_card) /obj/item/pai_card/emp_act(severity) . = ..() diff --git a/code/modules/pai/pai.dm b/code/modules/pai/pai.dm index c27cc513b85f..4c0f14f9e98d 100644 --- a/code/modules/pai/pai.dm +++ b/code/modules/pai/pai.dm @@ -150,7 +150,7 @@ return ..() /mob/living/silicon/pai/emag_act(mob/user, obj/item/card/emag/emag_card) - handle_emag(user, emag_card) + return handle_emag(user, emag_card) /mob/living/silicon/pai/examine(mob/user) . = ..() diff --git a/code/modules/paperwork/ticketmachine.dm b/code/modules/paperwork/ticketmachine.dm index 608c7b9b9fc0..49db1cdd519d 100644 --- a/code/modules/paperwork/ticketmachine.dm +++ b/code/modules/paperwork/ticketmachine.dm @@ -62,10 +62,8 @@ playsound(tickets[screenNum], 'sound/machines/twobeep_high.ogg', 10, 0 ,1-world.view) //The sound travels world.view+extraRange tiles. This last value is the extra range, which means the total range will be 1. /obj/machinery/ticket_machine/emag_act(mob/user, obj/item/card/emag/emag_card) //Emag the ticket machine to dispense burning tickets, as well as randomize its customer number to destroy the HOP's mind. - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE to_chat(user, span_warning("You overload [src]'s bureaucratic logic circuitry to its MAXIMUM setting.")) var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread s.set_up(12, 1, src) @@ -73,6 +71,7 @@ screenNum = rand(0,ticketNumMax) update_appearance(UPDATE_ICON) obj_flags |= EMAGGED + return TRUE /obj/machinery/ticket_machine/attack_hand(mob/living/carbon/user) . = ..() diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index a2d12d629785..7176fa9aa318 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -865,23 +865,24 @@ update_appearance(UPDATE_ICON) /obj/machinery/power/apc/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(!(obj_flags & EMAGGED) && !malfhack) - if(opened) - to_chat(user, span_warning("You must close the cover to swipe an ID card!")) - else if(panel_open) - to_chat(user, span_warning("You must close the panel first!")) - else if(stat & (BROKEN|MAINT)) - to_chat(user, span_warning("Nothing happens!")) - else - flick("apc-spark", src) - playsound(src, "sparks", 75, 1) - obj_flags |= EMAGGED - locked = FALSE - to_chat(user, span_notice("You emag the APC interface.")) - update_appearance(UPDATE_ICON) - + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED) || malfhack) + return FALSE + if(opened) + to_chat(user, span_warning("You must close the cover to swipe an ID card!")) + return FALSE + if(panel_open) + to_chat(user, span_warning("You must close the panel first!")) + return FALSE + if(stat & (BROKEN|MAINT)) + to_chat(user, span_warning("Nothing happens!")) + return FALSE + flick("apc-spark", src) + playsound(src, "sparks", 75, 1) + obj_flags |= EMAGGED + locked = FALSE + to_chat(user, span_notice("You emag the APC interface.")) + update_appearance(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 702e05195582..62c9a9a172b0 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -207,10 +207,8 @@ return ..() /obj/machinery/power/port_gen/pacman/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE obj_flags |= EMAGGED emp_act(EMP_HEAVY) diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 2ed19f5ad840..b920ada682a5 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -376,10 +376,8 @@ projectile_sound = initial(projectile_sound) /obj/machinery/power/emitter/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE locked = FALSE obj_flags |= EMAGGED sparks.start() @@ -391,7 +389,7 @@ active_power_usage *= 5 projectile_type = /obj/item/projectile/beam/emitter/pulse projectile_sound = 'sound/weapons/pulse.ogg' - + return TRUE /obj/machinery/power/emitter/prototype name = "Prototype Emitter" diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm index 3470aaaafa6f..801927b2db66 100644 --- a/code/modules/projectiles/pins.dm +++ b/code/modules/projectiles/pins.dm @@ -40,13 +40,12 @@ to_chat(user, "This firearm already has a firing pin installed.") /obj/item/firing_pin/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE obj_flags |= EMAGGED to_chat(user, span_notice("You override the authentication mechanism.")) - + return TRUE + ///what do we do when we are being added to a gun /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 165dfbb05bef..dc1b09a660f1 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -158,15 +158,16 @@ /obj/machinery/chem_dispenser/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE if(obj_flags & EMAGGED) to_chat(user, span_warning("[src] has no functional safeties to emag.")) - return + return FALSE to_chat(user, span_notice("You short out [src]'s safeties.")) dispensable_reagents |= emagged_reagents//add the emagged reagents to the dispensable ones display_reagents |= emagged_reagents 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 ad6ac9f6bf62..2edf936e6e34 100644 --- a/code/modules/research/nanites/nanite_remote.dm +++ b/code/modules/research/nanites/nanite_remote.dm @@ -38,16 +38,15 @@ to_chat(user, span_warning("Access denied.")) /obj/item/nanite_remote/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE to_chat(user, span_warning("You override [src]'s ID lock.")) obj_flags |= EMAGGED if(locked) locked = FALSE update_appearance(UPDATE_ICON) - + return TRUE + /obj/item/nanite_remote/update_overlays() . = ..() if(obj_flags & EMAGGED) diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index ea7d7e68d91a..c585f525b7b6 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -202,14 +202,12 @@ Nothing else in the console has ID requirements. ..() /obj/machinery/computer/rdconsole/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(!(obj_flags & EMAGGED)) - to_chat(user, span_notice("You disable the security protocols[locked? " and unlock the console":""].")) - playsound(src, "sparks", 75, 1) - obj_flags |= EMAGGED - locked = FALSE - return ..() + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE + to_chat(user, span_notice("You disable the security protocols[locked? " and unlock the console":""].")) + playsound(src, "sparks", 75, 1) + obj_flags |= EMAGGED + locked = FALSE /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 0b5d2ef6a7cf..5ace76c10afb 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -202,10 +202,9 @@ src.updateUsrDialog() /obj/machinery/computer/rdservercontrol/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE playsound(src, "sparks", 75, 1) obj_flags |= EMAGGED to_chat(user, span_notice("You disable the security protocols.")) + return TRUE diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 874d723885ff..89e065919a76 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -128,14 +128,13 @@ return TRUE /obj/machinery/computer/shuttle/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE req_access = list() obj_flags |= EMAGGED to_chat(user, span_notice("You fried the consoles ID checking system.")) - + return TRUE + /obj/machinery/computer/shuttle/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override=FALSE) if(port && (shuttleId == initial(shuttleId) || override)) shuttleId = port.id diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index 0fd623c67c3c..2b38ab79f6c2 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -157,14 +157,14 @@ /obj/machinery/computer/emergency_shuttle/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE // How did you even get on the shuttle before it go to the station? if(!IS_DOCKED) - return + return FALSE if(CHECK_BITFIELD(obj_flags, EMAGGED) || ENGINES_STARTED) //SYSTEM ERROR: THE SHUTTLE WILL LA-SYSTEM ERROR: THE SHUTTLE WILL LA-SYSTEM ERROR: THE SHUTTLE WILL LAUNCH IN 10 SECONDS to_chat(user, span_warning("The shuttle is already about to launch!")) - return + return FALSE var/time = TIME_LEFT message_admins("[ADMIN_LOOKUPFLW(user.client)] has emagged the emergency shuttle [time] seconds before launch.") @@ -185,6 +185,7 @@ authorized += ID process(SSMACHINES_DT) + return TRUE /obj/machinery/computer/emergency_shuttle/Destroy() // Our fake IDs that the emag generated are just there for colour @@ -505,10 +506,8 @@ return ..() /obj/machinery/computer/shuttle/pod/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE ENABLE_BITFIELD(obj_flags, EMAGGED) to_chat(user, span_warning("You fry the pod's alert level checking system.")) diff --git a/code/modules/shuttle/ferry.dm b/code/modules/shuttle/ferry.dm index dd56c47653da..692f5a5d7829 100644 --- a/code/modules/shuttle/ferry.dm +++ b/code/modules/shuttle/ferry.dm @@ -11,7 +11,7 @@ /obj/machinery/computer/shuttle/ferry/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE if(!allow_emag) to_chat(user, span_warning("[src]'s security firewall is far too powerful for you to bypass.")) return FALSE diff --git a/code/modules/surgery/organs/augments_arms.dm b/code/modules/surgery/organs/augments_arms.dm index 334c6306ae56..134d8d5981ea 100644 --- a/code/modules/surgery/organs/augments_arms.dm +++ b/code/modules/surgery/organs/augments_arms.dm @@ -216,7 +216,7 @@ /obj/item/organ/cyberimp/arm/toolset/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE if(!(locate(/obj/item/kitchen/knife/combat/cyborg) in items_list)) to_chat(usr, span_notice("You unlock [src]'s integrated knife!")) items_list += new /obj/item/kitchen/knife/combat/cyborg(src) diff --git a/code/modules/vehicles/cars/clowncar.dm b/code/modules/vehicles/cars/clowncar.dm index bd6e2fefc437..25a8844bc5bc 100644 --- a/code/modules/vehicles/cars/clowncar.dm +++ b/code/modules/vehicles/cars/clowncar.dm @@ -82,15 +82,14 @@ log_combat(src, A, "crashed into", null, "dumping all passengers") /obj/vehicle/sealed/car/clowncar/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE obj_flags |= EMAGGED to_chat(user, span_danger("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) initialize_controller_action_type(/datum/action/vehicle/sealed/Cannon, VEHICLE_CONTROL_DRIVE) - + return TRUE + /obj/vehicle/sealed/car/clowncar/Destroy() playsound(src, 'sound/vehicles/clowncar_fart.ogg', 100) return ..() diff --git a/code/modules/vehicles/motorized_wheelchair.dm b/code/modules/vehicles/motorized_wheelchair.dm index 4664243624de..71095ad910a1 100644 --- a/code/modules/vehicles/motorized_wheelchair.dm +++ b/code/modules/vehicles/motorized_wheelchair.dm @@ -164,9 +164,7 @@ playsound(src, 'sound/effects/bang.ogg', 50, TRUE) /obj/vehicle/ridden/wheelchair/motorized/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if((obj_flags & EMAGGED) || !panel_open) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED) || !panel_open) + return FALSE to_chat(user, span_warning("A bomb appears in [src], what the fuck?")) obj_flags |= EMAGGED diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index 9482cf7f8a94..4227cdf3d90b 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -661,13 +661,12 @@ GLOBAL_LIST_EMPTY(vending_products) . = ..() /obj/machinery/vending/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE obj_flags |= EMAGGED to_chat(user, span_notice("You short out the product lock on [src].")) - + return TRUE + /obj/machinery/vending/_try_interact(mob/user) if(seconds_electrified && !(stat & NOPOWER)) if(shock(user, 100)) diff --git a/yogstation/code/game/machinery/computer/arcade.dm b/yogstation/code/game/machinery/computer/arcade.dm index e35f3e9e487c..c1033fe26d22 100644 --- a/yogstation/code/game/machinery/computer/arcade.dm +++ b/yogstation/code/game/machinery/computer/arcade.dm @@ -147,10 +147,8 @@ return TRUE /obj/machinery/computer/arcade/minesweeper/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE desc = "An arcade machine that generates grids. It's clunking and sparking everywhere, almost as if threatening to explode at any moment!" do_sparks(5, 1, src) obj_flags |= EMAGGED @@ -161,3 +159,4 @@ to_chat(user, span_warning("The machine buzzes and sparks... the game has been reset!")) playsound(user, 'sound/machines/buzz-sigh.ogg', 100, 0, extrarange = 3, falloff_exponent = 10) //Loud buzz board.game_status = MINESWEEPER_IDLE + return TRUE diff --git a/yogstation/code/game/machinery/telecomms/computers/traffic_control.dm b/yogstation/code/game/machinery/telecomms/computers/traffic_control.dm index 3771ee54f365..eae7698d55e1 100644 --- a/yogstation/code/game/machinery/telecomms/computers/traffic_control.dm +++ b/yogstation/code/game/machinery/telecomms/computers/traffic_control.dm @@ -291,12 +291,11 @@ ..() /obj/machinery/computer/telecomms/traffic/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(!emagged) - playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) - emagged = TRUE - to_chat(user, span_notice("You you disable the security protocols.")) + if(istype(emag_card, /obj/item/card/emag/cmag) || emagged) + return FALSE + playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) + emagged = TRUE + to_chat(user, span_notice("You you disable the security protocols.")) /obj/machinery/computer/telecomms/traffic/proc/canAccess(mob/user) if(issilicon(user) || in_range(user, src)) diff --git a/yogstation/code/game/objects/items/cards_ids.dm b/yogstation/code/game/objects/items/cards_ids.dm index 6cb0cdf67261..3dd492cba4bc 100644 --- a/yogstation/code/game/objects/items/cards_ids.dm +++ b/yogstation/code/game/objects/items/cards_ids.dm @@ -70,23 +70,23 @@ /obj/item/card/emag/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return - var/otherEmag = user.get_active_held_item() - if(!otherEmag) - return - if(istype(otherEmag, /obj/item/card/emag/improvised)) - return + return FALSE + if(!emag_card) + return FALSE + if(istype(emag_card, /obj/item/card/emag/improvised)) + return FALSE if(prob(7)) to_chat(user, span_notice("By some ungodly miracle, the emag gains new functionality instead of being destroyed.")) playsound(src.loc, "sparks", 50, 1) - qdel(otherEmag) + qdel(emag_card) color = rgb(40, 130, 255) prox_check = FALSE - return + return TRUE to_chat(user, span_notice("The cyptographic sequencers attempt to override each other before destroying themselves.")) playsound(src.loc, "sparks", 50, 1) - qdel(otherEmag) + qdel(emag_card) qdel(src) + return TRUE /obj/item/card/id/gasclerk name = "Clerk" diff --git a/yogstation/code/game/objects/items/holotool/holotool.dm b/yogstation/code/game/objects/items/holotool/holotool.dm index 0cc001a4989f..837cd7555977 100644 --- a/yogstation/code/game/objects/items/holotool/holotool.dm +++ b/yogstation/code/game/objects/items/holotool/holotool.dm @@ -139,14 +139,12 @@ switch_tool(user, new_tool) /obj/item/holotool/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE to_chat(user, span_danger("ZZT- ILLEGAL BLUEPRINT UNLOCKED- CONTACT !#$@^%$# NANOTRASEN SUPPORT-@*%$^%!")) do_sparks(5, 0, src) obj_flags |= EMAGGED - + return TRUE // Spawn in RD closet /obj/structure/closet/secure_closet/RD/PopulateContents() diff --git a/yogstation/code/game/objects/items/plushes.dm b/yogstation/code/game/objects/items/plushes.dm index 1fada5cfe07a..09ad063eb9e9 100644 --- a/yogstation/code/game/objects/items/plushes.dm +++ b/yogstation/code/game/objects/items/plushes.dm @@ -44,14 +44,15 @@ /obj/item/toy/plush/goatplushie/angry/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if (obj_flags&EMAGGED) + return FALSE + if(obj_flags & EMAGGED) visible_message(span_notice("[src] already looks angry enough, you shouldn't anger it more.")) - return + return FALSE cooldown_modifier = 5 throwforce = 20 obj_flags |= EMAGGED visible_message(span_danger("[src] stares at [user] angrily before going docile.")) + return TRUE /obj/item/toy/plush/goatplushie/angry/Destroy() STOP_PROCESSING(SSprocessing, src) diff --git a/yogstation/code/game/objects/items/tools.dm b/yogstation/code/game/objects/items/tools.dm index a93c51f31696..b064a975b3e0 100644 --- a/yogstation/code/game/objects/items/tools.dm +++ b/yogstation/code/game/objects/items/tools.dm @@ -204,15 +204,15 @@ /obj/item/jawsoflife/jimmy/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE if(obj_flags & EMAGGED) to_chat(user, span_warning("Nothing new seems to happen when you swipe the emag.")) - return + return FALSE to_chat(user, span_notice("You swipe the emag on [src]'s pressure gage' enabling you to pump more pressure. ")) obj_flags |= EMAGGED pump_max = 150 pump_cost = 75 - . = ..() + return TRUE /obj/item/jawsoflife/jimmy/examine(mob/user) . = ..() diff --git a/yogstation/code/game/objects/structures/fireaxe.dm b/yogstation/code/game/objects/structures/fireaxe.dm index eb33d59eeaba..5bf9980ced9d 100644 --- a/yogstation/code/game/objects/structures/fireaxe.dm +++ b/yogstation/code/game/objects/structures/fireaxe.dm @@ -89,23 +89,21 @@ update_appearance(UPDATE_ICON) /obj/structure/fireaxecabinet/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - //this allows you to emag the fireaxe cabinet, unlocking it immediately. - if(obj_flags & EMAGGED) - return - if(!open && locked) - user.visible_message(span_warning("Sparks fly out of the [src]'s locking modules!"), \ - span_caution("You short out the [name]'s locking modules."), \ - span_italics("You hear electricity arcing.")) - spark_system.start() - - src.add_fingerprint(user) - obj_flags |= EMAGGED - desc += "
    [span_warning("The access panel is smoking slightly.")]" - - playsound(loc, "sound/machines/locktoggle.ogg", 30, 1, -3) - locked = 0 - audible_message("You hear an audible clunk as the [name]'s bolt retracts.") - update_appearance(UPDATE_ICON) - //Fireaxe Cabinet is now permanently unlocked. + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE + if(open || !locked) // You won't need the emag to get what you want. Just open it normally! + return FALSE + // This allows you to emag the fireaxe cabinet, unlocking it immediately. + user.visible_message(span_warning("Sparks fly out of the [src]'s locking modules!"), \ + span_caution("You short out the [name]'s locking modules."), \ + span_italics("You hear electricity arcing.")) + spark_system.start() + src.add_fingerprint(user) + obj_flags |= EMAGGED + desc += "
    [span_warning("The access panel is smoking slightly.")]" + playsound(loc, "sound/machines/locktoggle.ogg", 30, 1, -3) + locked = 0 + audible_message("You hear an audible clunk as the [name]'s bolt retracts.") + update_appearance(UPDATE_ICON) + // The fireaxe cabinet is now permanently unlocked. + return TRUE diff --git a/yogstation/code/modules/clothing/suits/nerd.dm b/yogstation/code/modules/clothing/suits/nerd.dm index 233eb9020611..6e544abf3483 100644 --- a/yogstation/code/modules/clothing/suits/nerd.dm +++ b/yogstation/code/modules/clothing/suits/nerd.dm @@ -80,10 +80,8 @@ addtimer(CALLBACK(src, PROC_REF(process_sound_queue)), sound_delay) /obj/item/clothing/suit/armor/nerd/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE if(owner) to_chat(owner, span_warning("You need to take off \the [name] before emagging it.")) return FALSE diff --git a/yogstation/code/modules/mob/living/carbon/human/species_types/preternis/preternis.dm b/yogstation/code/modules/mob/living/carbon/human/species_types/preternis/preternis.dm index 90248e3983a0..e5b20710c610 100644 --- a/yogstation/code/modules/mob/living/carbon/human/species_types/preternis/preternis.dm +++ b/yogstation/code/modules/mob/living/carbon/human/species_types/preternis/preternis.dm @@ -155,10 +155,10 @@ adjust_charge - take a positive or negative value to adjust the charge level /datum/species/preternis/spec_emag_act(mob/living/carbon/human/H, mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) - return + return FALSE . = ..() if(emag_lvl == 2) - return + return FALSE emag_lvl = min(emag_lvl + 1,2) playsound(H.loc, 'sound/machines/warning-buzzer.ogg', 50, 1, 1) H.Paralyze(60) @@ -170,7 +170,8 @@ adjust_charge - take a positive or negative value to adjust the charge level H.overlay_fullscreen("preternis_emag", /atom/movable/screen/fullscreen/high) H.throw_alert("preternis_emag", /atom/movable/screen/alert/high/preternis) to_chat(H,span_danger("ALERT! OPTIC SENSORS FAILURE.VISION PROCESSOR COMPROMISED.")) - + return TRUE + /datum/species/preternis/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H) . = ..() diff --git a/yogstation/code/modules/mob/living/simple_animal/friendly/clowncat.dm b/yogstation/code/modules/mob/living/simple_animal/friendly/clowncat.dm index 21275fead68d..ee812f2aeac5 100644 --- a/yogstation/code/modules/mob/living/simple_animal/friendly/clowncat.dm +++ b/yogstation/code/modules/mob/living/simple_animal/friendly/clowncat.dm @@ -20,11 +20,10 @@ playsound(src, pick(meows), 100) /mob/living/simple_animal/pet/cat/clown/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(emagged == FALSE) - emagged = TRUE - do_sparks(8, FALSE, loc) + if(istype(emag_card, /obj/item/card/emag/cmag) || emagged) + return FALSE + emagged = TRUE + do_sparks(8, FALSE, loc) /mob/living/simple_animal/pet/cat/clown/Move(atom/newloc, direct) ..() diff --git a/yogstation/code/modules/power/hugbox.dm b/yogstation/code/modules/power/hugbox.dm index af4041a1a9f0..ea7286a2056c 100644 --- a/yogstation/code/modules/power/hugbox.dm +++ b/yogstation/code/modules/power/hugbox.dm @@ -12,13 +12,12 @@ var/power_per_hug = 1000000 /obj/machinery/power/hugbox_engine/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE obj_flags |= EMAGGED to_chat(user, span_warning("You crank up the love harvesting regulator to hardware maximum.")) - + return TRUE + /obj/machinery/power/hugbox_engine/wrench_act(mob/living/user, obj/item/I) if(!anchored && !isinspace()) connect_to_network() diff --git a/yogstation/code/modules/power/singularity/particle_accelerator/particle_control.dm b/yogstation/code/modules/power/singularity/particle_accelerator/particle_control.dm index c56a23f38a8a..9e7c91768d62 100644 --- a/yogstation/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/yogstation/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -2,10 +2,9 @@ active_power_usage = 5000 // The power usage when at lvl 0 /obj/machinery/particle_accelerator/control_box/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE + to_chat(user, span_danger("The laws of physics no longer apply in the future, god help you...")) locked = FALSE area_restricted = FALSE @@ -19,3 +18,4 @@ if(!active) toggle_power() update_appearance(UPDATE_ICON) + return TRUE diff --git a/yogstation/code/modules/power/stationarybike.dm b/yogstation/code/modules/power/stationarybike.dm index 6312ca554cb4..b7c290990897 100644 --- a/yogstation/code/modules/power/stationarybike.dm +++ b/yogstation/code/modules/power/stationarybike.dm @@ -19,16 +19,15 @@ /obj/machinery/power/stationarybike/examine(mob/user) . = ..() - . +=span_notice("It is generating [generating]kw of power.") + . += span_notice("It is generating [generating]kw of power.") /obj/machinery/power/stationarybike/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE obj_flags |= EMAGGED lifeweb = 1 - to_chat(user, span_warning("You disabled safeties")) + to_chat(user, span_warning("You disabled the safeties.")) + return TRUE /obj/machinery/power/stationarybike/wrench_act(mob/living/user, obj/item/I) if(!anchored && !isinspace()) diff --git a/yogstation/code/modules/power/validhunter.dm b/yogstation/code/modules/power/validhunter.dm index 71cb4ee2ff3e..115565c20780 100644 --- a/yogstation/code/modules/power/validhunter.dm +++ b/yogstation/code/modules/power/validhunter.dm @@ -41,14 +41,13 @@ return TRUE /obj/machinery/power/validhunter_engine/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return - if(obj_flags & EMAGGED) - return + if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + return FALSE obj_flags |= EMAGGED to_chat(user, span_warning("You overload the syndicate chip.")) - + return TRUE + /obj/machinery/power/validhunter_engine/attack_hand(mob/user) . = ..() if(.) From 40c1b9672d0558bca0cbb81296cf38f9cc110777 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Thu, 27 Jul 2023 01:20:22 -0700 Subject: [PATCH 20/42] epic fail --- code/game/objects/structures/barsigns.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/structures/barsigns.dm b/code/game/objects/structures/barsigns.dm index 2f08d82f6bc5..bd19e7deefea 100644 --- a/code/game/objects/structures/barsigns.dm +++ b/code/game/objects/structures/barsigns.dm @@ -122,7 +122,7 @@ addtimer(CALLBACK(src, PROC_REF(finish_emag_act), user, emag_card), 10 SECONDS) return TRUE -/obj/machinery/door/window/proc/finish_emag_act(mob/user, obj/item/card/emag/emag_card) +/obj/structure/sign/barsign/proc/finish_emag_act(mob/user, obj/item/card/emag/emag_card) if(QDELETED(src)) return chosen_sign = set_sign(new /datum/barsign/hiddensigns/syndibarsign) From 83f1857b4c2973fe6de211261b5987226b32d955 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Thu, 27 Jul 2023 01:22:38 -0700 Subject: [PATCH 21/42] move it up --- code/game/machinery/computer/security.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 603c245e59cf..92fc4e6fac63 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -849,6 +849,8 @@ /obj/machinery/computer/secure_data/emag_act(mob/user, obj/item/card/emag/emag_card) if(istype(emag_card, /obj/item/card/emag/cmag)) return FALSE + if(logged_in) // What was the point then? + return FALSE var/name if(ishuman(user)) var/mob/living/carbon/human/human_user = user @@ -859,8 +861,6 @@ name = "Unknown" if(issilicon(user)) name = "[user.name]" - if(logged_in) - return FALSE // What was the point then? logged_in = TRUE to_chat(user, span_warning("You override [src]'s ID lock.")) trigger_alarm() From 07849670922d905a90093218160773a973e1efcc Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Thu, 27 Jul 2023 01:25:03 -0700 Subject: [PATCH 22/42] dont need to return here --- code/game/machinery/porta_turret/portable_turret_cover.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/game/machinery/porta_turret/portable_turret_cover.dm b/code/game/machinery/porta_turret/portable_turret_cover.dm index 824cb52e274e..c141d1203c2c 100644 --- a/code/game/machinery/porta_turret/portable_turret_cover.dm +++ b/code/game/machinery/porta_turret/portable_turret_cover.dm @@ -101,4 +101,3 @@ if(QDELETED(parent_turret)) return parent_turret.on = 1 - return TRUE From 77ba7836743bc32593eabc202ab76b84f87aeffc Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Thu, 27 Jul 2023 01:29:47 -0700 Subject: [PATCH 23/42] probably dont need these nulls --- code/game/objects/items/storage/lockbox.dm | 2 +- code/modules/antagonists/revenant/revenant_abilities.dm | 4 ++-- code/modules/events/ion_storm.dm | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items/storage/lockbox.dm b/code/game/objects/items/storage/lockbox.dm index 47192ba67c0b..69d3e36679e2 100644 --- a/code/game/objects/items/storage/lockbox.dm +++ b/code/game/objects/items/storage/lockbox.dm @@ -80,7 +80,7 @@ /obj/item/storage/lockbox/emp_act(severity) switch(severity) if(EMP_HEAVY) - emag_act(null, null) + emag_act() if(EMP_LIGHT) if(prob(60)) var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED) diff --git a/code/modules/antagonists/revenant/revenant_abilities.dm b/code/modules/antagonists/revenant/revenant_abilities.dm index 9bfa29fcb981..c32ebe515243 100644 --- a/code/modules/antagonists/revenant/revenant_abilities.dm +++ b/code/modules/antagonists/revenant/revenant_abilities.dm @@ -315,7 +315,7 @@ new /obj/effect/temp_visual/revenant(bot.loc) bot.locked = FALSE bot.open = TRUE - bot.emag_act(caster, null) + bot.emag_act(caster) for(var/mob/living/carbon/human/human in victim) if(human == caster) continue @@ -331,7 +331,7 @@ if(prob(20)) if(prob(50)) new /obj/effect/temp_visual/revenant(thing.loc) - thing.emag_act(caster, null) + thing.emag_act(caster) // Only works on cyborgs, not AI! for(var/mob/living/silicon/robot/cyborg in victim) playsound(cyborg, 'sound/machines/warning-buzzer.ogg', 50, TRUE) diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm index c32d6b00e9f0..3a3dbd8f6534 100644 --- a/code/modules/events/ion_storm.dm +++ b/code/modules/events/ion_storm.dm @@ -60,7 +60,7 @@ if(botEmagChance) for(var/mob/living/simple_animal/bot/bot in GLOB.alive_mob_list) if(prob(botEmagChance)) - bot.emag_act(null, null) + bot.emag_act() /*/proc/generate_ion_law() //yogs - start mirrored in the yogs folder //Threats are generally bad things, silly or otherwise. Plural. From 6900580935db338082179ad3a002ee3ab59f7b94 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Thu, 27 Jul 2023 01:32:25 -0700 Subject: [PATCH 24/42] dont need this here either --- code/modules/mob/living/simple_animal/bot/medbot.dm | 2 -- 1 file changed, 2 deletions(-) diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index 47812934701f..2c3a944483e4 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -256,8 +256,6 @@ step_to(src, (get_step_away(src,user))) /mob/living/simple_animal/bot/medbot/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return ..() if(emagged == 2) declare_crit = 0 From be3dcb3e0b2fd6a9ef8dded5710fe70bf272c979 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Thu, 27 Jul 2023 01:42:04 -0700 Subject: [PATCH 25/42] last pass --- code/game/machinery/doors/airlock.dm | 4 ++-- code/game/machinery/doors/windowdoor.dm | 2 +- .../machinery/porta_turret/portable_turret.dm | 4 ++-- code/game/objects/structures/barsigns.dm | 4 ++-- .../simple_animal/friendly/spiderbot.dm | 21 +++++++++++++------ code/modules/ninja/energy_katana.dm | 2 +- code/modules/pai/pai.dm | 2 +- 7 files changed, 24 insertions(+), 15 deletions(-) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 822a79439bb0..7f7c4404bc98 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1533,10 +1533,10 @@ return FALSE operating = TRUE update_icon(state = AIRLOCK_EMAG, override = TRUE) - addtimer(CALLBACK(src, PROC_REF(finish_emag_act), user, emag_card), 0.6 SECONDS) + addtimer(CALLBACK(src, PROC_REF(finish_emag_act)), 0.6 SECONDS) return TRUE -/obj/machinery/door/airlock/proc/finish_emag_act(mob/user, obj/item/card/emag/emag_card) +/obj/machinery/door/airlock/proc/finish_emag_act() if(QDELETED(src)) return operating = FALSE diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index d2c4abcf0fd8..a8fbf09a64dc 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -233,7 +233,7 @@ addtimer(CALLBACK(src, PROC_REF(finish_emag_act), user, emag_card), 0.6 SECONDS) return TRUE -/obj/machinery/door/window/proc/finish_emag_act(mob/user, obj/item/card/emag/emag_card) +/obj/machinery/door/window/proc/finish_emag_act() if(QDELETED(src)) return operating = FALSE diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 70e0ffbcbfd1..2d78b7373297 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -285,10 +285,10 @@ controllock = TRUE on = FALSE //turns off the turret temporarily update_appearance(UPDATE_ICON) - addtimer(CALLBACK(src, PROC_REF(finish_emag_act), user, emag_card), 6 SECONDS) // 6 seconds to get away. + addtimer(CALLBACK(src, PROC_REF(finish_emag_act)), 6 SECONDS) // 6 seconds to get away. return TRUE -/obj/machinery/porta_turret/proc/finish_emag_act(mob/user, obj/item/card/emag/emag_card) +/obj/machinery/porta_turret/proc/finish_emag_act() if(QDELETED(src)) return on = TRUE // Turns it back on. The cover popUp() popDown() are automatically called in process(), no need to define it here. diff --git a/code/game/objects/structures/barsigns.dm b/code/game/objects/structures/barsigns.dm index bd19e7deefea..acac7559b65d 100644 --- a/code/game/objects/structures/barsigns.dm +++ b/code/game/objects/structures/barsigns.dm @@ -119,10 +119,10 @@ to_chat(user, span_warning("Nothing interesting happens!")) return FALSE to_chat(user, span_notice("You load an illegal barsign into the memory buffer...")) - addtimer(CALLBACK(src, PROC_REF(finish_emag_act), user, emag_card), 10 SECONDS) + addtimer(CALLBACK(src, PROC_REF(finish_emag_act)), 10 SECONDS) return TRUE -/obj/structure/sign/barsign/proc/finish_emag_act(mob/user, obj/item/card/emag/emag_card) +/obj/structure/sign/barsign/proc/finish_emag_act() if(QDELETED(src)) return chosen_sign = set_sign(new /datum/barsign/hiddensigns/syndibarsign) diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index 5e9319ef9272..4c28a6c781db 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -118,14 +118,23 @@ return FALSE emagged = 1 to_chat(user, span_notice("You short out the security protocols and overload [src]'s cell, priming it to explode in a short time.")) - spawn(100) - to_chat(src, span_warning("Your cell seems to be outputting a lot of power...")) - spawn(200) - to_chat(src, span_warning("Internal heat sensors are spiking! Something is badly wrong with your cell!")) - spawn(300) - explode() + addtimer(CALLBACK(src, PROC_REF(finish_emag_act), 1), 10 SECONDS) return TRUE +/mob/living/simple_animal/spiderbot/proc/finish_emag_act(progress) + if(QDELETED(src)) + return + if(progress) + switch(progress) + if(1) + to_chat(src, span_warning("Your cell seems to be outputting a lot of power...")) + addtimer(CALLBACK(src, PROC_REF(finish_emag_act), 2), 10 SECONDS) + if(2) + to_chat(src, span_warning("Internal heat sensors are spiking! Something is badly wrong with your cell!")) + addtimer(CALLBACK(src, PROC_REF(finish_emag_act), 3), 10 SECONDS) + if(3) + explode() + /mob/living/simple_animal/spiderbot/proc/explode() //When emagged. visible_message(span_warning("[src] makes an odd warbling noise, fizzles, and explodes.")) explosion(get_turf(src), -1, 0, 2, 3, 0, flame_range = 2) ///Explodes like a fireball diff --git a/code/modules/ninja/energy_katana.dm b/code/modules/ninja/energy_katana.dm index d9e8b5d45794..83d559175094 100644 --- a/code/modules/ninja/energy_katana.dm +++ b/code/modules/ninja/energy_katana.dm @@ -53,7 +53,7 @@ spark_system.start() playsound(user, "sparks", 50, 1) playsound(user, 'sound/weapons/blade1.ogg', 50, 1) - target.emag_act(user, null) + target.emag_act(user) /obj/item/energy_katana/pickup(mob/living/carbon/human/user) . = ..() diff --git a/code/modules/pai/pai.dm b/code/modules/pai/pai.dm index 4c0f14f9e98d..022802f46da2 100644 --- a/code/modules/pai/pai.dm +++ b/code/modules/pai/pai.dm @@ -287,7 +287,7 @@ * @param {living/carbon} attacker - The user performing the action. * @returns {boolean} - TRUE if successful, FALSE if not. */ -/mob/living/silicon/pai/proc/handle_emag(mob/living/carbon/attacker) +/mob/living/silicon/pai/proc/handle_emag(mob/living/carbon/attacker, obj/item/card/emag/emag_card) if(!isliving(attacker)) return FALSE balloon_alert(attacker, "directive override complete") From 54a9164fea4eaa73c824db990dc03bc89b674e4f Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Thu, 27 Jul 2023 01:43:39 -0700 Subject: [PATCH 26/42] yep --- code/game/machinery/doors/airlock.dm | 4 ++-- code/game/machinery/porta_turret/portable_turret_cover.dm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 7f7c4404bc98..822a79439bb0 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1533,10 +1533,10 @@ return FALSE operating = TRUE update_icon(state = AIRLOCK_EMAG, override = TRUE) - addtimer(CALLBACK(src, PROC_REF(finish_emag_act)), 0.6 SECONDS) + addtimer(CALLBACK(src, PROC_REF(finish_emag_act), user, emag_card), 0.6 SECONDS) return TRUE -/obj/machinery/door/airlock/proc/finish_emag_act() +/obj/machinery/door/airlock/proc/finish_emag_act(mob/user, obj/item/card/emag/emag_card) if(QDELETED(src)) return operating = FALSE diff --git a/code/game/machinery/porta_turret/portable_turret_cover.dm b/code/game/machinery/porta_turret/portable_turret_cover.dm index c141d1203c2c..5853732b06b8 100644 --- a/code/game/machinery/porta_turret/portable_turret_cover.dm +++ b/code/game/machinery/porta_turret/portable_turret_cover.dm @@ -94,10 +94,10 @@ visible_message("[parent_turret] hums oddly...") parent_turret.obj_flags |= EMAGGED parent_turret.on = 0 - addtimer(CALLBACK(src, PROC_REF(finish_emag_act), user, emag_card), 4 SECONDS) // 4 seconds to get away. + addtimer(CALLBACK(src, PROC_REF(finish_emag_act)), 4 SECONDS) // 4 seconds to get away. return TRUE -/obj/machinery/porta_turret_cover/proc/finish_emag_act(mob/user, obj/item/card/emag/emag_card) +/obj/machinery/porta_turret_cover/proc/finish_emag_act() if(QDELETED(parent_turret)) return parent_turret.on = 1 From 307601e2b41ca6b209dd6f8d2f58dbd370d302ce Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Thu, 27 Jul 2023 01:46:02 -0700 Subject: [PATCH 27/42] charges --- code/game/objects/items/cards_ids.dm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index f2fd0e22ac54..0ed4fc9c178d 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -115,8 +115,9 @@ to_chat(user, span_danger("\The [src] is still recharging!")) return log_combat(user, A, "attempted to emag") - if(A.emag_act(user, src)) - charges-- + charges-- + if(!A.emag_act(user, src) && ((charges + 1) > maxcharges)) // This is here because some emag_act use sleep and that could mess things up. + charges++ // No charge usage if they fail (likely because either no interaction or already emagged). /obj/item/card/emag/bluespace name = "bluespace cryptographic sequencer" @@ -153,8 +154,8 @@ M.ignite_mob() to_chat(user, span_danger("The card shorts out and catches fire in your hands!")) log_combat(user, target, "attempted to emag") - if(!target.emag_act(user, src)) - charges++ // No charge usage if they fail (likely because either no interaction or already emagged). + if(!target.emag_act(user, src) && !((charges + 1) > maxcharges)) + charges++ emagging = FALSE /obj/item/card/emag/cmag From d8b9acc211a4d323d265ebaf34a07266082bf94a Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Thu, 27 Jul 2023 01:55:50 -0700 Subject: [PATCH 28/42] max_charges --- code/game/objects/items/cards_ids.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index 0ed4fc9c178d..6c901451514e 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -116,7 +116,7 @@ return log_combat(user, A, "attempted to emag") charges-- - if(!A.emag_act(user, src) && ((charges + 1) > maxcharges)) // This is here because some emag_act use sleep and that could mess things up. + if(!A.emag_act(user, src) && ((charges + 1) > max_charges)) // This is here because some emag_act use sleep and that could mess things up. charges++ // No charge usage if they fail (likely because either no interaction or already emagged). /obj/item/card/emag/bluespace @@ -154,7 +154,7 @@ M.ignite_mob() to_chat(user, span_danger("The card shorts out and catches fire in your hands!")) log_combat(user, target, "attempted to emag") - if(!target.emag_act(user, src) && !((charges + 1) > maxcharges)) + if(!target.emag_act(user, src) && !((charges + 1) > max_charges)) charges++ emagging = FALSE From c12273477c5588a6c8ec5069a539763ebe04ff20 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Sat, 29 Jul 2023 13:20:56 -0700 Subject: [PATCH 29/42] space --- code/_globalvars/bitfields.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index e38907893b72..9bcbf6b2d377 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -33,7 +33,7 @@ GLOBAL_LIST_INIT(bitfields, list( "USES_TGUI" = USES_TGUI, "FROZEN" = FROZEN, "UNIQUE_REDESC" = UNIQUE_REDESC, - "CMAGGED" = CMAGGED, + "CMAGGED" = CMAGGED, ), "datum_flags" = list( "DF_USE_TAG" = DF_USE_TAG, From bffa10b6409b1ba1f716c791782e5359f53303e4 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Thu, 3 Aug 2023 16:25:27 -0700 Subject: [PATCH 30/42] removed unused var --- code/game/objects/items/cards_ids.dm | 2 -- 1 file changed, 2 deletions(-) diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index 65bcf8c5c28b..58f3e3f0fc39 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -75,8 +75,6 @@ var/recharge_rate = 0.4 /// Does usage require you to be in range? var/prox_check = TRUE - /// Is this the funny verison of the emag? Usage will cause different set of interactions (of the funny variety)! - var/clown_version = FALSE /obj/item/card/emag/Initialize(mapload) . = ..() From 1d57bac9a527a9375de94d0da7a3ed487b3ed8b6 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Sun, 13 Aug 2023 20:34:28 -0700 Subject: [PATCH 31/42] as requested --- code/game/machinery/Sleeper.dm | 2 +- code/game/machinery/airlock_cycle_control.dm | 2 +- code/game/machinery/autolathe.dm | 2 +- code/game/machinery/buttons.dm | 2 +- code/game/machinery/cloning.dm | 2 +- code/game/machinery/computer/apc_control.dm | 2 +- code/game/machinery/computer/arcade.dm | 4 +- .../game/machinery/computer/communications.dm | 2 +- code/game/machinery/computer/security.dm | 2 - code/game/machinery/decontamination.dm | 2 - code/game/machinery/doors/airlock.dm | 7 +-- code/game/machinery/doors/windowdoor.dm | 7 --- .../embedded_controller/access_controller.dm | 2 +- code/game/machinery/fat_sucker.dm | 2 +- code/game/machinery/firealarm.dm | 2 +- code/game/machinery/gulag_item_reclaimer.dm | 2 +- code/game/machinery/harvester.dm | 2 +- code/game/machinery/lightswitch.dm | 2 - code/game/machinery/limbgrower.dm | 2 +- code/game/machinery/medical_kiosk.dm | 2 +- .../machinery/porta_turret/portable_turret.dm | 4 +- .../porta_turret/portable_turret_cover.dm | 2 +- code/game/machinery/recycler.dm | 2 +- code/game/machinery/scan_gate.dm | 2 +- code/game/machinery/shieldgen.dm | 4 -- code/game/machinery/slotmachine.dm | 2 +- code/game/machinery/stasis.dm | 2 - .../machinery/telecomms/computers/message.dm | 2 +- .../machinery/telecomms/telecomunications.dm | 2 - code/game/mecha/mech_fabricator.dm | 2 - code/game/objects/items/RSF.dm | 2 - code/game/objects/items/cards_ids.dm | 52 ++++++++++++++++++- code/game/objects/items/cigs_lighters.dm | 2 - .../circuitboards/computer_circuitboards.dm | 4 +- code/game/objects/items/defib.dm | 2 - .../objects/items/devices/geiger_counter.dm | 2 +- .../objects/items/devices/lightreplacer.dm | 2 +- code/game/objects/items/devices/megaphone.dm | 2 +- code/game/objects/items/robot/robot_items.dm | 2 - code/game/objects/items/storage/lockbox.dm | 2 +- code/game/objects/structures/barsigns.dm | 2 - .../structures/crates_lockers/closets.dm | 2 - code/modules/VR/vr_sleeper.dm | 2 - .../atmospherics/machinery/airalarm.dm | 2 +- code/modules/cargo/bounty_console.dm | 2 +- code/modules/cargo/console.dm | 2 +- code/modules/cargo/expressconsole.dm | 2 +- code/modules/clothing/glasses/hud.dm | 2 +- code/modules/clothing/masks/hailer.dm | 2 +- .../goals/station_goals/bluespace_tap.dm | 2 +- code/modules/goals/station_goals/shield.dm | 2 +- code/modules/holodeck/computer.dm | 2 +- code/modules/library/lib_machines.dm | 2 - code/modules/mining/abandoned_crates.dm | 2 +- code/modules/mining/laborcamp/laborstacker.dm | 2 +- .../mob/living/carbon/human/human_defense.dm | 2 - .../management/ai_controlpanel.dm | 2 +- .../management/resource_distribution.dm | 2 +- .../mob/living/silicon/robot/robot_defense.dm | 2 - .../mob/living/simple_animal/bot/bot.dm | 2 - .../mob/living/simple_animal/bot/mulebot.dm | 2 - .../mob/living/simple_animal/friendly/dog.dm | 2 +- .../simple_animal/friendly/spiderbot.dm | 2 - .../computers/item/computer.dm | 2 - .../computers/item/tablet/tablet.dm | 2 - .../computers/machinery/modular_computer.dm | 2 - code/modules/pai/card.dm | 2 - code/modules/paperwork/ticketmachine.dm | 2 +- code/modules/power/apc.dm | 2 +- code/modules/power/port_gen.dm | 2 +- code/modules/power/singularity/emitter.dm | 2 +- code/modules/projectiles/pins.dm | 2 +- .../chemistry/machinery/chem_dispenser.dm | 2 - .../modules/research/nanites/nanite_remote.dm | 2 +- code/modules/research/rdconsole.dm | 2 +- code/modules/research/server.dm | 2 +- code/modules/shuttle/computer.dm | 2 +- code/modules/shuttle/emergency.dm | 4 +- code/modules/shuttle/ferry.dm | 2 - code/modules/surgery/organs/augments_arms.dm | 2 - code/modules/vehicles/cars/clowncar.dm | 2 +- code/modules/vehicles/motorized_wheelchair.dm | 2 +- code/modules/vending/_vending.dm | 2 +- .../code/game/machinery/computer/arcade.dm | 2 +- .../telecomms/computers/traffic_control.dm | 2 +- .../code/game/objects/items/cards_ids.dm | 2 - .../game/objects/items/holotool/holotool.dm | 2 +- yogstation/code/game/objects/items/plushes.dm | 2 - yogstation/code/game/objects/items/tools.dm | 2 - .../code/game/objects/structures/fireaxe.dm | 2 +- .../code/modules/clothing/suits/nerd.dm | 2 +- .../species_types/preternis/preternis.dm | 2 - .../living/simple_animal/friendly/clowncat.dm | 2 +- yogstation/code/modules/power/hugbox.dm | 2 +- .../particle_accelerator/particle_control.dm | 2 +- .../code/modules/power/stationarybike.dm | 2 +- yogstation/code/modules/power/validhunter.dm | 2 +- 97 files changed, 117 insertions(+), 147 deletions(-) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 3dec0e15e20f..83838415fd36 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -121,7 +121,7 @@ open_machine() /obj/machinery/sleeper/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE to_chat(user, span_danger("You disable the chemical injection inhibitors on the sleeper...")) obj_flags |= EMAGGED diff --git a/code/game/machinery/airlock_cycle_control.dm b/code/game/machinery/airlock_cycle_control.dm index 1e1867bcba11..852ac542b135 100644 --- a/code/game/machinery/airlock_cycle_control.dm +++ b/code/game/machinery/airlock_cycle_control.dm @@ -787,7 +787,7 @@ update_cycle_icon() /obj/machinery/advanced_airlock_controller/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED visible_message(span_warning("Sparks fly out of [src]!"), span_notice("You emag [src], disabling its safeties.")) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 1c47d8388e68..8e1558b043f9 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -312,7 +312,7 @@ adjust_hacked(TRUE) /obj/machinery/autolathe/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED) ) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED if(!hacked) diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index b827cee0940d..f42cb3761b23 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -134,7 +134,7 @@ return ..() /obj/machinery/button/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE req_access = list() req_one_access = list() diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 7027224a67ae..5b8ded73c998 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -436,7 +436,7 @@ GLOBAL_VAR_INIT(clones, 0) return ..() /obj/machinery/clonepod/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || !occupant) + if(!occupant) return FALSE to_chat(user, span_warning("You corrupt the genetic compiler.")) malfunction() diff --git a/code/game/machinery/computer/apc_control.dm b/code/game/machinery/computer/apc_control.dm index 1db84d312f18..e6dbb51f4608 100644 --- a/code/game/machinery/computer/apc_control.dm +++ b/code/game/machinery/computer/apc_control.dm @@ -182,7 +182,7 @@ log_activity("Turned APC [target.area.name]'s breaker [setTo]") /obj/machinery/computer/apc_control/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED log_game("[key_name(user)] emagged [src] at [AREACOORD(src)]") diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 3c32a7b62608..280f8d08f02c 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -331,7 +331,7 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list( /obj/machinery/computer/arcade/battle/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE to_chat(user, span_warning("A mesmerizing Rhumba beat starts playing from the arcade machine's speakers!")) temp = "If you die in the game, you die for real!" @@ -1080,7 +1080,7 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list( desc = "Learn how our ancestors planned to colonize Orion, and have fun in the process!" /obj/machinery/computer/arcade/orion_trail/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE to_chat(user, span_notice("You override the cheat code menu and skip to Cheat #[rand(1, 50)]: Realism Mode.")) name = "The Orion Trail: Realism Edition" diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index b3b69d86aa17..2914a3fbdf0b 100755 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -82,7 +82,7 @@ return ..() /obj/machinery/computer/communications/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED if (authenticated) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 92fc4e6fac63..4c3a77264c0d 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -847,8 +847,6 @@ addtimer(CALLBACK(SILICON, TYPE_PROC_REF(/mob/living/silicon, cancelAlarm),"Burglar",src,alarmed), 600) /obj/machinery/computer/secure_data/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(logged_in) // What was the point then? return FALSE var/name diff --git a/code/game/machinery/decontamination.dm b/code/game/machinery/decontamination.dm index 56314f20fd39..d43020acde96 100644 --- a/code/game/machinery/decontamination.dm +++ b/code/game/machinery/decontamination.dm @@ -170,8 +170,6 @@ electrocute_mob(user, src, src, 1, TRUE) /obj/machinery/decontamination_unit/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(obj_flags & EMAGGED) to_chat(user, span_warning("[src] has no functional safeties to emag.")) return FALSE diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 822a79439bb0..7d9f72c774f2 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1540,12 +1540,7 @@ if(QDELETED(src)) return operating = FALSE - - if(istype(emag_card, /obj/item/card/emag/cmag)) // Clown behavior. - update_icon(state = AIRLOCK_CLOSED, override = TRUE) - obj_flags |= CMAGGED - return TRUE - + if(!open()) // Something prevented it from being opened. For example, bolted/welded shut. update_icon(state = AIRLOCK_CLOSED, override = TRUE) obj_flags |= EMAGGED diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index a8fbf09a64dc..edb6ef9f4a75 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -219,13 +219,6 @@ /obj/machinery/door/window/emag_act(mob/user, obj/item/card/emag/emag_card) if(operating || !density || (obj_flags & CMAGGED)) return FALSE - if(istype(emag_card, /obj/item/card/emag/cmag)) - obj_flags |= CMAGGED - operating = TRUE - flick("[base_state]spark", src) - playsound(src, "sparks", 75, 1) - operating = FALSE - return TRUE obj_flags |= EMAGGED operating = TRUE flick("[base_state]spark", src) diff --git a/code/game/machinery/embedded_controller/access_controller.dm b/code/game/machinery/embedded_controller/access_controller.dm index 19567f270580..ff8bcd91022a 100644 --- a/code/game/machinery/embedded_controller/access_controller.dm +++ b/code/game/machinery/embedded_controller/access_controller.dm @@ -26,7 +26,7 @@ findObjsByTag() /obj/machinery/doorButtons/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED req_access = list() diff --git a/code/game/machinery/fat_sucker.dm b/code/game/machinery/fat_sucker.dm index 6b02d408835c..97cbb9198d9c 100644 --- a/code/game/machinery/fat_sucker.dm +++ b/code/game/machinery/fat_sucker.dm @@ -204,7 +204,7 @@ return TRUE /obj/machinery/fat_sucker/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED start_at = 100 diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index 49c7505e0ec3..23f9934c3181 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -105,7 +105,7 @@ alarm() /obj/machinery/firealarm/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED update_appearance(UPDATE_ICON) diff --git a/code/game/machinery/gulag_item_reclaimer.dm b/code/game/machinery/gulag_item_reclaimer.dm index 334683c72b71..316db99bf7ee 100644 --- a/code/game/machinery/gulag_item_reclaimer.dm +++ b/code/game/machinery/gulag_item_reclaimer.dm @@ -24,7 +24,7 @@ return ..() /obj/machinery/gulag_item_reclaimer/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED req_access = list() // Emagging lets anyone reclaim all the items. diff --git a/code/game/machinery/harvester.dm b/code/game/machinery/harvester.dm index 317fbb8acf66..427f4ff9de99 100644 --- a/code/game/machinery/harvester.dm +++ b/code/game/machinery/harvester.dm @@ -157,7 +157,7 @@ open_machine() /obj/machinery/harvester/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED allow_living = TRUE diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index 855c69a42bcf..bccc9137bd39 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -77,8 +77,6 @@ /obj/machinery/light_switch/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(obj_flags & EMAGGED) to_chat(user, span_warning("Nothing new seems to happen when you swipe the emag.")) return FALSE diff --git a/code/game/machinery/limbgrower.dm b/code/game/machinery/limbgrower.dm index 489e042a7569..7e94601a5de9 100644 --- a/code/game/machinery/limbgrower.dm +++ b/code/game/machinery/limbgrower.dm @@ -303,7 +303,7 @@ /// Emagging a limbgrower allows you to build synthetic armblades. /obj/machinery/limbgrower/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE for(var/design_id in SSresearch.techweb_designs) var/datum/design/found_design = SSresearch.techweb_design_by_id(design_id) diff --git a/code/game/machinery/medical_kiosk.dm b/code/game/machinery/medical_kiosk.dm index a664a93de83e..5b3d25dab013 100644 --- a/code/game/machinery/medical_kiosk.dm +++ b/code/game/machinery/medical_kiosk.dm @@ -136,7 +136,7 @@ return ..() /obj/machinery/medical_kiosk/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE if(user) user.visible_message("[user] waves a suspicious card by the [src]'s biometric scanner!", diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 813bf38f136e..71f46e38ed8b 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -277,7 +277,7 @@ return ..() /obj/machinery/porta_turret/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE to_chat(user, span_warning("You short out [src]'s threat assessment circuits.")) visible_message("[src] hums oddly...") @@ -872,7 +872,7 @@ to_chat(user, span_warning("Access denied.")) /obj/machinery/turretid/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE to_chat(user, span_danger("You short out the turret controls' access analysis module.")) obj_flags |= EMAGGED diff --git a/code/game/machinery/porta_turret/portable_turret_cover.dm b/code/game/machinery/porta_turret/portable_turret_cover.dm index 5853732b06b8..a85b4e10845a 100644 --- a/code/game/machinery/porta_turret/portable_turret_cover.dm +++ b/code/game/machinery/porta_turret/portable_turret_cover.dm @@ -88,7 +88,7 @@ . = 0 /obj/machinery/porta_turret_cover/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (parent_turret.obj_flags & EMAGGED)) + if((parent_turret.obj_flags & EMAGGED)) return FALSE to_chat(user, span_notice("You short out [parent_turret]'s threat assessment circuits.")) visible_message("[parent_turret] hums oddly...") diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index 17d99f37d1f2..e9fdd712afde 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -62,7 +62,7 @@ return ..() /obj/machinery/recycler/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || obj_flags & EMAGGED) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED if(safety_mode) diff --git a/code/game/machinery/scan_gate.dm b/code/game/machinery/scan_gate.dm index cd5bfa5a1c99..4f47a96e6c34 100644 --- a/code/game/machinery/scan_gate.dm +++ b/code/game/machinery/scan_gate.dm @@ -83,7 +83,7 @@ return ..() /obj/machinery/scanner_gate/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE locked = FALSE req_access = list() diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index 515e6ee7241e..00b2dd57f2a7 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -195,8 +195,6 @@ return ..() /obj/machinery/shieldgen/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(obj_flags & EMAGGED) to_chat(user, span_warning("The access controller is damaged!")) return FALSE @@ -391,8 +389,6 @@ add_fingerprint(user) /obj/machinery/shieldwallgen/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(obj_flags & EMAGGED) to_chat(user, span_warning("The access controller is damaged!")) return FALSE diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm index de97175c3ab5..dfa0d85f206d 100644 --- a/code/game/machinery/slotmachine.dm +++ b/code/game/machinery/slotmachine.dm @@ -120,7 +120,7 @@ return ..() /obj/machinery/computer/slot_machine/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread() diff --git a/code/game/machinery/stasis.dm b/code/game/machinery/stasis.dm index aa1b5df32141..0b3068846a59 100644 --- a/code/game/machinery/stasis.dm +++ b/code/game/machinery/stasis.dm @@ -210,8 +210,6 @@ ..() /obj/machinery/stasis/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(obj_flags & EMAGGED) to_chat(user, span_warning("The stasis bed's safeties are already overridden!")) return FALSE diff --git a/code/game/machinery/telecomms/computers/message.dm b/code/game/machinery/telecomms/computers/message.dm index 75aec2922182..715140a1cdf0 100644 --- a/code/game/machinery/telecomms/computers/message.dm +++ b/code/game/machinery/telecomms/computers/message.dm @@ -48,7 +48,7 @@ return ..() /obj/machinery/computer/message_monitor/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE if(isnull(linkedServer)) to_chat(user, span_notice("A no server error appears on the screen.")) diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index 3eacba44e951..6bf5c01110be 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -200,8 +200,6 @@ GLOBAL_LIST_EMPTY(telecomms_list) stat &= ~EMPED /obj/machinery/telecomms/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE obj_flags |= EMAGGED visible_message(span_notice("Sparks fly out of the [src]!")) traffic += 50 diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 54e37e46511c..02c698f74fe1 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -768,8 +768,6 @@ return TRUE /obj/machinery/mecha_part_fabricator/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(obj_flags & EMAGGED) to_chat(user, span_warning("[src] has no functional safeties to emag.")) return FALSE diff --git a/code/game/objects/items/RSF.dm b/code/game/objects/items/RSF.dm index bc98575c9ab9..dce2f155e9e7 100644 --- a/code/game/objects/items/RSF.dm +++ b/code/game/objects/items/RSF.dm @@ -183,8 +183,6 @@ RSF return /obj/item/rsf/cookiesynth/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE obj_flags ^= EMAGGED if(obj_flags & EMAGGED) to_chat(user, span_warning("You short out [src]'s reagent safety checker!")) diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index 58f3e3f0fc39..21693b1d301b 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -106,9 +106,11 @@ /obj/item/card/emag/afterattack(atom/target, mob/user, proximity) . = ..() + if(src.type == /obj/item/card/emag/cmag) // Still want to use ..() for cmag, but don't want much of anything else. + return var/atom/A = target if(!proximity && prox_check) - return + return if(charges < 1) to_chat(user, span_danger("\The [src] is still recharging!")) return @@ -164,7 +166,53 @@ /obj/item/card/emag/cmag/Initialize(mapload) . = ..() AddComponent(/datum/component/slippery, 8 SECONDS, GALOSHES_DONT_HELP) // It wouldn't be funny if it couldn't slip! - + +#define CMAG_AIRLOCK_CLOSED 1 // Since this is undefined outside of `airlock.dm`, have to redefine them. +#define CMAG_AIRLOCK_EMAG 6 + +/obj/item/card/emag/cmag/afterattack(atom/target, mob/user, proximity) + . = ..() // Handles the ..() before that. + if(!proximity && prox_check) + return + if(charges < 1) + to_chat(user, span_danger("\The [src] is still recharging!")) + return + + log_combat(user, target, "attempted to cmag") + // Since cmag only has very few interactions, all of it is handled in `afterattack` instead of `emag_act`. + if(istype(target, /obj/machinery/door/airlock)) + var/obj/machinery/door/airlock/airlock = target + if(airlock.operating || !airlock.density || !airlock.hasPower() || (airlock.obj_flags & EMAGGED) || (airlock.obj_flags & CMAGGED)) + return + + charges-- + airlock.operating = TRUE + airlock.update_icon(state = CMAG_AIRLOCK_EMAG, override = TRUE) + + sleep(0.6 SECONDS) + if(QDELETED(src)) + return + airlock.update_icon(state = CMAG_AIRLOCK_CLOSED, override = TRUE) + airlock.obj_flags |= CMAGGED + airlock.operating = FALSE + return + + if(istype(target, /obj/machinery/door/window)) + var/obj/machinery/door/window/windoor = target + if(windoor.operating || !windoor.density || (windoor.obj_flags & EMAGGED) || (windoor.obj_flags & CMAGGED)) + return + + charges-- + windoor.operating = TRUE + windoor.obj_flags |= CMAGGED + flick("[windoor.base_state]spark", windoor) + playsound(windoor, "sparks", 75, 1) + windoor.operating = FALSE + return + +#undef CMAG_AIRLOCK_CLOSED +#undef CMAG_AIRLOCK_EMAG + /obj/item/card/emagfake desc = "It's a card with a magnetic strip attached to some circuitry. Closer inspection shows that this card is a poorly made replica, with a \"DonkCo\" logo stamped on the back." name = "cryptographic sequencer" diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm index 6e2ae51c765e..9138e4e70ae8 100644 --- a/code/game/objects/items/cigs_lighters.dm +++ b/code/game/objects/items/cigs_lighters.dm @@ -865,8 +865,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM /obj/item/clothing/mask/vape/emag_act(mob/user, obj/item/card/emag/emag_card)// I WON'T REGRET WRITTING THIS, SURLY. - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(!screw) to_chat(user, span_notice("You need to open the cap to do that.")) return FALSE diff --git a/code/game/objects/items/circuitboards/computer_circuitboards.dm b/code/game/objects/items/circuitboards/computer_circuitboards.dm index 0bd45620e9e6..611ed0868c6a 100644 --- a/code/game/objects/items/circuitboards/computer_circuitboards.dm +++ b/code/game/objects/items/circuitboards/computer_circuitboards.dm @@ -488,7 +488,7 @@ to_chat(user, span_notice("The spectrum chip is unresponsive.")) /obj/item/circuitboard/computer/cargo/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE contraband = TRUE obj_flags |= EMAGGED @@ -507,7 +507,7 @@ obj_flags &= ~EMAGGED /obj/item/circuitboard/computer/cargo/express/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED to_chat(user, span_notice("You change the routing protocols, allowing the Drop Pod to land anywhere on the station.")) diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index 54c525ab5c78..589103941ff1 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -141,8 +141,6 @@ return ..() /obj/item/defibrillator/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(safety) safety = FALSE to_chat(user, span_warning("You silently disable [src]'s safety protocols with the cryptographic sequencer.")) diff --git a/code/game/objects/items/devices/geiger_counter.dm b/code/game/objects/items/devices/geiger_counter.dm index 160191d6e598..0d37b5fbcc28 100644 --- a/code/game/objects/items/devices/geiger_counter.dm +++ b/code/game/objects/items/devices/geiger_counter.dm @@ -179,7 +179,7 @@ update_appearance(UPDATE_ICON) /obj/item/geiger_counter/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE if(scanning) to_chat(user, span_warning("Turn off [src] before you perform this action!")) diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index 4153a3ca3b59..11e9d518a4af 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -143,7 +143,7 @@ to_chat(user, span_notice("You fill \the [src] with lights from \the [S]. " + status_string() + "")) /obj/item/lightreplacer/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED name = "shortcircuited [initial(name)]" diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index c87f02c96512..8f2e996ef16e 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -64,7 +64,7 @@ speech_args[SPEECH_SPANS] |= voicespan /obj/item/megaphone/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED voicespan = list(SPAN_REALLYBIG, "userdanger") diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index 14b04c2a5075..6f92539acf28 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -300,8 +300,6 @@ var/cooldown = 0 /obj/item/harmalarm/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE obj_flags ^= EMAGGED if(user) if(obj_flags & EMAGGED) diff --git a/code/game/objects/items/storage/lockbox.dm b/code/game/objects/items/storage/lockbox.dm index 69d3e36679e2..98342c6c4910 100644 --- a/code/game/objects/items/storage/lockbox.dm +++ b/code/game/objects/items/storage/lockbox.dm @@ -51,7 +51,7 @@ return /obj/item/storage/lockbox/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || broken) + if(broken) return FALSE broken = TRUE SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, FALSE) diff --git a/code/game/objects/structures/barsigns.dm b/code/game/objects/structures/barsigns.dm index acac7559b65d..e6c35e8eb24f 100644 --- a/code/game/objects/structures/barsigns.dm +++ b/code/game/objects/structures/barsigns.dm @@ -113,8 +113,6 @@ broken = TRUE /obj/structure/sign/barsign/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(broken) to_chat(user, span_warning("Nothing interesting happens!")) return FALSE diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 7f86995e53cb..c710b27a0846 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -522,8 +522,6 @@ GLOBAL_LIST_EMPTY(lockers) to_chat(user, span_warning("\The [src] is broken!")) /obj/structure/closet/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(!secure || broken) return FALSE user.visible_message(span_warning("Sparks fly from [src]!"), diff --git a/code/modules/VR/vr_sleeper.dm b/code/modules/VR/vr_sleeper.dm index a2cb7ca25e9e..af38ac4bd161 100644 --- a/code/modules/VR/vr_sleeper.dm +++ b/code/modules/VR/vr_sleeper.dm @@ -57,8 +57,6 @@ return /obj/machinery/vr_sleeper/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE you_die_in_the_game_you_die_for_real = TRUE sparks.start() addtimer(CALLBACK(src, PROC_REF(emagNotify)), 150) diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index f50acb2bf3ed..8f332b1f6a0f 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -847,7 +847,7 @@ return /obj/machinery/airalarm/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED visible_message(span_warning("Sparks fly out of [src]!"), span_notice("You emag [src], disabling its safeties.")) diff --git a/code/modules/cargo/bounty_console.dm b/code/modules/cargo/bounty_console.dm index 938fc7fe661d..de917a924e00 100644 --- a/code/modules/cargo/bounty_console.dm +++ b/code/modules/cargo/bounty_console.dm @@ -32,7 +32,7 @@
  • Completed: [B.completion_string()]
  • "} /obj/machinery/computer/bounty/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE if(istype(emag_card, /obj/item/card/emag/improvised)) // We can't have nice things. to_chat(user, span_notice("The cheap circuitry isn't strong enough to subvert this!")) diff --git a/code/modules/cargo/console.dm b/code/modules/cargo/console.dm index 4c229cb86eea..d6b16d59b671 100644 --- a/code/modules/cargo/console.dm +++ b/code/modules/cargo/console.dm @@ -43,7 +43,7 @@ . |= EXPORT_EMAG /obj/machinery/computer/cargo/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE user.visible_message(span_warning("[user] swipes a suspicious card through [src]!"), span_notice("You adjust [src]'s routing and receiver spectrum, unlocking special supplies and contraband.")) diff --git a/code/modules/cargo/expressconsole.dm b/code/modules/cargo/expressconsole.dm index 50c91f06973b..3ec66739dcfe 100644 --- a/code/modules/cargo/expressconsole.dm +++ b/code/modules/cargo/expressconsole.dm @@ -54,7 +54,7 @@ ..() /obj/machinery/computer/cargo/express/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE user.visible_message(span_warning("[user] swipes a suspicious card through [src]!"), span_notice("You change the routing protocols, allowing the Supply Pod to land anywhere on the station.")) diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index 41c5aa7e02a6..33592b773bf9 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -24,7 +24,7 @@ desc = "[desc] The display is flickering slightly." /obj/item/clothing/glasses/hud/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED to_chat(user, span_warning("PZZTTPFFFT")) diff --git a/code/modules/clothing/masks/hailer.dm b/code/modules/clothing/masks/hailer.dm index bdb83ff03784..c8f47d97b938 100644 --- a/code/modules/clothing/masks/hailer.dm +++ b/code/modules/clothing/masks/hailer.dm @@ -130,7 +130,7 @@ adjustmask(user) /obj/item/clothing/mask/gas/sechailer/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || obj_flags & EMAGGED) + if(obj_flags & EMAGGED) return obj_flags |= EMAGGED to_chat(user, span_warning("You silently fry [src]'s vocal circuit with the cryptographic sequencer.")) diff --git a/code/modules/goals/station_goals/bluespace_tap.dm b/code/modules/goals/station_goals/bluespace_tap.dm index 7763f6cefdff..4be2a135744c 100644 --- a/code/modules/goals/station_goals/bluespace_tap.dm +++ b/code/modules/goals/station_goals/bluespace_tap.dm @@ -408,7 +408,7 @@ //emaging provides slightly more points but at much greater risk /obj/machinery/power/bluespace_tap/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || emagged) + if(emagged) return FALSE emagged = TRUE do_sparks(5, FALSE, src) diff --git a/code/modules/goals/station_goals/shield.dm b/code/modules/goals/station_goals/shield.dm index 7095c658d93c..fae2ca31f60e 100644 --- a/code/modules/goals/station_goals/shield.dm +++ b/code/modules/goals/station_goals/shield.dm @@ -171,7 +171,7 @@ change_meteor_chance(0.5) /obj/machinery/satellite/meteor_shield/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED to_chat(user, span_notice("You access the satellite's debug mode, increasing the chance of meteor strikes.")) diff --git a/code/modules/holodeck/computer.dm b/code/modules/holodeck/computer.dm index 404033cdc644..8d2fc26e966d 100644 --- a/code/modules/holodeck/computer.dm +++ b/code/modules/holodeck/computer.dm @@ -164,7 +164,7 @@ active_power_usage = 50 + spawned.len * 3 + effects.len * 5 /obj/machinery/computer/holodeck/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE if(!LAZYLEN(emag_programs)) to_chat(user, "[src] does not seem to have a card swipe port. It must be an inferior model.") diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 88d324b232e2..34cc91f04eee 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -298,8 +298,6 @@ GLOBAL_LIST_EMPTY(checkouts) cooldown = world.time + PRINTER_COOLDOWN /obj/machinery/computer/libraryconsole/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE obj_flags ^= EMAGGED if(obj_flags & EMAGGED) to_chat(user, "You short out the safeties on [src]!") diff --git a/code/modules/mining/abandoned_crates.dm b/code/modules/mining/abandoned_crates.dm index 34126439a1b5..ef603dd85d04 100644 --- a/code/modules/mining/abandoned_crates.dm +++ b/code/modules/mining/abandoned_crates.dm @@ -225,7 +225,7 @@ return ..() /obj/structure/closet/crate/secure/loot/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || !locked) + if(!locked) return FALSE boom(user) // Did you expect the "anti-tamper system" to not work? return TRUE diff --git a/code/modules/mining/laborcamp/laborstacker.dm b/code/modules/mining/laborcamp/laborstacker.dm index 33c68b595bb8..0a66362eb9e7 100644 --- a/code/modules/mining/laborcamp/laborstacker.dm +++ b/code/modules/mining/laborcamp/laborstacker.dm @@ -119,7 +119,7 @@ GLOBAL_LIST(labor_sheet_values) stacking_machine.console = src /obj/machinery/mineral/labor_claim_console/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED to_chat(user, span_warning("PZZTTPFFFT")) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 00ed6f8a988b..2b75dcacecf3 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -540,8 +540,6 @@ electrocution_animation(40) /mob/living/carbon/human/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE . = ..() if(dna) return dna.species.spec_emag_act(src, user, emag_card) diff --git a/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm b/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm index ffcaef53f763..d0c3e928b76a 100644 --- a/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm +++ b/code/modules/mob/living/silicon/ai/decentralized/management/ai_controlpanel.dm @@ -90,7 +90,7 @@ GLOBAL_VAR_INIT(ai_control_code, random_nukecode(6)) return ..() /obj/machinery/computer/ai_control_console/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED authenticated = TRUE diff --git a/code/modules/mob/living/silicon/ai/decentralized/management/resource_distribution.dm b/code/modules/mob/living/silicon/ai/decentralized/management/resource_distribution.dm index 858534e232b9..26529fac72e1 100644 --- a/code/modules/mob/living/silicon/ai/decentralized/management/resource_distribution.dm +++ b/code/modules/mob/living/silicon/ai/decentralized/management/resource_distribution.dm @@ -15,7 +15,7 @@ /obj/machinery/computer/ai_resource_distribution/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED authenticated = TRUE diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm index 28304c2ae8ef..f1a3d1b7dc59 100644 --- a/code/modules/mob/living/silicon/robot/robot_defense.dm +++ b/code/modules/mob/living/silicon/robot/robot_defense.dm @@ -84,8 +84,6 @@ /mob/living/silicon/robot/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(user == src) // To prevent syndieborgs from emagging themselves. return FALSE if(!opened) // Cover is closed. diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 930f96797d71..4563e1a2199e 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -201,8 +201,6 @@ qdel(src) /mob/living/simple_animal/bot/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(locked) // First emag application unlocks the bot's interface. Apply a screwdriver to use the emag again. locked = FALSE emagged = 1 diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 25a0db15265e..8566bfc68e54 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -116,8 +116,6 @@ return /mob/living/simple_animal/bot/mulebot/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(emagged < 1) emagged = TRUE if(!open) diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm index b28c8db9b5e8..ca9afcbdbebb 100644 --- a/code/modules/mob/living/simple_animal/friendly/dog.dm +++ b/code/modules/mob/living/simple_animal/friendly/dog.dm @@ -75,7 +75,7 @@ nofur = TRUE /mob/living/simple_animal/pet/dog/corgi/borgi/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || emagged) + if(emagged) return FALSE emagged = TRUE visible_message(span_warning("[user] swipes a card through [src]."), span_notice("You overload [src]s internal reactor.")) diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index 4c28a6c781db..880f42e7acc7 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -111,8 +111,6 @@ job = "Spider Bot" /mob/living/simple_animal/spiderbot/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(emagged) to_chat(user, span_warning("[src] is already overloaded - better run.")) return FALSE diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm index feeb480095a5..4f1916353362 100644 --- a/code/modules/modular_computers/computers/item/computer.dm +++ b/code/modules/modular_computers/computers/item/computer.dm @@ -236,8 +236,6 @@ turn_on(user) /obj/item/modular_computer/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(!enabled) to_chat(user, "You'd need to turn the [src] on first.") return FALSE diff --git a/code/modules/modular_computers/computers/item/tablet/tablet.dm b/code/modules/modular_computers/computers/item/tablet/tablet.dm index cb8b536ec7b1..78fac57fa5e9 100644 --- a/code/modules/modular_computers/computers/item/tablet/tablet.dm +++ b/code/modules/modular_computers/computers/item/tablet/tablet.dm @@ -91,8 +91,6 @@ /obj/item/modular_computer/tablet/nukeops/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(!enabled) to_chat(user, "You'd need to turn the [src] on first.") return FALSE diff --git a/code/modules/modular_computers/computers/machinery/modular_computer.dm b/code/modules/modular_computers/computers/machinery/modular_computer.dm index a15879cd8ee8..dde78cf9758a 100644 --- a/code/modules/modular_computers/computers/machinery/modular_computer.dm +++ b/code/modules/modular_computers/computers/machinery/modular_computer.dm @@ -70,8 +70,6 @@ cpu.attack_ghost(user) /obj/machinery/modular_computer/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(!cpu) to_chat(user, "You'd need to turn the [src] on first.") return FALSE diff --git a/code/modules/pai/card.dm b/code/modules/pai/card.dm index b024c7082ae0..fc50e1a2c04b 100644 --- a/code/modules/pai/card.dm +++ b/code/modules/pai/card.dm @@ -44,8 +44,6 @@ return ..() /obj/item/pai_card/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(!pai) return FALSE return pai.handle_emag(user, emag_card) diff --git a/code/modules/paperwork/ticketmachine.dm b/code/modules/paperwork/ticketmachine.dm index 49db1cdd519d..eb5315d546fe 100644 --- a/code/modules/paperwork/ticketmachine.dm +++ b/code/modules/paperwork/ticketmachine.dm @@ -62,7 +62,7 @@ playsound(tickets[screenNum], 'sound/machines/twobeep_high.ogg', 10, 0 ,1-world.view) //The sound travels world.view+extraRange tiles. This last value is the extra range, which means the total range will be 1. /obj/machinery/ticket_machine/emag_act(mob/user, obj/item/card/emag/emag_card) //Emag the ticket machine to dispense burning tickets, as well as randomize its customer number to destroy the HOP's mind. - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE to_chat(user, span_warning("You overload [src]'s bureaucratic logic circuitry to its MAXIMUM setting.")) var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 7176fa9aa318..fe9d88bfe610 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -865,7 +865,7 @@ update_appearance(UPDATE_ICON) /obj/machinery/power/apc/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED) || malfhack) + if((obj_flags & EMAGGED) || malfhack) return FALSE if(opened) to_chat(user, span_warning("You must close the cover to swipe an ID card!")) diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 62c9a9a172b0..9c2b51b7a4bf 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -207,7 +207,7 @@ return ..() /obj/machinery/power/port_gen/pacman/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED emp_act(EMP_HEAVY) diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index f32e4548834a..b5822bf6cb24 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -378,7 +378,7 @@ projectile_sound = initial(projectile_sound) /obj/machinery/power/emitter/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE locked = FALSE obj_flags |= EMAGGED diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm index 801927b2db66..c8d5874477d7 100644 --- a/code/modules/projectiles/pins.dm +++ b/code/modules/projectiles/pins.dm @@ -40,7 +40,7 @@ to_chat(user, "This firearm already has a firing pin installed.") /obj/item/firing_pin/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED to_chat(user, span_notice("You override the authentication mechanism.")) diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index dc1b09a660f1..41a7d1388143 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -157,8 +157,6 @@ . += beaker_overlay /obj/machinery/chem_dispenser/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(obj_flags & EMAGGED) to_chat(user, span_warning("[src] has no functional safeties to emag.")) return FALSE diff --git a/code/modules/research/nanites/nanite_remote.dm b/code/modules/research/nanites/nanite_remote.dm index 2edf936e6e34..aedea6529693 100644 --- a/code/modules/research/nanites/nanite_remote.dm +++ b/code/modules/research/nanites/nanite_remote.dm @@ -38,7 +38,7 @@ to_chat(user, span_warning("Access denied.")) /obj/item/nanite_remote/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE to_chat(user, span_warning("You override [src]'s ID lock.")) obj_flags |= EMAGGED diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index c585f525b7b6..a072ffcfe343 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -202,7 +202,7 @@ Nothing else in the console has ID requirements. ..() /obj/machinery/computer/rdconsole/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE to_chat(user, span_notice("You disable the security protocols[locked? " and unlock the console":""].")) playsound(src, "sparks", 75, 1) diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index 5ace76c10afb..b82716cf96b5 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -202,7 +202,7 @@ src.updateUsrDialog() /obj/machinery/computer/rdservercontrol/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE playsound(src, "sparks", 75, 1) obj_flags |= EMAGGED diff --git a/code/modules/shuttle/computer.dm b/code/modules/shuttle/computer.dm index 89e065919a76..b924566f58c3 100644 --- a/code/modules/shuttle/computer.dm +++ b/code/modules/shuttle/computer.dm @@ -128,7 +128,7 @@ return TRUE /obj/machinery/computer/shuttle/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE req_access = list() obj_flags |= EMAGGED diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index 2b38ab79f6c2..85708fa7cd0e 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -156,8 +156,6 @@ . = TRUE /obj/machinery/computer/emergency_shuttle/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE // How did you even get on the shuttle before it go to the station? if(!IS_DOCKED) return FALSE @@ -506,7 +504,7 @@ return ..() /obj/machinery/computer/shuttle/pod/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE ENABLE_BITFIELD(obj_flags, EMAGGED) to_chat(user, span_warning("You fry the pod's alert level checking system.")) diff --git a/code/modules/shuttle/ferry.dm b/code/modules/shuttle/ferry.dm index 692f5a5d7829..a19005a9ceb8 100644 --- a/code/modules/shuttle/ferry.dm +++ b/code/modules/shuttle/ferry.dm @@ -10,8 +10,6 @@ var/allow_emag = FALSE /obj/machinery/computer/shuttle/ferry/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(!allow_emag) to_chat(user, span_warning("[src]'s security firewall is far too powerful for you to bypass.")) return FALSE diff --git a/code/modules/surgery/organs/augments_arms.dm b/code/modules/surgery/organs/augments_arms.dm index 134d8d5981ea..3b499cc45a76 100644 --- a/code/modules/surgery/organs/augments_arms.dm +++ b/code/modules/surgery/organs/augments_arms.dm @@ -215,8 +215,6 @@ . = ..() /obj/item/organ/cyberimp/arm/toolset/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(!(locate(/obj/item/kitchen/knife/combat/cyborg) in items_list)) to_chat(usr, span_notice("You unlock [src]'s integrated knife!")) items_list += new /obj/item/kitchen/knife/combat/cyborg(src) diff --git a/code/modules/vehicles/cars/clowncar.dm b/code/modules/vehicles/cars/clowncar.dm index 25a8844bc5bc..a8b685b63fdb 100644 --- a/code/modules/vehicles/cars/clowncar.dm +++ b/code/modules/vehicles/cars/clowncar.dm @@ -82,7 +82,7 @@ log_combat(src, A, "crashed into", null, "dumping all passengers") /obj/vehicle/sealed/car/clowncar/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED to_chat(user, span_danger("You scramble the clowncar child safety lock and a panel with 6 colorful buttons appears!")) diff --git a/code/modules/vehicles/motorized_wheelchair.dm b/code/modules/vehicles/motorized_wheelchair.dm index 71095ad910a1..29337df5d20c 100644 --- a/code/modules/vehicles/motorized_wheelchair.dm +++ b/code/modules/vehicles/motorized_wheelchair.dm @@ -164,7 +164,7 @@ playsound(src, 'sound/effects/bang.ogg', 50, TRUE) /obj/vehicle/ridden/wheelchair/motorized/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED) || !panel_open) + if((obj_flags & EMAGGED) || !panel_open) return FALSE to_chat(user, span_warning("A bomb appears in [src], what the fuck?")) obj_flags |= EMAGGED diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index 4227cdf3d90b..87f510ce3c10 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -661,7 +661,7 @@ GLOBAL_LIST_EMPTY(vending_products) . = ..() /obj/machinery/vending/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED to_chat(user, span_notice("You short out the product lock on [src].")) diff --git a/yogstation/code/game/machinery/computer/arcade.dm b/yogstation/code/game/machinery/computer/arcade.dm index c1033fe26d22..08fcf38fae5c 100644 --- a/yogstation/code/game/machinery/computer/arcade.dm +++ b/yogstation/code/game/machinery/computer/arcade.dm @@ -147,7 +147,7 @@ return TRUE /obj/machinery/computer/arcade/minesweeper/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE desc = "An arcade machine that generates grids. It's clunking and sparking everywhere, almost as if threatening to explode at any moment!" do_sparks(5, 1, src) diff --git a/yogstation/code/game/machinery/telecomms/computers/traffic_control.dm b/yogstation/code/game/machinery/telecomms/computers/traffic_control.dm index eae7698d55e1..b5d4ea19754a 100644 --- a/yogstation/code/game/machinery/telecomms/computers/traffic_control.dm +++ b/yogstation/code/game/machinery/telecomms/computers/traffic_control.dm @@ -291,7 +291,7 @@ ..() /obj/machinery/computer/telecomms/traffic/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || emagged) + if(emagged) return FALSE playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) emagged = TRUE diff --git a/yogstation/code/game/objects/items/cards_ids.dm b/yogstation/code/game/objects/items/cards_ids.dm index 89ce236b8a61..d7ffaacd5c63 100644 --- a/yogstation/code/game/objects/items/cards_ids.dm +++ b/yogstation/code/game/objects/items/cards_ids.dm @@ -71,8 +71,6 @@ icon_state = "id_gold" /obj/item/card/emag/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(!emag_card) return FALSE if(istype(emag_card, /obj/item/card/emag/improvised)) diff --git a/yogstation/code/game/objects/items/holotool/holotool.dm b/yogstation/code/game/objects/items/holotool/holotool.dm index 837cd7555977..3f12d10a5fb8 100644 --- a/yogstation/code/game/objects/items/holotool/holotool.dm +++ b/yogstation/code/game/objects/items/holotool/holotool.dm @@ -139,7 +139,7 @@ switch_tool(user, new_tool) /obj/item/holotool/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE to_chat(user, span_danger("ZZT- ILLEGAL BLUEPRINT UNLOCKED- CONTACT !#$@^%$# NANOTRASEN SUPPORT-@*%$^%!")) do_sparks(5, 0, src) diff --git a/yogstation/code/game/objects/items/plushes.dm b/yogstation/code/game/objects/items/plushes.dm index 09ad063eb9e9..23a9058fc7da 100644 --- a/yogstation/code/game/objects/items/plushes.dm +++ b/yogstation/code/game/objects/items/plushes.dm @@ -43,8 +43,6 @@ visible_message(span_notice("[src] looks disinterested.")) /obj/item/toy/plush/goatplushie/angry/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(obj_flags & EMAGGED) visible_message(span_notice("[src] already looks angry enough, you shouldn't anger it more.")) return FALSE diff --git a/yogstation/code/game/objects/items/tools.dm b/yogstation/code/game/objects/items/tools.dm index ba3b8eaef62b..477c5ff547be 100644 --- a/yogstation/code/game/objects/items/tools.dm +++ b/yogstation/code/game/objects/items/tools.dm @@ -211,8 +211,6 @@ is_pumping = FALSE /obj/item/jawsoflife/jimmy/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE if(obj_flags & EMAGGED) to_chat(user, span_warning("Nothing new seems to happen when you swipe the emag.")) return FALSE diff --git a/yogstation/code/game/objects/structures/fireaxe.dm b/yogstation/code/game/objects/structures/fireaxe.dm index 5bf9980ced9d..e9a123234235 100644 --- a/yogstation/code/game/objects/structures/fireaxe.dm +++ b/yogstation/code/game/objects/structures/fireaxe.dm @@ -89,7 +89,7 @@ update_appearance(UPDATE_ICON) /obj/structure/fireaxecabinet/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE if(open || !locked) // You won't need the emag to get what you want. Just open it normally! return FALSE diff --git a/yogstation/code/modules/clothing/suits/nerd.dm b/yogstation/code/modules/clothing/suits/nerd.dm index 6e544abf3483..a7a7b14d5a73 100644 --- a/yogstation/code/modules/clothing/suits/nerd.dm +++ b/yogstation/code/modules/clothing/suits/nerd.dm @@ -80,7 +80,7 @@ addtimer(CALLBACK(src, PROC_REF(process_sound_queue)), sound_delay) /obj/item/clothing/suit/armor/nerd/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE if(owner) to_chat(owner, span_warning("You need to take off \the [name] before emagging it.")) diff --git a/yogstation/code/modules/mob/living/carbon/human/species_types/preternis/preternis.dm b/yogstation/code/modules/mob/living/carbon/human/species_types/preternis/preternis.dm index 77fcacaa449e..56bbb539a38c 100644 --- a/yogstation/code/modules/mob/living/carbon/human/species_types/preternis/preternis.dm +++ b/yogstation/code/modules/mob/living/carbon/human/species_types/preternis/preternis.dm @@ -144,8 +144,6 @@ adjust_charge - take a positive or negative value to adjust the charge level return (..() || lockdown) /datum/species/preternis/spec_emag_act(mob/living/carbon/human/H, mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag)) - return FALSE . = ..() if(emag_lvl == 2) return FALSE diff --git a/yogstation/code/modules/mob/living/simple_animal/friendly/clowncat.dm b/yogstation/code/modules/mob/living/simple_animal/friendly/clowncat.dm index ee812f2aeac5..5b433eadc4fc 100644 --- a/yogstation/code/modules/mob/living/simple_animal/friendly/clowncat.dm +++ b/yogstation/code/modules/mob/living/simple_animal/friendly/clowncat.dm @@ -20,7 +20,7 @@ playsound(src, pick(meows), 100) /mob/living/simple_animal/pet/cat/clown/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || emagged) + if(emagged) return FALSE emagged = TRUE do_sparks(8, FALSE, loc) diff --git a/yogstation/code/modules/power/hugbox.dm b/yogstation/code/modules/power/hugbox.dm index ea7286a2056c..6d4b3974b2b2 100644 --- a/yogstation/code/modules/power/hugbox.dm +++ b/yogstation/code/modules/power/hugbox.dm @@ -12,7 +12,7 @@ var/power_per_hug = 1000000 /obj/machinery/power/hugbox_engine/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED to_chat(user, span_warning("You crank up the love harvesting regulator to hardware maximum.")) diff --git a/yogstation/code/modules/power/singularity/particle_accelerator/particle_control.dm b/yogstation/code/modules/power/singularity/particle_accelerator/particle_control.dm index 9e7c91768d62..2ff3817dfc77 100644 --- a/yogstation/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/yogstation/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -2,7 +2,7 @@ active_power_usage = 5000 // The power usage when at lvl 0 /obj/machinery/particle_accelerator/control_box/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE to_chat(user, span_danger("The laws of physics no longer apply in the future, god help you...")) diff --git a/yogstation/code/modules/power/stationarybike.dm b/yogstation/code/modules/power/stationarybike.dm index b7c290990897..acb6757efbc7 100644 --- a/yogstation/code/modules/power/stationarybike.dm +++ b/yogstation/code/modules/power/stationarybike.dm @@ -22,7 +22,7 @@ . += span_notice("It is generating [generating]kw of power.") /obj/machinery/power/stationarybike/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED lifeweb = 1 diff --git a/yogstation/code/modules/power/validhunter.dm b/yogstation/code/modules/power/validhunter.dm index 115565c20780..dbe337a9fd17 100644 --- a/yogstation/code/modules/power/validhunter.dm +++ b/yogstation/code/modules/power/validhunter.dm @@ -41,7 +41,7 @@ return TRUE /obj/machinery/power/validhunter_engine/emag_act(mob/user, obj/item/card/emag/emag_card) - if(istype(emag_card, /obj/item/card/emag/cmag) || (obj_flags & EMAGGED)) + if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED From e4ddef53b3a0f68a758f53a24aa780d8dadde5db Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Sun, 13 Aug 2023 20:40:52 -0700 Subject: [PATCH 32/42] unneeded check --- code/game/machinery/autolathe.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 8e1558b043f9..387bf22c4320 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -318,8 +318,7 @@ if(!hacked) adjust_hacked(TRUE) playsound(src, "sparks", 75, TRUE, -1) - if(user) - to_chat(user, span_notice("You use the cryptographic sequencer on [src].")) + to_chat(user, span_notice("You use the cryptographic sequencer on [src].")) return TRUE //Called when the object is constructed by an autolathe From 8d439f649667e7379ae349a61a931d492e0fb1d2 Mon Sep 17 00:00:00 2001 From: Rune Knight <30399783+Runian@users.noreply.github.com> Date: Sun, 13 Aug 2023 21:14:58 -0700 Subject: [PATCH 33/42] Update code/game/machinery/porta_turret/portable_turret_cover.dm Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> --- code/game/machinery/porta_turret/portable_turret_cover.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/porta_turret/portable_turret_cover.dm b/code/game/machinery/porta_turret/portable_turret_cover.dm index a85b4e10845a..8572096771ef 100644 --- a/code/game/machinery/porta_turret/portable_turret_cover.dm +++ b/code/game/machinery/porta_turret/portable_turret_cover.dm @@ -93,7 +93,7 @@ to_chat(user, span_notice("You short out [parent_turret]'s threat assessment circuits.")) visible_message("[parent_turret] hums oddly...") parent_turret.obj_flags |= EMAGGED - parent_turret.on = 0 + parent_turret.on = FALSE addtimer(CALLBACK(src, PROC_REF(finish_emag_act)), 4 SECONDS) // 4 seconds to get away. return TRUE From eec77ac99d6ade870d72ba4aff7d4d3aced65b64 Mon Sep 17 00:00:00 2001 From: Rune Knight <30399783+Runian@users.noreply.github.com> Date: Sun, 13 Aug 2023 21:15:08 -0700 Subject: [PATCH 34/42] Update code/game/machinery/porta_turret/portable_turret_cover.dm Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> --- code/game/machinery/porta_turret/portable_turret_cover.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/porta_turret/portable_turret_cover.dm b/code/game/machinery/porta_turret/portable_turret_cover.dm index 8572096771ef..58772c7d8fe4 100644 --- a/code/game/machinery/porta_turret/portable_turret_cover.dm +++ b/code/game/machinery/porta_turret/portable_turret_cover.dm @@ -100,4 +100,4 @@ /obj/machinery/porta_turret_cover/proc/finish_emag_act() if(QDELETED(parent_turret)) return - parent_turret.on = 1 + parent_turret.on = TRUE From 0eaa5c4d02ebdb31eb8c3518e82fc70f64608016 Mon Sep 17 00:00:00 2001 From: Rune Knight <30399783+Runian@users.noreply.github.com> Date: Sun, 13 Aug 2023 21:16:04 -0700 Subject: [PATCH 35/42] Update yogstation/code/game/objects/structures/fireaxe.dm Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> --- yogstation/code/game/objects/structures/fireaxe.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yogstation/code/game/objects/structures/fireaxe.dm b/yogstation/code/game/objects/structures/fireaxe.dm index e9a123234235..5e5637d43c29 100644 --- a/yogstation/code/game/objects/structures/fireaxe.dm +++ b/yogstation/code/game/objects/structures/fireaxe.dm @@ -98,7 +98,7 @@ span_caution("You short out the [name]'s locking modules."), \ span_italics("You hear electricity arcing.")) spark_system.start() - src.add_fingerprint(user) + add_fingerprint(user) obj_flags |= EMAGGED desc += "
    [span_warning("The access panel is smoking slightly.")]" playsound(loc, "sound/machines/locktoggle.ogg", 30, 1, -3) From 022ffe87f2af6e6eec6b42e33c6b7738c6cf8e8c Mon Sep 17 00:00:00 2001 From: Rune Knight <30399783+Runian@users.noreply.github.com> Date: Sun, 13 Aug 2023 21:16:16 -0700 Subject: [PATCH 36/42] Update yogstation/code/game/objects/structures/fireaxe.dm Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> --- yogstation/code/game/objects/structures/fireaxe.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yogstation/code/game/objects/structures/fireaxe.dm b/yogstation/code/game/objects/structures/fireaxe.dm index 5e5637d43c29..efb0ee795902 100644 --- a/yogstation/code/game/objects/structures/fireaxe.dm +++ b/yogstation/code/game/objects/structures/fireaxe.dm @@ -102,7 +102,7 @@ obj_flags |= EMAGGED desc += "
    [span_warning("The access panel is smoking slightly.")]" playsound(loc, "sound/machines/locktoggle.ogg", 30, 1, -3) - locked = 0 + locked = FALSE audible_message("You hear an audible clunk as the [name]'s bolt retracts.") update_appearance(UPDATE_ICON) // The fireaxe cabinet is now permanently unlocked. From 6a0f4f9568c92314fab89404db123131a65f0e33 Mon Sep 17 00:00:00 2001 From: Rune Knight <30399783+Runian@users.noreply.github.com> Date: Sun, 13 Aug 2023 21:17:19 -0700 Subject: [PATCH 37/42] Update code/game/objects/items/clown_items.dm Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> --- code/game/objects/items/clown_items.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/clown_items.dm b/code/game/objects/items/clown_items.dm index 25933eba19c7..2077eb3ceb23 100644 --- a/code/game/objects/items/clown_items.dm +++ b/code/game/objects/items/clown_items.dm @@ -136,7 +136,7 @@ user.visible_message("[user] starts to clean the ooze off \the [door.name]'s access panel.", "You start to clean the ooze off \the [door.name]'s access panel.") if(do_after(user, src.cleanspeed, door)) to_chat(span_notice(" You clean the ooze off [src]'s access panel.")) - door.obj_flags -= CMAGGED + door.obj_flags &= ~CMAGGED decreaseUses(user) return user.visible_message("[user] begins to clean \the [target.name] with [src]...", span_notice("You begin to clean \the [target.name] with [src]...")) From bfea2424ad181933ea699faa498a8ae7301c349c Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Sun, 13 Aug 2023 21:21:55 -0700 Subject: [PATCH 38/42] update_desc for fireaxe --- yogstation/code/game/objects/structures/fireaxe.dm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/yogstation/code/game/objects/structures/fireaxe.dm b/yogstation/code/game/objects/structures/fireaxe.dm index efb0ee795902..0a3cae345342 100644 --- a/yogstation/code/game/objects/structures/fireaxe.dm +++ b/yogstation/code/game/objects/structures/fireaxe.dm @@ -15,6 +15,12 @@ spark_system.set_up(2, 1, src) spark_system.attach(src) +/obj/structure/fireaxecabinet/update_desc(updates=ALL) + . = ..() + desc = initial(desc) + if(obj_flags & EMAGGED) + desc += "
    [span_warning("The access panel is smoking slightly.")]" + /obj/structure/fireaxecabinet/Destroy()//<-- mirrored/overwritten proc if(fireaxe) fireaxe.forceMove(get_turf(src)) @@ -100,10 +106,9 @@ spark_system.start() add_fingerprint(user) obj_flags |= EMAGGED - desc += "
    [span_warning("The access panel is smoking slightly.")]" playsound(loc, "sound/machines/locktoggle.ogg", 30, 1, -3) locked = FALSE audible_message("You hear an audible clunk as the [name]'s bolt retracts.") - update_appearance(UPDATE_ICON) + update_appearance() // The fireaxe cabinet is now permanently unlocked. return TRUE From ad41074ca4bfe99a2d00ba83dda3cb27e52bdafa Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Sun, 13 Aug 2023 21:26:02 -0700 Subject: [PATCH 39/42] update_name for lightreplacer --- code/game/objects/items/devices/lightreplacer.dm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index 11e9d518a4af..b8c26361f0b7 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -146,9 +146,8 @@ if(obj_flags & EMAGGED) return FALSE obj_flags |= EMAGGED - name = "shortcircuited [initial(name)]" playsound(src.loc, "sparks", 100, 1) - update_appearance(UPDATE_ICON) + update_appearance() return TRUE /obj/item/lightreplacer/attack_self(mob/user) @@ -160,6 +159,13 @@ . = ..() icon_state = "lightreplacer[(obj_flags & EMAGGED ? 1 : 0)]" +/obj/item/lightreplacer/update_name(updates=ALL) + . = ..() + if(obj_flags & EMAGGED) + name = "shortcircuited [initial(name)]" + else + name = initial(name) + /obj/item/lightreplacer/proc/status_string() return "It has [uses] light\s remaining (plus [bulb_shards] fragment\s)." From 4d7a5814939a38aa50a24fce1e9d4358e63cd20c Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Sun, 13 Aug 2023 21:46:50 -0700 Subject: [PATCH 40/42] replaces active cmag tell with a bikehorn --- code/game/objects/items/cards_ids.dm | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index 21693b1d301b..acc751b12d2e 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -167,9 +167,6 @@ . = ..() AddComponent(/datum/component/slippery, 8 SECONDS, GALOSHES_DONT_HELP) // It wouldn't be funny if it couldn't slip! -#define CMAG_AIRLOCK_CLOSED 1 // Since this is undefined outside of `airlock.dm`, have to redefine them. -#define CMAG_AIRLOCK_EMAG 6 - /obj/item/card/emag/cmag/afterattack(atom/target, mob/user, proximity) . = ..() // Handles the ..() before that. if(!proximity && prox_check) @@ -186,15 +183,8 @@ return charges-- - airlock.operating = TRUE - airlock.update_icon(state = CMAG_AIRLOCK_EMAG, override = TRUE) - - sleep(0.6 SECONDS) - if(QDELETED(src)) - return - airlock.update_icon(state = CMAG_AIRLOCK_CLOSED, override = TRUE) + playsound(airlock, 'sound/items/bikehorn.ogg', 20, 1) // Was it an innocent bike horn or is it someone actively cmagging your airlock? The only tell if someone is actively cmagging things. airlock.obj_flags |= CMAGGED - airlock.operating = FALSE return if(istype(target, /obj/machinery/door/window)) @@ -203,16 +193,10 @@ return charges-- - windoor.operating = TRUE + playsound(windoor, 'sound/items/bikehorn.ogg', 20, 1) windoor.obj_flags |= CMAGGED - flick("[windoor.base_state]spark", windoor) - playsound(windoor, "sparks", 75, 1) - windoor.operating = FALSE return -#undef CMAG_AIRLOCK_CLOSED -#undef CMAG_AIRLOCK_EMAG - /obj/item/card/emagfake desc = "It's a card with a magnetic strip attached to some circuitry. Closer inspection shows that this card is a poorly made replica, with a \"DonkCo\" logo stamped on the back." name = "cryptographic sequencer" From 33f0937841984aad5e8f35c754a078be50ac6938 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Sun, 13 Aug 2023 22:03:43 -0700 Subject: [PATCH 41/42] /emag/cmag -> /cmag --- code/game/objects/items/cards_ids.dm | 54 +++++++++++++++++++++++----- code/modules/uplink/uplink_items.dm | 2 +- 2 files changed, 46 insertions(+), 10 deletions(-) diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index acc751b12d2e..9a233ed619da 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -106,8 +106,6 @@ /obj/item/card/emag/afterattack(atom/target, mob/user, proximity) . = ..() - if(src.type == /obj/item/card/emag/cmag) // Still want to use ..() for cmag, but don't want much of anything else. - return var/atom/A = target if(!proximity && prox_check) return @@ -158,17 +156,55 @@ charges++ emagging = FALSE -/obj/item/card/emag/cmag - desc = "It's a card coated in a slurry of electromagnetic bananium." +/// A replica of an emag in most ways, except what it "cmags" what it interacts with. +/obj/item/card/cmag name = "jestographic sequencer" + desc = "It's a card coated in a slurry of electromagnetic bananium." icon_state = "cmag" + item_state = "card-id" + lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi' + item_flags = NO_MAT_REDEMPTION | NOBLUDGEON + /// How many charges can the cmag hold? + var/max_charges = 5 + /// How many charges does the cmag start with? + var/charges = 5 + /// How fast (in seconds) does charges increase by 1? + var/recharge_rate = 0.4 + /// Does usage require you to be in range? + var/prox_check = TRUE -/obj/item/card/emag/cmag/Initialize(mapload) +/obj/item/card/cmag/Initialize(mapload) . = ..() + if(recharge_rate != 0) + START_PROCESSING(SSobj, src) AddComponent(/datum/component/slippery, 8 SECONDS, GALOSHES_DONT_HELP) // It wouldn't be funny if it couldn't slip! -/obj/item/card/emag/cmag/afterattack(atom/target, mob/user, proximity) - . = ..() // Handles the ..() before that. +/obj/item/card/cmag/Destroy() + STOP_PROCESSING(SSobj, src) + . = ..() + +/obj/item/card/cmag/process(delta_time) + charges = clamp(charges + (recharge_rate * delta_time), 0, max_charges) + +/obj/item/card/cmag/attackby(obj/item/W, mob/user, params) + . = ..() + if(max_charges > charges) + if(istype(W, /obj/item/stack/sheet/mineral/uranium)) + var/obj/item/stack/sheet/mineral/uranium/T = W + T.use(1) + charges = min(charges + 1, max_charges) + to_chat(user, span_notice("You add another charge to the [src]. It now has [charges] use[charges == 1 ? "" : "s"] remaining.")) + +/obj/item/card/cmag/examine(mob/user) + . = ..() + . += span_notice("The charge meter indicates that it has [charges] charge[charges == 1 ? "" : "s"] remaining out of [max_charges] charges.") + +/obj/item/card/cmag/attack() + return + +/obj/item/card/cmag/afterattack(atom/target, mob/user, proximity) + . = ..() if(!proximity && prox_check) return if(charges < 1) @@ -176,14 +212,14 @@ return log_combat(user, target, "attempted to cmag") - // Since cmag only has very few interactions, all of it is handled in `afterattack` instead of `emag_act`. + // Since cmag only has very few interactions, all of it is handled in `afterattack` instead of being a child of emag/`emag_act`. if(istype(target, /obj/machinery/door/airlock)) var/obj/machinery/door/airlock/airlock = target if(airlock.operating || !airlock.density || !airlock.hasPower() || (airlock.obj_flags & EMAGGED) || (airlock.obj_flags & CMAGGED)) return charges-- - playsound(airlock, 'sound/items/bikehorn.ogg', 20, 1) // Was it an innocent bike horn or is it someone actively cmagging your airlock? The only tell if someone is actively cmagging things. + playsound(airlock, 'sound/items/bikehorn.ogg', 20, 1) // Was it an innocent bike horn or was is it someone actively cmagging your airlock? The only tell if someone is actively cmagging things. airlock.obj_flags |= CMAGGED return diff --git a/code/modules/uplink/uplink_items.dm b/code/modules/uplink/uplink_items.dm index 08acd85ce60c..e6058a62f50c 100644 --- a/code/modules/uplink/uplink_items.dm +++ b/code/modules/uplink/uplink_items.dm @@ -2611,7 +2611,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) /datum/uplink_item/role_restricted/cmag name = "Jestographic Sequencer" desc = "The jestographic sequencer, also known as a cmag, is a small card that inverts the access on any door it's used on. Perfect for locking command out of their own departments. Honk!" - item = /obj/item/card/emag/cmag + item = /obj/item/card/cmag cost = 4 // Not as "destructive" as the emag. In addition, less features than the normal emag. Increase price once more impactful features are added. restricted_roles = list("Clown") From bc79acd41f3d5fbc8e39e6353a9c5236ae5f90a5 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Fri, 18 Aug 2023 16:31:44 -0700 Subject: [PATCH 42/42] SHOULD_CALL_PARENT(FALSE) --- code/game/atoms.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 2cbe0ab44dda..4a062f4298bb 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -800,6 +800,7 @@ * TRUE if the emag had any effect, falsey otherwise. */ /atom/proc/emag_act(mob/user, obj/item/card/emag/emag_card) + SHOULD_CALL_PARENT(FALSE) // Emag act should either be: overridden (no signal) or default (signal). return (SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT, user, emag_card)) /**