diff --git a/code/datums/outfits/outfit_debug.dm b/code/datums/outfits/outfit_debug.dm
index 287c8ea45a4..908eafdb38a 100644
--- a/code/datums/outfits/outfit_debug.dm
+++ b/code/datums/outfits/outfit_debug.dm
@@ -194,8 +194,10 @@
desc = "A wonder of modern medicine. This tool functions as any other sort of surgery tool, and finishes in only a fraction of the time. Hey, how'd you get your hands on this, anyway?"
toolspeed = 0.01
-/obj/item/scalpel/laser/manager/debug/attack_self__legacy__attackchain(mob/user)
- . = ..()
+/obj/item/scalpel/laser/manager/debug/activate_self(mob/user)
+ if(..())
+ return
+
toolspeed = toolspeed == 0.5 ? 0.01 : 0.5
to_chat(user, "[src] is now set to toolspeed [toolspeed]")
playsound(src, 'sound/effects/pop.ogg', 50, 0) //Change the mode
diff --git a/code/game/objects/items/theft_items.dm b/code/game/objects/items/theft_items.dm
index 768458f1087..06c9849babd 100644
--- a/code/game/objects/items/theft_items.dm
+++ b/code/game/objects/items/theft_items.dm
@@ -1,8 +1,4 @@
//Items for nuke theft, supermatter theft traitor objective
-
-
-// STEALING THE NUKE
-
//the nuke core, base item
/obj/item/nuke_core
name = "plutonium core"
@@ -12,6 +8,7 @@
inhand_icon_state = "plutoniumcore"
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
flags_2 = RAD_NO_CONTAMINATE_2 //This is made from radioactive material so cannot really be contaminated
+ new_attack_chain = TRUE
var/cooldown = 0
var/pulseicon = "plutonium_core_pulse"
// Is this made from radioactive material or not.
@@ -26,16 +23,11 @@
/obj/item/nuke_core/Destroy()
return ..()
-/obj/item/nuke_core/attackby__legacy__attackchain(obj/item/nuke_core_container/container, mob/user)
- if(istype(container))
- container.load(src, user)
- else
- return ..()
-
/obj/item/nuke_core/suicide_act(mob/user)
user.visible_message("[user] is rubbing [src] against [user.p_themselves()]! It looks like [user.p_theyre()] trying to commit suicide!")
return TOXLOSS
+// MARK: Plutonium core
/// The steal objective, so it doesnt mess with the SM sliver on pinpointers and objectives
/obj/item/nuke_core/plutonium
@@ -52,22 +44,10 @@
inhand_icon_state = "syringe_kit"
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF //Don't want people trying to break it open with acid, then destroying the core.
var/obj/item/nuke_core/plutonium/core
+ new_attack_chain = TRUE
var/dented = FALSE
var/cracked = FALSE
-/obj/item/nuke_core_container/Destroy()
- QDEL_NULL(core)
- return ..()
-
-/obj/item/nuke_core_container/ex_act(severity)
- switch(severity)
- if(EXPLODE_DEVASTATE)
- if(!cracked)
- crack_open()
- if(EXPLODE_HEAVY)
- if(!dented)
- dented = TRUE
-
/obj/item/nuke_core_container/examine(mob/user)
. = ..()
if(cracked) // Cracked open.
@@ -75,7 +55,22 @@
else if(dented) // Not cracked, but dented.
. += "[src] looks dented. Perhaps a bigger explosion may break it."
else // Not cracked or dented.
- . += "Fine print on the box reads \"Syndicate Field Operations secure core extraction container. Guaranteed thermite proof, assistant proof, and explosive resistant.\""
+ . += "Fine print on the box reads \"Syndicate Field Operations secure core extraction container. Guaranteed thermite proof, assistant proof, and explosive resistant.\""
+
+/obj/item/nuke_core_container/item_interaction(mob/living/user, obj/item/used, list/modifiers)
+ if(!istype(used, /obj/item/nuke_core/plutonium))
+ return ..()
+
+ var/obj/item/nuke_core/plutonium/core = used
+ if(cracked)
+ return ITEM_INTERACT_COMPLETE
+
+ if(!user.drop_item())
+ to_chat(user, "[core] is stuck to your hand!")
+ return ITEM_INTERACT_COMPLETE
+
+ load(core, user)
+ return ITEM_INTERACT_COMPLETE
/obj/item/nuke_core_container/attack_hand(mob/user)
if(cracked && core)
@@ -83,6 +78,17 @@
else
return ..()
+/obj/item/nuke_core_container/ex_act(severity)
+ switch(severity)
+ if(EXPLODE_DEVASTATE)
+ if(!cracked)
+ crack_open()
+ if(EXPLODE_HEAVY)
+ dented = TRUE
+
+/obj/item/nuke_core_container/Destroy()
+ QDEL_NULL(core)
+ return ..()
/obj/item/nuke_core_container/proc/load(obj/item/nuke_core/plutonium/new_core, mob/user)
if(core || !istype(new_core) || cracked)
@@ -111,16 +117,6 @@
if(ismob(loc))
to_chat(loc, "[src] is permanently sealed, [core]'s radiation is contained.")
-/obj/item/nuke_core_container/attackby__legacy__attackchain(obj/item/nuke_core/plutonium/core, mob/user)
- if(!istype(core) || cracked)
- return ..()
-
- if(!user.drop_item())
- to_chat(user, "[core] is stuck to your hand!")
- return
- else
- load(core, user)
-
/obj/item/nuke_core_container/proc/crack_open()
visible_message("[src] bursts open!")
if(core)
@@ -145,8 +141,7 @@
???\
"
-// STEALING SUPERMATTER.
-
+// MARK: Supermatter sliver
/obj/item/paper/guides/antag/supermatter_sliver
info = "How to safely extract a supermatter sliver:
\
\
@@ -188,39 +183,54 @@
return TRUE
return FALSE
-/obj/item/nuke_core/supermatter_sliver/attackby__legacy__attackchain(obj/item/I, mob/living/user, params)
- if(istype(I, /obj/item/retractor/supermatter))
- var/obj/item/retractor/supermatter/tongs = I
+/obj/item/nuke_core/supermatter_sliver/item_interaction(mob/living/user, obj/item/used, list/modifiers)
+ if(istype(used, /obj/item/retractor/supermatter))
+ var/obj/item/retractor/supermatter/tongs = used
if(tongs.sliver)
to_chat(user, "[tongs] are already holding a supermatter sliver!")
- return FALSE
+ return ITEM_INTERACT_COMPLETE
+
forceMove(tongs)
tongs.sliver = src
tongs.update_icon(UPDATE_ICON_STATE)
to_chat(user, "You carefully pick up [src] with [tongs].")
- else if(istype(I, /obj/item/scalpel/supermatter) || istype(I, /obj/item/nuke_core_container/supermatter) || HAS_TRAIT(I, TRAIT_SUPERMATTER_IMMUNE)) // we don't want it to dust
- return
- else
- if(issilicon(user))
- to_chat(user, "You try to touch [src] with one of your modules. Error!")
- radiation_pulse(user, 2000, GAMMA_RAD)
- playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE)
- user.dust()
- qdel(src)
- return
- to_chat(user, "As it touches [src], both [src] and [I] burst into dust!")
- radiation_pulse(user, 400, GAMMA_RAD)
+ return ITEM_INTERACT_COMPLETE
+
+ if(istype(used, /obj/item/scalpel/supermatter) || istype(used, /obj/item/nuke_core_container/supermatter)) // we don't want it to dust
+ return ITEM_INTERACT_COMPLETE
+
+ if(user.status_flags & GODMODE || HAS_TRAIT(user, TRAIT_SUPERMATTER_IMMUNE))
+ return ITEM_INTERACT_COMPLETE
+
+ if(issilicon(user))
+ to_chat(user, "You try to touch [src] with [used]. ERROR!")
+ radiation_pulse(user, 2000, GAMMA_RAD)
playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE)
- qdel(I)
+ user.dust()
qdel(src)
- return ..()
+ return ITEM_INTERACT_COMPLETE
+
+ // Don't poke it with no-drops!
+ if(!user.drop_item())
+ radiation_pulse(user, 2000, GAMMA_RAD)
+ to_chat(user, "As it touches [src], both [src] and [used] burst into dust. The resonance then consumes you as well!")
+ user.dust()
+ else
+ to_chat(user, "As it touches [src], both [src] and [used] burst into dust!")
+ radiation_pulse(user, 400, GAMMA_RAD)
+ qdel(used)
+ playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE)
+ qdel(src)
+ return ITEM_INTERACT_COMPLETE
/obj/item/nuke_core/supermatter_sliver/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(!isliving(hit_atom))
return ..()
+
var/mob/living/victim = hit_atom
if(victim.incorporeal_move || victim.status_flags & GODMODE || HAS_TRAIT(victim, TRAIT_SUPERMATTER_IMMUNE)) //try to keep this in sync with supermatter's consume fail conditions
return ..()
+
var/mob/user = throwingdatum?.get_thrower()
if(user)
add_attack_logs(user, victim, "[victim] consumed by [src] thrown by [user] ")
@@ -241,8 +251,10 @@
..()
if(HAS_TRAIT(user, TRAIT_SUPERMATTER_IMMUNE))
return TRUE //yay sliver throwing memes!
+
if(!isliving(user) || user.status_flags & GODMODE) //try to keep this in sync with supermatter's consume fail conditions
return FALSE
+
user.visible_message("[user] reaches out and tries to pick up [src]. [user.p_their()] body starts to glow and bursts into flames before flashing into dust!",
"You reach for [src] with your hands. That was dumb.",
"Everything suddenly goes silent.")
@@ -262,6 +274,7 @@
/obj/item/nuke_core_container/supermatter/load(obj/item/retractor/supermatter/I, mob/user)
if(!istype(I) || !I.sliver || sliver)
return
+
I.sliver.forceMove(src)
sliver = I.sliver
I.sliver = null
@@ -285,6 +298,7 @@
/obj/item/nuke_core_container/supermatter/unload(obj/item/retractor/supermatter/I, mob/user)
if(!istype(I) || I.sliver)
return
+
sliver.forceMove(I)
I.sliver = sliver
sliver = null
@@ -292,21 +306,23 @@
icon_state = "core_container_cracked_empty"
to_chat(user, "You carefully pick up [I.sliver] with [I].")
-/obj/item/nuke_core_container/supermatter/attackby__legacy__attackchain(obj/item/retractor/supermatter/tongs, mob/user)
- if(istype(tongs))
- if(cracked)
- //lets take that shard out
- unload(tongs, user)
- else
- //try to load shard into core
- load(tongs, user)
- else
+/obj/item/nuke_core_container/supermatter/item_interaction(mob/living/user, obj/item/used, list/modifiers)
+ if(!istype(used, /obj/item/retractor/supermatter))
return ..()
+ var/obj/item/retractor/supermatter/tongs = used
+ if(cracked)
+ unload(tongs, user)
+ return ITEM_INTERACT_COMPLETE
+
+ load(tongs, user)
+ return ITEM_INTERACT_COMPLETE
+
/obj/item/nuke_core_container/supermatter/attack_hand(mob/user)
if(cracked && sliver) //What did we say about touching the shard...
- if(!isliving(user) || user.status_flags & GODMODE)
+ if(!isliving(user) || user.status_flags & GODMODE || HAS_TRAIT(user, TRAIT_SUPERMATTER_IMMUNE))
return FALSE
+
user.visible_message("[user] reaches out and tries to pick up [sliver]. [user.p_their()] body starts to glow and bursts into flames before flashing into dust!",
"You reach for [sliver] with your hands. That was dumb.",
"Everything suddenly goes silent.")
@@ -317,7 +333,6 @@
user.dust()
icon_state = "core_container_cracked_empty"
qdel(sliver)
-
else
return ..()
@@ -363,12 +378,14 @@
/obj/item/retractor/supermatter/update_icon_state()
icon_state = "[initial(icon_state)][sliver ? "_loaded" : ""]"
-/obj/item/retractor/supermatter/afterattack__legacy__attackchain(atom/O, mob/user, proximity)
+/obj/item/retractor/supermatter/interact_with_atom(atom/target, mob/living/user, list/modifiers)
. = ..()
if(!sliver)
return
- if(proximity && ismovable(O) && O != sliver)
- Consume(O, user)
+
+ if(ismovable(target) && target != sliver)
+ Consume(target, user)
+ return ITEM_INTERACT_COMPLETE
/obj/item/retractor/supermatter/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum) // no instakill supermatter javelins
if(sliver)
@@ -379,32 +396,47 @@
return ..()
/obj/item/retractor/supermatter/proc/Consume(atom/movable/AM, mob/living/user)
+ if(istype(AM, /obj/item/nuke_core_container))
+ return
+
+ if(istype(AM, /obj/machinery/atmospherics/supermatter_crystal))
+ return
+
+ if(istype(AM, /obj/singularity))
+ return
+
if(ismob(AM))
if(!isliving(AM))
return
+
var/mob/living/victim = AM
- if(victim.incorporeal_move || victim.status_flags & GODMODE) //try to keep this in sync with supermatter's consume fail conditions
+ if(victim.incorporeal_move || victim.status_flags & GODMODE || HAS_TRAIT(victim, TRAIT_SUPERMATTER_IMMUNE)) //try to keep this in sync with supermatter's consume fail conditions
return
+
victim.dust()
+ radiation_pulse(src, 2000, GAMMA_RAD)
message_admins("[src] has consumed [key_name_admin(victim)] [ADMIN_JMP(src)].")
investigate_log("has irradiated [key_name(victim)].", INVESTIGATE_SUPERMATTER)
- else if(istype(AM, /obj/singularity))
- return
- else if(istype(AM, /obj/item/nuke_core_container))
- return
- else if(istype(AM, /obj/machinery/atmospherics/supermatter_crystal))
- return
- else
- investigate_log("has consumed [AM].", INVESTIGATE_SUPERMATTER)
- qdel(AM)
- if(user)
- add_attack_logs(user, AM, "[AM] and [user] consumed by melee attack with [src] by [user]")
- user.visible_message("As [user] touches [AM] with [src], both flash into dust and silence fills the room...",
- "You touch [AM] with [src], and everything suddenly goes silent.\n[AM] and [sliver] flash into dust, and soon as you can register this, you do as well.",
- "Everything suddenly goes silent.")
- user.dust()
- radiation_pulse(src, 2000, GAMMA_RAD)
playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE)
+ investigate_log("has consumed [AM].", INVESTIGATE_SUPERMATTER)
+ qdel(AM)
+ if(user)
+ if(!(HAS_TRAIT(user, TRAIT_SUPERMATTER_IMMUNE) || user.status_flags & GODMODE))
+ add_attack_logs(user, AM, "[AM] and [user] consumed by melee attack with [src] by [user].")
+ user.visible_message(
+ "As [user] touches [AM] with [src], both flash into dust and silence fills the room...",
+ "You touch [AM] with [src], and everything suddenly goes silent.\n[AM] and [sliver] flash into dust, and soon as you can register this, you do as well.",
+ "Everything suddenly goes silent."
+ )
+ user.dust()
+ radiation_pulse(src, 2000, GAMMA_RAD)
+ else
+ add_attack_logs(user, AM, "[AM] consumed by melee attack with [src] by [user].")
+ user.visible_message(
+ "As [user] touches [AM] with [src], [AM] flashes into dust and silence fills the room...",
+ "You touch [AM] with [src], and everything suddenly goes silent.\n[AM] and [sliver] flash into dust.",
+ "Everything suddenly goes silent."
+ )
QDEL_NULL(sliver)
update_icon(UPDATE_ICON_STATE)
diff --git a/code/modules/surgery/tools.dm b/code/modules/surgery/tools.dm
index 115733ed3f3..a3c301bd377 100644
--- a/code/modules/surgery/tools.dm
+++ b/code/modules/surgery/tools.dm
@@ -10,6 +10,7 @@
w_class = WEIGHT_CLASS_SMALL
origin_tech = "materials=1;biotech=1"
tool_behaviour = TOOL_RETRACTOR
+ new_attack_chain = TRUE
/obj/item/retractor/Initialize(mapload)
. = ..()
@@ -35,6 +36,7 @@
origin_tech = "materials=1;biotech=1"
attack_verb = list("attacked", "pinched")
tool_behaviour = TOOL_HEMOSTAT
+ new_attack_chain = TRUE
/obj/item/hemostat/Initialize(mapload)
. = ..()
@@ -60,6 +62,7 @@
origin_tech = "materials=1;biotech=1"
attack_verb = list("burnt")
tool_behaviour = TOOL_CAUTERY
+ new_attack_chain = TRUE
/obj/item/cautery/Initialize(mapload)
. = ..()
@@ -67,9 +70,11 @@
RegisterSignal(src, COMSIG_BIT_ATTACH, PROC_REF(add_bit))
RegisterSignal(src, COMSIG_CLICK_ALT, PROC_REF(remove_bit))
-/obj/item/cautery/attack__legacy__attackchain(mob/living/target, mob/living/user)
- if(!cigarette_lighter_act(user, target))
- return ..()
+/obj/item/cautery/interact_with_atom(atom/target, mob/living/user, list/modifiers)
+ if(cigarette_lighter_act(user, target))
+ return ITEM_INTERACT_COMPLETE
+
+ return ..()
/obj/item/cautery/cigarette_lighter_act(mob/living/user, mob/living/target, obj/item/direct_attackby_item)
var/obj/item/clothing/mask/cigarette/cig = ..()
@@ -108,6 +113,7 @@
origin_tech = "materials=1;biotech=1"
attack_verb = list("drilled")
tool_behaviour = TOOL_DRILL
+ new_attack_chain = TRUE
/obj/item/surgicaldrill/Initialize(mapload)
. = ..()
@@ -146,6 +152,7 @@
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
tool_behaviour = TOOL_SCALPEL
+ new_attack_chain = TRUE
/obj/item/scalpel/Initialize(mapload)
. = ..()
@@ -154,14 +161,12 @@
RegisterSignal(src, COMSIG_BIT_ATTACH, PROC_REF(add_bit))
RegisterSignal(src, COMSIG_CLICK_ALT, PROC_REF(remove_bit))
-
/obj/item/scalpel/suicide_act(mob/user)
to_chat(viewers(user), pick("[user] is slitting [user.p_their()] wrists with [src]! It looks like [user.p_theyre()] trying to commit suicide!",
"[user] is slitting [user.p_their()] throat with [src]! It looks like [user.p_theyre()] trying to commit suicide!",
"[user] is slitting [user.p_their()] stomach open with [src]! It looks like [user.p_theyre()] trying to commit seppuku!"))
return BRUTELOSS
-
/obj/item/scalpel/augment
desc = "Ultra-sharp blade attached directly to your bone for extra-accuracy."
toolspeed = 0.5
@@ -178,9 +183,11 @@
hitsound = 'sound/weapons/sear.ogg'
materials = list(MAT_METAL = 2000, MAT_GLASS = 1000)
-/obj/item/scalpel/laser/attack__legacy__attackchain(mob/living/carbon/target, mob/living/user)
- if(!cigarette_lighter_act(user, target))
- return ..()
+/obj/item/scalpel/laser/interact_with_atom(atom/target, mob/living/user, list/modifiers)
+ if(cigarette_lighter_act(user, target))
+ return ITEM_INTERACT_COMPLETE
+
+ return ..()
/obj/item/scalpel/laser/cigarette_lighter_act(mob/living/user, mob/living/target, obj/item/direct_attackby_item)
var/obj/item/clothing/mask/cigarette/cig = ..()
@@ -246,6 +253,7 @@
origin_tech = "biotech=1;combat=1"
attack_verb = list("attacked", "slashed", "sawed", "cut")
tool_behaviour = TOOL_SAW
+ new_attack_chain = TRUE
/obj/item/circular_saw/Initialize(mapload)
. = ..()
@@ -271,6 +279,7 @@
throwforce = 1.0
origin_tech = "materials=1;biotech=1"
tool_behaviour = TOOL_BONEGEL
+ new_attack_chain = TRUE
/obj/item/bonegel/Initialize(mapload)
. = ..()
@@ -292,6 +301,7 @@
origin_tech = "materials=1;biotech=1"
w_class = WEIGHT_CLASS_SMALL
tool_behaviour = TOOL_FIXOVEIN
+ new_attack_chain = TRUE
/obj/item/fix_o_vein/Initialize(mapload)
. = ..()
@@ -317,6 +327,7 @@
attack_verb = list("attacked", "hit", "bludgeoned")
origin_tech = "materials=1;biotech=1"
tool_behaviour = TOOL_BONESET
+ new_attack_chain = TRUE
/obj/item/bonesetter/Initialize(mapload)
. = ..()
@@ -337,6 +348,7 @@
attack_verb = list("slapped")
/// How effective this is at preventing infections during surgeries.
var/surgery_effectiveness = 0.9
+ new_attack_chain = TRUE
/obj/item/surgical_drapes/Initialize(mapload)
. = ..()