refactor: wiped planet after bombing

This commit is contained in:
IliaDenisov
2026-02-06 18:01:20 +03:00
parent 449c3273bf
commit 203d4e21c4
2 changed files with 2 additions and 2 deletions
-2
View File
@@ -21,9 +21,7 @@ func (c *Cache) ProduceBombings() []*game.Bombing {
}
if p.Population == 0 {
// TODO: what aboul colonists left on planet?
p.Free()
clear(p.Route)
} else {
// Если на планете остались также и колонисты, то они превращаются в население,
// а накопленная промышленность возмещает потери производства.
+2
View File
@@ -37,6 +37,8 @@ func (p *Planet) Own(v uuid.UUID) {
func (p *Planet) Free() {
p.Owner = nil
p.Production = ProductionNone.AsType(uuid.Nil)
p.Colonists = 0.
clear(p.Route)
}
func (p Planet) Owned() bool {