Wax
Overview
This component tracks and controls whether an entity behaves as a wax spray. It maintains an is_spray state and ensures the entity's "waxspray" tag is correctly added or removed based on that state.
Dependencies & Tags
- Tags used:
- Adds
"waxspray"tag whenis_sprayistrue. - Removes
"waxspray"tag whenis_sprayisfalse.
- Adds
- No external component dependencies are explicitly declared or inferred.
Properties
| Property | Type | Default Value | Description |
|---|---|---|---|
is_spray | boolean | false | Indicates whether the entity is currently acting as a wax spray. |
Main Functions
Wax:SetIsSpray()
- Description: Sets the
is_spraystate totrue, which triggers addition of the"waxspray"tag to the entity. - Parameters: None.
Wax:GetIsSpray()
- Description: Returns the current value of the
is_sprayflag. - Parameters: None.
OnIsSprayFn(self, is_spray)
- Description: Internal callback used when
is_sprayis set (via metatable assignment); updates the entity's"waxspray"tag accordingly. - Parameters:
self: TheWaxcomponent instance.is_spray: Boolean indicating the desired spray state.
Events & Listeners
None.