Skip to content

Commit

Permalink
add lifeform buildings constants for every races
Browse files Browse the repository at this point in the history
  • Loading branch information
alaingilbert committed Aug 28, 2022
1 parent 396c2ff commit e39079d
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 3 deletions.
38 changes: 37 additions & 1 deletion pkg/ogame/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const (
IntergalacticResearchNetworkID ID = 123
AstrophysicsID ID = 124
GravitonTechnologyID ID = 199
ResidentialSectorID ID = 11101 // Lifeform
ResidentialSectorID ID = 11101 // Lifeform (humans)
BiosphereFarmID ID = 11102
ResearchCentreID ID = 11103
AcademyOfSciencesID ID = 11104
Expand All @@ -190,6 +190,42 @@ const (
BiotechLabID ID = 11110
MetropolisID ID = 11111
PlanetaryShieldID ID = 11112
MeditationEnclaveID ID = 12101 // Lifeform (rocktal)
CrystalFarmID ID = 12102
RuneTechnologiumID ID = 12103
RuneForgeID ID = 12104
OriktoriumID ID = 12105
MagmaForgeID ID = 12106
DisruptionChamberID ID = 12107
MegalithID ID = 12108
CrystalRefineryID ID = 12109
DeuteriumSynthesiserID ID = 12110
MineralResearchCentreID ID = 12111
MetalRecyclingPlantID ID = 12112
AssemblyLineID ID = 13101 // Lifeform (mechas)
FusionCellFactoryID ID = 13102
RoboticsResearchCentreID ID = 13103
UpdateNetworkID ID = 12304
QuantumComputerCentreID ID = 13105
AutomatisedAssemblyCentreID ID = 13106
HighPerformanceTransformerID ID = 13107
MicrochipAssemblyLineID ID = 13108
ProductionAssemblyHallID ID = 13109
HighPerformanceSynthesiserID ID = 13110
ChipMassProductionID ID = 13111
NanoRepairBotsID ID = 13112
SanctuaryID ID = 14101 // Lifeform (kaelesh)
AntimatterCondenserID ID = 14102
VortexChamberID ID = 14103
HallsOfRealisationID ID = 14104
ForumOfTranscendenceID ID = 14105
AntimatterConvectorID ID = 14106
CloningLaboratoryID ID = 14107
ChrysalisAcceleratorID ID = 14108
BioModifierID ID = 14109
PsionicModulatorID ID = 14110
ShipManufacturingHallID ID = 14111
SupraRefractorID ID = 14112
IntergalacticEnvoysID ID = 11201 // Lifeform tech
HighPerformanceExtractorsID ID = 11202
FusionDrivesID ID = 11203
Expand Down
40 changes: 38 additions & 2 deletions pkg/ogame/id.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func (o ID) IsResourceBuilding() bool {
}

func (o ID) IsLfBuilding() bool {
return o == ResidentialSectorID ||
return o == ResidentialSectorID || // humans
o == BiosphereFarmID ||
o == ResearchCentreID ||
o == AcademyOfSciencesID ||
Expand All @@ -209,7 +209,43 @@ func (o ID) IsLfBuilding() bool {
o == SkyscraperID ||
o == BiotechLabID ||
o == MetropolisID ||
o == PlanetaryShieldID
o == PlanetaryShieldID || // rocktal
o == MeditationEnclaveID ||
o == CrystalFarmID ||
o == RuneTechnologiumID ||
o == RuneForgeID ||
o == OriktoriumID ||
o == MagmaForgeID ||
o == DisruptionChamberID ||
o == MegalithID ||
o == CrystalRefineryID ||
o == DeuteriumSynthesiserID ||
o == MineralResearchCentreID ||
o == MetalRecyclingPlantID ||
o == AssemblyLineID || // mechas
o == FusionCellFactoryID ||
o == RoboticsResearchCentreID ||
o == UpdateNetworkID ||
o == QuantumComputerCentreID ||
o == AutomatisedAssemblyCentreID ||
o == HighPerformanceTransformerID ||
o == MicrochipAssemblyLineID ||
o == ProductionAssemblyHallID ||
o == HighPerformanceSynthesiserID ||
o == ChipMassProductionID ||
o == NanoRepairBotsID ||
o == SanctuaryID || // kaelesh
o == AntimatterCondenserID ||
o == VortexChamberID ||
o == HallsOfRealisationID ||
o == ForumOfTranscendenceID ||
o == AntimatterConvectorID ||
o == CloningLaboratoryID ||
o == ChrysalisAcceleratorID ||
o == BioModifierID ||
o == PsionicModulatorID ||
o == ShipManufacturingHallID ||
o == SupraRefractorID
}

// IsBuilding returns either or not the id is a building (facility, resource building)
Expand Down

0 comments on commit e39079d

Please sign in to comment.