From 47460e0e4ace22f49b637933533065371d03f24f Mon Sep 17 00:00:00 2001 From: iaada Date: Fri, 25 Jul 2025 15:01:05 -0500 Subject: [PATCH] bottles --- .../nutrition/components/drink-component.ftl | 2 +- .../Objects/Consumable/Drinks/base_drinks.yml | 40 ++++- .../Consumable/Drinks/drinks_bottles.yml | 151 ++++-------------- .../Objects/Consumable/Drinks/drinks_cans.yml | 2 +- 4 files changed, 71 insertions(+), 124 deletions(-) diff --git a/Resources/Locale/en-US/nutrition/components/drink-component.ftl b/Resources/Locale/en-US/nutrition/components/drink-component.ftl index 5692f7b0e6..5fa449396c 100644 --- a/Resources/Locale/en-US/nutrition/components/drink-component.ftl +++ b/Resources/Locale/en-US/nutrition/components/drink-component.ftl @@ -3,7 +3,7 @@ drink-component-on-examine-is-empty = [color=gray]Empty[/color] drink-component-on-examine-is-opened = [color=yellow]Opened[/color] drink-component-on-examine-is-sealed = The seal is intact. drink-component-on-examine-is-unsealed = The seal is broken. -drink-component-on-examine-is-unsealed-lost-lid = The seal is broken, and there's no way to close it. +drink-component-on-examine-is-unsealed-no-cork = The seal is broken, and the cork is gone. drink-component-on-examine-is-full = Full drink-component-on-examine-is-mostly-full = Mostly Full drink-component-on-examine-is-half-full = Halfway Full diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/base_drinks.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/base_drinks.yml index 96f69f3101..bac4db0d57 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/base_drinks.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/base_drinks.yml @@ -1,7 +1,7 @@ # TODO: Find remaining cans and move to drinks_cans # TODO: Find empty containers (e.g. mug, pitcher) and move to their own yml -# For cups, beakers, and other fully accessible solutions +# For cups, bottles, beakers, and other freely accessible solutions - type: entity abstract: true parent: BaseItem @@ -85,6 +85,27 @@ tags: - DrinkGlass +# A destructible, opaque plastic bottle +- type: entity + abstract: true + parent: DrinkBase + id: DrinkPlasticBase + components: + - type: Damageable + damageContainer: Inorganic + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 5 + behaviors: + - !type:SpillBehavior { } + - !type:DoActsBehavior + acts: [ "Destruction" ] + - type: PhysicalComposition + materialComposition: + Plastic: 25 + # Cans and bottles - type: entity abstract: true @@ -102,13 +123,26 @@ parent: BaseDrinkOpenable id: BaseDrinkOpenableOpen components: + - type: Sprite + layers: + - state: icon_open - type: Openable opened: true - closeable: false # the lid disappeared somewhere - type: Sealable sealed: false - examineTextUnsealed: drink-component-on-examine-is-unsealed-lost-lid # inform the player the lid is gone +# An empty drink, often paired with BaseDrinkOpenableOpen +- type: entity + abstract: true + id: BaseDrinkEmptyTrash + suffix: Empty + components: + - type: SpaceGarbage + - type: TrashOnSolutionEmpty + solution: drink + - type: Tag + tags: + - Trash ### # TODO: MOVE diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_bottles.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_bottles.yml index 06f4daf9d1..8b4bfc137b 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_bottles.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_bottles.yml @@ -1,8 +1,8 @@ # When adding new drinks also add to random spawner located in Resources\Prototypes\Entities\Markers\Spawners\Random\Food_Drinks\drinks_bottles.yml - type: entity abstract: true - parent: [ DrinkBase, BaseDrinkOpenable ] - id: DrinkBottlePlasticBaseFull + parent: [ DrinkPlasticBase, BaseDrinkOpenable ] + id: DrinkBottlePlasticBaseFull # Large plastic suffix: Full components: - type: Tag @@ -23,28 +23,11 @@ sprite: Objects/Consumable/Drinks/generic_jug.rsi # fallback to generic plastic jug - type: Item size: Normal - - type: Damageable - damageContainer: Inorganic - - type: Destructible - thresholds: - - trigger: - !type:DamageTrigger - damage: 5 - behaviors: - - !type:SpillBehavior { } - - !type:DoActsBehavior - acts: [ "Destruction" ] - - type: TrashOnSolutionEmpty - solution: drink - - type: PhysicalComposition - materialComposition: - Plastic: 100 - type: entity abstract: true - parent: [ DrinkBase, BaseDrinkOpenable ] - id: DrinkBottlePlasticSmallBaseFull - suffix: Full + parent: DrinkBottlePlasticBaseFull + id: DrinkBottlePlasticSmallBaseFull # small plastic components: - type: Item size: Small @@ -57,117 +40,53 @@ maxVol: 30 - type: FitsInDispenser solution: drink - - type: Openable - sound: - collection: bottleOpenSounds - closeable: true - closeSound: - collection: bottleCloseSounds - type: Sprite state: icon - sprite: Objects/Consumable/Drinks/waterbottle.rsi - - type: Damageable - damageContainer: Inorganic - - type: Destructible - thresholds: - - trigger: - !type:DamageTrigger - damage: 5 - behaviors: - - !type:DoActsBehavior - acts: [ "Destruction" ] - - !type:SpillBehavior { } + sprite: Objects/Consumable/Drinks/waterbottle.rsi # fallback - type: TrashOnSolutionEmpty solution: drink - - type: PhysicalComposition - materialComposition: - Plastic: 100 - type: entity abstract: true - parent: DrinkBottlePlasticSmallBaseFull - id: DrinkBottleGlassSmallBaseFull + parent: [ DrinkGlassBase, BaseDrinkOpenable ] + id: DrinkBottleGlassSmallBaseFull # small glass + suffix: Full components: + - type: Openable + sound: + collection: bottleOpenSounds + closeable: true + closeSound: + collection: bottleCloseSounds - type: SolutionContainerManager solutions: drink: maxVol: 50 - type: Sprite - sprite: Objects/Consumable/Drinks/beer.rsi - - type: DamageOnLand - damage: - types: - Blunt: 5 - - type: DamageOtherOnHit - damage: - types: - Blunt: 4 - - type: Destructible - thresholds: - - trigger: - !type:DamageTrigger - damage: 5 - behaviors: - - !type:PlaySoundBehavior - sound: - collection: GlassBreak - - !type:SpillBehavior { } - - !type:SpawnEntitiesBehavior - spawn: - BrokenBottle: - min: 1 - max: 1 - - !type:DoActsBehavior - acts: [ "Destruction" ] + sprite: Objects/Consumable/Drinks/beer.rsi # fallback - type: Tool qualities: - Rolling - speedModifier: 0.75 - - type: PhysicalComposition - materialComposition: - Glass: 100 + speedModifier: 0.75 # not as good as a rolling pin but does the job + - type: TrashOnSolutionEmpty + solution: drink + - type: Tag + tags: + - DrinkBottle - type: entity abstract: true - parent: DrinkBottlePlasticBaseFull - id: DrinkBottleGlassBaseFull + parent: DrinkBottleGlassSmallBaseFull + id: DrinkBottleGlassBaseFull # large glass components: + - type: SolutionContainerManager + solutions: + drink: + maxVol: 100 - type: Sprite - state: icon - - type: DamageOnLand - damage: - types: - Blunt: 5 - - type: DamageOtherOnHit - damage: - types: - Blunt: 4 - - type: Damageable - damageContainer: Inorganic - - type: Destructible - thresholds: - - trigger: - !type:DamageTrigger - damage: 5 - behaviors: - - !type:PlaySoundBehavior - sound: - collection: GlassBreak - - !type:SpillBehavior { } - - !type:SpawnEntitiesBehavior - spawn: - BrokenBottle: - min: 1 - max: 1 - - !type:DoActsBehavior - acts: [ "Destruction" ] - - type: Tool - qualities: - - Rolling - speedModifier: 0.75 # not as good as a rolling pin but does the job - - type: PhysicalComposition - materialComposition: - Glass: 100 + sprite: Objects/Consumable/Drinks/alco-bottle.rsi # fallback + - type: Item + size: Normal - type: entity abstract: true @@ -228,7 +147,6 @@ currentLabel: reagent-name-absinthe - type: Sprite sprite: Objects/Consumable/Drinks/absinthebottle.rsi - - type: Sealable - type: entity parent: [DrinkBottleVisualsAll, DrinkBottleGlassBaseFull] @@ -272,7 +190,6 @@ currentLabel: reagent-name-nothing - type: Sprite sprite: Objects/Consumable/Drinks/bottleofnothing.rsi - - type: Sealable - type: entity parent: [DrinkBottleVisualsOpenable, DrinkBottleGlassBaseFull] @@ -292,6 +209,8 @@ sprite: Objects/Consumable/Drinks/champagnebottle.rsi - type: Openable closeable: false # Champagne corks are fat. Not worth the effort. + - type: Sealable + examineTextUnsealed: drink-component-on-examine-is-unsealed-no-cork # tell the player why it can't close - type: entity parent: [DrinkBottleVisualsAll, DrinkBottleGlassBaseFull] @@ -309,7 +228,6 @@ currentLabel: reagent-name-cognac - type: Sprite sprite: Objects/Consumable/Drinks/cognacbottle.rsi - - type: Sealable - type: entity parent: [DrinkBottleVisualsAll, DrinkBottleGlassBaseFull] @@ -346,7 +264,6 @@ currentLabel: reagent-name-gin - type: Sprite sprite: Objects/Consumable/Drinks/ginbottle.rsi - - type: Sealable - type: entity parent: [DrinkBottleVisualsAll, DrinkBottleGlassBaseFull] @@ -364,7 +281,6 @@ currentLabel: reagent-name-gildlager - type: Sprite sprite: Objects/Consumable/Drinks/gildlagerbottle.rsi - - type: Sealable - type: entity parent: [DrinkBottleVisualsOpenable, DrinkBottleGlassBaseFull] @@ -382,7 +298,6 @@ currentLabel: reagent-name-coffeeliqueur - type: Sprite sprite: Objects/Consumable/Drinks/coffeeliqueurbottle.rsi - - type: Sealable - type: entity parent: [DrinkBottleVisualsAll, DrinkBottleGlassBaseFull] @@ -441,7 +356,6 @@ Quantity: 100 - type: Sprite sprite: Objects/Consumable/Drinks/pwinebottle.rsi - - type: Sealable - type: Tag tags: - Wine @@ -463,7 +377,6 @@ currentLabel: reagent-name-rum - type: Sprite sprite: Objects/Consumable/Drinks/rumbottle.rsi - - type: Sealable - type: entity parent: [DrinkBottleVisualsAll, DrinkBottleGlassBaseFull] diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans.yml index 94868a0ffd..53ab1c6fee 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans.yml @@ -50,7 +50,7 @@ tags: - DrinkCan -## +## Filled - type: entity parent: DrinkCanBaseFull -- 2.51.2