]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
give trash a reusable entity table (#30921)
authorNemanja <98561806+EmoGarbage404@users.noreply.github.com>
Mon, 12 Aug 2024 02:07:39 +0000 (22:07 -0400)
committerGitHub <noreply@github.com>
Mon, 12 Aug 2024 02:07:39 +0000 (12:07 +1000)
Resources/Prototypes/Entities/Markers/Spawners/Random/trash.yml

index d19164e4fa20288bf089050cf89da6f4f63b8509..fb3d945b246d8121ff81e2e5a487f7ef562cbb2a 100644 (file)
@@ -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
         - 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