From 896bc8914aa5b275b0f973f8ff5feae3d5b75d0d Mon Sep 17 00:00:00 2001 From: spookerton Date: Sat, 15 Oct 2022 11:24:29 +0100 Subject: [PATCH] speculative fix for obj/random's not being deleted --- code/game/objects/random/_random.dm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/code/game/objects/random/_random.dm b/code/game/objects/random/_random.dm index 14ef5acd43..d6e073b620 100644 --- a/code/game/objects/random/_random.dm +++ b/code/game/objects/random/_random.dm @@ -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()