diff --git a/Content.Server/GameObjects/Components/Fluids/PuddleComponent.cs b/Content.Server/GameObjects/Components/Fluids/PuddleComponent.cs index 435ee56ddc..9b8c8043bb 100644 --- a/Content.Server/GameObjects/Components/Fluids/PuddleComponent.cs +++ b/Content.Server/GameObjects/Components/Fluids/PuddleComponent.cs @@ -104,6 +104,9 @@ namespace Content.Server.GameObjects.Components.Fluids [DataField("recolor")] private bool _recolor = default; + [DataField("state")] + private string _spriteState = "puddle"; + private bool Slippery => Owner.TryGetComponent(out SlipperyComponent? slippery) && slippery.Slippery; public override void Initialize() @@ -122,10 +125,7 @@ namespace Content.Server.GameObjects.Components.Fluids if (_spriteComponent.BaseRSIPath != null) { - var baseName = new ResourcePath(_spriteComponent.BaseRSIPath).FilenameWithoutExtension; - - _spriteComponent.LayerSetState(0, $"{baseName}-{randomVariant}"); // TODO: Remove hardcode - + _spriteComponent.LayerSetState(0, $"{_spriteState}-{randomVariant}"); } // UpdateAppearance should get called soon after this so shouldn't need to call Dirty() here diff --git a/Resources/Prototypes/Entities/Effects/puddle.yml b/Resources/Prototypes/Entities/Effects/puddle.yml index 007a55daff..300ccbcf6e 100644 --- a/Resources/Prototypes/Entities/Effects/puddle.yml +++ b/Resources/Prototypes/Entities/Effects/puddle.yml @@ -41,6 +41,7 @@ state: gibblet-0 - type: Puddle variants: 5 + state: gibblet - type: entity name: puddle @@ -53,6 +54,7 @@ state: smear-0 - type: Puddle variants: 7 + state: smear - type: entity name: puddle @@ -65,6 +67,7 @@ state: splatter-0 - type: Puddle variants: 6 + state: splatter - type: entity name: vomit @@ -79,6 +82,7 @@ variants: 4 recolor: false evaporate_threshold: -1 + state: vomit - type: entity name: toxins vomit @@ -92,6 +96,7 @@ - type: Puddle variants: 4 recolor: false + state: vomit_toxin - type: entity name: writing @@ -104,3 +109,4 @@ state: writing-0 - type: Puddle variants: 5 + state: writing diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/egg.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/egg.yml index 1c9a7375eb..f2896a2ba0 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/egg.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/egg.yml @@ -65,7 +65,8 @@ state: egg-0 - type: Puddle variants: 4 - + state: egg + - type: entity name: eggshells parent: BaseItem @@ -79,6 +80,12 @@ netsync: false - type: Item size: 1 + - type: SolutionContainer + maxVol: 1 + contents: + reagents: + - ReagentId: Egg + Quantity: 1 # Egg diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/ingredients.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/ingredients.yml index c6188b6b4c..e3964dc17f 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/ingredients.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/ingredients.yml @@ -1,5 +1,20 @@ # Lots of misc stuff in here, hard to parent it. +# Powder (For when you throw stuff like flour and it explodes) + +- type: entity + name: flour + id: PuddleFlour + parent: PuddleBase + description: Call the janitor. + components: + - type: Sprite + sprite: Objects/Consumable/Food/ingredients.rsi + state: powder-0 + color: white + - type: Puddle + state: powder + # Reagent Containers - type: entity @@ -31,6 +46,26 @@ reagents: - ReagentId: Flour Quantity: 50 + - type: DamageOnLand + amount: 1 + - type: DamageOtherOnHit + amount: 1 + - type: Damageable + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 2 + behaviors: + - !type:PlaySoundCollectionBehavior + soundCollection: desecration + - !type:SpawnEntitiesBehavior + spawn: + PuddleFlour: + min: 1 + max: 1 + - !type:DoActsBehavior + acts: [ "Destruction" ] - type: entity parent: ReagentContainerBase @@ -46,6 +81,26 @@ reagents: - ReagentId: Flour Quantity: 20 + - type: DamageOnLand + amount: 1 + - type: DamageOtherOnHit + amount: 1 + - type: Damageable + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 2 + behaviors: + - !type:PlaySoundCollectionBehavior + soundCollection: desecration + - !type:SpawnEntitiesBehavior + spawn: + PuddleFlour: + min: 1 + max: 1 + - !type:DoActsBehavior + acts: [ "Destruction" ] - type: entity parent: ReagentContainerBase diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml index 998f004c5c..6106a54f69 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml @@ -243,6 +243,38 @@ reagents: - ReagentId: JuiceTomato Quantity: 10 + - type: DamageOnLand + amount: 1 + - type: DamageOtherOnHit + amount: 1 + - type: Damageable + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 1 + behaviors: + - !type:PlaySoundCollectionBehavior + soundCollection: desecration + - !type:SpawnEntitiesBehavior + spawn: + PuddleTomato: + min: 1 + max: 1 + - !type:DoActsBehavior + acts: [ "Destruction" ] + +- type: entity + name: tomato + id: PuddleTomato + parent: PuddleBase + description: Splat. + components: + - type: Sprite + sprite: Objects/Specific/Hydroponics/tomato.rsi + state: puddle-0 + - type: Puddle + variants: 3 - type: entity name: eggplant diff --git a/Resources/Textures/Objects/Consumable/Food/ingredients.rsi/meta.json b/Resources/Textures/Objects/Consumable/Food/ingredients.rsi/meta.json index cd099532ca..d85acfcd63 100644 --- a/Resources/Textures/Objects/Consumable/Food/ingredients.rsi/meta.json +++ b/Resources/Textures/Objects/Consumable/Food/ingredients.rsi/meta.json @@ -64,6 +64,9 @@ { "name": "pizzabread" }, + { + "name": "powder-0" + }, { "name": "rice-big" }, diff --git a/Resources/Textures/Objects/Consumable/Food/ingredients.rsi/powder-0.png b/Resources/Textures/Objects/Consumable/Food/ingredients.rsi/powder-0.png new file mode 100644 index 0000000000..218aa8d176 Binary files /dev/null and b/Resources/Textures/Objects/Consumable/Food/ingredients.rsi/powder-0.png differ diff --git a/Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/meta.json b/Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/meta.json index 140deb3229..cdfcdbacc5 100644 --- a/Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/meta.json +++ b/Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/meta.json @@ -1 +1,50 @@ -{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "Taken from https://github.com/vgstation-coders/vgstation13 at 1dbcf389b0ec6b2c51b002df5fef8dd1519f8068", "states": [{"name": "dead", "delays": [[1.0]]}, {"name": "harvest", "delays": [[1.0]]}, {"name": "produce", "delays": [[1.0]]}, {"name": "seed", "delays": [[1.0]]}, {"name": "stage-1", "delays": [[1.0]]}, {"name": "stage-2", "delays": [[1.0]]}, {"name": "stage-3", "delays": [[1.0]]}, {"name": "stage-4", "delays": [[1.0]]}, {"name": "stage-5", "delays": [[1.0]]}, {"name": "stage-6", "delays": [[1.0]]}]} \ No newline at end of file +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from https://github.com/vgstation-coders/vgstation13 at 1dbcf389b0ec6b2c51b002df5fef8dd1519f8068", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "dead" + }, + { + "name": "harvest" + }, + { + "name": "produce" + }, + { + "name": "seed" + }, + { + "name": "puddle-0" + }, + { + "name": "puddle-1" + }, + { + "name": "puddle-2" + }, + { + "name": "stage-1" + }, + { + "name": "stage-2" + }, + { + "name": "stage-3" + }, + { + "name": "stage-4" + }, + { + "name": "stage-5" + }, + { + "name": "stage-6" + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/puddle-0.png b/Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/puddle-0.png new file mode 100644 index 0000000000..3743f674ac Binary files /dev/null and b/Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/puddle-0.png differ diff --git a/Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/puddle-1.png b/Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/puddle-1.png new file mode 100644 index 0000000000..8e541b31e3 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/puddle-1.png differ diff --git a/Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/puddle-2.png b/Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/puddle-2.png new file mode 100644 index 0000000000..c55d6eabdd Binary files /dev/null and b/Resources/Textures/Objects/Specific/Hydroponics/tomato.rsi/puddle-2.png differ