From a0a1421da4c94e046a1a2f66b688240596227849 Mon Sep 17 00:00:00 2001 From: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> Date: Sun, 11 Aug 2024 22:07:39 -0400 Subject: [PATCH] give trash a reusable entity table (#30921) --- .../Markers/Spawners/Random/trash.yml | 63 +++++++++++-------- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/Resources/Prototypes/Entities/Markers/Spawners/Random/trash.yml b/Resources/Prototypes/Entities/Markers/Spawners/Random/trash.yml index d19164e4fa..fb3d945b24 100644 --- a/Resources/Prototypes/Entities/Markers/Spawners/Random/trash.yml +++ b/Resources/Prototypes/Entities/Markers/Spawners/Random/trash.yml @@ -1,3 +1,31 @@ +- type: entityTable + id: GenericTrashItems + table: !type:GroupSelector + children: + - !type:GroupSelector + weight: 95 + children: + - id: FoodPacketBoritosTrash + - id: FoodPacketCheesieTrash + - id: FoodPacketChipsTrash + - id: FoodPacketChocolateTrash + - id: FoodPacketChowMeinTrash + - id: FoodPacketCnDsTrash + - id: FoodPacketDanDanTrash + - id: FoodPacketPistachioTrash + - id: FoodPacketEnergyTrash + - id: FoodPacketPopcornTrash + - id: FoodPacketRaisinsTrash + - id: FoodPacketSemkiTrash + - id: FoodPacketSusTrash + - id: FoodPacketSyndiTrash + - id: BrokenBottle + - !type:GroupSelector + weight: 5 + children: + - id: FoodPlateSmallTrash + - id: FoodBowlBigTrash + - type: entity name: Trash Spawner id: RandomSpawner @@ -9,32 +37,11 @@ - state: red - sprite: Objects/Consumable/Food/snacks.rsi state: pistachio-trash - - type: RandomSpawner - rarePrototypes: - - PuddleVomit - - FoodPlateSmallTrash - - FoodBowlBigTrash - rareChance: 0.03 - prototypes: -# - TrashCandy - - FoodPacketBoritosTrash - - FoodPacketCheesieTrash - - FoodPacketChipsTrash - - FoodPacketChocolateTrash - - FoodPacketChowMeinTrash - - FoodPacketCnDsTrash - - FoodPacketDanDanTrash - - FoodPacketEnergyTrash - - FoodPacketPistachioTrash -# - TrashPlasticBag - - FoodPacketPopcornTrash - - FoodPacketRaisinsTrash - - FoodPacketSemkiTrash - - FoodPacketSusTrash - - FoodPacketSyndiTrash - - BrokenBottle - chance: 0.5 + - type: EntityTableSpawner offset: 0.2 + table: !type:NestedSelector + tableId: GenericTrashItems + prob: 0.5 placement: mode: AlignTileAny @@ -45,5 +52,7 @@ placement: mode: AlignTileAny components: - - type: RandomSpawner - chance: 1 + - type: EntityTableSpawner + offset: 0.2 + table: !type:NestedSelector + tableId: GenericTrashItems -- 2.52.0