mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] fix ghost pods (#11562)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
cbcf691c83
commit
968556d96c
@@ -32,27 +32,26 @@
|
|||||||
/obj/structure/ghost_pod/proc/get_winner()
|
/obj/structure/ghost_pod/proc/get_winner()
|
||||||
SIGNAL_HANDLER
|
SIGNAL_HANDLER
|
||||||
busy = FALSE
|
busy = FALSE
|
||||||
var/deletion_candidate = FALSE
|
if(length(Q.candidates))
|
||||||
if(Q && Q.candidates.len) //Q should NEVER get deleted but...whatever, sanity.
|
|
||||||
var/mob/observer/dead/D = Q.candidates[1]
|
var/mob/observer/dead/D = Q.candidates[1]
|
||||||
|
UnregisterSignal(Q, COMSIG_GHOST_QUERY_COMPLETE)
|
||||||
|
QDEL_NULL(Q) //get rid of the query
|
||||||
create_occupant(D)
|
create_occupant(D)
|
||||||
icon_state = icon_state_opened
|
return
|
||||||
if(needscharger)
|
|
||||||
new /obj/machinery/recharge_station/ghost_pod_recharger(src.loc)
|
if(delay_to_try_again)
|
||||||
deletion_candidate = TRUE
|
addtimer(CALLBACK(src, PROC_REF(trigger)), delay_to_try_again)
|
||||||
else
|
|
||||||
if(delay_to_try_again)
|
|
||||||
addtimer(CALLBACK(src, PROC_REF(trigger)), delay_to_try_again)
|
|
||||||
UnregisterSignal(Q, COMSIG_GHOST_QUERY_COMPLETE)
|
UnregisterSignal(Q, COMSIG_GHOST_QUERY_COMPLETE)
|
||||||
QDEL_NULL(Q) //get rid of the query
|
QDEL_NULL(Q) //get rid of the query
|
||||||
if(deletion_candidate)
|
|
||||||
qdel(src)
|
|
||||||
|
|
||||||
// Override this to create whatever mob you need. Be sure to call ..() if you don't want it to make infinite mobs.
|
// Override this to create whatever mob you need. Be sure to call ..() if you don't want it to make infinite mobs.
|
||||||
/obj/structure/ghost_pod/proc/create_occupant(var/mob/M)
|
/obj/structure/ghost_pod/proc/create_occupant(var/mob/M)
|
||||||
used = TRUE
|
used = TRUE
|
||||||
|
icon_state = icon_state_opened
|
||||||
GLOB.active_ghost_pods -= src
|
GLOB.active_ghost_pods -= src
|
||||||
return TRUE
|
if(needscharger)
|
||||||
|
new /obj/machinery/recharge_station/ghost_pod_recharger(src.loc)
|
||||||
|
qdel(src)
|
||||||
|
|
||||||
|
|
||||||
// This type is triggered manually by a player discovering the pod and deciding to open it.
|
// This type is triggered manually by a player discovering the pod and deciding to open it.
|
||||||
|
|||||||
Reference in New Issue
Block a user