gogame-old/models/planet.go
models/planet.goRaw
1package models
2
3import (
4 "time"
5
6 "gopkg.in/mgo.v2/bson"
7)
8
9type Process struct {
10 // if Title == "", is not active, and can build other buildings/research
11 Title string // building name / research name + level
12 Building string
13 Ends time.Time
14}
15
16type Planet struct {
17 Id bson.ObjectId `json:"id" bson:"_id,omitempty"`
18 Size int64 // fields/slots
19 Name string
20 OwnerId bson.ObjectId
21 Buildings map[string]int64
22 CurrentBuild Process
23 Research Process
24 /*
25 Buildings types (in the map, all in lowcase):
26 MetalMine int64
27 CrystalMine int64
28 DeuteriumMine int64
29 EnergyMine int64
30 FusionReactor int64
31 RoboticsFactory int64
32 Shipyard int64
33 RessearchLab int64
34 */
35}