mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-12 15:47:04 +01:00
b324bd75cc
* lets get the foundations right * collapsing * more cleanup * coordinator * more cleanup * put those in a better place * awa * these live in config now * that too * cleanup * changed over * cleanup * more cleanup * oop * Cleanup * deargod * sanity achieved * cleanup stuff * cleared duplicated hud code * documenting * clarify --------- Co-authored-by: Cameron Lennox <killer65311@gmail.com>
127 lines
3.4 KiB
Plaintext
127 lines
3.4 KiB
Plaintext
/obj/structure/closet/statue
|
|
name = "statue"
|
|
desc = "An incredibly lifelike marble carving"
|
|
icon = 'icons/obj/statue.dmi'
|
|
icon_state = "human_male"
|
|
density = TRUE
|
|
anchored = TRUE
|
|
health = 0 //destroying the statue kills the mob within
|
|
blocks_emissive = EMISSIVE_BLOCK_UNIQUE
|
|
closet_appearance = null
|
|
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/Initialize(mapload, mob/living/L)
|
|
. = ..()
|
|
if(L && (ishuman(L) || L.isMonkey() || iscorgi(L)))
|
|
if(L.buckled)
|
|
L.buckled = 0
|
|
L.anchored = FALSE
|
|
L.forceMove(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(L.isMonkey())
|
|
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..."
|
|
|
|
if(health == 0) //meaning if the statue didn't find a valid target
|
|
return INITIALIZE_HINT_QDEL
|
|
|
|
START_PROCESSING(SSobj, src)
|
|
|
|
/obj/structure/closet/statue/process()
|
|
timer--
|
|
for(var/mob/living/M in src) //Go-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()
|
|
STOP_PROCESSING(SSobj, src)
|
|
qdel(src)
|
|
|
|
/obj/structure/closet/statue/dump_contents()
|
|
|
|
for(var/obj/O in src)
|
|
O.forceMove(get_turf(src))
|
|
|
|
for(var/mob/living/M in src)
|
|
M.forceMove(loc) // Might be in a belly
|
|
M.sdisabilities &= ~MUTE
|
|
M.take_overall_damage((M.health - health - 100),0) //any new damage the statue incurred is transfered to the mob
|
|
|
|
/obj/structure/closet/statue/open()
|
|
return
|
|
|
|
/obj/structure/closet/statue/close()
|
|
return
|
|
|
|
/obj/structure/closet/statue/toggle()
|
|
return
|
|
|
|
/obj/structure/closet/statue/proc/check_health()
|
|
if(health <= 0)
|
|
for(var/mob/M in src)
|
|
shatter(M)
|
|
|
|
/obj/structure/closet/statue/bullet_act(obj/item/projectile/Proj)
|
|
health -= Proj.get_structure_damage()
|
|
check_health()
|
|
|
|
return
|
|
|
|
/obj/structure/closet/statue/attack_generic(mob/user, damage, attacktext, environment_smash)
|
|
if(damage && environment_smash)
|
|
for(var/mob/M in src)
|
|
shatter(M)
|
|
|
|
/obj/structure/closet/statue/ex_act(severity)
|
|
for(var/mob/M in src)
|
|
M.ex_act(severity)
|
|
health -= 60 / severity
|
|
check_health()
|
|
|
|
/obj/structure/closet/statue/attackby(obj/item/I as obj, mob/user as mob)
|
|
health -= I.force
|
|
user.do_attack_animation(src)
|
|
visible_message(span_danger("[user] strikes [src] with [I]."))
|
|
check_health()
|
|
|
|
/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(span_warning("[src] shatters!."))
|
|
qdel(src)
|