49 lines
1.1 KiB
Plaintext
49 lines
1.1 KiB
Plaintext
|
|
/mob/living/carbon/human/dummy
|
|
real_name = "Test Dummy"
|
|
status_flags = GODMODE|CANPUSH
|
|
mouse_drag_pointer = MOUSE_INACTIVE_POINTER
|
|
var/in_use = FALSE
|
|
no_vore = TRUE
|
|
|
|
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()
|
|
icon_render_key = null
|
|
cut_overlays(TRUE)
|
|
|
|
//Inefficient pooling/caching way.
|
|
GLOBAL_LIST_EMPTY(human_dummy_list)
|
|
GLOBAL_LIST_EMPTY(dummy_mob_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
|
|
GLOB.dummy_mob_list += 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
|