Sisturn
Based on game build 714014 | Last updated: 2026-03-07
Overview
Sisturn is a specialized structure prefab that functions as a decorative flower stand. It accepts up to four flower-type items into its container slots (petals_evil or moon_tree_blossom) and dynamically adjusts game behavior: the preserver component modifies perish rate based on skill upgrades, while the sanityaura component adjusts aura magnitude and sign based on item composition (normal, evil, or blossom). It interacts with the sisturnregistry and skilltreeupdater components to support Wendy-specific skill effects and event coordination. The structure also triggers visual/audio effects when fully filled, especially when moon blossoms are present.
Usage example
local inst = SpawnPrefab("sisturn")
inst.Transform:SetPos(x, y, z)
inst.components.container:InsertItem(item1)
inst.components.container:InsertItem(item2)
-- Add two more items to trigger full-state behavior
Dependencies & tags
Components used: burnable, container, inspectable, lootdropper, preserver, sanityaura, sisturnregistry, skilltreeupdater, talker, workable, fueled, hauntable, mini_map, rewards
Tags: Adds structure. Checks burnt, ghostlyfriend.
Properties
| Property | Type | Default Value | Description |
|---|---|---|---|
_petal_preserve | boolean or nil | nil | Whether the "petal preserve" skill upgrade is active for this inst. |
_sanityaura_size | number or nil | nil | Modulated base sanity aura value from skill upgrades (or default). |
_builder_id | string or nil | nil | User ID of the player who built the sisturn (used for skill-change tracking). |
lune_fx | Prefab or nil | nil | Reference to the moon blossom particle effect entity. |
AnimState | AnimState | — | Runtime animation manager (inherited via entity:AddAnimState()). |
Main functions
ConfigureSkillTreeUpgrades(inst, builder)
- Description: Checks if specific skill upgrades ("wendy_sisturn_1", "wendy_sisturn_2") are activated via the builder's
skilltreeupdatercomponent and caches the results. Returnstrueif any values changed from their prior cached state. - Parameters:
inst(Entity instance),builder(Player entity or nil). - Returns:
trueif the cached values (_petal_preserve,_sanityaura_size) were updated; otherwisefalse. - Error states: Returns
falseif no skill tree data is available.
ApplySkillModifiers(inst)
- Description: Applies current skill-modified modifiers to
preserver.perish_rate_multiplierandsanityaura.aura. - Parameters:
inst(Entity instance). - Returns: Nothing.
IsFullOfFlowers(inst)
- Description: Checks whether the container has all four slots filled with items.
- Parameters:
inst(Entity instance). - Returns:
trueifcontainer:IsFull()istrue; otherwisefalse.
getstatus(inst)
- Description: Returns a status string describing the sisturn's fill level and content type for the
inspectablecomponent. - Parameters:
inst(Entity instance). - Returns: One of
"LOTS_OF_FLOWERS_EVIL","LOTS_OF_FLOWERS_BLOSSOM","LOTS_OF_FLOWERS","SOME_FLOWERS", ornil.
getsisturnfeel(inst)
- Description: Determines the dominant content type of items in the container by checking for
"petals_evil"(evil),"moon_tree_blossom"(blossom), or default. - Parameters:
inst(Entity instance). - Returns:
"EVIL","BLOSSOM", or"NORMAL".
update_sanityaura(inst)
- Description: Conditionally adds/removes the
sanityauracomponent and sets itsauravalue based on fill state andgetsisturnfeel. - Parameters:
inst(Entity instance). - Returns: Nothing.
update_idle_anim(inst)
- Description: Switches between looping ambient animation/sound when full and idle state when empty.
- Parameters:
inst(Entity instance). - Returns: Nothing.
update_abigail_status(inst)
- Description: Manages the
moon_blossom_sisturnworld event and spawns/stopssisturn_moon_petal_fxwhen full and blossom content is present. - Parameters:
inst(Entity instance). - Returns: Nothing.
add_decor(inst, data)
- Description: Handles the "itemget" event: updates visual decorators (flower layers), triggers sanity/anim updates, fires the
ms_updatesisturnstateevent, and optionally announces via talker when the container becomes full. - Parameters:
inst(Entity instance),data(table withslot,item,builderfields). - Returns: Nothing.
remove_decor(inst, data)
- Description: Handles the "itemlose" event: updates visual decorators, triggers sanity/anim updates, fires
ms_updatesisturnstate, and cleans up talker announcement. - Parameters:
inst(Entity instance),data(table withslotfield). - Returns: Nothing.
UpdateFlowerDecor(inst)
- Description: Syncs override symbols for flower layers (e.g.,
"flowers_01") based on item prefab type (petals_evil→flowers_evil,moon_tree_blossom→flowers_lunar). - Parameters:
inst(Entity instance). - Returns: Nothing.
onhammered(inst)
- Description: Called when the sisturn is hammered: drops loot and container contents, spawns a small collapse FX, and removes the inst.
- Parameters:
inst(Entity instance). - Returns: Nothing.
onhit(inst, worker, workleft)
- Description: Handles partial hammering: plays hit sound/anim and drops container contents if not burnt and work remains.
- Parameters:
inst(Entity instance),worker(Entity),workleft(number). - Returns: Nothing.
on_built(inst, data)
- Description: Initializes state on build: plays build animation/sound, sets builder ID, configures skill upgrades, and applies modifiers.
- Parameters:
inst(Entity instance),data(table withbuilderfield). - Returns: Nothing.
OnSave(inst, data)
- Description: Serializes relevant state (
burnt,_petal_preserve,_sanityaura_size,builder_id,_preserve_rate) intodata. - Parameters:
inst(Entity instance),data(table). - Returns: Nothing.
OnLoad(inst, data)
- Description: Restores state on load: handles burnt state and re-applies skill modifiers if present.
- Parameters:
inst(Entity instance),data(table or nil). - Returns: Nothing.
Events & listeners
- Listens to:
itemget→add_decoritemlose→remove_decoronbuilt→on_builtwendy_sisturnskillchanged→ skill upgrade re-evaluation (builder-scoped).
- Pushes:
moon_blossom_sisturn(whenupdate_abigail_statusdetects full + blossom condition).ms_updatesisturnstate(onadd_decorandremove_decorto sync with UI/network).