--- /dev/null
+using Content.Shared.Inventory;
+using Content.Shared.Chemistry.Reagent;
+using Robust.Shared.Prototypes;
+
+namespace Content.Server.Chemistry.ReagentEffects;
+
+/// <summary>
+/// A reaction effect that consumes the required amount of reagent and spawns PrototypeID in the
+/// entity's Slot. Used to implement the water droplet effect for arachnids.
+/// </summary>
+public sealed partial class WearableReaction : ReagentEffect
+{
+ /// <summary>
+ /// Minimum quantity of reagent required to trigger this effect.
+ /// </summary>
+ [DataField]
+ public float AmountThreshold = 1f;
+
+ /// <summary>
+ /// Slot to spawn the item into.
+ /// </summary>
+ [DataField(required: true)]
+ public string Slot;
+
+ /// <summary>
+ /// Prototype ID of item to spawn.
+ /// </summary>
+ [DataField(required: true)]
+ public string PrototypeID;
+
+ protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) => null;
+
+ public override void Effect(ReagentEffectArgs args)
+ {
+ if (args.Reagent == null || args.Quantity < AmountThreshold)
+ return;
+
+ // SpawnItemInSlot returns false if slot is already occupied
+ if (args.EntityManager.System<InventorySystem>().SpawnItemInSlot(args.SolutionEntity, Slot, PrototypeID))
+ args.Source?.RemoveReagent(args.Reagent.ID, AmountThreshold);
+ }
+}
sprite: Clothing/Head/Misc/red_racoon.rsi
- type: Clothing
sprite: Clothing/Head/Misc/red_racoon.rsi
+
+- type: entity
+ parent: Clothing
+ id: WaterDropletHat
+ name: water droplet
+ description: Makes 8-eyed friends 8 times more adorable!
+ components:
+ - type: Sprite
+ sprite: Clothing/Head/Misc/waterdroplet.rsi
+ state: icon
+ - type: Item
+ sprite: Clothing/Head/Misc/waterdroplet.rsi
+ size: Tiny
+ storedRotation: -90
+ - type: Clothing
+ slots:
+ - HEAD
+ - type: Food
+ solution: drink
+ useSound: /Audio/Items/drink.ogg
+ eatMessage: drink-component-try-use-drink-success-slurp
+ delay: 0.5
+ forceFeedDelay: 1.5
+ - type: FlavorProfile
+ flavors:
+ - water
+ - type: SolutionContainerManager
+ solutions:
+ drink:
+ maxVol: 2
+ reagents:
+ - ReagentId: Water
+ Quantity: 2
+ - type: DamageOnHighSpeedImpact
+ minimumSpeed: 0.1
+ damage:
+ types:
+ Blunt: 1
+ - type: Damageable
+ damageContainer: Biological
+ - type: Destructible
+ thresholds:
+ - trigger:
+ !type:DamageTrigger
+ damage: 1
+ behaviors:
+ - !type:PlaySoundBehavior
+ sound:
+ collection: desecration
+ - !type:SpillBehavior
+ solution: drink
+ - !type:DoActsBehavior
+ acts: [ "Destruction" ]
+ - type: Tag
+ tags:
+ - WhitelistChameleon
+ - type: StaticPrice
+ price: 1
--- /dev/null
+{
+ "version": 1,
+ "license": "CC-BY-SA-3.0",
+ "copyright": "Created by SlamBamActionman",
+ "size": {
+ "x": 32,
+ "y": 32
+ },
+ "states": [
+ {
+ "name": "icon"
+ },
+ {
+ "name": "equipped-HELMET",
+ "directions": 4
+ },
+ {
+ "name": "inhand-left",
+ "directions": 4
+ },
+ {
+ "name": "inhand-right",
+ "directions": 4
+ }
+ ]
+}