refactor: fleet/group AtPlanet
This commit is contained in:
@@ -142,8 +142,7 @@ func (sg ShipGroup) State() ShipGroupState {
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: ambigous func, refactor
|
||||
func (sg ShipGroup) OnPlanet() (uint, bool) {
|
||||
func (sg ShipGroup) AtPlanet() (uint, bool) {
|
||||
switch sg.State() {
|
||||
case StateInOrbit:
|
||||
return sg.Destination, true
|
||||
@@ -171,7 +170,7 @@ func (sg ShipGroup) Equal(other ShipGroup) bool {
|
||||
sg.TechLevel(TechShields) == other.TechLevel(TechShields) &&
|
||||
sg.TechLevel(TechCargo) == other.TechLevel(TechCargo) &&
|
||||
sg.CargoType == other.CargoType &&
|
||||
sg.Load.F()/float64(sg.Number) == other.Load.F()/float64(other.Number) &&
|
||||
(sg.Load/F(float64(sg.Number))).F() == (other.Load/F(float64(other.Number))).F() &&
|
||||
sg.State() == other.State()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user