fix: only blackbox maintloot spawners (#26859)

This commit is contained in:
warriorstar-orion
2024-09-24 02:21:32 +00:00
committed by GitHub
parent d856d5c74b
commit 02f5a2452d
6 changed files with 15 additions and 2 deletions
@@ -33,6 +33,8 @@
var/spawn_random_offset_max_pixels = 16
/// Whether the spawned items should be rotated randomly.
var/spawn_random_angle = FALSE
/// Whether blackbox should record when the spawner spawns.
var/record_spawn = FALSE
// Brief explanation:
// Rather then setting up and then deleting spawners, we block all atomlike setup
@@ -96,7 +98,8 @@
loot_spawned++
/**
* Makes the actual item related to our spawner.
* Makes the actual item related to our spawner. If `record_spawn` is `TRUE`,
* this is when the items spawned are recorded to blackbox (except for `/obj/effect`s).
*
* spawn_loc - where are we spawning it?
* type_path_to_make - what are we spawning?
@@ -104,7 +107,8 @@
/obj/effect/spawner/random/proc/make_item(spawn_loc, type_path_to_make)
var/result = new type_path_to_make(spawn_loc)
record_item(type_path_to_make)
if(record_spawn)
record_item(type_path_to_make)
var/atom/item = result
if(spawn_random_angle && istype(item))