diff --git a/code/datums/spells/wizard.dm b/code/datums/spells/wizard.dm index dbb8139953e..b2f466abb4e 100644 --- a/code/datums/spells/wizard.dm +++ b/code/datums/spells/wizard.dm @@ -212,7 +212,7 @@ invocation_type = "shout" amt_stunned = 2//just exists to make sure the statue "catches" them - summon_type = "/obj/structure/statue" + summon_type = "/obj/structure/closet/statue" /obj/effect/proc_holder/spell/dumbfire/fireball name = "Fireball" diff --git a/code/game/objects/structures/crates_lockers/closets/statue.dm b/code/game/objects/structures/crates_lockers/closets/statue.dm new file mode 100644 index 00000000000..647a47d479d --- /dev/null +++ b/code/game/objects/structures/crates_lockers/closets/statue.dm @@ -0,0 +1,154 @@ +/obj/structure/closet/statue + name = "statue" + desc = "An incredibly lifelike marble carving" + icon = 'icons/obj/statue.dmi' + icon_state = "human_male" + density = 1 + anchored = 1 + flags = FPRINT + health = 200 //destroying the statue kills the mob within + var/intialTox = 0 //these are here to keep the mob from taking damage from things that logically wouldn't affect a rock + var/intialFire = 0 //it's a little sloppy I know but it was this or the GODMODE flag. Lesser of two evils. + var/intialBrute = 0 + var/intialOxy = 0 + var/timer = 240 //eventually the person will be freed + +/obj/structure/closet/statue/New() + + for(var/atom/movable/AM in src.loc) + if(istype(AM, /mob/living)) + var/mob/living/L = AM + if((ishuman(L) || ismonkey(L) || iscorgi(L)) && (!L.mind || L.mind.special_role != "Wizard")) + if(L.buckled) + L.buckled = 0 + if(L.client) + L.client.perspective = EYE_PERSPECTIVE + L.client.eye = src + AM.loc = src + L.sdisabilities += MUTE + health = L.health + 100 //stoning damaged mobs will result in easier to shatter statues + intialTox = L.getToxLoss() + intialFire = L.getFireLoss() + intialBrute = L.getBruteLoss() + intialOxy = L.getOxyLoss() + if(ishuman(L)) + name = "statue of [L.name]" + if(L.gender == "female") + icon_state = "human_female" + else if(ismonkey(L)) + name = "statue of a monkey" + icon_state = "monkey" + else if(iscorgi(L)) + name = "statue of a corgi" + icon_state = "corgi" + desc = "If it takes forever, I will wait for you..." + break + else + del(src) + + processing_objects.Add(src) + ..() + +/obj/structure/closet/statue/process() + timer-- + for(var/mob/living/M in src) //Gp-go gadget stasis field + M.setToxLoss(intialTox) + M.adjustFireLoss(intialFire - M.getFireLoss()) + M.adjustBruteLoss(intialBrute - M.getBruteLoss()) + M.setOxyLoss(intialOxy) + if (timer <= 0) + dump_contents() + processing_objects.Remove(src) + del(src) + +/obj/structure/closet/statue/dump_contents() + + for(var/obj/O in src) + O.loc = src.loc + + for(var/mob/living/M in src) + M.loc = get_turf(src) //src.loc not used to avoid an edge case where the mob was recursively stored + M.sdisabilities -= MUTE + M.take_overall_damage((M.health - health - 100),0) //any new the statue incurred is transfered to the mob + if(M.client) + M.client.eye = M.client.mob + M.client.perspective = MOB_PERSPECTIVE + for(var/mob/living/simple_animal/hostile/mimic/copy/C in M.loc) //destroy animated statue if there is one + C.health = 0 + +/obj/structure/closet/statue/take_contents() + return + +/obj/structure/closet/statue/open() + return + +/obj/structure/closet/statue/take_contents() + return + +/obj/structure/closet/statue/open() + return + +/obj/structure/closet/statue/insert() + return + +/obj/structure/closet/statue/close() + return + +/obj/structure/closet/statue/toggle() + return + +/obj/structure/closet/statue/bullet_act(var/obj/item/projectile/Proj) + health -= Proj.damage + if(health <= 0) + for(var/mob/M in src) + shatter(M) + + return + +/obj/structure/closet/statue/attack_animal(mob/living/simple_animal/user as mob) + if(user.wall_smash) + for(var/mob/M in src) + shatter(M) + +/obj/structure/closet/statue/blob_act() + for(var/mob/M in src) + shatter(M) + +/obj/structure/closet/statue/meteorhit(obj/O as obj) + if(O.icon_state == "flaming") + for(var/mob/M in src) + M.meteorhit(O) + shatter(M) + +/obj/structure/closet/statue/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W, /obj/item/weapon/)) + health -= W.force + visible_message("\red [user] strikes [src] with [W].") + if(health <= 0) + for(var/mob/M in src) + shatter(M) + +/obj/structure/closet/statue/place() + return + +/obj/structure/closet/statue/MouseDrop_T() + return + +/obj/structure/closet/statue/relaymove() + return + +/obj/structure/closet/statue/attack_hand() + return + +/obj/structure/closet/statue/verb_toggleopen() + return + +/obj/structure/closet/statue/update_icon() + return + +/obj/structure/closet/statue/proc/shatter(mob/user as mob) + if (user) + user.dust() + dump_contents() + visible_message("\red [src] shatters!. ") + del(src) \ No newline at end of file diff --git a/code/game/objects/structures/statue.dm b/code/game/objects/structures/statue.dm deleted file mode 100644 index ae9d2749d38..00000000000 --- a/code/game/objects/structures/statue.dm +++ /dev/null @@ -1,113 +0,0 @@ -/obj/structure/statue - name = "statue" - desc = "An incredibly lifelike granite carving" - icon = 'icons/obj/statue.dmi' - icon_state = "human_male" - density = 1 - anchored = 1 - flags = FPRINT - var/health = 200 //destroying the statue kills the person within - var/timer = 240 //eventually the person will be freed - -/obj/structure/statue/New() - - for(var/atom/movable/AM in src.loc) - if(istype(AM, /mob/living)) - var/mob/living/L = AM - if((ishuman(L) || ismonkey(L) || iscorgi(L)) && (!L.mind || L.mind.special_role != "Wizard")) - if(L.buckled) - L.buckled = 0 - if(L.client) - L.client.perspective = EYE_PERSPECTIVE - L.client.eye = src - AM.loc = src - L.sdisabilities += MUTE - L.status_flags += GODMODE - if(ishuman(L)) - name = "statue of [L.name]" - if(L.gender == "female") - icon_state = "human_female" - else if(ismonkey(L)) - name = "statue of a monkey" - icon_state = "monkey" - else if(iscorgi(L)) - name = "statue of a corgi" - icon_state = "corgi" - desc = "If it takes forever, I will wait for you..." - break - else - del(src) - - processing_objects.Add(src) - ..() - -/obj/structure/statue/process() - timer-- - if (timer <= 0) - dump_contents() - processing_objects.Remove(src) - del(src) - -/obj/structure/statue/alter_health() - return get_turf(src) - -/obj/structure/statue/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) - if(air_group || height==0) return 1 - return (!density) - -/obj/structure/statue/proc/dump_contents() - - for(var/obj/O in src) - O.loc = src.loc - - for(var/mob/M in src) - M.loc = get_turf(src) //src.loc not used to avoid an edge case where the mob was recursively stored - M.sdisabilities -= MUTE - M.status_flags -= GODMODE - if(M.client) - M.client.eye = M.client.mob - M.client.perspective = MOB_PERSPECTIVE - for(var/mob/living/simple_animal/hostile/mimic/copy/C in M.loc) //destroy animated statue if there is one - C.health = 0 - visible_message("\blue [M.name] returns to flesh and blood!.") - - -/obj/structure/statue/bullet_act(var/obj/item/projectile/Proj) - health -= Proj.damage - ..() - if(health <= 0) - for(var/mob/M in src) - shatter(M) - - return - -/obj/structure/statue/attack_animal(mob/living/simple_animal/user as mob) - if(user.wall_smash) - for(var/mob/M in src) - shatter(M) - -/obj/structure/statue/blob_act() - for(var/mob/M in src) - shatter(M) - -/obj/structure/statue/meteorhit(obj/O as obj) - if(O.icon_state == "flaming") - for(var/mob/M in src) - M.meteorhit(O) - shatter(M) - -/obj/structure/statue/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/)) - health -= W.force - visible_message("\red [user] strikes [src] with [W].") - if(health <= 0) - for(var/mob/M in src) - shatter(M) - -/obj/structure/statue/proc/shatter(mob/user as mob) - if (user) - user.status_flags -= GODMODE - user.dust() - dump_contents() - visible_message("\red [src] shatters!. ") - del(src) \ No newline at end of file diff --git a/icons/obj/statue.dmi b/icons/obj/statue.dmi index 2ad361b498c..d50c18e660e 100644 Binary files a/icons/obj/statue.dmi and b/icons/obj/statue.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 82921f3a17f..dba71dec66a 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -594,7 +594,6 @@ #include "code\game\objects\structures\OpTable.dm" #include "code\game\objects\structures\safe.dm" #include "code\game\objects\structures\signs.dm" -#include "code\game\objects\structures\statue.dm" #include "code\game\objects\structures\tables_racks.dm" #include "code\game\objects\structures\tank_dispenser.dm" #include "code\game\objects\structures\target_stake.dm" @@ -614,6 +613,7 @@ #include "code\game\objects\structures\crates_lockers\closets\job_closets.dm" #include "code\game\objects\structures\crates_lockers\closets\l3closet.dm" #include "code\game\objects\structures\crates_lockers\closets\malfunction.dm" +#include "code\game\objects\structures\crates_lockers\closets\statue.dm" #include "code\game\objects\structures\crates_lockers\closets\syndicate.dm" #include "code\game\objects\structures\crates_lockers\closets\utility_closets.dm" #include "code\game\objects\structures\crates_lockers\closets\wardrobe.dm"