From: iaada Date: Fri, 25 Jul 2025 08:03:32 +0000 (-0500) Subject: fix the base types X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=fe8c3d2e0b25e87f8cf25892b7398f9d4ab33ae7;p=space-station-14.git fix the base types --- diff --git a/Resources/Locale/en-US/nutrition/components/drink-component.ftl b/Resources/Locale/en-US/nutrition/components/drink-component.ftl index e80787c8d5..5692f7b0e6 100644 --- a/Resources/Locale/en-US/nutrition/components/drink-component.ftl +++ b/Resources/Locale/en-US/nutrition/components/drink-component.ftl @@ -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 diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/base_drinks.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/base_drinks.yml index c81209719d..96f69f3101 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/base_drinks.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/base_drinks.yml @@ -85,6 +85,29 @@ 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 ### diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks-cartons.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks-cartons.yml index c33e24ad3e..70a86e6d98 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks-cartons.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks-cartons.yml @@ -1,7 +1,7 @@ - type: entity - parent: DrinkBase - id: DrinkCartonBaseFull abstract: true + parent: [ DrinkBase, BaseDrinkOpenable ] + id: DrinkCartonBaseFull suffix: Full components: - type: Openable @@ -10,14 +10,10 @@ 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 @@ -42,12 +38,14 @@ #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 @@ -194,7 +194,7 @@ Quantity: 100 - type: Sprite sprite: Objects/Consumable/Drinks/oatmilk.rsi - + - type: entity parent: [DrinkCartonVisualsOpenable, DrinkCartonBaseFull] id: DrinkJuiceLemonCarton @@ -209,7 +209,7 @@ Quantity: 50 - type: Sprite sprite: Objects/Consumable/Drinks/lemonjuice.rsi - + - type: entity parent: [DrinkCartonVisualsOpenable, DrinkCartonBaseFull] id: DrinkJuicePineappleCarton diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_bottles.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_bottles.yml index c2ac4c606f..06f4daf9d1 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 - parent: DrinkBase - id: DrinkBottlePlasticBaseFull abstract: true + parent: [ DrinkBase, BaseDrinkOpenable ] + id: DrinkBottlePlasticBaseFull suffix: Full components: - type: Tag @@ -39,15 +39,11 @@ - 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 @@ -81,20 +77,16 @@ - !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: @@ -136,9 +128,9 @@ Glass: 100 - type: entity + abstract: true parent: DrinkBottlePlasticBaseFull id: DrinkBottleGlassBaseFull - abstract: true components: - type: Sprite state: icon @@ -178,8 +170,8 @@ Glass: 100 - type: entity - id: DrinkBottleVisualsOpenable abstract: true + id: DrinkBottleVisualsOpenable components: - type: Appearance - type: GenericVisualizer @@ -194,8 +186,8 @@ map: ["enum.OpenableVisuals.Layer"] - type: entity - id: DrinkBottleVisualsAll abstract: true + id: DrinkBottleVisualsAll components: - type: Appearance - type: GenericVisualizer diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans.yml index 46425f9afa..94868a0ffd 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans.yml @@ -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: @@ -20,17 +17,11 @@ 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: @@ -38,14 +29,6 @@ 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: @@ -53,14 +36,6 @@ 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 ## diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans_empty.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans_empty.yml index a10616aecb..e4db6f4365 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans_empty.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans_empty.yml @@ -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 diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cups.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cups.yml index 9ccadd77f7..844cb9fb62 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cups.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cups.yml @@ -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: @@ -10,35 +10,13 @@ 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 @@ -213,7 +191,8 @@ - type: Sprite sprite: Objects/Consumable/Drinks/mug_red.rsi -# Filled +## Filled + - type: entity parent: DrinkBaseCup id: DrinkHotCoco diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_metamorphic.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_metamorphic.yml index 8065c4164a..6912b2cfa2 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_metamorphic.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_metamorphic.yml @@ -63,7 +63,7 @@ state: icon - type: TransformableContainer -## Reagent filled +## Filled - type: entity parent: DrinkGlass diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_special.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_special.yml index cb958d6776..f6fb5ab8ec 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_special.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_special.yml @@ -62,27 +62,7 @@ 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. @@ -105,7 +85,7 @@ 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! diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/trash_drinks.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/trash_drinks.yml index eadeeabd74..a1e95ad845 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/trash_drinks.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/trash_drinks.yml @@ -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 @@ -92,63 +23,20 @@ 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