speculative fix for obj/random's not being deleted

This commit is contained in:
spookerton
2022-10-15 11:24:29 +01:00
parent a0f9c2b78b
commit 896bc8914a

View File

@@ -7,12 +7,14 @@
var/drop_get_turf = TRUE
var/start_anomalous = FALSE
// creates a new object and deletes itself
/obj/random/Initialize()
. = INITIALIZE_HINT_QDEL
..()
if(!prob(spawn_nothing_percentage))
try_spawn_item()
return INITIALIZE_HINT_QDEL
if (prob(spawn_nothing_percentage))
return
try_spawn_item()
/obj/random/proc/try_spawn_item()
var/atom/result = spawn_item()