Skip to main content

Wintersfeastfuel

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

Overview

wintersfeastfuel is a lightweight consumable item prefab used as a thematic or decorative food item. It contributes no health or hunger restoration and instead serves a narrative purpose: when eaten by an entity with a talker component, it triggers a localized speech line. The prefab is structured as a standard DST inventory item with stacking support and networked visibility, but omits common food traits like satiety.

Usage example

-- Example usage in a mod prefabs/ directory (conceptual)
local WintersfeastFuel = require "prefabs/wintersfeastfuel"
local inst = Prefab("my_custom_wintersfeastfuel", function()
local entity = WintersfeastFuel()
-- Optionally override properties after instantiation
return entity
end)

Dependencies & tags

Components used: stackable, edible, inspectable, inventoryitem, transform, animstate, network, health, talker (indirectly via event callback).
Tags: None explicitly added, removed, or checked.

Properties

PropertyTypeDefault ValueDescription
foodtypeFOODTYPEFOODTYPE.GENERICClassification for food-related logic (unused beyond definition).
healthvaluenumber0Health restored on consumption (disabled).
hungervaluenumber0Hunger restored on consumption (disabled).
maxsizenumberTUNING.STACK_SIZE_SMALLITEMMaximum stack size for this item.

Main functions

OnEaten(inst, eater)

  • Description: Callback executed when the item is consumed. Triggers the eater to speak a predefined phrase if the eater has a talker component.
  • Parameters:
    • inst (Entity) — The wintersfeastfuel instance being eaten.
    • eater (Entity) — The entity consuming the item.
  • Returns: Nothing.
  • Error states: If eater.components.talker is nil, the function exits silently.

Events & listeners

  • Listens to: None (no inst:ListenForEvent calls in this file).
  • Pushes: None (no inst:PushEvent calls in this file).