]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Soap, Banana peel, and Slip entity tables (#41783)
authorāda <ss.adasts@gmail.com>
Thu, 11 Dec 2025 00:17:03 +0000 (18:17 -0600)
committerGitHub <noreply@github.com>
Thu, 11 Dec 2025 00:17:03 +0000 (00:17 +0000)
* commit

* self review

* self review 2

* buff

* nerf

* microbalance continues until i'm happy

* requested and more

---------

Co-authored-by: iaada <iaada@users.noreply.github.com>
Resources/Prototypes/Catalog/Fills/Crates/cargo.yml
Resources/Prototypes/Catalog/Fills/Crates/service.yml
Resources/Prototypes/Catalog/Fills/Items/belt.yml
Resources/Prototypes/Entities/Markers/Spawners/Random/maintenance.yml
Resources/Prototypes/Entities/Markers/Spawners/Random/soap.yml
Resources/Prototypes/Entities/Markers/Spawners/Random/trash.yml
Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml
Resources/Prototypes/Entities/Objects/Specific/Janitorial/soap.yml
Resources/Prototypes/Entities/Objects/Tools/lighters.yml
Resources/Prototypes/Entities/Objects/Weapons/Bombs/funny.yml

index 0cef9777ef5fa695453cdbdda72e3719c6f3b935..b3f0325529f487d6cd7d58e514166e66f8a68bdc 100644 (file)
   id: LotteryJunkEntityTable
   table: !type:GroupSelector
     children:
+    - !type:NestedSelector
+      tableId: AllBananaPeelsTable
+      weight: 4
     - id: CigaretteSpent
     - id: FoodBowlBigTrash
     - id: FoodFrozenPopsicleTrash
     - id: FoodCornTrash
-    - id: TrashBananaPeel
-    - id: TrashBananaPeelExplosive
-      weight: 0.01
     - id: FoodTinBeansTrash
-    - id: TrashBakedBananaPeel
-    - id: TrashMimanaPeel
-    - id: TrashBananiumPeel
 
 - type: entityTable
   id: LotteryCanistersEntityTable
index e2547dbda0b0b25f9b3333525abcbc4c94aa0a9c..961f09bcd2345413a37ea1a43da3b6c6e1d4680e 100644 (file)
@@ -8,13 +8,14 @@
     containers:
       entity_storage: !type:AllSelector
         children:
+        - !type:NestedSelector
+          tableId: AllSoapsTable
         - id: MopItem
         - id: MopBucketCubeWrapped
         - id: Bucket
           amount: 3
         - id: WetFloorSign
           amount: 2
-        - id: Soap
         - id: SprayBottleSpaceCleaner
           amount: 2
         - id: TrashBag
index f9ef85554b5e27bc7a57b861eed1cfd791a4c04d..1a06d09f3a6a6c6c73ad8e843ed8109a1d548148 100644 (file)
@@ -86,7 +86,8 @@
     containers:
       storagebase: !type:AllSelector
         children:
-        - id: Soap #Make a soap group and pick between when i'm not lazy
+        - !type:NestedSelector
+          tableId: AllSoapsTable
         - id: SprayBottleSpaceCleaner
         - id: CleanerGrenade
           amount: 2
index 1e2a3eafa4cc75b51bfdd398ae3e5aeccf30b7c8..09378f25cd0ea32dd71f2483e6e7ab4afd34a3da 100644 (file)
       - id: Plunger
       - id: PowerCellMedium
       - id: PowerCellSmall
-      - id: Soap
+      - !type:NestedSelector
+        tableId: AllSoapsTable
       - id: Wirecutter
       - id: Screwdriver
       - id: Wrench
index d3283522b2167f23bb271a3f0d1b0b7d0060f97b..1f4f4b4abab3adf2b359f0d70762ba1c9368eaab 100644 (file)
@@ -1,21 +1,61 @@
+- type: entityTable # max size 1x2 (for now)
+  id: SlipTable
+  table: !type:GroupSelector
+    children:
+    - !type:NestedSelector
+      tableId: AllBananaPeelsTable
+    - !type:NestedSelector
+      tableId: AllSoapsTable
+    - !type:GroupSelector # Other
+      weight: 0.02 # 1 in 100
+      children:
+      - id: FoodButter
+      - id: FoodCannabisButter
+        weight: 0.5
+      - id: BananaPhoneInstrument
+        weight: 0.2
+
+- type: entityTable # max size 1x2
+  id: AllSoapsTable
+  table: !type:GroupSelector
+    children:
+    - id: SoapNT
+      weight: 2
+    - id: Soap
+    - id: SoapHomemade
+    - id: SoapDeluxe
+    - !type:GroupSelector # Rare soaps
+      weight: 0.02 # 1 in 250
+      children:
+      - id: SoapSyndie
+      - id: SlipocalypseClusterSoap
+      - id: SoapOmega
+
 - type: entity
+  parent: MarkerBase
+  id: RandomSlip100
+  name: random slip spawner
+  components:
+  - type: Sprite
+    layers:
+    - state: red
+    - sprite: Objects/Specific/Hydroponics/banana.rsi
+      state: peel
+  - type: EntityTableSpawner
+    table: !type:NestedSelector
+      tableId: SlipTable
+
+- type: entity
+  parent: MarkerBase
   id: RandomSoap
   name: random soap spawner
-  parent: MarkerBase
   components:
   - type: Sprite
     layers:
       - state: red
       - sprite: Objects/Specific/Janitorial/soap.rsi
         state: soap-4
-  - type: RandomSpawner
-    prototypes:
-      - Soap
-      - SoapHomemade
-      - SoapNT
-      - SoapDeluxe
-    chance: 0.95
-    rarePrototypes:
-      - SoapSyndie
-      - SoapOmega
-    rareChance: 0.05
+  - type: EntityTableSpawner
+    table: !type:NestedSelector
+      tableId: AllSoapsTable
+
index fb3d945b246d8121ff81e2e5a487f7ef562cbb2a..5ae54c40e4853677db3b007c0cce07af3bffb920 100644 (file)
@@ -3,7 +3,7 @@
   table: !type:GroupSelector
     children:
     - !type:GroupSelector
-      weight: 95
+      weight: 90
       children:
       - id: FoodPacketBoritosTrash
       - id: FoodPacketCheesieTrash
       children:
       - id: FoodPlateSmallTrash
       - id: FoodBowlBigTrash
+    - !type:NestedSelector
+      weight: 5
+      tableId: AllBananaPeelsTable
+
+- type: entityTable # max size 1x2
+  id: AllBananaPeelsTable
+  table: !type:GroupSelector
+    children:
+    - id: TrashBananaPeel
+      weight: 3
+    - id: TrashBakedBananaPeel
+      weight: 2
+    - id: TrashMimanaPeel
+    - id: TrashBananiumPeel
+      weight: 0.5
+    - id: TrashBananaPeelExplosive
+      weight: 0.001 # 1 in 6,500
 
 - type: entity
-  name: Trash Spawner
-  id: RandomSpawner
   parent: MarkerBase
+  id: RandomSpawner
+  name: Trash Spawner
   suffix: 50
   components:
     - type: Sprite
     offset: 0.2
     table: !type:NestedSelector
       tableId: GenericTrashItems
+
+- type: entity
+  parent: MarkerBase
+  id: RandomBananaPeel90
+  name: random banana peel spawner
+  components:
+  - type: Sprite
+    layers:
+    - state: red
+    - sprite: Objects/Specific/Hydroponics/banana.rsi
+      state: peel
+  - type: EntityTableSpawner
+    table: !type:NestedSelector
+      tableId: AllBananaPeelsTable
+      prob: 0.9
index b0eaa06895919c92b0f110a7ce3a5d5dccd26d75..e9562c53047c30c8ac00cb992a00f0cc4814fdaf 100644 (file)
       Taco: Mimana
 
 - type: entity
-  name: banana peel
   parent: BaseItem
   id: TrashBananaPeel
+  name: banana peel
   components:
   - type: Sprite
     sprite: Objects/Specific/Hydroponics/banana.rsi
     quickEquip: false
 
 - type: entity
-  name: baked banana peel
   parent: TrashBananaPeel
   id: TrashBakedBananaPeel
+  name: baked banana peel
   components:
   - type: Clothing
     sprite: Objects/Specific/Hydroponics/banana.rsi
           Quantity: 2
 
 - type: entity
-  name: mimana peel
   parent: TrashBananaPeel
   id: TrashMimanaPeel
+  name: mimana peel
   components:
   - type: Sprite
     sprite: Objects/Specific/Hydroponics/mimana.rsi
         volume: -100
 
 - type: entity
-  name: bananium peel
   parent: TrashBananaPeel
   id: TrashBananiumPeel
+  name: bananium peel
   components:
   - type: Sprite
     sprite: Objects/Materials/materials.rsi
index 172a75959edcab3e1447e16c7191566af68b696b..e4cfd8d347d0981de8b11e7fee3d01921a5ffcab 100644 (file)
@@ -1,17 +1,16 @@
+# When adding new soaps, also add them to id: AllSoapsTable
+
 - type: entity
-  name: soap
-  id: Soap
+  abstract: true
   parent: BaseItem
-  description: A cheap bar of soap. Doesn't smell.
+  id: BaseSoap
+  name: soap
   components:
   - type: Tag
     tags:
     - Soap
   - type: Sprite
     sprite: Objects/Specific/Janitorial/soap.rsi
-    layers:
-    - state: soap-4
-      map: ["enum.SolutionContainerLayers.Fill"]
   - type: SolutionContainerVisuals
     maxFillLevels: 4
     fillBaseName: soap-
     solution: soap
   - type: FlavorProfile
     flavors:
-      - clean
+    - clean
   - type: Edible
     solution: soap
   - type: BadFood
   - type: CleansForensics
   - type: Residue
     residueAdjective: residue-slippery
+
+- type: entity
+  parent: BaseSoap
+  id: Soap
+  description: A cheap bar of soap. Doesn't smell.
+  components:
+  - type: Sprite
+    layers:
+    - state: soap-4
+      map: ["enum.SolutionContainerLayers.Fill"]
+  - type: Residue
     residueColor: residue-green
 
 - type: entity
-  name: soap
+  parent: BaseSoap
   id: SoapNT
-  parent: Soap
   description: A Nanotrasen brand bar of soap. Smells of plasma.
   components:
   - type: Sprite
         - ReagentId: SoapReagent
           Quantity: 100
   - type: Residue
-    residueAdjective: residue-slippery
     residueColor: residue-grey
 
 - type: entity
-  name: soap
+  parent: BaseSoap
   id: SoapDeluxe
-  parent: Soap
   description: A deluxe Waffle Co. brand bar of soap. Smells of strawberries.
   components:
   - type: Sprite
   - type: Item
     heldPrefix: deluxe
   - type: Residue
-    residueAdjective: residue-slippery
     residueColor: residue-brown
 
 - type: entity
-  name: soap
+  parent: [BaseSoap, BaseSyndicateContraband]
   id: SoapSyndie
-  parent: [Soap, BaseSyndicateContraband]
   description: An untrustworthy bar of soap. Smells of fear.
   components:
   - type: Sprite
   - type: CleansForensics
     cleanDelay: 8.0
   - type: Residue
-    residueAdjective: residue-slippery
     residueColor: residue-red
   - type: StaticPrice
     price: 500
 
 - type: entity
-  name: soaplet
+  parent: BaseSoap
   id: SoapletSyndie
-  categories: [ HideSpawnMenu ]
-  parent: Soap
+  name: soaplet
   description: A tiny piece of syndicate soap.
+  categories: [ HideSpawnMenu ]
   components:
   - type: Sprite
     layers:
     - state: syndie-soaplet
+  - type: SolutionContainerManager
+    solutions:
+      soap:
+        maxVol: 10
+        reagents:
+        - ReagentId: SoapReagent
+          Quantity: 10
   - type: Slippery
   - type: StepTrigger
     intersectRatio: 0.04
         volume: -8
 
 - type: entity
-  name: soap
+  parent: BaseSoap
   id: SoapHomemade
-  parent: Soap
   description: A homemade bar of soap. Smells of... well....
   components:
   - type: Sprite
       map: ["enum.SolutionContainerLayers.Fill"]
   - type: SolutionContainerVisuals
     fillBaseName: gibs-
-  - type: Slippery
-  - type: StepTrigger
   - type: Item
     heldPrefix: gibs
   - type: FlavorProfile
       - clean
       - meaty
   - type: Residue
-    residueAdjective: residue-slippery
     residueColor: residue-red
 
 - type: entity
-  name: omega soap
+  parent: BaseSoap
   id: SoapOmega
-  parent: Soap
+  name: omega soap
   description: The most advanced soap known to mankind. Smells of bluespace.
   components:
   - type: Sprite
         - ReagentId: SoapReagent
           Quantity: 240
   - type: Residue
-    residueAdjective: residue-slippery
     residueColor: residue-blue
index dfe21506668bcbfbb46f21cd308f68fa7ec58173..2d3e55c6ed5aa9f1c55ddae945eb5e39ea075f6b 100644 (file)
     sprite: Objects/Tools/Lighters/honkco.rsi
   - type: Item
     sprite: Objects/Tools/Lighters/honkco.rsi
-  - type: ComponentToggler
+  - type: ComponentToggler # This is super cursed and ends up deleting the fixtures when toggled off
     components:
     - type: Slippery
     - type: StepTrigger
index 1618611e2ce7873e56b3453655d28e9d9fa4e6fa..ce0fbab45d76d95511737a0b39a7a637029254d5 100644 (file)
   - type: AnimationPlayer
 
 - type: entity
-  name: banana peel
-  suffix: Explosive
   parent: TrashBananaPeel
   id: TrashBananaPeelExplosive
+  suffix: Explosive
   components:
   - type: Sprite
     sprite: Objects/Specific/Hydroponics/banana.rsi