Farmtiller
Based on game build 714014 | Last updated: 2026-03-03
Overview
FarmTiller is a utility component that enables tilling of soil at a specified world position. It is typically attached to entities (e.g., tools like the hoe) that interact with terrain to prepare farmland. The component delegates terrain validation and modification to the World.Map system.
Usage example
local inst = CreateEntity()
inst:AddComponent("farmtiller")
local point = Vector3(10, 0, -5)
local success = inst.components.farmtiller:Till(point, player)
if success then
-- soil was tilled successfully
end
Dependencies & tags
Components used: None identified
Tags: None identified
Properties
No public properties
Main functions
Till(pt, doer)
- Description: Attempts to till the soil at the specified world point. Validates the location using the world map, collapses the existing soil, spawns a
farm_soilprefab, and optionally notifies the actor. - Parameters:
pt(Vector3) — World position (x, y, z) where tilling should occur.
doer(Entityornil) — The entity performing the tilling action; if provided, receives a"tilling"event. - Returns:
trueif tilling succeeded,falseotherwise. - Error states: Returns
falseifTheWorld.Map:CanTillSoilAtPoint()returnsfalsefor the given coordinates.
Events & listeners
- Listens to: None identified
- Pushes:
"tilling"— Sent todoeronly ifdoeris non-nil.