race quit, transfer state, refactor

This commit is contained in:
Ilia Denisov
2026-02-07 01:59:11 +02:00
parent 43ba5eb07c
commit fc73cbf83a
27 changed files with 520 additions and 341 deletions
+7
View File
@@ -38,9 +38,16 @@ func (p *Planet) Free() {
p.Owner = nil
p.Production = ProductionNone.AsType(uuid.Nil)
p.Colonists = 0.
p.Population = 0.
clear(p.Route)
}
func (p *Planet) Wipe() {
p.Free()
p.Industry = 0
p.Capital = 0
}
func (p Planet) Owned() bool {
return p.Owner != nil && *p.Owner != uuid.Nil
}