Browse Source

Adds Ship and ShipModel

Steve Thielemann 7 months ago
parent
commit
d8669c38cc
2 changed files with 29 additions and 1 deletions
  1. 1 1
      client.go
  2. 28 0
      ship.go

+ 1 - 1
client.go

@@ -41,7 +41,7 @@ func (c *Client) Write(text string) {
 	c.conn.Write([]byte(text))
 }
 
-var clearLine = bytes.Repeat([]byte("\b \b"), 500)
+var clearLine = bytes.Repeat([]byte("\b \b"), 1000)
 
 func (c *Client) InsertWrite(text string) {
 	c.conn.Write(clearLine)

+ 28 - 0
ship.go

@@ -0,0 +1,28 @@
+package main
+
+type ShipModel struct {
+	ID ID
+	Name string
+	MaxFighters uint64
+	MaxShields uint64
+	GenShieldAmount uint64
+	GenShieldTurns uint64
+	GenFighterAmount uint64
+	GenFighterTurns uint64
+	CanLand bool
+	AttackRatio float32
+	DefenseRatio float32
+	CanWarp bool
+}
+
+type Ship struct {
+	ID ID
+	Owner ID
+	CorpOwned bool
+	Model ID
+	Name string
+	Fighters uint64
+	Shields uint64
+	GenFighterTick uint64
+	GenShieldTick uint64
+}