24#include <entt/entt.hpp>
139 double GetPrice(
const entt::entity& good);
141 double GetSupply(
const entt::entity& good);
142 double GetDemand(
const entt::entity& good);
202 double newbalance = this->
balance * coefficent;
216 if ((_balance -
balance) < 0) {
Definition: resource.h:76
When adding assets, it is extremely crucial that you read cqsp::asset::AssetLoader::LoadResources to ...
Definition: clientctx.h:22
Represents commercial areas and other amenities that generate economic activity. They don't export go...
Definition: economy.h:263
entt::entity city
The city that it's based in.
Definition: economy.h:265
int size
Definition: economy.h:266
Records the prices of goods and other things
Definition: economy.h:179
Will be handled in the future, but for now is just a market
Definition: economy.h:174
Definition: economy.h:270
int population_needed
Definition: economy.h:271
entt::entity segment
Definition: economy.h:273
int population_fufilled
Definition: economy.h:272
Definition: economy.h:290
Definition: economy.h:257
An actor in a market that trades goods.
Definition: economy.h:244
entt::entity market
Definition: economy.h:245
An entity where the market is based, and the resources are traded.
Definition: economy.h:251
entt::entity market
Definition: economy.h:252
Definition: economy.h:120
void AddSupply(const ResourceLedger &stockpile)
Definition: economy.cpp:22
double GDP
Definition: economy.h:130
auto begin()
Definition: economy.h:148
double GetSupply(const entt::entity &good)
Definition: economy.cpp:56
std::vector< MarketInformation > history
Definition: economy.h:121
std::map< entt::entity, MarketElementInformation > market_information
Definition: economy.h:123
double GetSDRatio(const entt::entity &good)
Definition: economy.cpp:54
std::map< entt::entity, MarketElementInformation > last_market_information
Definition: economy.h:124
entt::basic_sparse_set< entt::entity > connected_markets
Definition: economy.h:128
MarketElementInformation & operator[](entt::entity ent)
Definition: economy.h:146
double GetPrice(const ResourceLedger &stockpile)
Definition: economy.cpp:46
std::set< entt::entity > participants
Definition: economy.h:126
double GetDemand(const entt::entity &good)
Definition: economy.cpp:58
void AddParticipant(entt::entity participant)
Definition: economy.h:144
void AddDemand(const ResourceLedger &stockpile)
Definition: economy.cpp:34
auto end()
Definition: economy.h:150
Definition: economy.h:294
entt::entity owner
Definition: economy.h:295
Definition: economy.h:116
std::vector< entt::entity > participants
Definition: economy.h:117
Price of a good. This is temporary, because this is to determine initial prices for goods....
Definition: economy.h:158
double price
Definition: economy.h:159
Definition: economy.h:298
Definition: economy.h:182
double GDP_change
Definition: economy.h:237
Wallet & operator=(double _balance)
Definition: economy.h:214
double GetChange() const
Definition: economy.h:225
double balance
Definition: economy.h:234
Wallet & operator-=(const double amount)
Definition: economy.h:191
void Reset()
Definition: economy.h:227
double change
Definition: economy.h:235
entt::entity currency
Definition: economy.h:238
double GetBalance() const
Definition: economy.h:223
Wallet & operator*=(const double coefficent)
Definition: economy.h:201
Wallet & operator+=(const double amount)
Definition: economy.h:186
double GetGDPChange()
Definition: economy.h:231
Wallet(entt::entity _currency, double _balance)
Definition: economy.h:184