first pass at repair mode
This commit is contained in:
@@ -5,19 +5,20 @@ import (
|
||||
)
|
||||
|
||||
type Robot struct {
|
||||
Id string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Stats Stats `json:"-"`
|
||||
TargetSpeed float32 `json:"-"`
|
||||
Speed float32 `json:"speed"`
|
||||
Health int `json:"health"`
|
||||
Position v.Point2d `json:"position"`
|
||||
Heading v.Vector2d `json:"heading"`
|
||||
MoveTo *v.Point2d `json:"-"`
|
||||
FireAt *v.Point2d `json:"-"`
|
||||
Scanners []Scanner `json:"scanners"`
|
||||
LastFired int `json:"-"`
|
||||
Collision bool `json:"collision"`
|
||||
Id string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Stats Stats `json:"-"`
|
||||
TargetSpeed float32 `json:"-"`
|
||||
Speed float32 `json:"speed"`
|
||||
Health int `json:"health"`
|
||||
RepairCounter float32 `json:"repair"`
|
||||
Position v.Point2d `json:"position"`
|
||||
Heading v.Vector2d `json:"heading"`
|
||||
MoveTo *v.Point2d `json:"-"`
|
||||
FireAt *v.Point2d `json:"-"`
|
||||
Scanners []Scanner `json:"scanners"`
|
||||
LastFired int `json:"-"`
|
||||
Collision bool `json:"collision"`
|
||||
}
|
||||
|
||||
// This is the subset of data we send to players about robots
|
||||
@@ -157,5 +158,6 @@ type Instruction struct {
|
||||
MoveTo *v.Point2d `json:"move_to,omitempty"`
|
||||
FireAt *v.Point2d `json:"fire_at,omitempty"`
|
||||
TargetSpeed *float32 `json:"target_speed,omitempty"`
|
||||
Repair *bool `json:"repair,omitempty"`
|
||||
Stats Stats `json:"stats"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user