Quagmire Salts
Based on game build 714014 | Last updated: 2026-03-06
Overview
This file defines two prefabs (quagmire_saltrock and quagmire_salt) representing decorative, non-interactive environmental assets found in the Quagmire biome. They are static, visually distinct ground objects with idle animations, optimized for placement in the world. The prefabs include network synchronization via AddNetwork() and use master-only post-initialization hooks for mod-specific customization.
Usage example
-- Example of spawning a Quagmire salt rock at a specific location
local saltrock = SpawnPrefab("quagmire_saltrock")
if saltrock ~= nil then
saltrock.Transform:SetPosition(x, y, z)
end
-- Example of spawning a Quagmire salt (ground version)
local salt = SpawnPrefab("quagmire_salt")
if salt ~= nil then
salt.Transform:SetPosition(x, y, z)
end
Dependencies & tags
Components used: None identified.
Tags: Neither prefab adds tags during initialization.
Properties
No public properties.
Main functions
The prefabs themselves are factory functions and are not invoked directly as methods. The following internal functions are defined and called during prefab instantiation:
rock_fn()
- Description: Constructor for the
quagmire_saltrockprefab. Initializes a basic entity with transform, animation state, and network components; sets up physics for inventory items (though it's static); and plays the idle animation. For non-master simulation contexts (e.g., clients), returns early; otherwise, invokes the server-sidemaster_postinit_rockhook. - Parameters: None (called internally by the engine during prefab creation).
- Returns:
inst(Entity) — the fully constructed entity instance.
ground_fn()
- Description: Constructor for the
quagmire_saltprefab. Behaves identically torock_fn()but uses thequagmire_saltanimation bank/build and invokesmaster_postinit_groundon the server. - Parameters: None (called internally by the engine during prefab creation).
- Returns:
inst(Entity) — the fully constructed entity instance.
Events & listeners
- Listens to: None identified.
- Pushes: None identified.
(Both prefabs are static and do not participate in event-driven behavior beyond standard network sync and post-init hooks.)