From 65703df45d9cc11c4cbd135cd84e57343b5cd138 Mon Sep 17 00:00:00 2001 From: itseasytosee <55666666+itseasytosee@users.noreply.github.com> Date: Mon, 3 Jul 2023 12:10:18 -0500 Subject: [PATCH] Petrify Smite (#75538) ## About The Pull Request adds a smite to petrify someone forever, works like the wizard spell. Adds support to make petrification brainless. Creates a var to remove those annoying "you can not move while buckled to X" messages for abstract items like statues. ## Why It's Good For The Game Smite good. Message spam bad. ## Changelog :cl: itseasytosee spellcheck: You should see a lot less "you can not move while bucked too X" messages where they don't make sense. admin: Added a petrify smite. Try it out on your least favorite player! /:cl: --------- Co-authored-by: san7890 --- code/datums/dna.dm | 2 +- code/game/objects/structures/petrified_statue.dm | 15 +++++++++++---- code/modules/admin/smites/petrify.dm | 12 ++++++++++++ .../surgery/organs/internal/heart/_heart.dm | 3 +++ tgstation.dme | 1 + 5 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 code/modules/admin/smites/petrify.dm diff --git a/code/datums/dna.dm b/code/datums/dna.dm index 534005b4457..1c8766d327b 100644 --- a/code/datums/dna.dm +++ b/code/datums/dna.dm @@ -876,7 +876,7 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) if(2) investigate_log("has been transformed into a statue by DNA instability.", INVESTIGATE_DEATHS) death() - petrify(INFINITY) + petrify(statue_timer = INFINITY, save_brain = FALSE) ghostize(FALSE) if(3) if(prob(95)) diff --git a/code/game/objects/structures/petrified_statue.dm b/code/game/objects/structures/petrified_statue.dm index e3a271e18db..20582676ae4 100644 --- a/code/game/objects/structures/petrified_statue.dm +++ b/code/game/objects/structures/petrified_statue.dm @@ -5,13 +5,20 @@ density = TRUE anchored = TRUE max_integrity = 200 + // Should we leave a brain behind when the statue is wrecked? + var/brain = TRUE var/timer = 480 //eventually the person will be freed var/mob/living/petrified_mob -/obj/structure/statue/petrified/Initialize(mapload, mob/living/L, statue_timer) +/obj/structure/statue/petrified/relaymove() + return + +/obj/structure/statue/petrified/Initialize(mapload, mob/living/L, statue_timer, save_brain) . = ..() if(statue_timer) timer = statue_timer + if(save_brain) + brain = save_brain if(L) petrified_mob = L if(L.buckled) @@ -71,7 +78,7 @@ if(!disassembled) if(petrified_mob) petrified_mob.investigate_log("has been dusted by statue deconstruction.", INVESTIGATE_DEATHS) - if(iscarbon(petrified_mob)) + if(iscarbon(petrified_mob) && brain) var/mob/living/carbon/petrified_carbon = petrified_mob var/obj/item/organ/internal/brain/carbon_brain = petrified_carbon.get_organ_slot(ORGAN_SLOT_BRAIN) carbon_brain.Remove(petrified_carbon) @@ -87,10 +94,10 @@ /mob/proc/petrify(statue_timer) -/mob/living/carbon/human/petrify(statue_timer) +/mob/living/carbon/human/petrify(statue_timer, save_brain) if(!isturf(loc)) return FALSE - var/obj/structure/statue/petrified/S = new(loc, src, statue_timer) + var/obj/structure/statue/petrified/S = new(loc, src, statue_timer, save_brain) S.name = "statue of [name]" ADD_TRAIT(src, TRAIT_NOBLOOD, MAGIC_TRAIT) S.copy_overlays(src) diff --git a/code/modules/admin/smites/petrify.dm b/code/modules/admin/smites/petrify.dm new file mode 100644 index 00000000000..5380b93d732 --- /dev/null +++ b/code/modules/admin/smites/petrify.dm @@ -0,0 +1,12 @@ +/// Turn pur target to stone, forever +/datum/smite/petrify + name = "Petrify" + +/datum/smite/petrify/effect(client/user, mob/living/target) + . = ..() + + if(!ishuman(target)) + to_chat(user, span_warning("This must be used on a human subtype."), confidential = TRUE) + return + var/mob/living/carbon/human/human_target = target + human_target.petrify(statue_timer = INFINITY, save_brain = FALSE) diff --git a/code/modules/surgery/organs/internal/heart/_heart.dm b/code/modules/surgery/organs/internal/heart/_heart.dm index 1dfff58d887..77eb9c8d7ed 100644 --- a/code/modules/surgery/organs/internal/heart/_heart.dm +++ b/code/modules/surgery/organs/internal/heart/_heart.dm @@ -455,6 +455,9 @@ ///Is the crystal still being built? True by default, gets changed after a timer. var/being_built = TRUE +/obj/structure/ethereal_crystal/relaymove() + return + /obj/structure/ethereal_crystal/Initialize(mapload, obj/item/organ/internal/heart/ethereal/ethereal_heart) . = ..() if(!ethereal_heart) diff --git a/tgstation.dme b/tgstation.dme index bb0c7abebb1..7818ac672f8 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -2395,6 +2395,7 @@ #include "code\modules\admin\smites\knot_shoes.dm" #include "code\modules\admin\smites\lightning.dm" #include "code\modules\admin\smites\nugget.dm" +#include "code\modules\admin\smites\petrify.dm" #include "code\modules\admin\smites\phobia_ocky_icky.dm" #include "code\modules\admin\smites\puzzgrid.dm" #include "code\modules\admin\smites\puzzle.dm"