A machine in the game. Used to refine ore.
More...
#include <machine.hpp>
|
void | log (const std::string &message) |
| adds a message to this _game_object's logs. _intended for your own debugging purposes, as strings stored here are saved in the gamelog. More...
|
|
template<typename T > |
std::shared_ptr< typename
T::element_type > | as () |
| Dynamically casts this object to another type. Returns nullptr if it cannot be converted to the type. More...
|
|
template<typename T > |
bool | is () |
| Determines if this object is of the specified object type More...
|
|
|
const std::string & | ore_type |
| What type of ore the machine takes it. Also determines the type of material it outputs. (redium or blueium). More...
|
|
const int & | refine_input |
| The amount of ore that needs to be inputted into the machine for it to be worked. More...
|
|
const int & | refine_output |
| The amount of refined ore that is returned after the machine has been fully worked. More...
|
|
const int & | refine_time |
| The number of times this machine needs to be worked to refine ore. More...
|
|
const Tile & | tile |
| The Tile this Machine is on. More...
|
|
const int & | worked |
| Tracks how many times this machine has been worked. (0 to refineTime). More...
|
|
const std::string & | game_object_name |
| String representing the top level Class that this game object is an instance of. Used for reflection to create new instances on clients, but exposed for convenience should AIs want this data. More...
|
|
const std::string & | id |
| A unique id for each instance of a GameObject or a sub class. Used for client and server communication. Should never change value after being set. More...
|
|
const std::vector< std::string > & | logs |
| Any strings logged will be stored here. Intended for debugging. More...
|
|
A machine in the game. Used to refine ore.
template<typename T >
std::shared_ptr<typename T::element_type> cpp_client::Base_object::as |
( |
| ) |
|
|
inlineinherited |
Dynamically casts this object to another type. Returns nullptr if it cannot be converted to the type.
- Returns
- A pointer to the desired type, or nullptr if it could not be converted
template<typename T >
bool cpp_client::Base_object::is |
( |
| ) |
|
|
inlineinherited |
Determines if this object is of the specified object type
- Returns
- true if the object is the object type, false otherwise
void cpp_client::newtonian::Game_object::log |
( |
const std::string & |
message | ) |
|
|
inherited |
adds a message to this _game_object's logs. _intended for your own debugging purposes, as strings stored here are saved in the gamelog.
- Parameters
-
message | A string to add to this GameObject's log. Intended for debugging. |
const std::string& cpp_client::newtonian::Game_object::game_object_name |
|
inherited |
String representing the top level Class that this game object is an instance of. Used for reflection to create new instances on clients, but exposed for convenience should AIs want this data.
const std::string& cpp_client::newtonian::Game_object::id |
|
inherited |
A unique id for each instance of a GameObject or a sub class. Used for client and server communication. Should never change value after being set.
const std::vector<std::string>& cpp_client::newtonian::Game_object::logs |
|
inherited |
Any strings logged will be stored here. Intended for debugging.
const std::string& cpp_client::newtonian::Machine::ore_type |
What type of ore the machine takes it. Also determines the type of material it outputs. (redium or blueium).
const int& cpp_client::newtonian::Machine::refine_input |
The amount of ore that needs to be inputted into the machine for it to be worked.
const int& cpp_client::newtonian::Machine::refine_output |
The amount of refined ore that is returned after the machine has been fully worked.
const int& cpp_client::newtonian::Machine::refine_time |
The number of times this machine needs to be worked to refine ore.
const Tile& cpp_client::newtonian::Machine::tile |
const int& cpp_client::newtonian::Machine::worked |
Tracks how many times this machine has been worked. (0 to refineTime).
The documentation for this class was generated from the following file: