WorldSim  inDev
2D tile-based sandbox RPG with procedurally generated fantasy world simulator 🌏
Public Member Functions | Public Attributes | List of all members
Stockpile Class Reference

#include <Stockpile.hpp>

Inheritance diagram for Stockpile:
Inheritance graph
[legend]
Collaboration diagram for Stockpile:
Collaboration graph
[legend]

Public Member Functions

 Stockpile ()
 
void add (enumResource type, int amount)
 
int get (enumResource type)
 
bool take (enumResource type, int amount)
 
bool hasEnough (enumResource type, int amount)
 
void add (enumIntermediate type, int amount)
 
int get (enumIntermediate type)
 
bool take (enumIntermediate type, int amount)
 
bool hasEnough (enumIntermediate type, int amount)
 
bool hasEnough (IntermediateRequirement requirement)
 
bool hasEnough (Intermediate resource)
 
bool canMake (IntermediateRequirement requirement)
 
bool hasEnough (Resource resource)
 
bool hasEnough (ResourceRequirement requirement)
 
bool canMake (ResourceRequirement requirement)
 
bool canMake (StockpileRequirement requirement)
 
bool deduct (IntermediateRequirement requirement)
 
bool deduct (ResourceRequirement requirement)
 
bool deduct (StockpileRequirement requirement)
 
void add (Item *item)
 
void take (Item *item)
 
int getNumOfType (ItemType type)
 
ItemgetBestItemFor (Job job)
 
ItemgetBestItemFor (Job *job)
 
int getNumberOfItems (ItemType type)
 
void print ()
 
- Public Member Functions inherited from HasMoney
 HasMoney ()
 
virtual void addMoney (int _money)
 
virtual void giveMoney (int _money)
 
virtual int getMoney ()
 
virtual bool takeMoney (int _amount)
 
virtual int takeMoneyUpTo (int _amount)
 

Public Attributes

Vector< Item * > vItem
 

Constructor & Destructor Documentation

◆ Stockpile()

Stockpile::Stockpile ( )

Member Function Documentation

◆ add() [1/3]

void Stockpile::add ( enumResource  type,
int  amount 
)

◆ add() [2/3]

void Stockpile::add ( enumIntermediate  type,
int  amount 
)

◆ add() [3/3]

void Stockpile::add ( Item item)

◆ canMake() [1/3]

bool Stockpile::canMake ( IntermediateRequirement  requirement)

◆ canMake() [2/3]

bool Stockpile::canMake ( ResourceRequirement  requirement)

◆ canMake() [3/3]

bool Stockpile::canMake ( StockpileRequirement  requirement)

◆ deduct() [1/3]

bool Stockpile::deduct ( IntermediateRequirement  requirement)

◆ deduct() [2/3]

bool Stockpile::deduct ( ResourceRequirement  requirement)

◆ deduct() [3/3]

bool Stockpile::deduct ( StockpileRequirement  requirement)

◆ get() [1/2]

int Stockpile::get ( enumResource  type)

◆ get() [2/2]

int Stockpile::get ( enumIntermediate  type)

◆ getBestItemFor() [1/2]

Item * Stockpile::getBestItemFor ( Job  job)

◆ getBestItemFor() [2/2]

Item * Stockpile::getBestItemFor ( Job job)

◆ getNumberOfItems()

int Stockpile::getNumberOfItems ( ItemType  type)

◆ getNumOfType()

int Stockpile::getNumOfType ( ItemType  type)

◆ hasEnough() [1/6]

bool Stockpile::hasEnough ( enumResource  type,
int  amount 
)

◆ hasEnough() [2/6]

bool Stockpile::hasEnough ( enumIntermediate  type,
int  amount 
)

◆ hasEnough() [3/6]

bool Stockpile::hasEnough ( IntermediateRequirement  requirement)

◆ hasEnough() [4/6]

bool Stockpile::hasEnough ( Intermediate  resource)

◆ hasEnough() [5/6]

bool Stockpile::hasEnough ( Resource  resource)

◆ hasEnough() [6/6]

bool Stockpile::hasEnough ( ResourceRequirement  requirement)

◆ print()

void Stockpile::print ( )

◆ take() [1/3]

bool Stockpile::take ( enumResource  type,
int  amount 
)

◆ take() [2/3]

bool Stockpile::take ( enumIntermediate  type,
int  amount 
)

◆ take() [3/3]

void Stockpile::take ( Item item)

Member Data Documentation

◆ vItem

Vector<Item*> Stockpile::vItem

The documentation for this class was generated from the following files: