Files
VOREStation/code/game/objects/structures/crates_lockers/closets/statue.dm
T
Will 2194b87de0 Fixing client eye (#18577)
* signal foundation

* reset_perspective implemented

* you too

* setting mob

* no

* fix

* tweak

* remote view element

* these too

* use element

* cleanup more manual code

* fix element

* mutation signal

* handle being dropped from holders, and fix pai hud

* handle qdel

* it's a component now

* ugly holder fix

* another fix

* follow view target

* item remote view

* doc update

* unneeded

* this needs a recode to work better

* many fixes

* these are all unneeded

* almost working viewerlist remotes

* this uses component too

* this needs to die to it's item

* don't allow spamming tgui menus

* tg style args

* fixing behaviors

* fuk

* working view release from holders

* only final matters

* comment order and disposal fix

* cryotube loc fix

* no mob should reset its view every life tick

* major improvements

* still forbid z level change even if we allow moving

* this too

* don't doubledip

* qdel on self is unneeded

* wipe remote views on logout

* vore bellies need to manually clear views

* fixAI hud

* belly release fixes

* cannot use binoculars in a vore belly

* pai card can be picked up and dropped correctly

* ventcrawl fix and distracted fix

* this is better

* forcemove

* vr console fix

* use flag for this

* belly stuff

* various cleanups

* oops

* fixes statue spell

* unneeded perspective clear

* automatic instead

* continued cleanup

* that was dumb

* needed

* none of this works

* are these even needed

* lets lock down to these

* lets try to make this work

* extremely close to working

* needs to solve final pai issues

* mob eye change signal

* Revert "mob eye change signal"

This reverts commit eedd5da934.

* significant progress

* safety

* expected to be not null

* likely not needed

* don't spam component changes

* endview on logout

* accessors

* egg fixing

* Revert "egg fixing"

This reverts commit 6a54049c69.

* getting closer

* even closer

* needs type

* close...

* extremely close to working

* fixing pai stuff

* this too

* promising fixes

* docs

* this is recursive move's responsibility tbh

* unneeded now

* oops

* better decouple

* topmost check

* cleanup

* holder released from egg fix

* pai fix for reset view

* debug info

* some better pai ejection code

* better way

* unneeded

* needs to be null

* better vision restore

* use correct handling

* no longer needed

* required

* handle decouple on mecha too

* name clarity

* do not allow double dipping zoom items

* ethereal jaunt needs a full cleanup later

* fix blackscreen flicker

* remove set machine from pda

* Update code/game/objects/items.dm

* Update code/game/objects/items.dm

* Update code/game/objects/items.dm

* Update code/game/objects/items.dm

---------

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
2025-10-12 22:18:08 -04:00

128 lines
3.5 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, var/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
M.reset_perspective() // Fixes a blackscreen flicker
/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(var/obj/item/projectile/Proj)
health -= Proj.get_structure_damage()
check_health()
return
/obj/structure/closet/statue/attack_generic(var/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)