Versions in this module Expand all Collapse all v0 v0.1.0 Jun 14, 2026 Changes in this version + const FireAtWill + const FireHold + const FireReturn + const MoveHold + const MoveManeuver + const MoveRoam + const TickHz + const TickMs + func ParseYardMap(s string, fx, fz int) []yardCell + type Binding interface + HasScript func(name string) bool + Pieces func() []frame.PieceState + Restart func(name string, args ...int) + Start func(name string, args ...int) + type Blast struct + AoE fixed.Fixed + Damage fixed.Fixed + Edge fixed.Fixed + type CobController interface + KillAllThreads func() + KillThread func(id int32) + ResetState func() + type CobDebugger interface + AddBreakpoint func(scriptIdx int, offset uint32) + ClearBreakpointHits func() + ClearBreakpoints func() + Coverage func() map[int][]uint32 + RemoveBreakpoint func(scriptIdx int, offset uint32) + SetStatic func(idx int, v int32) + SetThreadLocal func(id int32, idx int, v int32) + SetThreadPC func(id int32, pc int) + StepThread func(id int32) + type CobInspector interface + CobState func() frame.CobUnitState + type CobPorts interface + SetUnitValuePort func(port int, v int32) + UnitValuePort func(port int) int32 + type CobScripts interface + HasScript func(name string) bool + KillThreadsByName func(name string) + Restart func(name string, args ...int) + ScriptNames func() []string + Start func(name string, args ...int) + type Config struct + Gravity fixed.Fixed + Seed uint32 + Spawn SpawnFunc + type RestoredProjectile struct + Accel fixed.Fixed + AgeSec fixed.Fixed + AoE fixed.Fixed + Closing bool + Damage fixed.Fixed + FromPiece int + Gravity fixed.Fixed + Heading int32 + HomingR fixed.Fixed + ID uint32 + LastDist fixed.Fixed + LaunchY fixed.Fixed + LifeSec fixed.Fixed + Mode uint8 + Model string + Origin fixed.Vec3 + OwnerID uint32 + Phase uint8 + Pitch int32 + Pos fixed.Vec3 + Slot int + Speed fixed.Fixed + Target fixed.Vec3 + TargetID uint32 + TurnAng int32 + VMax fixed.Fixed + Vel fixed.Vec3 + Weapon string + type RestoredQueued struct + Kind uint8 + Name string + Target fixed.Vec2 + TargetUnit uint32 + type RestoredUnit struct + AttackTarget uint32 + AutoEngaged bool + AvoidFlip bool + BuildGateMs int64 + BuildName string + BuildPercent fixed.Fixed + BuildSite fixed.Vec2 + BuildState uint8 + BuildTargetID uint32 + CarriedBy uint32 + Carrying []uint32 + Cob *frame.CobSnapshot + CurIsPatrol bool + Dead bool + FireMode uint8 + HasAttack bool + HasMove bool + HasUnload bool + Heading fixed.Fixed + Health fixed.Fixed + HomePos fixed.Vec2 + ID uint32 + LoadTarget uint32 + MoveMode uint8 + MoveTarget fixed.Vec2 + Name string + Pos fixed.Vec3 + ProdQueue []string + ProgressX fixed.Fixed + ProgressZ fixed.Fixed + Queue []RestoredQueued + SelfDAtMs int64 + Side int + Speed fixed.Fixed + StallTicks uint16 + UnloadAt fixed.Vec2 + Weapons [3]RestoredWeapon + type RestoredWeapon struct + HasTarget bool + LastFireMs int64 + Source string + TargetPt fixed.Vec3 + TargetUnit uint32 + type Runtime interface + Tick func(ms int64) + type SpawnFunc func(name string) (*UnitMeta, Binding) + type Terrain struct + CellWU fixed.Fixed + Data []uint8 + H int + HeightScale fixed.Fixed + SeaLevel int + SlopeScalePct int + Void []uint8 + W int + type Unit struct + BuildPercent fixed.Fixed + Dead bool + Health fixed.Fixed + ID uint32 + IsMoving bool + Meta *UnitMeta + Name string + PosY fixed.Fixed + Side int + func (u *Unit) Heading() int32 + func (u *Unit) Pos() fixed.Vec3 + type UnitMeta struct + Accel fixed.Fixed + ActivateWhenBuilt bool + BrakeRate fixed.Fixed + BuildDistance fixed.Fixed + BuildTime fixed.Fixed + CanMove bool + CostEnergy fixed.Fixed + CostMana fixed.Fixed + CostMetal fixed.Fixed + CruiseAltitude fixed.Fixed + Explode Blast + FootprintX int + FootprintZ int + IsAircraft bool + IsBuilder bool + IsHover bool + IsHovercraft bool + IsShip bool + IsSub bool + MakeEnergy fixed.Fixed + MakeMana fixed.Fixed + MakeMetal fixed.Fixed + MaxHealth fixed.Fixed + MaxSlope int + MaxVelocity fixed.Fixed + MaxWaterDepth int + MinWaterDepth int + Name string + OnOffable bool + SelfD Blast + StandFire uint8 + StandMove uint8 + StoreEnergy fixed.Fixed + StoreMana fixed.Fixed + StoreMetal fixed.Fixed + TransportSlots int + TurnRate fixed.Fixed + Weapons [3]WeaponMeta + WorkerTime int + Yard []yardCell + type WeaponMeta struct + AccelerationWU fixed.Fixed + AreaOfEffectWU fixed.Fixed + Ballistic bool + BeamWeapon bool + Burst int + CommandFire bool + Damage fixed.Fixed + Dropped bool + EnergyShot fixed.Fixed + FlightTimeSec fixed.Fixed + MetalShot fixed.Fixed + Model string + Name string + Present bool + Range fixed.Fixed + ReloadMs int + SelfProp bool + StartVelocityWU fixed.Fixed + Tolerance int32 + Tracks bool + TurnRateAng int32 + VLaunch bool + VelocityWU fixed.Fixed + type World struct + func New(cfg Config) *World + func (w *World) AddUnit(name string, meta *UnitMeta, binding Binding, at fixed.Vec2, heading int32, ...) uint32 + func (w *World) ApplyDamage(sourceID, targetID uint32, dmg fixed.Fixed) bool + func (w *World) ApplyOrder(o order.Order) + func (w *World) CanBuildAt(name string, x, z fixed.Fixed) bool + func (w *World) ExportProjectiles() []RestoredProjectile + func (w *World) ExportUnits() []RestoredUnit + func (w *World) ForEachUnit(fn func(*Unit)) + func (w *World) Hash() uint64 + func (w *World) InitOnOff(id uint32) + func (w *World) KillAllThreads() + func (w *World) RemoveUnit(id uint32) + func (w *World) Restore(tick uint64, units []RestoredUnit, projectiles []RestoredProjectile) + func (w *World) SetTerrain(t *Terrain) + func (w *World) Snapshot() frame.Snapshot + func (w *World) Step(rt Runtime) + func (w *World) Terrain() *Terrain + func (w *World) Tick() uint64 + func (w *World) UnitAddBreakpoint(id uint32, scriptIdx int, offset uint32) + func (w *World) UnitByID(id uint32) *Unit + func (w *World) UnitClearBreakpointHits(id uint32) + func (w *World) UnitClearBreakpoints(id uint32) + func (w *World) UnitCob(id uint32) (frame.CobUnitState, bool) + func (w *World) UnitCount() int + func (w *World) UnitCoverage(id uint32) map[int][]uint32 + func (w *World) UnitKillThread(id uint32, threadID int32) + func (w *World) UnitKillThreads(id uint32) + func (w *World) UnitKillThreadsByName(id uint32, name string) + func (w *World) UnitRemoveBreakpoint(id uint32, scriptIdx int, offset uint32) + func (w *World) UnitReset(id uint32) + func (w *World) UnitRestartScript(id uint32, name string, args ...int) + func (w *World) UnitScriptNames(id uint32) []string + func (w *World) UnitSetStatic(id uint32, idx int, v int32) + func (w *World) UnitSetThreadLocal(id uint32, threadID int32, idx int, v int32) + func (w *World) UnitSetThreadPC(id uint32, threadID int32, pc int) + func (w *World) UnitSetValuePort(id uint32, port int, v int32) + func (w *World) UnitStartScript(id uint32, name string, args ...int) + func (w *World) UnitStepThread(id uint32, threadID int32) + func (w *World) UnitValuePort(id uint32, port int) int32