Skip to content

Commit

Permalink
Silverscale statue destruction fix (#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMelbert authored Jan 17, 2024
1 parent 101e462 commit 4fa7fc5
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
cost = CARGO_CRATE_VALUE * 70 // this shit is SO culturally, functionally, and scientifically important.

unit_name = "silverscale tongue"
export_types = (/obj/item/organ/internal/tongue/lizard/silver)
export_types = list(/obj/item/organ/internal/tongue/lizard/silver)

/datum/export/organ/tongue/lizard/silver/total_printout(datum/export_report/ex, notes = TRUE)
. = ..()
Expand Down Expand Up @@ -138,6 +138,7 @@
statue.flags_ricochet |= RICOCHET_SHINY
RegisterSignal(statue, COMSIG_ATOM_ENTERED, PROC_REF(statue_entered))
RegisterSignal(statue, COMSIG_ATOM_EXITED, PROC_REF(statue_exited))
RegisterSignal(statue, COMSIG_OBJ_DECONSTRUCT, PROC_REF(statue_deconstructed))

/datum/action/item_action/organ_action/statue/Trigger(trigger_flags)
if(owner.loc != statue)
Expand Down Expand Up @@ -188,6 +189,18 @@
// Matches up dirs again, someone could've rotated our statue
lizard.setDir(statue.dir)

/datum/action/item_action/organ_action/statue/statue_destroyed(datum/source)
statue = null
qdel(src)

/datum/action/item_action/organ_action/statue/proc/statue_deconstructed(datum/source, disassembled)
SIGNAL_HANDLER
to_chat(owner, span_userdanger("You watch as your statue is [disassembled ? "taken apart, piece by piece" : "broken apart"] - and with it, your life force!"))
statue.visible_message(span_warning("[statue] shatters into dust!"))
var/mob/living/lizard = owner
lizard.forceMove(statue.loc)
lizard.dust(drop_items = TRUE)

/datum/armor/silverscale_statue_armor
melee = 50
bullet = 50
Expand Down

0 comments on commit 4fa7fc5

Please sign in to comment.