WorldSim  inDev
2D tile-based sandbox RPG with procedurally generated fantasy world simulator 🌏
Ingredient.hpp
Go to the documentation of this file.
1 #pragma once
2 #ifndef WORLDSIM_INGREDIENT_HPP
3 #define WORLDSIM_INGREDIENT_HPP
4 
5 /* WorldSim: Ingredient
6  #include "Ingredient.hpp"
7 
8  Flora will probably refer to both instances and types, however maybe not, in which case Flora will refer to
9  types of Flora, and then Flora_Instance will refer to actual Flora instances. We can then also differentiate
10  instances into Flora_Abstract, which will probably just be a pointer to the Flora species until generated properly.
11  A Flora instance is necessary even if it simply tracks the time it was last harvested.
12 
13  Wildlife simulation will be greatly simplified and therefore there will not be a need ot provide different food
14  values for flora. They can have a single caloric value per harvest, and optionally return an ingredient.
15 
16 
17 */
18 
19 
21 {
22  public:
23  std::string name;
25  ColourRGB <unsigned char> colour; // colour of the ingredient for description purposes.
26 
27  Ingredient(std::string _name)
28  {
29  name = _name;
30  effect = effectGenerator.generate();
31  colour.setRandom(globalRandom);
32  }
33  std::string getColour()
34  {
35  return colourManager.getNameOfColour(colour);
36  }
37 };
38 
39 #endif
RandomLehmer globalRandom
Definition: Driver_GlobalObjects.hpp:11
Definition: Static_Flora.hpp:128
ColourManager< unsigned char > colourManager
Definition: Driver_GlobalObjects.hpp:32
Definition: Ingredient.hpp:20
Ingredient(std::string _name)
Definition: Ingredient.hpp:27
ColourRGB< unsigned char > colour
Definition: Ingredient.hpp:25
EffectGenerator effectGenerator
Definition: Static_Flora.hpp:158
std::string getColour()
Definition: Ingredient.hpp:33
Effect * generate()
Definition: Static_Flora.hpp:152
Effect * effect
Definition: Ingredient.hpp:24
std::string name
Definition: Ingredient.hpp:23