24 credits_t *mean,
double *std );
25void economy_averageSeenPrices(
const Spob *p );
26void economy_averageSeenPricesAtTime(
const Spob *p,
const ntime_t tupdate );
30 const Spob *p, ntime_t t );
38void economy_initialiseSingleSystem( StarSystem *sys,
Spob *spob );
int economy_init(void)
Initializes the economy.
void economy_clearKnown(void)
Clears all system knowledge.
int economy_update(unsigned int dt)
Updates the economy.
void economy_addQueuedUpdate(void)
Increments the queued update counter.
void economy_destroy(void)
Destroys the economy.
credits_t economy_getPriceAtTime(const Commodity *com, const StarSystem *sys, const Spob *p, ntime_t tme)
Gets the price of a good on a spob in a system.
int economy_getAveragePrice(const Commodity *com, credits_t *mean, double *std)
Gets the average price of a good as seen by the player (anywhere).
void economy_initialiseCommodityPrices(void)
Initialises commodity prices for the sinusoidal economy model.
void economy_clearSingleSpob(Spob *p)
Clears all economy knowledge of a given spob. Used by the unidiff system.
int economy_execQueued(void)
Calls economy_refresh if an economy update is queued.
credits_t economy_getPrice(const Commodity *com, const StarSystem *sys, const Spob *p)
Gets the price of a good on a spob in a system.
int economy_refresh(void)
Regenerates the economy matrix. Should be used if the universe changes in any permanent way.
int economy_getAverageSpobPrice(const Commodity *com, const Spob *p, credits_t *mean, double *std)
Gets the average price of a good on a spob in a system, using a rolling average over the times the pl...
Represents a Space Object (SPOB), including and not limited to planets, stations, wormholes,...