24#include <entt/entt.hpp>
91 double GetPrice(
const entt::entity& good);
93 double GetSupply(
const entt::entity& good);
94 double GetDemand(
const entt::entity& good);
154 double newbalance = this->
balance * coefficent;
168 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:21
Represents commercial areas and other amenities that generate economic activity. They don't export go...
Definition: economy.h:213
entt::entity city
The city that it's based in.
Definition: economy.h:215
int size
Definition: economy.h:216
Records the prices of goods and other things
Definition: economy.h:131
Will be handled in the future, but for now is just a market
Definition: economy.h:126
Definition: economy.h:220
int population_needed
Definition: economy.h:221
entt::entity segment
Definition: economy.h:223
int population_fufilled
Definition: economy.h:222
Definition: economy.h:240
Definition: economy.h:207
An actor in a market that trades goods.
Definition: economy.h:194
entt::entity market
Definition: economy.h:195
An entity where the market is based, and the resources are traded.
Definition: economy.h:201
entt::entity market
Definition: economy.h:202
void AddSupply(const ResourceLedger &stockpile)
Definition: economy.cpp:22
double GDP
Definition: economy.h:82
auto begin()
Definition: economy.h:100
double GetSupply(const entt::entity &good)
Definition: economy.cpp:56
std::vector< MarketInformation > history
Definition: economy.h:74
std::map< entt::entity, MarketElementInformation > market_information
Definition: economy.h:76
double GetSDRatio(const entt::entity &good)
Definition: economy.cpp:54
std::map< entt::entity, MarketElementInformation > last_market_information
Definition: economy.h:77
entt::basic_sparse_set< entt::entity > connected_markets
Definition: economy.h:80
MarketElementInformation & operator[](entt::entity ent)
Definition: economy.h:98
double GetPrice(const ResourceLedger &stockpile)
Definition: economy.cpp:46
std::set< entt::entity > participants
Definition: economy.h:79
double GetDemand(const entt::entity &good)
Definition: economy.cpp:58
void AddParticipant(entt::entity participant)
Definition: economy.h:96
void AddDemand(const ResourceLedger &stockpile)
Definition: economy.cpp:34
auto end()
Definition: economy.h:102
Definition: economy.h:244
entt::entity owner
Definition: economy.h:245
Price of a good. This is temporary, because this is to determine initial prices for goods....
Definition: economy.h:110
double price
Definition: economy.h:111
Definition: economy.h:134
double GDP_change
Definition: economy.h:187
Wallet & operator=(double _balance)
Definition: economy.h:166
double balance
Definition: economy.h:184
Wallet & operator-=(const double amount)
Definition: economy.h:143
void Reset()
Definition: economy.h:177
double change
Definition: economy.h:185
entt::entity currency
Definition: economy.h:188
double GetBalance() const
Definition: economy.h:175
Wallet & operator*=(const double coefficent)
Definition: economy.h:153
Wallet & operator+=(const double amount)
Definition: economy.h:138
double GetGDPChange()
Definition: economy.h:181
Wallet(entt::entity _currency, double _balance)
Definition: economy.h:136