mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-29 13:46:52 +01:00
106 lines
2.8 KiB
Plaintext
106 lines
2.8 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
|
|
armor_type = /datum/armor/misc/weeping_angel
|
|
not_actually_a_closet = TRUE
|
|
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)
|
|
. = ..(mapload)
|
|
var/found = FALSE
|
|
if(L && (ishuman(L) || L.isMonkey() || iscorgi(L)))
|
|
if(L.buckled)
|
|
L.buckled = 0
|
|
L.anchored = 0
|
|
L.forceMove(src)
|
|
L.update_perspective()
|
|
L.sdisabilities |= SDISABILITY_MUTE
|
|
found = TRUE
|
|
integrity = 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(!found) //meaning if the statue didn't find a valid target
|
|
qdel(src)
|
|
return
|
|
|
|
START_PROCESSING(SSobj, src)
|
|
..()
|
|
|
|
/obj/structure/closet/statue/process(delta_time)
|
|
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(loc)
|
|
|
|
for(var/mob/living/M in src)
|
|
M.forceMove(loc)
|
|
M.update_perspective()
|
|
M.sdisabilities &= ~SDISABILITY_MUTE
|
|
M.take_overall_damage((M.health - integrity - 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/deconstructed(method)
|
|
for(var/mob/M in src)
|
|
shatter(M)
|
|
return ..()
|
|
|
|
/obj/structure/closet/statue/MouseDroppedOnLegacy()
|
|
return
|
|
|
|
/obj/structure/closet/statue/relaymove()
|
|
return
|
|
|
|
/obj/structure/closet/statue/attack_hand(mob/user, datum/event_args/actor/clickchain/e_args)
|
|
return
|
|
|
|
/obj/structure/closet/statue/verb_toggleopen()
|
|
return
|
|
|
|
/obj/structure/closet/statue/update_icon()
|
|
return
|
|
|
|
/obj/structure/closet/statue/proc/shatter(mob/user)
|
|
if (user)
|
|
user.dust()
|
|
visible_message("<span class='warning'>[user] shatters!.</span>")
|