Skip to content

Commit

Permalink
Add Lftechs to buildCancelable()
Browse files Browse the repository at this point in the history
  • Loading branch information
YOLOP0wn committed Sep 24, 2022
1 parent 9260bba commit 8a6f179
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/wrapper/ogame.go
Original file line number Diff line number Diff line change
Expand Up @@ -3010,6 +3010,8 @@ func (b *OGame) build(celestialID ogame.CelestialID, id ogame.ID, nbr int64) err
page = ShipyardPageName
} else if id.IsLfBuilding() {
page = LfbuildingsPageName
} else if id.IsLfTech() {
page = LftechsPageName
} else if id.IsBuilding() {
page = SuppliesPageName
} else if id.IsTech() {
Expand Down Expand Up @@ -3057,7 +3059,7 @@ func (b *OGame) build(celestialID ogame.CelestialID, id ogame.ID, nbr int64) err
}

func (b *OGame) buildCancelable(celestialID ogame.CelestialID, id ogame.ID) error {
if !id.IsBuilding() && !id.IsTech() && !id.IsLfBuilding() {
if !id.IsBuilding() && !id.IsTech() && !id.IsLfBuilding() && !id.IsLfTech() {
return errors.New("invalid id " + id.String())
}
return b.build(celestialID, id, 0)
Expand Down

0 comments on commit 8a6f179

Please sign in to comment.