Migrates Surgery Tools, Nuke Kits, and Nuke Cores to the New Attack Chain (#30442)

* super

* Update theft_items.dm

* Update theft_items.dm

* Update outfit_debug.dm

* Update code/game/objects/items/theft_items.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>

---------

Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
CRUNCH
2025-10-17 18:58:35 +01:00
committed by GitHub
parent 027146fee1
commit 3210d12d56
3 changed files with 141 additions and 95 deletions
+117 -85
View File
@@ -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("<span class='suicide'>[user] is rubbing [src] against [user.p_themselves()]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
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.
. += "<span class='notice'>[src] looks dented. Perhaps a bigger explosion may break it.</span>"
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.\""
. += "<span class='notice'>Fine print on the box reads \"Syndicate Field Operations secure core extraction container. Guaranteed thermite proof, assistant proof, and explosive resistant.\"</span>"
/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, "<span class='warning'>[core] is stuck to your hand!</span>")
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, "<span class='warning'>[src] is permanently sealed, [core]'s radiation is contained.</span>")
/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, "<span class='warning'>[core] is stuck to your hand!</span>")
return
else
load(core, user)
/obj/item/nuke_core_container/proc/crack_open()
visible_message("<span class='boldnotice'>[src] bursts open!</span>")
if(core)
@@ -145,8 +141,7 @@
<li>???</li>\
</ul>"
// STEALING SUPERMATTER.
// MARK: Supermatter sliver
/obj/item/paper/guides/antag/supermatter_sliver
info = "How to safely extract a supermatter sliver:<br>\
<ul>\
@@ -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, "<span class='warning'>[tongs] are already holding a supermatter sliver!</span>")
return FALSE
return ITEM_INTERACT_COMPLETE
forceMove(tongs)
tongs.sliver = src
tongs.update_icon(UPDATE_ICON_STATE)
to_chat(user, "<span class='notice'>You carefully pick up [src] with [tongs].</span>")
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, "<span class='userdanger'>You try to touch [src] with one of your modules. Error!</span>")
radiation_pulse(user, 2000, GAMMA_RAD)
playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE)
user.dust()
qdel(src)
return
to_chat(user, "<span class='danger'>As it touches [src], both [src] and [I] burst into dust!</span>")
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, "<span class='userdanger'>You try to touch [src] with [used]. ERROR!</span>")
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, "<span class='userdanger'>As it touches [src], both [src] and [used] burst into dust. The resonance then consumes you as well!</span>")
user.dust()
else
to_chat(user, "<span class='danger'>As it touches [src], both [src] and [used] burst into dust!</span>")
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("<span class='danger'>[user] reaches out and tries to pick up [src]. [user.p_their()] body starts to glow and bursts into flames before flashing into dust!</span>",
"<span class='userdanger'>You reach for [src] with your hands. That was dumb.</span>",
"<span class='hear'>Everything suddenly goes silent.</span>")
@@ -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, "<span class='notice'>You carefully pick up [I.sliver] with [I].</span>")
/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("<span class='danger'>[user] reaches out and tries to pick up [sliver]. [user.p_their()] body starts to glow and bursts into flames before flashing into dust!</span>",
"<span class='userdanger'>You reach for [sliver] with your hands. That was dumb.</span>",
"<span class='italics'>Everything suddenly goes silent.</span>")
@@ -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("<span class='danger'>As [user] touches [AM] with [src], both flash into dust and silence fills the room...</span>",
"<span class='userdanger'>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.</span>",
"<span class='hear'>Everything suddenly goes silent.</span>")
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(
"<span class='danger'>As [user] touches [AM] with [src], both flash into dust and silence fills the room...</span>",
"<span class='userdanger'>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.</span>",
"<span class='hear'>Everything suddenly goes silent.</span>"
)
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(
"<span class='danger'>As [user] touches [AM] with [src], [AM] flashes into dust and silence fills the room...</span>",
"<span class='userdanger'>You touch [AM] with [src], and everything suddenly goes silent.\n[AM] and [sliver] flash into dust.</span>",
"<span class='hear'>Everything suddenly goes silent.</span>"
)
QDEL_NULL(sliver)
update_icon(UPDATE_ICON_STATE)