Farmtiller
Overview
The FarmTiller component enables an entity to transform untilled soil tiles into tilled farm soil by collapsing the current ground tile and spawning a farm_soil asset at the target location. It implements the core logic for soil tilling actions in the game’s farming system.
Dependencies & Tags
- Components: None identified
- Tags: None added or removed by this component
Properties
No public instance properties are explicitly initialized in the constructor or elsewhere; only self.inst is set to the owning entity reference.
Main Functions
Till(pt, doer)
- Description: Attempts to till the soil tile at the given world point. If successful, collapses the current soil tile, spawns a
farm_soilprefab at that location, and optionally fires a"tilling"event on thedoerentity. - Parameters:
pt: AVector3-like point (x, y=0, z) specifying the location to till.doer: The entity performing the tilling (e.g., a player or mob); may benil. If non-nil, triggers the"tilling"event on this entity.
Events & Listeners
- Listens for no events (does not register any
inst:ListenForEventcalls). - Triggers events:
- If
doeris non-nil: pushes"tilling"event ondoer.
- If