Skip to main content

Raincoat

Based on game build 714014 | Last updated: 2026-03-06

Overview

The raincoat prefab is a wearable inventory item that grants waterproofer and insulation properties to the wearer. It consumes fuel over time while equipped to maintain its protective effect, and stops consuming when unequipped or when attached to a character model (e.g., during preview). The component integrates closely with the equippable, fueled, and insulator systems to manage wear state, fuel consumption, and insulation level.

Usage example

local raincoat = SpawnPrefab("raincoat")
if raincoat then
raincoat.components.fueled:InitializeFuelLevel(600) -- Set custom fuel level (seconds)
raincoat.components.equippable:SetOnEquip(function(inst, owner)
print("Raincoat equipped!")
end)
end

Dependencies & tags

Components used: equippable, fueled, insulator, inspectable, inventoryitem, tradable, waterproofer
Tags: Adds waterproofer (used for optimization and identification)

Properties

PropertyTypeDefault ValueDescription
equipslotEQUIPSLOTSEQUIPSLOTS.BODYSlot where the item is equipped (body armor slot).
insulatedbooleantrueIndicates whether the item provides insulation (true).
fueltypeFUELTYPEFUELTYPE.USAGEType of fuel consumed; in this case, a usage-based consumable.
insulationnumberTUNING.INSULATION_SMALLInsulation value provided by the item.

Main functions

Not applicable — this file defines a prefab factory (fn) that constructs and configures the entity. No standalone functions are exposed as public API beyond what is provided by the added components.

Events & listeners

  • Pushes (on equip):
    • equipskinneditem with { skin_build_name } — fired when equipping a skinned variant of the item.
  • Pushes (on unequip):
    • unequipskinneditem with { skin_build_name } — fired when unequipping a skinned variant.
  • Listens to (via fueled component):
    • Internal onfueldsectionchanged events to handle fuel level transitions (not directly handled in this file, but observed by fueled).