Documentation ¶
Index ¶
- Constants
- Variables
- func ChebyshevDistance(a, b image.Point) int
- func ChebyshevDistanceToArea(position image.Point, area image.Rectangle) int
- func DeltasToArea(position image.Point, area image.Rectangle) (int, int)
- func DeltasToAreaAsPoint(position image.Point, area image.Rectangle) image.Point
- func Distance(a image.Point, b image.Point) int
- func DistanceToArea(position image.Point, area image.Rectangle) int
- func EmptyUnitTile(tile *datamod.BoardRow, layer LayerId)
- func GetAttackStrength(proto *datamod.UnitPrototypesRow, layerId LayerId) uint8
- func GetDimensionsAsPoint(object interface{ ... }) image.Point
- func GetPositionAsPoint(object interface{ ... }) image.Point
- func IsTileEmpty(tile *datamod.BoardRow, layer LayerId) bool
- func IsTileEmptyAllLayers(tile *datamod.BoardRow) bool
- func ManhattanDistance(a, b image.Point) int
- func ManhattanDistanceToArea(position image.Point, area image.Rectangle) int
- func SetTileAirUnit(tile *datamod.BoardRow, playerId uint8, unitId uint8)
- func SetTileHoverUnit(tile *datamod.BoardRow, playerId uint8, unitId uint8)
- func SetTileLandObject(tile *datamod.BoardRow, objectType ObjectType, playerId uint8, objectId uint8)
- func SetTileUnit(tile *datamod.BoardRow, layer LayerId, playerId uint8, unitId uint8)
- func StepTowards(curPos image.Point, targetArea image.Rectangle) image.Point
- func StepTowards1D(curPos, targetL, targetSize int) int
- func StepTowards2D(curPos image.Point, targetArea image.Rectangle) image.Point
- type BuildingFilter
- type BuildingObjectWithRow
- type BuildingPlacement
- type BuildingPrototypeAddition
- type BuildingState
- type CommandPath
- func (c *CommandPath) CurrentPoint() image.Point
- func (c *CommandPath) GetPathPoint(i int) image.Point
- func (c *CommandPath) HasPath() bool
- func (c *CommandPath) IncPointer()
- func (c *CommandPath) Meta() commandPathMeta
- func (c *CommandPath) Path() []image.Point
- func (c *CommandPath) PathLen() uint8
- func (c *CommandPath) Pointer() uint8
- func (c *CommandPath) RawPath() uint64
- func (c *CommandPath) SetPath(path []image.Point)
- type Core
- func (c *Core) AbsSubTickIndex() uint32
- func (c *Core) AddBuildingPrototype(action *BuildingPrototypeAddition) error
- func (c *Core) AddPlayer(action *PlayerAddition) error
- func (c *Core) AddUnitPrototype(action *UnitPrototypeAddition) error
- func (c *Core) AssignUnit(action *UnitAssignation) error
- func (c *Core) BoardRect() image.Rectangle
- func (c *Core) BoardSize() image.Point
- func (c *Core) CreateUnit(action *UnitCreation) error
- func (c *Core) EventHandler() InternalEventHandler
- func (c *Core) ForEachBuilding(playerId uint8, forEach func(buildingId uint8, building *datamod.BuildingsRow))
- func (c *Core) ForEachBuildingPrototype(forEach func(prototypeId uint8, prototype *datamod.BuildingPrototypesRow))
- func (c *Core) ForEachPlayer(forEach func(playerId uint8, player *datamod.PlayersRow))
- func (c *Core) ForEachUnit(playerId uint8, forEach func(unitId uint8, unit *datamod.UnitsRow))
- func (c *Core) ForEachUnitPrototype(forEach func(prototypeId uint8, prototype *datamod.UnitPrototypesRow))
- func (c *Core) GetBoardTile(x, y uint16) *datamod.BoardRow
- func (c *Core) GetBuilding(playerId uint8, buildingId uint8) *datamod.BuildingsRow
- func (c *Core) GetBuildingArea(playerId uint8, buildingId uint8) image.Rectangle
- func (c *Core) GetBuildingObject(playerId uint8, buildingId uint8) BuildingObjectWithRow
- func (c *Core) GetBuildingPrototype(prototypeId uint8) *datamod.BuildingPrototypesRow
- func (c *Core) GetMainBuilding(playerId uint8) *datamod.BuildingsRow
- func (c *Core) GetMainBuildingArea(playerId uint8) image.Rectangle
- func (c *Core) GetMainBuildingPosition(playerId uint8) image.Point
- func (c *Core) GetMeta() *datamod.MetaRow
- func (c *Core) GetNearest(iter IIterator_Uint8, area image.Rectangle) ObjectMatchByDistance
- func (c *Core) GetNearestEnemyUnits(playerId uint8, position image.Point, filters ...UnitFilter) []PlayerObjectMatchByDistance
- func (c *Core) GetPlayer(playerId uint8) *datamod.PlayersRow
- func (c *Core) GetSpawnArea(playerId uint8) image.Rectangle
- func (c *Core) GetSpawnPoint(layer LayerId, playerId uint8) (image.Point, bool)
- func (c *Core) GetUnit(playerId uint8, unitId uint8) *datamod.UnitsRow
- func (c *Core) GetUnitObject(playerId uint8, uintId uint8) UnitObjectWithRow
- func (c *Core) GetUnitPrototype(unitTypeId uint8) *datamod.UnitPrototypesRow
- func (c *Core) GetUnitToFireAt(obj UnitObjectWithRow) PlayerObjectMatchByDistance
- func (c *Core) GetWorkerPortArea(playerId uint8) image.Rectangle
- func (c *Core) GetWorkerPortPosition(playerId uint8) image.Point
- func (c *Core) HasStarted() bool
- func (c *Core) Initialize(action *Initialization) error
- func (c *Core) IsBuildableArea(area image.Rectangle) bool
- func (c *Core) IsInitialized() bool
- func (c *Core) IterBuildings(playerId uint8, filters ...BuildingFilter) *Iterator_uint8
- func (c *Core) IterPlayers(filters ...PlayerFilter) *Iterator_uint8
- func (c *Core) IterUnits(playerId uint8, filters ...UnitFilter) *Iterator_uint8
- func (c *Core) PlaceBuilding(action *BuildingPlacement) error
- func (c *Core) Purge()
- func (c *Core) SearchIter(iter IIterator_Uint8) (uint8, interface{})
- func (c *Core) SetEventHandler(handler InternalEventHandler)
- func (c *Core) SetFieldCallback(tableId lib.TableId, rowKey lib.RowKey, columnIndex int, value []byte)
- func (c *Core) SetFieldHandler() SetFieldHandler
- func (c *Core) SetSetFieldHandler(handler SetFieldHandler)
- func (c *Core) Start(action *Start) error
- func (c *Core) Tick()
- func (c *Core) TicksPerBlock() uint64
- func (c *Core) TileIsInBoard(position image.Point) bool
- func (c *Core) ValidateBuildingId(playerId uint8, buildingId uint8) error
- func (c *Core) ValidateBuildingType(prototypeId uint8) error
- func (c *Core) ValidatePlayerId(playerId uint8) error
- func (c *Core) ValidatePlayerOrEnvironmentId(playerId uint8) error
- func (c *Core) ValidateUnitId(playerId uint8, unitId uint8) error
- func (c *Core) ValidateUnitType(prototypeId uint8) error
- type FighterCommandData
- func (c FighterCommandData) Alpha() uint16
- func (c FighterCommandData) Beta() uint16
- func (c *FighterCommandData) SetAlpha(alpha uint16)
- func (c *FighterCommandData) SetBeta(beta uint16)
- func (c *FighterCommandData) SetTargetBuilding(playerId uint8, buildingId uint8)
- func (c *FighterCommandData) SetTargetBuildingId(buildingId uint8)
- func (c *FighterCommandData) SetTargetPlayerId(playerId uint8)
- func (c *FighterCommandData) SetTargetPosition(p image.Point)
- func (c *FighterCommandData) SetTargetUnitId(unitId uint8)
- func (c FighterCommandData) String() string
- func (c *FighterCommandData) TargetBuilding() (uint8, uint8)
- func (c FighterCommandData) TargetBuildingId() uint8
- func (c FighterCommandData) TargetPlayerId() uint8
- func (c FighterCommandData) TargetPosition() image.Point
- func (c FighterCommandData) TargetUnit() (uint8, uint8)
- func (c *FighterCommandData) TargetUnitId() uint8
- func (c FighterCommandData) Type() FighterCommandType
- func (c FighterCommandData) Uint64() uint64
- type FighterCommandType
- type IIterator_Uint8
- type Initialization
- type InternalEventHandler
- type InternalEvent_Built
- type InternalEvent_Destroyed
- type InternalEvent_Killed
- type InternalEvent_Shot
- type InternalEvent_Spawned
- type Iterator_uint8
- type LayerId
- type Object
- type ObjectMatchByDistance
- type ObjectType
- type ObjectWithRow
- type PlayerAddition
- type PlayerFilter
- type PlayerObjectMatchByDistance
- type SetFieldHandler
- type Start
- type Tick
- type UnitAssignation
- type UnitCommandData
- type UnitCommandType
- type UnitCreation
- type UnitFilter
- type UnitObjectWithRow
- type UnitPrototypeAddition
- type UnitState
- type WorkerCommandData
- func (c *WorkerCommandData) SetTargetBuilding(playerId uint8, buildingId uint8)
- func (c *WorkerCommandData) SetTargetBuildingId(buildingId uint8)
- func (c *WorkerCommandData) SetTargetPlayerId(playerId uint8)
- func (c WorkerCommandData) String() string
- func (c *WorkerCommandData) TargetBuilding() (uint8, uint8)
- func (c WorkerCommandData) TargetBuildingId() uint8
- func (c WorkerCommandData) TargetPlayerId() uint8
- func (c WorkerCommandData) Type() WorkerCommandType
- func (c WorkerCommandData) Uint64() uint64
- type WorkerCommandType
Constants ¶
View Source
const ( NilObjectId = uint8(0) NilPlayerId = NilObjectId NilBuildingId = NilObjectId NilUnitId = NilObjectId )
View Source
const ( InternalEventId_Shot uint8 = iota InternalEventId_Spawned InternalEventId_Killed InternalEventId_Built InternalEventId_Destroyed )
Variables ¶
View Source
var ( ErrNotInitialized = errors.New("not initialized") ErrNotStarted = errors.New("not started") ErrAlreadyInitialized = errors.New("already initialized") ErrAlreadyStarted = errors.New("already started") ErrPlayerLimitReached = errors.New("player limit reached") ErrUnitLimitReached = errors.New("unit limit reached") ErrBuildingLimitReached = errors.New("building limit reached") ErrUnitPrototypeLimitReached = errors.New("unit prototype limit reached") ErrBuildingPrototypeLimitReached = errors.New("building prototype limit reached") ErrInvalidPlayerId = errors.New("invalid player id") ErrInvalidUnitId = errors.New("invalid unit id") ErrInvalidBuildingId = errors.New("invalid building id") ErrInvalidUnitType = errors.New("invalid unit type") ErrInvalidBuildingType = errors.New("invalid building type") ErrNonexistentPlayer = errors.New("nonexistent player") ErrMissingMainBuilding = errors.New("player has no main building") ErrMainBuildingDestroyed = errors.New("player's main building destroyed") ErrAreaNotBuildable = errors.New("area not buildable") ErrUnitDead = errors.New("unit dead") )
View Source
var (
TableId_Meta, _ = archmod.TableSchemas.TableIdFromName("Meta")
TableId_Players, _ = archmod.TableSchemas.TableIdFromName("Players")
TableId_Board, _ = archmod.TableSchemas.TableIdFromName("Board")
TableId_Units, _ = archmod.TableSchemas.TableIdFromName("Units")
TableId_Buildings, _ = archmod.TableSchemas.TableIdFromName("Buildings")
TableId_UnitPrototypes, _ = archmod.TableSchemas.TableIdFromName("UnitPrototypes")
TableId_BuildingPrototypes, _ = archmod.TableSchemas.TableIdFromName("BuildingPrototypes")
)
Functions ¶
func ChebyshevDistance ¶
func ChebyshevDistanceToArea ¶
func DeltasToAreaAsPoint ¶
func EmptyUnitTile ¶
func GetAttackStrength ¶
func GetAttackStrength(proto *datamod.UnitPrototypesRow, layerId LayerId) uint8
func GetDimensionsAsPoint ¶
func GetPositionAsPoint ¶
func IsTileEmptyAllLayers ¶
func ManhattanDistance ¶
func ManhattanDistanceToArea ¶
func SetTileLandObject ¶
func SetTileLandObject(tile *datamod.BoardRow, objectType ObjectType, playerId uint8, objectId uint8)
func SetTileUnit ¶
func StepTowards1D ¶
Types ¶
type BuildingFilter ¶
type BuildingFilter func(playerId, buildingId uint8, building *datamod.BuildingsRow) bool
type BuildingObjectWithRow ¶
type BuildingObjectWithRow struct {
ObjectWithRow
}
func (BuildingObjectWithRow) Building ¶
func (o BuildingObjectWithRow) Building() *datamod.BuildingsRow
type BuildingPlacement ¶
type BuildingPlacement = archmod.ActionData_PlaceBuilding
type BuildingPrototypeAddition ¶
type BuildingPrototypeAddition = archmod.ActionData_AddBuildingPrototype
type BuildingState ¶
type BuildingState uint8
const ( BuildingState_Nil BuildingState = iota BuildingState_Unpaid BuildingState_Building BuildingState_Built BuildingState_Destroyed BuildingState_Count )
func (BuildingState) HasBeenBuilt ¶
func (s BuildingState) HasBeenBuilt() bool
func (BuildingState) IsActive ¶
func (s BuildingState) IsActive() bool
func (BuildingState) IsNil ¶
func (s BuildingState) IsNil() bool
func (BuildingState) Uint8 ¶
func (s BuildingState) Uint8() uint8
type CommandPath ¶
type CommandPath struct {
// contains filtered or unexported fields
}
func NewCommandPath ¶
func NewCommandPath(pathRaw uint64, metaRaw uint8) *CommandPath
func (*CommandPath) CurrentPoint ¶
func (c *CommandPath) CurrentPoint() image.Point
func (*CommandPath) GetPathPoint ¶
func (c *CommandPath) GetPathPoint(i int) image.Point
func (*CommandPath) HasPath ¶
func (c *CommandPath) HasPath() bool
func (*CommandPath) IncPointer ¶
func (c *CommandPath) IncPointer()
func (*CommandPath) Meta ¶
func (c *CommandPath) Meta() commandPathMeta
func (*CommandPath) Path ¶
func (c *CommandPath) Path() []image.Point
func (*CommandPath) PathLen ¶
func (c *CommandPath) PathLen() uint8
func (*CommandPath) Pointer ¶
func (c *CommandPath) Pointer() uint8
func (*CommandPath) RawPath ¶
func (c *CommandPath) RawPath() uint64
func (*CommandPath) SetPath ¶
func (c *CommandPath) SetPath(path []image.Point)
type Core ¶
func (*Core) AbsSubTickIndex ¶
func (*Core) AddBuildingPrototype ¶
func (c *Core) AddBuildingPrototype(action *BuildingPrototypeAddition) error
func (*Core) AddPlayer ¶
func (c *Core) AddPlayer(action *PlayerAddition) error
func (*Core) AddUnitPrototype ¶
func (c *Core) AddUnitPrototype(action *UnitPrototypeAddition) error
func (*Core) AssignUnit ¶
func (c *Core) AssignUnit(action *UnitAssignation) error
func (*Core) CreateUnit ¶
func (c *Core) CreateUnit(action *UnitCreation) error
func (*Core) EventHandler ¶
func (c *Core) EventHandler() InternalEventHandler
func (*Core) ForEachBuilding ¶
func (c *Core) ForEachBuilding(playerId uint8, forEach func(buildingId uint8, building *datamod.BuildingsRow))
func (*Core) ForEachBuildingPrototype ¶
func (c *Core) ForEachBuildingPrototype(forEach func(prototypeId uint8, prototype *datamod.BuildingPrototypesRow))
func (*Core) ForEachPlayer ¶
func (c *Core) ForEachPlayer(forEach func(playerId uint8, player *datamod.PlayersRow))
func (*Core) ForEachUnit ¶
func (*Core) ForEachUnitPrototype ¶
func (c *Core) ForEachUnitPrototype(forEach func(prototypeId uint8, prototype *datamod.UnitPrototypesRow))
func (*Core) GetBuilding ¶
func (c *Core) GetBuilding(playerId uint8, buildingId uint8) *datamod.BuildingsRow
func (*Core) GetBuildingArea ¶
func (*Core) GetBuildingObject ¶
func (c *Core) GetBuildingObject(playerId uint8, buildingId uint8) BuildingObjectWithRow
func (*Core) GetBuildingPrototype ¶
func (c *Core) GetBuildingPrototype(prototypeId uint8) *datamod.BuildingPrototypesRow
func (*Core) GetMainBuilding ¶
func (c *Core) GetMainBuilding(playerId uint8) *datamod.BuildingsRow
func (*Core) GetMainBuildingArea ¶
func (*Core) GetMainBuildingPosition ¶
func (*Core) GetNearest ¶
func (c *Core) GetNearest(iter IIterator_Uint8, area image.Rectangle) ObjectMatchByDistance
func (*Core) GetNearestEnemyUnits ¶
func (c *Core) GetNearestEnemyUnits(playerId uint8, position image.Point, filters ...UnitFilter) []PlayerObjectMatchByDistance
func (*Core) GetSpawnPoint ¶
func (*Core) GetUnitObject ¶
func (c *Core) GetUnitObject(playerId uint8, uintId uint8) UnitObjectWithRow
func (*Core) GetUnitPrototype ¶
func (c *Core) GetUnitPrototype(unitTypeId uint8) *datamod.UnitPrototypesRow
func (*Core) GetUnitToFireAt ¶
func (c *Core) GetUnitToFireAt(obj UnitObjectWithRow) PlayerObjectMatchByDistance
func (*Core) GetWorkerPortPosition ¶
func (*Core) HasStarted ¶
func (*Core) Initialize ¶
func (c *Core) Initialize(action *Initialization) error
func (*Core) IsInitialized ¶
func (*Core) IterBuildings ¶
func (c *Core) IterBuildings(playerId uint8, filters ...BuildingFilter) *Iterator_uint8
func (*Core) IterPlayers ¶
func (c *Core) IterPlayers(filters ...PlayerFilter) *Iterator_uint8
func (*Core) IterUnits ¶
func (c *Core) IterUnits(playerId uint8, filters ...UnitFilter) *Iterator_uint8
func (*Core) PlaceBuilding ¶
func (c *Core) PlaceBuilding(action *BuildingPlacement) error
func (*Core) SearchIter ¶
func (c *Core) SearchIter(iter IIterator_Uint8) (uint8, interface{})
func (*Core) SetEventHandler ¶
func (c *Core) SetEventHandler(handler InternalEventHandler)
func (*Core) SetFieldCallback ¶
func (*Core) SetFieldHandler ¶
func (c *Core) SetFieldHandler() SetFieldHandler
func (*Core) SetSetFieldHandler ¶
func (c *Core) SetSetFieldHandler(handler SetFieldHandler)
func (*Core) TicksPerBlock ¶
func (*Core) ValidateBuildingId ¶
func (*Core) ValidateBuildingType ¶
func (*Core) ValidatePlayerId ¶
func (*Core) ValidatePlayerOrEnvironmentId ¶
func (*Core) ValidateUnitType ¶
type FighterCommandData ¶
type FighterCommandData uint64
<unused> uint24, CommandType uint8, Alpha uint16, Beta uint16
func NewFighterCommandData ¶
func NewFighterCommandData(command FighterCommandType) FighterCommandData
func (FighterCommandData) Alpha ¶
func (c FighterCommandData) Alpha() uint16
func (FighterCommandData) Beta ¶
func (c FighterCommandData) Beta() uint16
func (*FighterCommandData) SetAlpha ¶
func (c *FighterCommandData) SetAlpha(alpha uint16)
func (*FighterCommandData) SetBeta ¶
func (c *FighterCommandData) SetBeta(beta uint16)
func (*FighterCommandData) SetTargetBuilding ¶
func (c *FighterCommandData) SetTargetBuilding(playerId uint8, buildingId uint8)
func (*FighterCommandData) SetTargetBuildingId ¶
func (c *FighterCommandData) SetTargetBuildingId(buildingId uint8)
func (*FighterCommandData) SetTargetPlayerId ¶
func (c *FighterCommandData) SetTargetPlayerId(playerId uint8)
func (*FighterCommandData) SetTargetPosition ¶
func (c *FighterCommandData) SetTargetPosition(p image.Point)
func (*FighterCommandData) SetTargetUnitId ¶
func (c *FighterCommandData) SetTargetUnitId(unitId uint8)
func (FighterCommandData) String ¶
func (c FighterCommandData) String() string
func (*FighterCommandData) TargetBuilding ¶
func (c *FighterCommandData) TargetBuilding() (uint8, uint8)
func (FighterCommandData) TargetBuildingId ¶
func (c FighterCommandData) TargetBuildingId() uint8
func (FighterCommandData) TargetPlayerId ¶
func (c FighterCommandData) TargetPlayerId() uint8
func (FighterCommandData) TargetPosition ¶
func (c FighterCommandData) TargetPosition() image.Point
func (FighterCommandData) TargetUnit ¶
func (c FighterCommandData) TargetUnit() (uint8, uint8)
func (*FighterCommandData) TargetUnitId ¶
func (c *FighterCommandData) TargetUnitId() uint8
func (FighterCommandData) Type ¶
func (c FighterCommandData) Type() FighterCommandType
func (FighterCommandData) Uint64 ¶
func (c FighterCommandData) Uint64() uint64
type FighterCommandType ¶
type FighterCommandType uint8
const ( FighterCommandType_HoldPosition FighterCommandType = iota FighterCommandType_AttackBuilding FighterCommandType_AttackUnit FighterCommandType_Count )
func (FighterCommandType) IsBusy ¶
func (c FighterCommandType) IsBusy() bool
func (FighterCommandType) IsIdle ¶
func (c FighterCommandType) IsIdle() bool
func (FighterCommandType) IsTargetingBuilding ¶
func (c FighterCommandType) IsTargetingBuilding() bool
func (FighterCommandType) IsTargetingPosition ¶
func (c FighterCommandType) IsTargetingPosition() bool
func (FighterCommandType) IsTargetingUnit ¶
func (c FighterCommandType) IsTargetingUnit() bool
func (FighterCommandType) Uint8 ¶
func (c FighterCommandType) Uint8() uint8
type IIterator_Uint8 ¶
type Initialization ¶
type Initialization = archmod.ActionData_Initialize
type InternalEventHandler ¶
type InternalEventHandler func(eventId uint8, data interface{})
type InternalEvent_Built ¶
type InternalEvent_Built struct {
Building Object
}
type InternalEvent_Destroyed ¶
type InternalEvent_Destroyed struct {
Building Object
}
type InternalEvent_Killed ¶
type InternalEvent_Killed struct {
Unit Object
}
type InternalEvent_Shot ¶
type InternalEvent_Spawned ¶
type InternalEvent_Spawned struct {
Unit Object
}
type Iterator_uint8 ¶
type Iterator_uint8 struct { Current uint8 Max uint8 Get func(idx uint8) (id uint8, val interface{}) // contains filtered or unexported fields }
func (*Iterator_uint8) Next ¶
func (i *Iterator_uint8) Next() bool
func (*Iterator_uint8) Value ¶
func (i *Iterator_uint8) Value() (id uint8, val interface{})
type Object ¶
type Object struct { Type ObjectType PlayerId uint8 ObjectId uint8 }
type ObjectMatchByDistance ¶
func (ObjectMatchByDistance) IsNil ¶
func (m ObjectMatchByDistance) IsNil() bool
type ObjectType ¶
type ObjectType uint8
const ( ObjectType_Nil ObjectType = iota ObjectType_Building ObjectType_Unit ObjectType_Count )
func (ObjectType) IsNil ¶
func (t ObjectType) IsNil() bool
func (ObjectType) Uint8 ¶
func (t ObjectType) Uint8() uint8
type ObjectWithRow ¶
type ObjectWithRow struct {
// contains filtered or unexported fields
}
func (ObjectWithRow) IsNil ¶
func (o ObjectWithRow) IsNil() bool
func (ObjectWithRow) Object ¶
func (o ObjectWithRow) Object() Object
func (ObjectWithRow) ObjectId ¶
func (o ObjectWithRow) ObjectId() uint8
func (ObjectWithRow) ObjectType ¶
func (o ObjectWithRow) ObjectType() ObjectType
func (ObjectWithRow) PlayerId ¶
func (o ObjectWithRow) PlayerId() uint8
type PlayerAddition ¶
type PlayerAddition = archmod.ActionData_AddPlayer
type PlayerFilter ¶
type PlayerFilter func(playerId uint8, player *datamod.PlayersRow) bool
type PlayerObjectMatchByDistance ¶
type PlayerObjectMatchByDistance struct { PlayerId uint8 ObjectMatchByDistance }
type SetFieldHandler ¶
type Start ¶
type Start = archmod.ActionData_Start
type Tick ¶
type Tick = arch.CanonicalTickAction
type UnitAssignation ¶
type UnitAssignation = archmod.ActionData_AssignUnit
type UnitCommandData ¶
type UnitCommandType ¶
type UnitCreation ¶
type UnitCreation = archmod.ActionData_CreateUnit
type UnitObjectWithRow ¶
type UnitObjectWithRow struct {
ObjectWithRow
}
func (UnitObjectWithRow) Unit ¶
func (o UnitObjectWithRow) Unit() *datamod.UnitsRow
type UnitPrototypeAddition ¶
type UnitPrototypeAddition = archmod.ActionData_AddUnitPrototype
type UnitState ¶
type UnitState uint8
func (UnitState) HasSpawned ¶
func (UnitState) IsDeadOrInactive ¶
func (UnitState) IsSpawning ¶
type WorkerCommandData ¶
type WorkerCommandData uint64
<unused> uint40, CommandType uint8, PlayerId uint8, BuildingId uint8
func NewWorkerCommandData ¶
func NewWorkerCommandData(commandType WorkerCommandType) WorkerCommandData
func (*WorkerCommandData) SetTargetBuilding ¶
func (c *WorkerCommandData) SetTargetBuilding(playerId uint8, buildingId uint8)
func (*WorkerCommandData) SetTargetBuildingId ¶
func (c *WorkerCommandData) SetTargetBuildingId(buildingId uint8)
func (*WorkerCommandData) SetTargetPlayerId ¶
func (c *WorkerCommandData) SetTargetPlayerId(playerId uint8)
func (WorkerCommandData) String ¶
func (c WorkerCommandData) String() string
func (*WorkerCommandData) TargetBuilding ¶
func (c *WorkerCommandData) TargetBuilding() (uint8, uint8)
func (WorkerCommandData) TargetBuildingId ¶
func (c WorkerCommandData) TargetBuildingId() uint8
func (WorkerCommandData) TargetPlayerId ¶
func (c WorkerCommandData) TargetPlayerId() uint8
func (WorkerCommandData) Type ¶
func (c WorkerCommandData) Type() WorkerCommandType
func (WorkerCommandData) Uint64 ¶
func (c WorkerCommandData) Uint64() uint64
type WorkerCommandType ¶
type WorkerCommandType uint8
const ( WorkerCommandType_Idle WorkerCommandType = iota WorkerCommandType_Gather WorkerCommandType_Build WorkerCommandType_Count )
func (WorkerCommandType) IsBusy ¶
func (c WorkerCommandType) IsBusy() bool
func (WorkerCommandType) IsIdle ¶
func (c WorkerCommandType) IsIdle() bool
func (WorkerCommandType) Uint8 ¶
func (c WorkerCommandType) Uint8() uint8
Click to show internal directories.
Click to hide internal directories.