Quagmire Map
Based on game build 714014 | Last updated: 2026-03-03
Overview
This component supplements the core map system by adding Quagmire-specific logic for farmland detection and soil tillability. It is not a standalone ECS component but a set of extension methods added to the global Map object (the world map instance). The functions help determine where crops can be planted by validating terrain type and checking for interfering placed entities.
Usage example
local pt = Vector3(x, y, z)
if TheWorld.Map:IsFarmableSoilAtPoint(x, y, z) then
-- terrain is Quagmire soil; safe to consider planting
end
if TheWorld.Map:CanTillSoilAtPoint(pt) then
-- point is tillable (farmable soil and no planted soil blocks present)
end
Dependencies & tags
Components used: None identified.
Tags: Uses plantedsoil internally as a must-tag when querying entities.
Properties
No public properties.
Main functions
IsFarmableSoilAtPoint(x, y, z)
- Description: Checks whether the tile at the specified world coordinates is Quagmire farmland (i.e.,
QUAGMIRE_SOIL). - Parameters:
x(number) — World X coordinate.y(number) — World Y coordinate.z(number) — World Z coordinate.
- Returns:
trueif the tile at(x, y, z)isWORLD_TILES.QUAGMIRE_SOIL; otherwisefalse.
CanTillSoilAtPoint(pt)
- Description: Determines whether the soil at the given point can be tilled — that is, if it is farmable Quagmire soil and no entity with the
plantedsoiltag occupies the same tile. - Parameters:
pt(Vector3 or table with.x,.z) — World position to check.
- Returns:
trueif the point is tillable; otherwisefalse. - Error states: Returns
falseif the tile is notQUAGMIRE_SOIL, or if any entity at radius1with theplantedsoiltag is present at the point.
Events & listeners
Not applicable.