From fffbc654dd9c8aa5997152b1e58b19eead243b11 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C4=81da?= Date: Wed, 10 Dec 2025 18:17:03 -0600 Subject: [PATCH] Soap, Banana peel, and Slip entity tables (#41783) * commit * self review * self review 2 * buff * nerf * microbalance continues until i'm happy * requested and more --------- Co-authored-by: iaada --- .../Prototypes/Catalog/Fills/Crates/cargo.yml | 9 +-- .../Catalog/Fills/Crates/service.yml | 3 +- .../Prototypes/Catalog/Fills/Items/belt.yml | 3 +- .../Markers/Spawners/Random/maintenance.yml | 3 +- .../Entities/Markers/Spawners/Random/soap.yml | 64 +++++++++++++++---- .../Markers/Spawners/Random/trash.yml | 38 ++++++++++- .../Objects/Consumable/Food/produce.yml | 8 +-- .../Objects/Specific/Janitorial/soap.yml | 60 +++++++++-------- .../Entities/Objects/Tools/lighters.yml | 2 +- .../Entities/Objects/Weapons/Bombs/funny.yml | 3 +- 10 files changed, 135 insertions(+), 58 deletions(-) diff --git a/Resources/Prototypes/Catalog/Fills/Crates/cargo.yml b/Resources/Prototypes/Catalog/Fills/Crates/cargo.yml index 0cef9777ef..b3f0325529 100644 --- a/Resources/Prototypes/Catalog/Fills/Crates/cargo.yml +++ b/Resources/Prototypes/Catalog/Fills/Crates/cargo.yml @@ -73,17 +73,14 @@ 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 diff --git a/Resources/Prototypes/Catalog/Fills/Crates/service.yml b/Resources/Prototypes/Catalog/Fills/Crates/service.yml index e2547dbda0..961f09bcd2 100644 --- a/Resources/Prototypes/Catalog/Fills/Crates/service.yml +++ b/Resources/Prototypes/Catalog/Fills/Crates/service.yml @@ -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 diff --git a/Resources/Prototypes/Catalog/Fills/Items/belt.yml b/Resources/Prototypes/Catalog/Fills/Items/belt.yml index f9ef85554b..1a06d09f3a 100644 --- a/Resources/Prototypes/Catalog/Fills/Items/belt.yml +++ b/Resources/Prototypes/Catalog/Fills/Items/belt.yml @@ -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 diff --git a/Resources/Prototypes/Entities/Markers/Spawners/Random/maintenance.yml b/Resources/Prototypes/Entities/Markers/Spawners/Random/maintenance.yml index 1e2a3eafa4..09378f25cd 100644 --- a/Resources/Prototypes/Entities/Markers/Spawners/Random/maintenance.yml +++ b/Resources/Prototypes/Entities/Markers/Spawners/Random/maintenance.yml @@ -228,7 +228,8 @@ - id: Plunger - id: PowerCellMedium - id: PowerCellSmall - - id: Soap + - !type:NestedSelector + tableId: AllSoapsTable - id: Wirecutter - id: Screwdriver - id: Wrench diff --git a/Resources/Prototypes/Entities/Markers/Spawners/Random/soap.yml b/Resources/Prototypes/Entities/Markers/Spawners/Random/soap.yml index d3283522b2..1f4f4b4aba 100644 --- a/Resources/Prototypes/Entities/Markers/Spawners/Random/soap.yml +++ b/Resources/Prototypes/Entities/Markers/Spawners/Random/soap.yml @@ -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 + diff --git a/Resources/Prototypes/Entities/Markers/Spawners/Random/trash.yml b/Resources/Prototypes/Entities/Markers/Spawners/Random/trash.yml index fb3d945b24..5ae54c40e4 100644 --- a/Resources/Prototypes/Entities/Markers/Spawners/Random/trash.yml +++ b/Resources/Prototypes/Entities/Markers/Spawners/Random/trash.yml @@ -3,7 +3,7 @@ table: !type:GroupSelector children: - !type:GroupSelector - weight: 95 + weight: 90 children: - id: FoodPacketBoritosTrash - id: FoodPacketCheesieTrash @@ -25,11 +25,28 @@ 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 @@ -56,3 +73,18 @@ 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 diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml index b0eaa06895..e9562c5304 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml @@ -410,9 +410,9 @@ Taco: Mimana - type: entity - name: banana peel parent: BaseItem id: TrashBananaPeel + name: banana peel components: - type: Sprite sprite: Objects/Specific/Hydroponics/banana.rsi @@ -472,9 +472,9 @@ 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 @@ -497,9 +497,9 @@ Quantity: 2 - type: entity - name: mimana peel parent: TrashBananaPeel id: TrashMimanaPeel + name: mimana peel components: - type: Sprite sprite: Objects/Specific/Hydroponics/mimana.rsi @@ -517,9 +517,9 @@ volume: -100 - type: entity - name: bananium peel parent: TrashBananaPeel id: TrashBananiumPeel + name: bananium peel components: - type: Sprite sprite: Objects/Materials/materials.rsi diff --git a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/soap.yml b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/soap.yml index 172a75959e..e4cfd8d347 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/soap.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/soap.yml @@ -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- @@ -62,19 +61,29 @@ 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 @@ -93,13 +102,11 @@ - 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 @@ -111,13 +118,11 @@ - 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 @@ -140,21 +145,27 @@ - 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 @@ -187,9 +198,8 @@ volume: -8 - type: entity - name: soap + parent: BaseSoap id: SoapHomemade - parent: Soap description: A homemade bar of soap. Smells of... well.... components: - type: Sprite @@ -198,8 +208,6 @@ map: ["enum.SolutionContainerLayers.Fill"] - type: SolutionContainerVisuals fillBaseName: gibs- - - type: Slippery - - type: StepTrigger - type: Item heldPrefix: gibs - type: FlavorProfile @@ -207,13 +215,12 @@ - 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 @@ -237,5 +244,4 @@ - ReagentId: SoapReagent Quantity: 240 - type: Residue - residueAdjective: residue-slippery residueColor: residue-blue diff --git a/Resources/Prototypes/Entities/Objects/Tools/lighters.yml b/Resources/Prototypes/Entities/Objects/Tools/lighters.yml index dfe2150666..2d3e55c6ed 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/lighters.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/lighters.yml @@ -556,7 +556,7 @@ 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 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Bombs/funny.yml b/Resources/Prototypes/Entities/Objects/Weapons/Bombs/funny.yml index 1618611e2c..ce0fbab45d 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Bombs/funny.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Bombs/funny.yml @@ -75,10 +75,9 @@ - type: AnimationPlayer - type: entity - name: banana peel - suffix: Explosive parent: TrashBananaPeel id: TrashBananaPeelExplosive + suffix: Explosive components: - type: Sprite sprite: Objects/Specific/Hydroponics/banana.rsi -- 2.52.0