Conquer Space 0.0.0
A space themed grand strategy game set in the near future, with realistic orbital mechanics, and an emphasis on economics and politics.
Classes | Functions
cqsp::core::actions Namespace Reference

Classes

class  NameGenerator
 Name generator is pretty straightforward Format: More...
 

Functions

Node CreateCity (Node &planet, components::types::SurfaceCoordinate coords)
 
Node CreateCity (Node &planet, double lat, double longi)
 
bool BuyGood (components::AuctionHouse &auction_house, Node &agent, Node &good, double price, double quantity)
 Buys a good from the market More...
 
bool SellGood (components::AuctionHouse &auction_house, Node &agent, Node &, double price, double quantity)
 Sells a good to the market More...
 
void AddParticipant (Node &market_node, Node &participant)
 
Node CreateMarket (Universe &universe)
 Creates a market two instance. More...
 
void ApplySubsidy (Universe &universe, entt::entity country, entt::entity subsidy_target, float amount)
 
void RemoveSubsidy ()
 
Node CreateFactory (Node city, Node recipe, int productivity=1, double wages=10, double cash_reserves=0)
 Creates a factory from thin air More...
 
Node CreateCommercialArea (Node &city)
 
uint64_t GetCityPopulation (Node &city)
 
Node CreateShip (Node &starsystem, Node &fleet, const glm::vec3 &orbit, const std::string &shipName="")
 creates a ship with a name and assigns it to a fleet and solar system More...
 
Node CreateShip (Node &starsystem, Node &fleet, Node &orbit, const std::string &shipName)
 
Node CreateShip (Node &starsystem, Node &fleet, const components::types::Orbit &orbit, const std::string &shipName)
 
entt::entity LaunchShip (Universe &universe, const components::types::Orbit &orbit)
 
bool HasSpacePort (const Node &province)
 

Function Documentation

◆ AddParticipant()

void cqsp::core::actions::AddParticipant ( Node &  market_node,
Node &  participant 
)

◆ ApplySubsidy()

void cqsp::core::actions::ApplySubsidy ( Universe &  universe,
entt::entity  country,
entt::entity  subsidy_target,
float  amount 
)

◆ BuyGood()

bool cqsp::core::actions::BuyGood ( components::AuctionHouse &  auction_house,
Node &  agent,
Node &  good,
double  price,
double  quantity 
)

Buys a good from the market

Parameters
auction_houseAuction house to buy from
goodGood to buy
pricePrice
quantityQuantity
Returns
True if the order is fufilled immediately, false if a buy order is placed.

◆ CreateCity() [1/2]

Node cqsp::core::actions::CreateCity ( Node &  planet,
components::types::SurfaceCoordinate  coords 
)

◆ CreateCity() [2/2]

Node cqsp::core::actions::CreateCity ( Node &  planet,
double  lat,
double  longi 
)

◆ CreateCommercialArea()

Node cqsp::core::actions::CreateCommercialArea ( Node &  city)

◆ CreateFactory()

Node cqsp::core::actions::CreateFactory ( Node  city,
Node  recipe,
int  productivity = 1,
double  wages = 10,
double  cash_reserves = 0 
)

Creates a factory from thin air

Parameters
universe
city
recipe
productivity
Returns
The factory entity created

◆ CreateMarket()

Node cqsp::core::actions::CreateMarket ( Universe &  universe)

Creates a market two instance.

◆ CreateShip() [1/3]

Node cqsp::core::actions::CreateShip ( Node &  starsystem,
Node &  fleet,
const components::types::Orbit &  orbit,
const std::string &  shipName 
)

◆ CreateShip() [2/3]

Node cqsp::core::actions::CreateShip ( Node &  starsystem,
Node &  fleet,
const glm::vec3 &  orbit,
const std::string &  shipName = "" 
)

creates a ship with a name and assigns it to a fleet and solar system

Parameters
universeThe registry for the entities
fleetEntThe fleet to be used
starsystemEntThe star system where the ship is created in
Returns
The ship that is created

◆ CreateShip() [3/3]

Node cqsp::core::actions::CreateShip ( Node &  starsystem,
Node &  fleet,
Node &  orbit,
const std::string &  shipName 
)

◆ GetCityPopulation()

uint64_t cqsp::core::actions::GetCityPopulation ( Node &  city)

◆ HasSpacePort()

bool cqsp::core::actions::HasSpacePort ( const Node &  province)

◆ LaunchShip()

entt::entity cqsp::core::actions::LaunchShip ( Universe &  universe,
const components::types::Orbit &  orbit 
)

◆ RemoveSubsidy()

void cqsp::core::actions::RemoveSubsidy ( )

◆ SellGood()

bool cqsp::core::actions::SellGood ( components::AuctionHouse &  auction_house,
Node &  agent,
Node &  ,
double  price,
double  quantity 
)

Sells a good to the market

Parameters
auction_houseAuction house to buy from
goodGood to buy
pricePrice
quantityQuantity
Returns
True if the order is fufilled immediately, false if a sell order is placed.