From d8e55e67cbc19073f8d11ec383f1065d1386d212 Mon Sep 17 00:00:00 2001 From: Incoming Date: Wed, 17 Jul 2013 15:07:38 -0400 Subject: [PATCH] *statues are now a subclass of lockers (stripped of most its procs) to fix some inheritance problems *statue sprites updated from "granite" to "marble" to fix some contrast problems *statues now get their Health from their target's current health, healthy humans and monkeys will have 200 health before shattering, corgis will have 120 health. Injured targets will make for easier to smash statues. *likewise when a mob is unstoned it will take any damage the statue took as brute damage. *Replaced godmode with a set of vars to assure the mob's health remains constant while a statue --- code/datums/spells/wizard.dm | 2 +- .../crates_lockers/closets/statue.dm | 154 ++++++++++++++++++ code/game/objects/structures/statue.dm | 113 ------------- icons/obj/statue.dmi | Bin 1262 -> 812 bytes tgstation.dme | 2 +- 5 files changed, 156 insertions(+), 115 deletions(-) create mode 100644 code/game/objects/structures/crates_lockers/closets/statue.dm delete mode 100644 code/game/objects/structures/statue.dm 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 2ad361b498c75538cfe21c6830d306006de770e0..d50c18e660ed28c0b568bc7204ad1522606c6857 100644 GIT binary patch delta 701 zcmV;u0z&=n39JT?BtJG#OjJd{z`(h|xclzroxrld)5-AZ;o#%i>gV3w;n?Tq-QVKb zu*<*q?Bw<9w3a42!;bLDsDY^|2I1zq}G0=Lm@P>pmC8ht?0N_0x5hIH|dStOf ze?Rfjv|#;d^$8FIT)?&Or#7&eZf5!tMJO_zNKi{+l{*1jG?Ehp?sd408|7 zc^3UA|AcyNp2ZG5o18rh)}?d%IRro;0}!|X)v2u$7(s8A7NS$v0YTT1qe};A0;F{p z`VW)Y8(@1 zG&)}eiYvt8F96c>v*j>=WOo}tP_np49%Y40!YjyfBUe j*ahYfhXdgE!F%`x87L8Ne|Va=00000NkvXXu0mjfe=khj delta 1155 zcmV-}1bq9f2JQ)vB!8ArOjJd{z`$o`XJ}|>X=!PJfq{U4fMH=_U|?Xz#>RJdcgM%a zL_|bIMMWeeBqJjudU|?xc6O+!sB?33Z*OmMa&o7qr*Uy{f`Wo{bac_t(OOzs($dm- zd3jh^SZ;1^ZEbCJb#+isP*qh`R#sMOYHC+kSAKqeW@ct%V<2OAcz6H+0DXOZe0+R} zh=_Z8du3&1iHV6^TwJVLQ}K~wT7Ne`FFUnTiHkEOv#1y-V93RpR+N~V3Sq;QWt8S7 z=EdhG=A;s-G%b}V#mV_a>6y4xDJ!`8xqy8I0AC>V7XX;0Dp_(PctHZ zlfRHkts-cx-|74^E4hkrqs?ZsF?y3(C#Bx24=V`p|Lf*&AY|5sl~&=C2Pmt}=BCO5 z6lCjdZ7H`51Xoo%w<3bDHot!W(9ShFPk?RhoF$Pb(75nq5C|Cn1Epk!gf_Ztn#Sm~ z2n>G}K1zK|%b-hbg5f*0KYzB5-V%vOW)j|bn)ps2uoSgASxqWML6bE=55%x^U2-xz!078Jlt)OSxs7i3EVz?e1=2pYC>*Spt0If*ky%ssWH&{dR-hZZyDwy(JCIb4#QSVRF()m9s969iXfIb9!n#ptMk@?nG@ zU%qaymw~t2Z`p|cScn<&&Q1{DPIQU-lqFV(B9Ur3?`-kp-zBHOne18{0tg67uv3q!+T1-=o z8Fq#+exF58qVL6;3LIE7xra6!Cq4%-^E``SL%*T|0f5@+VS1ce0f6&Fj1i%yeoY0& z)aFTsG)&Cy`FR)vi5VgED*)2g00`H(iCbG=9O`kLhZx4OJ9e