]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Move some miscellaneous random spawners to entity tables (#42245)
authorSnappingOpossum <snappingopossum@outlook.com>
Tue, 6 Jan 2026 00:14:02 +0000 (11:14 +1100)
committerGitHub <noreply@github.com>
Tue, 6 Jan 2026 00:14:02 +0000 (00:14 +0000)
* Move some miscellaneous RandomSpawners to entity tables

* Fix a parenting issue and some conventions

Resources/Prototypes/Catalog/Fills/Crates/permaescape.yml
Resources/Prototypes/Entities/Clothing/Uniforms/random_suit.yml
Resources/Prototypes/Entities/Markers/Spawners/Random/crates.yml
Resources/Prototypes/Entities/Mobs/NPCs/elemental.yml
Resources/Prototypes/Entities/Mobs/Player/silicon.yml
Resources/Prototypes/Entities/Objects/Materials/crystal_shard.yml

index 1516cb71c7de948dabe0e04f1849d7acb876ac48..6c80d93bbd2cbc653e2b84996792a4087e06de40 100644 (file)
@@ -3,33 +3,34 @@
   id: CratePermaEscapeSpawner
   name: Perma Escape Crate Spawner
   components:
-  - type: RandomSpawner
-    prototypes:
-    # Please note any duplicates & alphabetize <3
-      - ClosetMaintenanceFilledRandom # x3
-      - ClosetMaintenanceFilledRandom
-      - ClosetMaintenanceFilledRandom
-      - CrateEngineeringMiniJetpack
-      - CratePermaEscapeBureaucracy
-      - CratePermaEscapeComs # x2
-      - CratePermaEscapeComs
-      - CratePermaEscapeDigging # x2
-      - CratePermaEscapeDigging
-      - CratePermaEscapeEVA
-      - CratePermaEscapeGiftsFromSyndicate
-      - CratePermaEscapeGun
-      - CratePermaEscapeLights
-      - CratePermaEscapeMats #x2
-      - CratePermaEscapeMats
-      - CratePermaEscapeMerc
-      - CratePermaEscapeTowercap # x2
-      - CratePermaEscapeTowercap
-      - CrateTrashCartFilled
-      - CrateServiceCustomSmokable
-    rarePrototypes:
-      - MobTick # These need to be killable by one dude with a shovel.
-    rareChance: .30
-    chance: 1
+  - type: EntityTableSpawner
+    table: !type:GroupSelector
+      children:
+      - id: MobTick # These need to be killable by one dude with a shovel.
+        weight: 0.3
+      - !type:GroupSelector
+        weight: 0.7
+        children:
+        # Please alphabetize <3
+        - id: ClosetMaintenanceFilledRandom
+          weight: 3
+        - id: CrateEngineeringMiniJetpack
+        - id: CratePermaEscapeBureaucracy
+        - id: CratePermaEscapeComs
+          weight: 2
+        - id: CratePermaEscapeDigging
+          weight: 2
+        - id: CratePermaEscapeEVA
+        - id: CratePermaEscapeGiftsFromSyndicate
+        - id: CratePermaEscapeGun
+        - id: CratePermaEscapeLights
+        - id: CratePermaEscapeMats
+          weight: 2
+        - id: CratePermaEscapeMerc
+        - id: CratePermaEscapeTowercap
+          weight: 2
+        - id: CrateTrashCartFilled
+        - id: CrateServiceCustomSmokable
     offset: 0.0
 
 - type: entity
index 7d4dfc59905a2e142cb05289381d379a2cf5cca5..28a045ce6c4c288e92b26c1fa8aec297d7ca530e 100644 (file)
   id: ClothingRandomSpawner
   name: random colorful costume
   components:
-  - type: RandomSpawner
+  - type: EntityTableSpawner
+    table: !type:GroupSelector
+      children:
+      - id: ClothingUniformRandomArmless
+      - id: ClothingUniformRandomStandard
+      - id: ClothingUniformRandomBra
+      - id: ClothingUniformRandomShorts
+      - id: ClothingUniformRandomShirt
     offset: 0
-    prototypes:
-    - ClothingUniformRandomArmless
-    - ClothingUniformRandomStandard
-    - ClothingUniformRandomBra
-    - ClothingUniformRandomShorts
-    - ClothingUniformRandomShirt
 
 - type: entity
   parent: ClothingUniformRandom
index 31f15ffad0370b1c11bd6995b578b0a9f6f288ce..f8761987cd45ce4fbe6d0612bdd8203c728e6568 100644 (file)
@@ -1,27 +1,28 @@
 - type: entity
-  name: Empty Crate Spawner
-  id: CrateEmptySpawner
   parent: MarkerBase
+  id: CrateEmptySpawner
+  name: Empty Crate Spawner
   components:
   - type: Sprite
     layers:
     - state: red
     - sprite: Structures/Storage/Crates/generic.rsi
       state: icon
-  - type: RandomSpawner
-    prototypes:
-    - CrateGenericSteel
-    - CratePlastic
-    - CrateFreezer
-    - CrateHydroponics
-    - CrateMedical
-    - CrateRadiation
-    - CrateInternals
-    - CrateElectrical
-    - CrateEngineering
-    - CrateScience
-    - CrateSurgery
-    chance: 0.7
+  - type: EntityTableSpawner
+    table: !type:GroupSelector
+      prob: 0.7
+      children:
+      - id: CrateGenericSteel
+      - id: CratePlastic
+      - id: CrateFreezer
+      - id: CrateHydroponics
+      - id: CrateMedical
+      - id: CrateRadiation
+      - id: CrateInternals
+      - id: CrateElectrical
+      - id: CrateEngineering
+      - id: CrateScience
+      - id: CrateSurgery
     offset: 0.0
 
 - type: entityTable
index e9f0c4a8ef7807cb8417f92059ea05abb64c75ce..b3f7749246f1695e090a76f421c582ebb2930dad 100644 (file)
     solution: bloodstream
 
 - type: entity
-  name: Reagent Slime Spawner
-  id: ReagentSlimeSpawner
   parent: MarkerBase
+  id: ReagentSlimeSpawner
+  name: Reagent Slime Spawner
   components:
-    - type: Sprite
-      layers:
-        - state: red
-        - sprite: Mobs/Aliens/elemental.rsi
-          state: alive
-    - type: RandomSpawner
-      prototypes:
-        - ReagentSlime
-        - ReagentSlimeBeer
-        - ReagentSlimePax
-        - ReagentSlimeNocturine
-        - ReagentSlimeTHC
-        - ReagentSlimeBicaridine
-        - ReagentSlimeToxin
-        - ReagentSlimeNapalm
-        - ReagentSlimeOmnizine
-        - ReagentSlimeMuteToxin
-        - ReagentSlimeNorepinephricAcid
-        - ReagentSlimeEphedrine
-        - ReagentSlimeRobustHarvest
-      chance: 1
+  - type: Sprite
+    layers:
+      - state: red
+      - sprite: Mobs/Aliens/elemental.rsi
+        state: alive
+  - type: EntityTableSpawner
+    table: !type:GroupSelector
+      children:
+      - id: ReagentSlime
+      - id: ReagentSlimeBeer
+      - id: ReagentSlimePax
+      - id: ReagentSlimeNocturine
+      - id: ReagentSlimeTHC
+      - id: ReagentSlimeBicaridine
+      - id: ReagentSlimeToxin
+      - id: ReagentSlimeNapalm
+      - id: ReagentSlimeOmnizine
+      - id: ReagentSlimeMuteToxin
+      - id: ReagentSlimeNorepinephricAcid
+      - id: ReagentSlimeEphedrine
+      - id: ReagentSlimeRobustHarvest
 
 - type: entity
   id: ReagentSlimeBeer
index d9bc7c5829e13d147097eb544458022c02139a39..6041c4e9e9060cf95a4b2793d46eb1b61a5d7cac 100644 (file)
     - type: GhostTakeoverAvailable
 
 - type: entity
-  name: syndicate invasion borg spawner
-  id: PlayerBorgSyndicateInvasionGhostRoleSpawner
   parent: MarkerBase
+  id: PlayerBorgSyndicateInvasionGhostRoleSpawner
+  name: syndicate invasion borg spawner
   components:
   - type: Sprite
     layers:
       - state: red
       - sprite: Structures/Decoration/banner.rsi
         state: banner_syndicate
-  - type: RandomSpawner
-    prototypes:
-    - PlayerBorgSyndicateAssaultGhostRole
-    - PlayerBorgSyndicateAssaultGhostRole # Saboteurs are kinda like cyborg medics, we want less.
-    - PlayerBorgSyndicateSaboteurGhostRole
+  - type: EntityTableSpawner
+    table: !type:GroupSelector
+      children:
+      - id: PlayerBorgSyndicateAssaultGhostRole
+      - id: PlayerBorgSyndicateSaboteurGhostRole
+        weight: 0.5 # Saboteurs are kinda like cyborg medics, we want less.
 
 - type: entity
   parent: EngineeringBorgChassisDerelict
index f4c110817c770a504d27cc47c040c3aafeea626b..25d80eaee645490373c89246d4ad2066a2bc9bac 100644 (file)
   id: ShardCrystalRandom
   name: random crystal shard
   components:
-  - type: RandomSpawner
-    prototypes:
-      - ShardCrystalGreen
-      - ShardCrystalPink
-      - ShardCrystalYellow
-      - ShardCrystalBlack
-      - ShardCrystalOrange
-      - ShardCrystalBlue
-      - ShardCrystalCyan
-      - ShardCrystalRed
-    chance: 1
+  - type: EntityTableSpawner
+    table: !type:GroupSelector
+      children:
+      - id: ShardCrystalGreen
+      - id: ShardCrystalPink
+      - id: ShardCrystalYellow
+      - id: ShardCrystalBlack
+      - id: ShardCrystalOrange
+      - id: ShardCrystalBlue
+      - id: ShardCrystalCyan
+      - id: ShardCrystalRed