Hermitcrabtea_defs
Based on game build 714014 | Last updated: 2026-03-07
Overview
hermitcrabtea_defs.lua is a data-defines file that declares two central tables: TEA_DEFS and BUFF_DEFS.
TEA_DEFSspecifies the properties of each tea ingredient (e.g.,petals,tillweed), including the resulting buff name, sanity/health/temperature effects.BUFF_DEFSdefines how each buff behaves over time (e.g., periodic delta application, aura modifiers, event listeners) viaonattachedfn,onextendedfn, andondetachedfnhooks.
This file does not implement an ECS component itself. Instead, it serves as a configuration table factory consumed elsewhere (e.g., hermitcrabtea.lua) to instantiate and manage Hermit Crab Teapot tea variants and their associated debuffs/buffs.
The file references and interacts with the debuff, health, and sanity components via direct calls to DoDelta() and aura modifier APIs.
Usage example
This file is not used directly. It returns a table { teas = ..., buffs = ... } for use by the teapot prefab:
local TEA_DEFS = require "prefabs/hermitcrabtea_defs"
-- Typically consumed by the teapot prefab as:
-- local teas = TEA_DEFS.teas
-- local buffs = TEA_DEFS.buffs
Dependencies & tags
Components used:
debuff(inst.components.debuff:Stop())health(target.components.health:DoDelta(...))sanity(target.components.sanity:DoDelta(...),neg_aura_modifiers)
Tags:
- Checks:
playerghost,shadowsubmissive - No tags are added/removed directly by this file.
Properties
No public properties. The file returns a single table with two keys: teas (an array of tea definitions) and buffs (an array of buff definitions). Each entry is a plain Lua table with static data.
Main functions
No public functions are exported. All logic is embedded in locally scoped functions (Petals_OnTick, Tillweed_OnTick, etc.) used by the onattachedfn hooks of the buffs table.
Events & listeners
This file defines the following event callbacks used inside buff onattachedfn/ondetachedfn hooks:
attacked— listened ontargetby themoon_tree_blossombuff; triggersMoonBlossom_OnAttacked.- Buff durations and tick rates are controlled via
inst:DoPeriodicTask()andinst.task:Cancel()— not standard DST events.