kotcity4 / kotcity.data / NationalTradeEntity

NationalTradeEntity

data class NationalTradeEntity : HasContracts, HasInventory

Constructors

<init>

NationalTradeEntity(cityMap: CityMap)

Properties

cityMap

val cityMap: CityMap

Functions

addContract

fun addContract(contract: Contract): Unit

addInventory

fun addInventory(tradeable: Tradeable, quantity: Int): Int

balance

fun balance(): Int

How much Tradeable.MONEY that the given thing has.

consumesQuantity

fun consumesQuantity(tradeable: Tradeable): Int

currentQuantityForSale

fun currentQuantityForSale(tradeable: Tradeable): Int

currentQuantityWanted

fun currentQuantityWanted(tradeable: Tradeable): Int

hasAnyContracts

fun hasAnyContracts(): Boolean

outsideEntity

fun outsideEntity(coordinate: BlockCoordinate): TradeEntity

producesQuantity

fun producesQuantity(tradeable: Tradeable): Int

productList

fun productList(): List<Tradeable>

quantityOnHand

fun quantityOnHand(tradeable: Tradeable): Int

resetCounts

fun resetCounts(): Unit

setInventory

fun setInventory(tradeable: Tradeable, quantity: Int): Int

subtractInventory

fun subtractInventory(tradeable: Tradeable, quantity: Int): Int

summarizeContracts

fun summarizeContracts(): String

summarizeInventory

fun summarizeInventory(): String

totalBeingBought

fun totalBeingBought(tradeable: Tradeable): Int

totalBeingSold

fun totalBeingSold(tradeable: Tradeable): Int

transferInventory

fun transferInventory(to: TradeEntity, tradeable: Tradeable, quantity: Int): Int

voidContractsWith

fun voidContractsWith(otherTradeEntity: TradeEntity): Unit

Inherited Functions

needsAnyContracts

open fun needsAnyContracts(): Boolean