Files
GS13NG/code/modules/mob/living/carbon/human/dummy.dm
T
AnturKandCitadelStationBot 3f975a63b7 Dedicated equipment removal proc (#31411)
* Dedicated equipment removal proc

* department of redundancy department

* Whitespace makes me angry
2017-10-08 13:18:12 -05:00

44 lines
996 B
Plaintext

/mob/living/carbon/human/dummy
real_name = "Test Dummy"
status_flags = GODMODE|CANPUSH
var/in_use = FALSE
INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy)
/mob/living/carbon/human/dummy/Destroy()
in_use = FALSE
return ..()
/mob/living/carbon/human/dummy/Life()
return
/mob/living/carbon/human/dummy/proc/wipe_state()
delete_equipment()
cut_overlays(TRUE)
//Inefficient pooling/caching way.
GLOBAL_LIST_EMPTY(human_dummy_list)
/proc/generate_or_wait_for_human_dummy(slotkey)
if(!slotkey)
return new /mob/living/carbon/human/dummy
var/mob/living/carbon/human/dummy/D = GLOB.human_dummy_list[slotkey]
if(istype(D))
UNTIL(!D.in_use)
else
pass()
if(QDELETED(D))
D = new
GLOB.human_dummy_list[slotkey] = D
D.in_use = TRUE
return D
/proc/unset_busy_human_dummy(slotnumber)
if(!slotnumber)
return
var/mob/living/carbon/human/dummy/D = GLOB.human_dummy_list[slotnumber]
if(istype(D))
D.wipe_state()
D.in_use = FALSE