Documentation ¶
Index ¶
- Constants
- func GetBuildingIndex(building Building) int
- type Building
- type BuildingDescriptions
- type BuildingInfo
- type BuildingInfos
- func (info BuildingInfos) Allows(building Building) []Building
- func (info BuildingInfos) BuildingInfo(building Building) BuildingInfo
- func (info BuildingInfos) Dependencies(building Building) []Building
- func (info BuildingInfos) GetBuildingByName(name string) *BuildingInfo
- func (info BuildingInfos) GetBuildingIndex(building Building) int
- func (info BuildingInfos) ManaProduction(building Building) int
- func (info BuildingInfos) Name(building Building) string
- func (info BuildingInfos) ProductionCost(building Building) int
- func (info BuildingInfos) ResearchProduction(building Building) int
- func (info BuildingInfos) UpkeepCost(building Building) int
Constants ¶
View Source
const ForrestTerrain = 101
View Source
const MineralTerrain = 200
View Source
const WaterTerrain = 110
Variables ¶
This section is empty.
Functions ¶
func GetBuildingIndex ¶
the index in cityscap.lbx for the picture of this building
Types ¶
type Building ¶
type Building int
const ( BuildingNone Building = iota BuildingBarracks BuildingArmory BuildingFightersGuild BuildingArmorersGuild BuildingWarCollege BuildingSmithy BuildingStables BuildingAnimistsGuild BuildingFantasticStable BuildingShipwrightsGuild BuildingShipYard BuildingMaritimeGuild BuildingSawmill BuildingLibrary BuildingSagesGuild BuildingOracle BuildingAlchemistsGuild BuildingUniversity BuildingWizardsGuild BuildingShrine BuildingTemple BuildingParthenon BuildingCathedral BuildingMarketplace BuildingBank BuildingMerchantsGuild BuildingGranary BuildingFarmersMarket BuildingForestersGuild BuildingBuildersHall BuildingMechaniciansGuild BuildingMinersGuild BuildingCityWalls BuildingFortress BuildingSummoningCircle BuildingHousing BuildingTradeGoods // not a real building, just a marker BuildingLast )
type BuildingDescriptions ¶
type BuildingDescriptions struct {
Descriptions []string
}
func MakeBuildDescriptions ¶
func MakeBuildDescriptions(cache *lbx.LbxCache) *BuildingDescriptions
func (*BuildingDescriptions) Get ¶
func (descriptions *BuildingDescriptions) Get(building Building) string
type BuildingInfo ¶
type BuildingInfo struct { Name string // index of building that must exist first, or 0 if no dependency BuildingDependency1 int BuildingDependency2 int // -1 for no terrain, otherwise specifies a tile index that the building can be built on TerrainDependency int // replaces the given building BuildingReplace int Grant20XP bool Grant60XP bool // grants magic weapons to new units if appropriate minerals around Alchemist bool // required gold to maintain this building UpkeepGold int UpkeepPower int PopulationGrowth int Religion int // points of research produced each turn Research int ConstructionCost int Animation int // 0: None, Trade, Housing // 1: Marketplace, Bank, Merchants Guild, Maritime Guild // 2: Shrine, Temple, Parthenon, Cathedral // 3: Library, Sages Guild, Oracle, Alchemists Guild, University, Wizards Guild // 4: Barracks, Armory, Fighters Guild, Armorers Guild, War College, Smithy, Stables, Fantastic Stable, Mechanicians Guild, City Walls Category int }
type BuildingInfos ¶
type BuildingInfos []BuildingInfo
func ReadBuildingInfo ¶
func ReadBuildingInfo(cache *lbx.LbxCache) (BuildingInfos, error)
func (BuildingInfos) Allows ¶
func (info BuildingInfos) Allows(building Building) []Building
return the buildings that have the provided building as a dependency
func (BuildingInfos) BuildingInfo ¶
func (info BuildingInfos) BuildingInfo(building Building) BuildingInfo
func (BuildingInfos) Dependencies ¶
func (info BuildingInfos) Dependencies(building Building) []Building
func (BuildingInfos) GetBuildingByName ¶
func (info BuildingInfos) GetBuildingByName(name string) *BuildingInfo
func (BuildingInfos) GetBuildingIndex ¶
func (info BuildingInfos) GetBuildingIndex(building Building) int
func (BuildingInfos) ManaProduction ¶
func (info BuildingInfos) ManaProduction(building Building) int
func (BuildingInfos) Name ¶
func (info BuildingInfos) Name(building Building) string
func (BuildingInfos) ProductionCost ¶
func (info BuildingInfos) ProductionCost(building Building) int
func (BuildingInfos) ResearchProduction ¶
func (info BuildingInfos) ResearchProduction(building Building) int
func (BuildingInfos) UpkeepCost ¶
func (info BuildingInfos) UpkeepCost(building Building) int
Click to show internal directories.
Click to hide internal directories.