]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
bottles
authoriaada <iaada@users.noreply.github.com>
Fri, 25 Jul 2025 20:01:05 +0000 (15:01 -0500)
committeriaada <iaada@users.noreply.github.com>
Fri, 25 Jul 2025 20:01:05 +0000 (15:01 -0500)
Resources/Locale/en-US/nutrition/components/drink-component.ftl
Resources/Prototypes/Entities/Objects/Consumable/Drinks/base_drinks.yml
Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_bottles.yml
Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans.yml

index 5692f7b0e66656af272905debafd6d9936758210..5fa449396c759eb5d6ff21250d53e42cc4e350c6 100644 (file)
@@ -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
index 96f69f310126999d2f97ad107a1e376fa91a94ab..bac4db0d5758075424820da1eda7d5cd9c4ec97e 100644 (file)
@@ -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
     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
   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
index 06f4daf9d114d5baebeeea5a13c425b335045d16..8b4bfc137b54e665420747fd523310341a1e4ab5 100644 (file)
@@ -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
     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
         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
     currentLabel: reagent-name-absinthe
   - type: Sprite
     sprite: Objects/Consumable/Drinks/absinthebottle.rsi
-  - type: Sealable
 
 - type: entity
   parent: [DrinkBottleVisualsAll, DrinkBottleGlassBaseFull]
     currentLabel: reagent-name-nothing
   - type: Sprite
     sprite: Objects/Consumable/Drinks/bottleofnothing.rsi
-  - type: Sealable
 
 - type: entity
   parent: [DrinkBottleVisualsOpenable, DrinkBottleGlassBaseFull]
     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]
     currentLabel: reagent-name-cognac
   - type: Sprite
     sprite: Objects/Consumable/Drinks/cognacbottle.rsi
-  - type: Sealable
 
 - type: entity
   parent: [DrinkBottleVisualsAll, DrinkBottleGlassBaseFull]
     currentLabel: reagent-name-gin
   - type: Sprite
     sprite: Objects/Consumable/Drinks/ginbottle.rsi
-  - type: Sealable
 
 - type: entity
   parent: [DrinkBottleVisualsAll, DrinkBottleGlassBaseFull]
     currentLabel: reagent-name-gildlager
   - type: Sprite
     sprite: Objects/Consumable/Drinks/gildlagerbottle.rsi
-  - type: Sealable
 
 - type: entity
   parent: [DrinkBottleVisualsOpenable, DrinkBottleGlassBaseFull]
     currentLabel: reagent-name-coffeeliqueur
   - type: Sprite
     sprite: Objects/Consumable/Drinks/coffeeliqueurbottle.rsi
-  - type: Sealable
 
 - type: entity
   parent: [DrinkBottleVisualsAll, DrinkBottleGlassBaseFull]
           Quantity: 100
   - type: Sprite
     sprite: Objects/Consumable/Drinks/pwinebottle.rsi
-  - type: Sealable
   - type: Tag
     tags:
     - Wine
     currentLabel: reagent-name-rum
   - type: Sprite
     sprite: Objects/Consumable/Drinks/rumbottle.rsi
-  - type: Sealable
 
 - type: entity
   parent: [DrinkBottleVisualsAll, DrinkBottleGlassBaseFull]
index 94868a0ffd298e632f1f2e85dfcd9b18fb27079f..53ab1c6fee85a396dc2227b7bea6812aefd0ad01 100644 (file)
@@ -50,7 +50,7 @@
     tags:
     - DrinkCan
 
-##
+## Filled
 
 - type: entity
   parent: DrinkCanBaseFull