Bullkelp Beached
Based on game build 714014 | Last updated: 2026-03-04
Overview
bullkelp_beached is a static environmental item prefab (often found as beached bull kelp on shorelines) that implements special pickup behavior. When picked up by an entity, it is removed and replaced by two separate items: kelp and bullkelp_root. Moisture state (wetness) is preserved and inherited by both new items. The prefab is typically used in coastal biome world generation and integrates with DST's moisture, burnable, propagator, and inventory systems.
Usage example
-- Automatically instantiated by the worldgen system; not manually spawned by modders.
-- Typical use is as a static world item with special pickup handling.
local kelp = SpawnPrefab("bullkelp_beached")
kelp.Transform:SetPosition(x, y, z)
Dependencies & tags
Components used: inventoryitem, inspectable, burnable, propagator, hauntable
Tags: None identified.
Properties
No public properties.
Main functions
ReplaceOnPickup(inst, container, src_pos)
- Description: Core handler that removes the beached bull kelp entity and spawns
kelpandbullkelp_rootprefabs, preserving and inheriting the original moisture state. If a source position is provided, items are placed at that location. - Parameters:
inst(entity) — the current beached bull kelp entity.container(Inventory or Container component) — destination inventory/container to receive new items.src_pos(Vector3 or nil) — optional position to spawn the new items at.
- Returns: Nothing.
- Error states: Does nothing if
containerisnil.
onpickup(inst, pickupguy, src_pos)
- Description: Standard pickup callback—invoked when an entity with an
inventorycomponent picks up this item. - Parameters:
inst(entity) — the beached bull kelp entity.pickupguy(entity) — the entity picking up the item.src_pos(Vector3) — position where pickup occurred.
- Returns:
true(indicates the original entity was consumed/removed). - Error states: Returns
trueunconditionally;ReplaceOnPickuphandles edge cases internally.
onputininventory(inst, owner)
- Description: Fallback pickup callback—invoked when the item is placed directly into an inventory without triggering
onpickup(e.g., when Woby picks items up, as she lacks an inventory component and usescontainerinstead). - Parameters:
inst(entity) — the beached bull kelp entity.owner(entity) — the entity that owns the target inventory or container.
- Returns: Nothing.
Events & listeners
None identified.