]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
fix the base types
authoriaada <iaada@users.noreply.github.com>
Fri, 25 Jul 2025 08:03:32 +0000 (03:03 -0500)
committeriaada <iaada@users.noreply.github.com>
Fri, 25 Jul 2025 08:03:32 +0000 (03:03 -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-cartons.yml
Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_bottles.yml
Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans.yml
Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans_empty.yml
Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cups.yml
Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_metamorphic.yml
Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_special.yml
Resources/Prototypes/Entities/Objects/Consumable/Drinks/trash_drinks.yml

index e80787c8d5beee54e95a172173d661091349e5f1..5692f7b0e66656af272905debafd6d9936758210 100644 (file)
@@ -3,6 +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-full = Full
 drink-component-on-examine-is-mostly-full = Mostly Full
 drink-component-on-examine-is-half-full = Halfway Full
index c81209719d0db16c8aa68567633b70501fa1578e..96f69f310126999d2f97ad107a1e376fa91a94ab 100644 (file)
     tags:
     - DrinkGlass
 
+# Cans and bottles
+- type: entity
+  abstract: true
+  id: BaseDrinkOpenable
+  components:
+  - type: Openable
+  - type: PressurizedSolution
+    solution: drink
+  - type: Shakeable
+  - type: Sealable
+
+# Cans and bottles (opened)
+- type: entity
+  abstract: true
+  parent: BaseDrinkOpenable
+  id: BaseDrinkOpenableOpen
+  components:
+  - 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
 
 
 ###
index c33e24ad3e49cc6f6e0cb6fc3dc6e73f2114ad93..70a86e6d986995c356e059f45e24b28b6cbfc911 100644 (file)
@@ -1,7 +1,7 @@
 - type: entity
-  parent: DrinkBase
-  id: DrinkCartonBaseFull
   abstract: true
+  parent: [ DrinkBase, BaseDrinkOpenable ]
+  id: DrinkCartonBaseFull
   suffix: Full
   components:
   - type: Openable
     closeable: true
     closeSound:
       collection: bottleCloseSounds
-  - type: Sealable
   - type: SolutionContainerManager
     solutions:
       drink:
         maxVol: 50
-  - type: PressurizedSolution
-    solution: drink
-  - type: Shakeable
   - type: Sprite
     state: icon
   - type: Item
         #In future maybe add generic plastic scrap trash/debris
   - type: TrashOnSolutionEmpty
     solution: drink
-  - type: DnaSubstanceTrace
+  - type: PhysicalComposition
+    materialComposition:
+      Cardboard: 20
 
 - type: entity
+  abstract: true
   parent: DrinkCartonBaseFull
   id: DrinkCartonBaseLargeFull
-  abstract: true
   components:
   - type: SolutionContainerManager
     solutions:
@@ -57,8 +55,8 @@
     size: Normal
 
 - type: entity
-  id: DrinkCartonVisualsOpenable
   abstract: true
+  id: DrinkCartonVisualsOpenable
   components:
   - type: Appearance
   - type: GenericVisualizer
@@ -72,6 +70,8 @@
       - state: icon
         map: ["enum.OpenableVisuals.Layer"]
 
+##
+
 - type: entity
   parent: [DrinkCartonVisualsOpenable, DrinkCartonBaseFull]
   id: DrinkJuiceLimeCarton
           Quantity: 100
   - type: Sprite
     sprite: Objects/Consumable/Drinks/oatmilk.rsi
-    
+
 - type: entity
   parent: [DrinkCartonVisualsOpenable, DrinkCartonBaseFull]
   id: DrinkJuiceLemonCarton
           Quantity: 50
   - type: Sprite
     sprite: Objects/Consumable/Drinks/lemonjuice.rsi
-    
+
 - type: entity
   parent: [DrinkCartonVisualsOpenable, DrinkCartonBaseFull]
   id: DrinkJuicePineappleCarton
index c2ac4c606fa5b65326180af64d39fc0023e9cbcf..06f4daf9d114d5baebeeea5a13c425b335045d16 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
-  parent: DrinkBase
-  id: DrinkBottlePlasticBaseFull
   abstract: true
+  parent: [ DrinkBase, BaseDrinkOpenable ]
+  id: DrinkBottlePlasticBaseFull
   suffix: Full
   components:
   - type: Tag
   - type: PhysicalComposition
     materialComposition:
       Plastic: 100
-  - type: DnaSubstanceTrace
-  - type: PressurizedSolution
-    solution: drink
-  - type: Shakeable
 
 - type: entity
-  parent: DrinkBase
-  id: DrinkBottlePlasticSmallBaseFull
   abstract: true
+  parent: [ DrinkBase, BaseDrinkOpenable ]
+  id: DrinkBottlePlasticSmallBaseFull
   suffix: Full
   components:
   - type: Item
        - !type:DoActsBehavior
         acts: [ "Destruction" ]
        - !type:SpillBehavior { }
-  - type: DnaSubstanceTrace
-  - type: PressurizedSolution
-    solution: drink
   - type: TrashOnSolutionEmpty
     solution: drink
-  - type: Shakeable
   - type: PhysicalComposition
     materialComposition:
       Plastic: 100
 
 - type: entity
+  abstract: true
   parent: DrinkBottlePlasticSmallBaseFull
   id: DrinkBottleGlassSmallBaseFull
-  abstract: true
   components:
   - type: SolutionContainerManager
     solutions:
       Glass: 100
 
 - type: entity
+  abstract: true
   parent: DrinkBottlePlasticBaseFull
   id: DrinkBottleGlassBaseFull
-  abstract: true
   components:
   - type: Sprite
     state: icon
       Glass: 100
 
 - type: entity
-  id: DrinkBottleVisualsOpenable
   abstract: true
+  id: DrinkBottleVisualsOpenable
   components:
   - type: Appearance
   - type: GenericVisualizer
         map: ["enum.OpenableVisuals.Layer"]
 
 - type: entity
-  id: DrinkBottleVisualsAll
   abstract: true
+  id: DrinkBottleVisualsAll
   components:
   - type: Appearance
   - type: GenericVisualizer
index 46425f9afa234ae85895a8a30bfe968628f906a9..94868a0ffd298e632f1f2e85dfcd9b18fb27079f 100644 (file)
@@ -1,12 +1,9 @@
 # When adding new drinks also add to random spawner located in Resources\Prototypes\Entities\Markers\Spawners\Random\Food_Drinks\drinks_soda.yml
 - type: entity
   abstract: true
-  parent: BaseItem
+  parent: [ DrinkBase, BaseDrinkOpenable ]
   id: DrinkCanBaseFull
   components:
-  - type: Drink
-  - type: Openable
-  - type: Shakeable
   - type: SolutionContainerManager
     solutions:
       drink:
           Quantity: 4
         - ReagentId: Iron
           Quantity: 1
-  - type: MixableSolution
-    solution: drink
   - type: SolutionTransfer
     canChangeTransferAmount: true
     maxTransferAmount: 15
   - type: Extractable
     grindableSolutionName: grindable
-  - type: UserInterface
-    interfaces:
-      enum.TransferAmountUiKey.Key:
-        type: TransferAmountBoundUserInterface
   - type: Sprite
     state: icon
     layers:
         map: ["enum.OpenableVisuals.Layer"]
   - type: FitsInDispenser
     solution: drink
-  - type: DrawableSolution
-    solution: drink
-  - type: RefillableSolution
-    solution: drink
-  - type: DrainableSolution
-    solution: drink
-  - type: PressurizedSolution
-    solution: drink
   - type: Appearance
   - type: GenericVisualizer
     visuals:
         enum.OpenableVisuals.Layer:
           True: {state: "icon_open"}
           False: {state: "icon"}
-  - type: Spillable
-    solution: drink
-  - type: MeleeWeapon
-    soundNoDamage:
-      path: "/Audio/Effects/Fluids/splat.ogg"
-    damage:
-      types:
-        Blunt: 0
   - type: Tool
     qualities:
     - Rolling
@@ -74,7 +49,6 @@
   - type: Tag
     tags:
     - DrinkCan
-  - type: DnaSubstanceTrace
 
 ##
 
index a10616aecb942dccd97972a611797b04185f5051..e4db6f4365f4799724f3b1dfb5ae0d84159bfa49 100644 (file)
@@ -1,7 +1,7 @@
 # When adding new drinks also add to random spawner located in Resources/Prototypes/Entities/Markers/Spawners/Random/trash.yml
 - type: entity
   abstract: true
-  parent: DrinkCanBaseFull
+  parent: [ BaseDrinkOpenableOpen, DrinkCanBaseFull ]
   id: DrinkCanBaseEmpty
   suffix: empty
   components:
@@ -18,8 +18,6 @@
           Quantity: 4
         - ReagentId: Iron
           Quantity: 1
-  - type: Openable
-    opened: true
   - type: Tag
     tags:
     - DrinkCan
index 9ccadd77f784f529d7cdf8994c463091bcfa42ed..844cb9fb62c1f6cdb4e64cf55c77b1b1469ef120 100644 (file)
@@ -2,7 +2,7 @@
 # When adding new drinks also add to random spawner located in Resources\Prototypes\Entities\Markers\Spawners\Random\Food_Drinks\drinks_soda.yml
 - type: entity
   abstract: true
-  parent: BaseItem
+  parent: DrinkBase
   id: DrinkBaseCup
   name: base cup
   components:
     solutions:
       drink:
         maxVol: 20
-  - type: MixableSolution
-    solution: drink
   - type: FitsInDispenser
     solution: drink
-  - type: DrawableSolution
-    solution: drink
-  - type: RefillableSolution
-    solution: drink
-  - type: DrainableSolution
-    solution: drink
   - type: SolutionTransfer
     canChangeTransferAmount: true
     maxTransferAmount: 10
-  - type: UserInterface
-    interfaces:
-      enum.TransferAmountUiKey.Key:
-        type: TransferAmountBoundUserInterface
-  - type: Drink
   - type: Sprite
     state: icon
-  - type: Spillable
-    solution: drink
-  - type: MeleeWeapon
-    soundNoDamage:
-      path: "/Audio/Effects/Fluids/splat.ogg"
-    damage:
-      types:
-        Blunt: 0
-  - type: DnaSubstanceTrace
   - type: Tag
     tags:
     - DrinkCup
   - type: Sprite
     sprite: Objects/Consumable/Drinks/mug_red.rsi
 
-# Filled
+## Filled
+
 - type: entity
   parent: DrinkBaseCup
   id: DrinkHotCoco
index 8065c4164a9ec633e85f4ad50f7390d7cc5fcc37..6912b2cfa2a0be1b554b83851e24e6bd91d95b74 100644 (file)
@@ -63,7 +63,7 @@
       state: icon
   - type: TransformableContainer
 
-## Reagent filled
+## Filled
 
 - type: entity
   parent: DrinkGlass
index cb958d67761adff1d8bd808340d08658441e6c4f..f6fb5ab8ec796672765a781b8303e35200b79252 100644 (file)
     sprite: Objects/Consumable/Drinks/jar_what.rsi
 
 - type: entity
-  id: BartenderMixer
-  abstract: true
-  components:
-  - type: DrainableSolution
-    solution: drink
-  - type: Drink
-  - type: DrawableSolution
-    solution: drink
-  - type: RefillableSolution
-    solution: drink
-  - type: SolutionTransfer
-    canChangeTransferAmount: true
-  - type: Spillable
-    solution: drink
-  - type: UserInterface
-    interfaces:
-      enum.TransferAmountUiKey.Key:
-        type: TransferAmountBoundUserInterface
-
-- type: entity
-  parent: BaseDrink
+  parent: DrinkBase
   id: DrinkJigger
   name: jigger
   description: Like a shaker, but smaller. Used to control the amount of ingredients.
       Steel: 20
 
 - type: entity
-  parent: BaseDrink
+  parent: DrinkBase
   id: DrinkIceBucket
   name: ice bucket
   description: A special bucket of refreshy ice. Prohibited use for challenge with the same name!
index eadeeabd7479426b58b6b42c9622a4dfd5af87a6..a1e95ad8459161f9d0d0b65bf53981425332a599 100644 (file)
@@ -1,88 +1,19 @@
 # These can still be used as containers
 - type: entity
-  name: base empty bottle
-  id: DrinkBottleBaseEmpty
-  parent: BaseItem
   abstract: true
-  description: An empty bottle.
+  parent: [ BaseDrinkOpenableOpen, DrinkBottleGlassBaseFull ]
+  id: DrinkBottleBaseEmpty
   suffix: Empty
   components:
-  - type: Sprite
-    state: icon
-  - type: Item
-    size: Normal
-  - type: SolutionContainerManager
-    solutions:
-      drink:
-        maxVol: 100
-  - type: SolutionTransfer
-    canChangeTransferAmount: true
-    maxTransferAmount: 5
-  - type: Drink
-  - type: MeleeWeapon
-    soundNoDamage:
-      path: "/Audio/Effects/Fluids/splat.ogg"
-    damage:
-      types:
-        Blunt: 0
-  - type: MixableSolution
-    solution: drink
-  - type: Spillable
-    solution: drink
-  - type: FitsInDispenser
-    solution: drink
-  - type: DrawableSolution
-    solution: drink
-  - type: RefillableSolution
-    solution: drink
-  - type: DrainableSolution
-    solution: drink
-  - type: UserInterface
-    interfaces:
-      enum.TransferAmountUiKey.Key:
-        type: TransferAmountBoundUserInterface
-  - 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
-        transferForensics: true
-      - !type:DoActsBehavior
-        acts: [ "Destruction" ]
   - type: Tag
     tags:
     - Trash
-  - type: PhysicalComposition
-    materialComposition:
-      Glass: 100
   - type: SpaceGarbage
-  - type: DnaSubstanceTrace
 
 - type: entity
-  name: base empty bottle
-  id: DrinkBottleBaseSmallEmpty
-  parent: DrinkBottleBaseEmpty
   abstract: true
+  parent: DrinkBottleGlassSmallBaseFull
+  id: DrinkBottleBaseSmallEmpty
   components:
   - type: Item
     size: Small
         maxVol: 50
 
 - type: entity
-  name: base empty carton
-  id: DrinkCartonBaseEmpty
-  parent: BaseItem
   abstract: true
-  description: An empty carton.
+  parent: [ BaseDrinkOpenableOpen, DrinkCartonBaseFull ]
+  id: DrinkCartonBaseEmpty
   suffix: Empty
   components:
-  - type: Sprite
-    state: icon
-  - type: SolutionContainerManager
-    solutions:
-      drink:
-        maxVol: 50
-  - type: MixableSolution
-    solution: drink
-  - type: SolutionTransfer
-    canChangeTransferAmount: true
-    maxTransferAmount: 5
-  - type: Drink
-  - type: Spillable
-    solution: drink
-  - type: FitsInDispenser
-    solution: drink
-  - type: DrawableSolution
-    solution: drink
-  - type: RefillableSolution
-    solution: drink
-  - type: DrainableSolution
-    solution: drink
-  - type: UserInterface
-    interfaces:
-      enum.TransferAmountUiKey.Key:
-        type: TransferAmountBoundUserInterface
-  - type: Damageable
-    damageContainer: Inorganic
-  - type: Destructible
-    thresholds:
-    - trigger:
-        !type:DamageTrigger
-        damage: 20
-      behaviors:
-      - !type:SpillBehavior { }
-      - !type:DoActsBehavior
-        acts: [ "Destruction" ]
   - type: Tag
     tags:
     - Trash
-  - type: PhysicalComposition
-    materialComposition:
-      Cardboard: 20
   - type: SpaceGarbage
 
 - type: entity
-  name: base empty bottle
-  id: DrinkCartonBaseLargeEmpty
-  parent: DrinkCartonBaseEmpty
   abstract: true
+  parent: DrinkCartonBaseEmpty
+  id: DrinkCartonBaseLargeEmpty
   components:
   - type: Item
     size: Normal