Stores a set of terrain costs (for movement, vision, or "jamming"). More...
#include <movetype.hpp>

Public Member Functions | |
| terrain_costs (const terrain_costs *fallback=nullptr, const terrain_costs *cascade=nullptr) | |
| terrain_costs (const config &cfg, const terrain_costs *fallback=nullptr, const terrain_costs *cascade=nullptr) | |
| terrain_costs (const terrain_costs &that, const terrain_costs *fallback=nullptr, const terrain_costs *cascade=nullptr) | |
| int | cost (const t_translation::t_terrain &terrain, bool slowed=false) const |
| Returns the cost associated with the given terrain. More... | |
Public Member Functions inherited from movetype::terrain_info | |
| terrain_info (const parameters ¶ms, const terrain_info *fallback=nullptr, const terrain_info *cascade=nullptr) | |
| Constructor. More... | |
| terrain_info (const config &cfg, const parameters ¶ms, const terrain_info *fallback=nullptr, const terrain_info *cascade=nullptr) | |
| Constructor. More... | |
| terrain_info (const terrain_info &that, const terrain_info *fallback=nullptr, const terrain_info *cascade=nullptr) | |
| Copy constructor. More... | |
| ~terrain_info () | |
| Destructor. More... | |
| terrain_info & | operator= (const terrain_info &that) |
| Assignment operator. More... | |
| void | clear_cache () const |
| Clears the cache of values. More... | |
| bool | empty () const |
| Returns whether or not our data is empty. More... | |
| void | merge (const config &new_values, bool overwrite) |
| Merges the given config over the existing values. More... | |
| int | value (const t_translation::t_terrain &terrain) const |
| Returns the value associated with the given terrain. More... | |
| void | write (config &cfg, const std::string &child_name="", bool merged=true) const |
| Writes our data to a config. More... | |
Static Private Attributes | |
| static const parameters | params_ |
Stores a set of terrain costs (for movement, vision, or "jamming").
Definition at line 88 of file movetype.hpp.
|
inlineexplicit |
Definition at line 92 of file movetype.hpp.
|
inlineexplicit |
Definition at line 96 of file movetype.hpp.
|
inline |
Definition at line 101 of file movetype.hpp.
|
inline |
Returns the cost associated with the given terrain.
Costs are doubled when slowed is true.
Definition at line 109 of file movetype.hpp.
References game_config::sounds::status::slowed, movetype::UNREACHABLE, and movetype::terrain_info::value().
Referenced by pathfind::find_routes(), movetype::jamming_cost(), movetype::movement_cost(), ai::default_recruitment::recruitment::update_average_local_cost(), and movetype::vision_cost().
|
staticprivate |
Definition at line 90 of file movetype.hpp.
1.8.8