purchaseConstruction

fun purchaseConstruction(constructionName: String, queuePosition: Int, automatic: Boolean, stat: Stat = Stat.Gold): Boolean

Purchase a construction for gold called from NextTurnAutomation and the City UI Build / place the new item, deduct cost, and maintain queue.

Return

Success (false e.g. unit cannot be placed

Parameters

constructionName

What to buy (needed since buying something not queued is allowed)

queuePosition

Position in the queue or -1 if not from queue Note: -1 does not guarantee queue will remain unchanged (validation)

automatic

Flag whether automation should try to choose what next to build (not coming from UI) Note: settings.autoAssignCityProduction is handled later

stat

Stat object of the stat with which was paid for the construction

Sources

jvm source
Link copied to clipboard