mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
[MIRROR] Adds loot blacklist, creates a maintenance spawner with decals blacklisted (#26613)
* Adds loot blacklist, creates a maintenance spawner with decals blacklisted (#81611) * Adds loot blacklist, creates a maintenance spawner with decals blacklisted --------- Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
This commit is contained in:
@@ -4,6 +4,13 @@
|
||||
icon_state = "loot"
|
||||
// see code/_globalvars/lists/maintenance_loot.dm for loot table
|
||||
|
||||
/// A subtype of maintenance loot spawner that does not spawn any decals, for when you want to place them on chasm turfs and such
|
||||
/// decals such as ashes will cause NeverShouldHaveComeHere() to fail on such turfs, which creates annoying rng based CI failures
|
||||
/obj/effect/spawner/random/maintenance/no_decals
|
||||
|
||||
/obj/effect/spawner/random/maintenance/no_decals/can_spawn(atom/loot)
|
||||
return !istype(loot, /obj/effect/decal)
|
||||
|
||||
/obj/effect/spawner/random/maintenance/examine(mob/user)
|
||||
. = ..()
|
||||
. += span_info("This spawner has an effective loot count of [get_effective_lootcount()].")
|
||||
@@ -64,3 +71,31 @@
|
||||
/obj/effect/spawner/random/maintenance/eight
|
||||
name = "8 x maintenance loot spawner"
|
||||
spawn_loot_count = 8
|
||||
|
||||
/obj/effect/spawner/random/maintenance/no_decals/two
|
||||
name = "2 x maintenance loot spawner"
|
||||
spawn_loot_count = 2
|
||||
|
||||
/obj/effect/spawner/random/maintenance/no_decals/three
|
||||
name = "3 x maintenance loot spawner"
|
||||
spawn_loot_count = 3
|
||||
|
||||
/obj/effect/spawner/random/maintenance/no_decals/four
|
||||
name = "4 x maintenance loot spawner"
|
||||
spawn_loot_count = 4
|
||||
|
||||
/obj/effect/spawner/random/maintenance/no_decals/five
|
||||
name = "5 x maintenance loot spawner"
|
||||
spawn_loot_count = 5
|
||||
|
||||
/obj/effect/spawner/random/maintenance/no_decals/six
|
||||
name = "6 x maintenance loot spawner"
|
||||
spawn_loot_count = 6
|
||||
|
||||
/obj/effect/spawner/random/maintenance/no_decals/seven
|
||||
name = "7 x maintenance loot spawner"
|
||||
spawn_loot_count = 7
|
||||
|
||||
/obj/effect/spawner/random/maintenance/no_decals/eight
|
||||
name = "8 x maintenance loot spawner"
|
||||
spawn_loot_count = 8
|
||||
|
||||
@@ -57,6 +57,9 @@
|
||||
var/pixel_divider = FLOOR(16 / spawn_loot_split_pixel_offsets, 1) // 16 pixels offsets is max that should be allowed in any direction
|
||||
while((spawn_loot_count-loot_spawned) && loot.len)
|
||||
var/lootspawn = pick_weight_recursive(loot)
|
||||
if(!can_spawn(lootspawn))
|
||||
loot.Remove(lootspawn)
|
||||
continue
|
||||
if(!spawn_loot_double)
|
||||
loot.Remove(lootspawn)
|
||||
if(lootspawn && (spawn_scatter_radius == 0 || spawn_locations.len))
|
||||
|
||||
Reference in New Issue
Block a user