mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 03:25:49 +01:00
fix: only blackbox maintloot spawners (#26859)
This commit is contained in:
committed by
GitHub
parent
d856d5c74b
commit
02f5a2452d
@@ -1,6 +1,7 @@
|
||||
/obj/effect/spawner/random/engineering
|
||||
icon = 'icons/effects/random_spawners.dmi'
|
||||
icon_state = "wrench"
|
||||
record_spawn = TRUE
|
||||
|
||||
/obj/effect/spawner/random/engineering/tools
|
||||
name = "Tool spawner"
|
||||
|
||||
@@ -18,3 +18,4 @@
|
||||
|
||||
/obj/item/food/stroopwafel = 1,
|
||||
)
|
||||
record_spawn = TRUE
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
name = "Maintenance loot spawner"
|
||||
spawn_loot_chance = 65
|
||||
spawn_random_offset_max_pixels = 8
|
||||
record_spawn = TRUE
|
||||
|
||||
/obj/effect/spawner/random/maintenance/Initialize(mapload)
|
||||
loot = GLOB.maintenance_loot_tables
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
/obj/item/dice/d10,
|
||||
/obj/item/dice/d12,
|
||||
)
|
||||
record_spawn = TRUE
|
||||
|
||||
/obj/effect/spawner/random/dice/Initialize()
|
||||
. = ..()
|
||||
@@ -28,6 +29,7 @@
|
||||
/obj/item/folder/yellow,
|
||||
/obj/item/clipboard,
|
||||
)
|
||||
record_spawn = TRUE
|
||||
|
||||
/obj/effect/spawner/random/book
|
||||
icon = 'icons/effects/random_spawners.dmi'
|
||||
@@ -67,6 +69,7 @@
|
||||
/obj/item/book/manual/wiki/sop_supply,
|
||||
/obj/item/book/manual/zombie_manual,
|
||||
)
|
||||
record_spawn = TRUE
|
||||
|
||||
/obj/effect/spawner/random/book/record_item(type_path_to_make)
|
||||
SSblackbox.record_feedback("tally", "random_spawners", 1, "[/obj/item/book]")
|
||||
@@ -78,6 +81,7 @@
|
||||
/obj/item/mod/module/balloon = 1,
|
||||
/obj/item/mod/module/stamp = 1
|
||||
)
|
||||
record_spawn = TRUE
|
||||
|
||||
/obj/effect/spawner/random/janitor/supplies
|
||||
icon = 'icons/effects/random_spawners.dmi'
|
||||
@@ -89,4 +93,5 @@
|
||||
/obj/item/storage/box/lights/mixed,
|
||||
/obj/item/storage/box/lights/bulbs,
|
||||
)
|
||||
record_spawn = TRUE
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
)
|
||||
|
||||
spawn_random_angle = TRUE
|
||||
record_spawn = TRUE
|
||||
|
||||
/obj/effect/spawner/random/food_trash/record_item(type_path_to_make)
|
||||
SSblackbox.record_feedback("tally", "random_spawners", 1, "[/obj/item/trash]")
|
||||
|
||||
Reference in New Issue
Block a user