From 6cdf16e1fdf79e27540897abf94e9e23d309ea89 Mon Sep 17 00:00:00 2001 From: iaada Date: Thu, 31 Jul 2025 17:38:39 -0500 Subject: [PATCH] pre-plan for more sounds --- Resources/Prototypes/Damage/modifier_sets.yml | 10 ------ .../Prototypes/Entities/Debugging/drugs.yml | 2 +- .../Consumable/Drinks/drinks-cartons.yml | 2 +- .../Objects/Consumable/Drinks/drinks_base.yml | 13 ++------ .../Drinks/drinks_base_materials.yml | 33 +++++-------------- .../Drinks/drinks_bottles_glass.yml | 28 ++++++++++++++-- .../Drinks/drinks_bottles_plastic.yml | 2 +- .../Objects/Consumable/Drinks/drinks_cans.yml | 2 +- .../Objects/Consumable/Drinks/drinks_cups.yml | 10 +++--- .../Consumable/Drinks/drinks_flasks.yml | 4 +-- .../Objects/Consumable/Drinks/drinks_fun.yml | 6 ++-- .../Consumable/Drinks/drinks_metamorphic.yml | 2 +- .../Consumable/Drinks/drinks_special.yml | 14 ++++---- 13 files changed, 57 insertions(+), 71 deletions(-) diff --git a/Resources/Prototypes/Damage/modifier_sets.yml b/Resources/Prototypes/Damage/modifier_sets.yml index cfb88c6a26..35a5f49134 100644 --- a/Resources/Prototypes/Damage/modifier_sets.yml +++ b/Resources/Prototypes/Damage/modifier_sets.yml @@ -155,16 +155,6 @@ flatReductions: Blunt: 5 -# Generally quite fragile -- type: damageModifierSet - id: Cardboard - coefficients: - Blunt: 1.3 - Slash: 1.3 - Piercing: 0.3 # poking holes in cardboard doesn't do much - Heat: 2.0 # it's wood so it burns - Structural: 1.3 - - type: damageModifierSet id: Web # Very flammable, can be easily hacked and slashed, but shooting or hitting it is another story. coefficients: diff --git a/Resources/Prototypes/Entities/Debugging/drugs.yml b/Resources/Prototypes/Entities/Debugging/drugs.yml index 473e370625..2bb8fdae71 100644 --- a/Resources/Prototypes/Entities/Debugging/drugs.yml +++ b/Resources/Prototypes/Entities/Debugging/drugs.yml @@ -1,5 +1,5 @@ - type: entity - parent: [DrinkBase, DrinkBaseMaterialGlass] + parent: [DrinkBaseMaterialGlass, DrinkBase] id: DrinkMeth name: meth # beer it is. coffee. beer? coff-ee? be-er? c-o... b-e description: Just a whole glass of meth. diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks-cartons.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks-cartons.yml index 5abc7d0ef4..4a5991d799 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks-cartons.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks-cartons.yml @@ -1,6 +1,6 @@ - type: entity abstract: true - parent: [ DrinkBase, DrinkBaseMaterialCardboard, DrinkBaseOpenable, DrinkVisualsOpenable ] + parent: [ DrinkBaseMaterialCardboard, DrinkBase, DrinkBaseOpenable, DrinkVisualsOpenable ] id: DrinkCartonBaseLargeFull # todo rename DrinkCartonBaseFull to match bottles suffix: Full components: diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_base.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_base.yml index 313e9c34e2..0cd822bff4 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_base.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_base.yml @@ -28,7 +28,7 @@ solution: drink - type: InjectableSolution # Injectors (syringe) will fallback to RefillableSolution. This adds support for hyposprays and injector anomalies. solution: drink -# - type: SolutionItemStatus todo Currently does not respect if the solution has ExaminableSolution and always shows the reagent count +# - type: SolutionItemStatus todo Currently always shows the reagent count. Should show vague fill levels without ExaminableSolution # solution: drink - type: SolutionContainerManager solutions: @@ -155,9 +155,9 @@ # Visualizer for an openable entity with fill levels - type: entity abstract: true + parent: [DrinkVisualsOpenable, DrinkVisualsFill] id: DrinkVisualsAll components: - - type: Appearance - type: GenericVisualizer visuals: enum.OpenableVisuals.Opened: @@ -171,15 +171,6 @@ - state: fill-1 map: ["enum.SolutionContainerLayers.Fill"] visible: false - - type: SolutionContainerVisuals - maxFillLevels: 5 - fillBaseName: fill- - inHandsMaxFillLevels: 3 - inHandsFillBaseName: -fill- - - type: ExaminableSolution # If you can see the fill levels, you can see the unit count - solution: drink - - type: SolutionItemStatus # Remove when comp is uncommented on DrinkBase - solution: drink # Visualizer for an openable entity with fill levels, already filled - type: entity diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_base_materials.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_base_materials.yml index 7233df4415..6b215c5d69 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_base_materials.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_base_materials.yml @@ -1,5 +1,5 @@ ## Material costs to apply to a drink -# Adding one of these bases as the first parent will override a previous inherited material +# These bases should always be the first parent # Fragile glass - type: entity @@ -42,6 +42,9 @@ damage: types: Blunt: 5 +# - type: EmitSoundOnLand TODO other materials need a sound +# sound: +# collection: GlassCrack - type: PhysicalComposition materialComposition: Glass: 25 @@ -49,11 +52,9 @@ # Porcelain (like glass but no shard) - type: entity abstract: true + parent: DrinkBaseMaterialGlass id: DrinkBaseMaterialPorcelain components: - - type: Damageable - damageContainer: Inorganic - damageModifierSet: FlimsyGlass - type: Destructible thresholds: - trigger: # Overkill threshold @@ -72,15 +73,6 @@ - !type:SpillBehavior { } - !type:DoActsBehavior acts: [ "Destruction" ] - - type: DamageOnLand - ignoreResistances: true - damage: - types: - Blunt: 5 # so fragile it smashes when thrown - - type: DamageOtherOnHit - damage: - types: - Blunt: 5 - type: PhysicalComposition materialComposition: Glass: 10 # Trace amounts of glass I guess. Important for overriding inheritance @@ -92,7 +84,7 @@ components: - type: Damageable damageContainer: Inorganic -#TODO damageModifierSet: FlimsyPlastic +# damageModifierSet: FlimsyPlastic TODO - type: Destructible thresholds: - trigger: # Overkill threshold @@ -131,7 +123,7 @@ components: - type: Damageable damageContainer: Inorganic - damageModifierSet: Cardboard +# damageModifierSet: Cardboard TODO - type: Destructible thresholds: - trigger: # Overkill threshold @@ -205,10 +197,10 @@ # strong metal - type: entity abstract: true + parent: DrinkBaseMaterialMetal id: DrinkBaseMaterialStrongMetal components: - type: Damageable - damageContainer: Inorganic damageModifierSet: Metallic - type: Destructible thresholds: @@ -228,15 +220,6 @@ - !type:SpillBehavior { } - !type:DoActsBehavior acts: [ "Destruction" ] - - type: DamageOnLand - ignoreResistances: true - damage: - types: - Blunt: 1 - - type: DamageOtherOnHit - damage: - types: - Blunt: 5 - type: PhysicalComposition materialComposition: Steel: 300 diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_bottles_glass.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_bottles_glass.yml index b1d29188a4..aefa55d67a 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_bottles_glass.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_bottles_glass.yml @@ -2,7 +2,7 @@ - type: entity abstract: true - parent: [ DrinkBase, DrinkBaseMaterialGlass, DrinkBaseOpenable ] + parent: [ DrinkBaseMaterialGlass, DrinkBase, DrinkBaseOpenable ] id: DrinkBottleGlassBaseFull suffix: Full components: @@ -29,6 +29,30 @@ - type: Tag tags: - DrinkBottle + - type: Destructible # Same as parent, but spawns BrokenBottle instead of ShardGlass + thresholds: + - trigger: # Overkill threshold + !type:DamageTrigger + damage: 200 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + - 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: entity abstract: true @@ -88,7 +112,6 @@ map: ["enum.SolutionContainerLayers.Fill"] - type: SolutionContainerVisuals maxFillLevels: 6 - fillBaseName: fill- - type: entity parent: [DrinkVisualsOpenable, DrinkBottleGlassBaseFull] @@ -243,7 +266,6 @@ map: ["enum.SolutionContainerLayers.Fill"] - type: SolutionContainerVisuals maxFillLevels: 6 - fillBaseName: fill- - type: entity parent: [DrinkVisualsAllFilled, DrinkBottleGlassBaseFull] diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_bottles_plastic.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_bottles_plastic.yml index 1a12f11e34..3343ad42ce 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_bottles_plastic.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_bottles_plastic.yml @@ -1,6 +1,6 @@ - type: entity abstract: true - parent: [ DrinkBase, DrinkBaseMaterialPlastic, DrinkBaseOpenable ] + parent: [ DrinkBaseMaterialPlastic, DrinkBase, DrinkBaseOpenable ] id: DrinkBottlePlasticBaseFull suffix: Full components: diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans.yml index 0318b05c5c..3102ffc522 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans.yml @@ -1,7 +1,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: [ DrinkBase, DrinkBaseMaterialMetal, DrinkBaseOpenable, DrinkVisualsOpenable ] + parent: [ DrinkBaseMaterialMetal, DrinkBase, DrinkBaseOpenable, DrinkVisualsOpenable ] id: DrinkCanBaseFull suffix: Full components: diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cups.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cups.yml index d6ad3c65f9..b4687d081f 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cups.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cups.yml @@ -22,7 +22,7 @@ # A mug is a type of cup.[2] - type: entity abstract: true - parent: [DrinkBaseCup, DrinkBaseMaterialPorcelain] # todo Should use DrinkVisualsFill, but inheritors have no in-hand and state names are wrong + parent: [ DrinkBaseMaterialPorcelain, DrinkBaseCup ] # todo Should use DrinkVisualsFill, but inheritors have no in-hand and state names are wrong id: DrinkBaseMug name: mug description: A mug. @@ -46,7 +46,7 @@ ## Misc Cups - type: entity - parent: [DrinkBaseCup, DrinkBaseMaterialGold] + parent: [DrinkBaseMaterialGold, DrinkBaseCup] id: DrinkGoldenCup name: golden cup description: A golden cup. @@ -73,7 +73,7 @@ maxFillLevels: 4 - type: entity - parent: [ DrinkBaseCup, DrinkBaseMaterialGlass, DrinkVisualsFillOverlay ] + parent: [ DrinkBaseMaterialGlass, DrinkBaseCup, DrinkVisualsFillOverlay ] id: DrinkGlassCoupeShaped name: coupe glass description: A classic thin neck coupe glass, the icon of fragile labels on crates around the galaxy. @@ -93,7 +93,7 @@ inHandsMaxFillLevels: 1 - type: entity - parent: [DrinkBaseCup, DrinkBaseMaterialCardboard] # TODO should use DrinkVisualsFill but state names are wrong and no inhand + parent: [DrinkBaseMaterialCardboard, DrinkBaseCup] # TODO should use DrinkVisualsFill but state names are wrong and no inhand id: DrinkWaterCup name: water cup description: A paper water cup. @@ -351,7 +351,7 @@ # TODO this needs fill levels - type: entity - parent: [DrinkBaseCup, DrinkBaseMaterialPlastic] + parent: [DrinkBaseMaterialPlastic, DrinkBaseCup] id: DrinkLean name: grape juice description: Damn, no fun allowed. diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_flasks.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_flasks.yml index e40ef2188e..17f9e47fe6 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_flasks.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_flasks.yml @@ -1,6 +1,6 @@ - type: entity abstract: true - parent: [DrinkBase, DrinkBaseMaterialStrongMetal, DrinkBaseOpenable, DrinkVisualsOpenable] + parent: [DrinkBaseMaterialStrongMetal, DrinkBase, DrinkBaseOpenable, DrinkVisualsOpenable] id: FlaskBase components: - type: SolutionContainerManager @@ -21,7 +21,7 @@ # Flasks - type: entity - parent: [DrinkBase, DrinkBaseMaterialStrongMetal] + parent: [DrinkBaseMaterialStrongMetal, DrinkBase] id: DrinkFlaskOld name: old flask description: A decrepit old flask, its lid seems to be missing. diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_fun.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_fun.yml index 180030d78a..5e670117d7 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_fun.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_fun.yml @@ -1,5 +1,5 @@ - type: entity - parent: [ DrinkBase, DrinkBaseMaterialPlastic, DrinkBaseOpenable, DrinkVisualsOpenable ] # todo Should use DrinkVisualAll, but sprite has no inhand + parent: [ DrinkBaseMaterialPlastic, DrinkBase, DrinkBaseOpenable, DrinkVisualsOpenable ] # todo Should use DrinkVisualAll, but sprite has no inhand id: DrinkSpaceGlue name: space glue tube description: High performance glue intended for maintenance of extremely complex mechanical equipment. DON'T DRINK! @@ -34,7 +34,7 @@ solution: drink - type: entity - parent: [ DrinkBase, DrinkBaseMaterialPlastic, DrinkBaseOpenable, DrinkVisualsOpenable ] # Should use DrinkVisualAll, but sprite has no inhand + parent: [ DrinkBaseMaterialPlastic, DrinkBase, DrinkBaseOpenable, DrinkVisualsOpenable ] # Should use DrinkVisualAll, but sprite has no inhand id: DrinkSpaceLube name: space lube tube description: High performance lubricant intended for maintenance of extremely complex mechanical equipment. @@ -88,7 +88,7 @@ Quantity: 200 - type: entity - parent: [DrinkBase, DrinkBaseMaterialGlass] + parent: [DrinkBaseMaterialGlass, DrinkBase] id: DrinkJarWhat name: jar of something description: You can't really tell what this is. diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_metamorphic.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_metamorphic.yml index 8c1029a9f4..a712fe45f3 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_metamorphic.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_metamorphic.yml @@ -4,7 +4,7 @@ # Transformable container - normal glass - type: entity - parent: [DrinkBaseCup, DrinkBaseMaterialGlass] # todo parent to DrinkVisualsFillOverlay after in-hands are added + parent: [DrinkBaseMaterialGlass, DrinkBaseCup] # todo parent to DrinkVisualsFillOverlay after in-hands are added id: DrinkGlass name: metamorphic glass description: A metamorphic glass that automagically turns into a glass appropriate for the drink within. There's a sanded off patent number on the bottom. diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_special.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_special.yml index 42bc056d37..fb0e114106 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_special.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_special.yml @@ -1,5 +1,5 @@ - type: entity - parent: [DrinkBase, DrinkBaseMaterialGlass, DrinkVisualsFillOverlay] + parent: [DrinkBaseMaterialGlass, DrinkBase, DrinkVisualsFillOverlay] id: DrinkShotGlass name: shot glass description: Perfect for slamming down onto the table angrily. @@ -31,7 +31,7 @@ - DrinkGlass - type: entity - parent: [DrinkBase, DrinkBaseMaterialMetal] + parent: [DrinkBaseMaterialMetal, DrinkBase] id: DrinkIceBucket name: ice bucket description: A special bucket of refreshy ice. Prohibited use for challenge with the same name! @@ -50,7 +50,7 @@ Steel: 75 - type: entity - parent: [DrinkBase, DrinkBaseMaterialPorcelain] + parent: [DrinkBaseMaterialPorcelain, DrinkBase] id: DrinkTeapot name: teapot # short and stout description: An elegant teapot. It simply oozes class. @@ -123,7 +123,7 @@ # Bartender tools - type: entity - parent: [DrinkBase, DrinkBaseMaterialStrongMetal] + parent: [DrinkBaseMaterialStrongMetal, DrinkBase] id: DrinkShaker name: shaker description: The trusty mixing buddy of the bartender. @@ -151,7 +151,7 @@ solution: drink - type: entity - parent: [DrinkBase, DrinkBaseMaterialMetal] + parent: [DrinkBaseMaterialMetal, DrinkBase] id: DrinkJigger name: jigger description: Like a shaker, but smaller. Used to control the amount of ingredients. @@ -178,7 +178,7 @@ solution: drink - type: entity - parent: [DrinkBase, DrinkBaseMaterialStrongMetal, DrinkVisualsFill] + parent: [DrinkBaseMaterialStrongMetal, DrinkBase, DrinkVisualsFill] id: Pitcher name: metal pitcher description: A stainless steel insulated pitcher. Everyone's best friend in the morning. @@ -204,7 +204,7 @@ - type: entity abstract: true - parent: [DrinkBase, DrinkBaseMaterialGlass] + parent: [DrinkBaseMaterialGlass, DrinkBase] id: DrinkShakeBase description: '' components: