mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
Merge pull request #5152 from CHOMPStation2/upstream-merge-13924
[MIRROR] [MIRROR] speculative fix for obj/random's not being deleted
This commit is contained in:
@@ -6,12 +6,14 @@
|
|||||||
var/spawn_nothing_percentage = 0 // this variable determines the likelyhood that this random object will not spawn anything
|
var/spawn_nothing_percentage = 0 // this variable determines the likelyhood that this random object will not spawn anything
|
||||||
var/drop_get_turf = TRUE
|
var/drop_get_turf = TRUE
|
||||||
|
|
||||||
// creates a new object and deletes itself
|
|
||||||
/obj/random/Initialize()
|
/obj/random/Initialize()
|
||||||
|
. = INITIALIZE_HINT_QDEL
|
||||||
..()
|
..()
|
||||||
if(!prob(spawn_nothing_percentage))
|
if (prob(spawn_nothing_percentage))
|
||||||
try_spawn_item()
|
return
|
||||||
return INITIALIZE_HINT_QDEL
|
try_spawn_item()
|
||||||
|
|
||||||
|
|
||||||
/obj/random/proc/try_spawn_item()
|
/obj/random/proc/try_spawn_item()
|
||||||
var/atom/result = spawn_item()
|
var/atom/result = spawn_item()
|
||||||
|
|||||||
Reference in New Issue
Block a user