building

package
v0.0.0-...-94f88f4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ForrestTerrain = 101
View Source
const MineralTerrain = 200
View Source
const WaterTerrain = 110

Variables

This section is empty.

Functions

func GetBuildingIndex

func GetBuildingIndex(building Building) int

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
)

func Buildings

func Buildings() []Building

the buildings that can be built in the order that they usually show up in the build screen

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL