Healingsalve
Based on game build 714014 | Last updated: 2026-03-05
Overview
healingsalve is a consumable inventory item prefab that restores health via the healer component. Two variants exist: standard healing salve (healingsalve) and acid-formula healing salve (healingsalve_acid). The acid variant grants a temporary acidrainimmune tag and heals over time via a debuff (healingsalve_acidbuff). The debuff system handles attachment/detachment logic, expiration, and persistence across saves/load events.
Usage example
-- Create and use standard healing salve
local salve = SpawnPrefab("healingsalve")
player.components.inventory:GiveItem(salve)
player.components.inventory:Equip(salve)
player:PushEvent("useitem", { item = salve })
-- The acid variant applies a temporary debuff
local acid_salve = SpawnPrefab("healingsalve_acid")
player.components.inventory:GiveItem(acid_salve)
player:PushEvent("useitem", { item = acid_salve })
Dependencies & tags
Components used: stackable, inspectable, inventoryitem, healer, debuff, talker, health
Tags: healerbuffs (only for healingsalve_acid), acidrainimmune (applied during debuff attachment), CLASSIFIED (for debuff entity)
Properties
| Property | Type | Default Value | Description |
|---|---|---|---|
health | number | TUNING.HEALING_MED | Amount of health restored when used (same for both variants) |
maxsize | number | TUNING.STACK_SIZE_SMALLITEM | Maximum stack size for inventory stacking |
Main functions
OnHealFn(inst, target)
- Description: Callback function for
healingsalve_acidthat triggers the debuff application on the target after healing. Not used for the standard salve. - Parameters:
inst(Entity) — thehealingsalve_acidinstance.
target(Entity) — the entity receiving the heal. - Returns: Nothing.
- Error states: No explicit error handling; assumes valid target with
AddDebuffsupport.
Events & listeners
- Listens to:
death— cancels the debuff when the target dies to avoid invalid operations. - Pushes: None directly; the
debuffcomponent fires internal events such asdebuffattached,debuffdetached,debuffextended, anddebuffexpired.