Documentation
¶
Overview ¶
Package entity provides a typed Go client for the entity manipulation commands registered by softmod/factop/entity.lua.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides typed methods for each entity-* RCON command.
func (*Client) Count ¶
func (c *Client) Count(area Area, opts FindOptions) (int, error)
Count returns the number of entities matching the filter in the area.
func (*Client) Create ¶
Create places a single entity at the given position. Direction uses Factorio direction names: "north", "south", "east", "west", etc. Pass empty strings for force/direction/surface to use defaults.
type Entity ¶
type Entity struct {
Name string `json:"name"`
X float64 `json:"x"`
Y float64 `json:"y"`
UnitNumber uint64 `json:"unit_number"`
}
Entity represents a found entity with its position and unit number.
type FindOptions ¶
FindOptions controls filtering for Find and Count operations. Use "_" or empty string to skip a filter field.
Click to show internal directories.
Click to hide internal directories.