Class that stores the part of a unit's data that is needed for fog clearing. More...
#include <vision.hpp>
Public Member Functions | |
| clearer_info (const unit &viewer) | |
| Constructor from a unit. More... | |
| clearer_info (const config &cfg) | |
| Constructor from a config. More... | |
| void | write (config &cfg) const |
| Writes to a config. More... | |
Public Attributes | |
| std::size_t | underlying_id |
| int | sight_range |
| bool | slowed |
| std::unique_ptr< movetype::terrain_costs > | costs |
| costs is always non-null, all of the constructors initialize it More... | |
Class that stores the part of a unit's data that is needed for fog clearing.
(Used by the undo stack as that cannot rely on a unit sticking around, and we do not really need to copy the entire unit.)
Definition at line 53 of file vision.hpp.
| actions::clearer_info::clearer_info | ( | const unit & | viewer | ) |
Constructor from a unit.
Definition at line 98 of file vision.cpp.
| actions::clearer_info::clearer_info | ( | const config & | cfg | ) |
Constructor from a config.
Definition at line 109 of file vision.cpp.
| void actions::clearer_info::write | ( | config & | cfg | ) | const |
Writes to a config.
Definition at line 120 of file vision.cpp.
References config::add_child(), cfg, costs, sight_range, slowed, and underlying_id.
Referenced by actions::shroud_clearing_action::write().
| std::unique_ptr<movetype::terrain_costs> actions::clearer_info::costs |
costs is always non-null, all of the constructors initialize it
Definition at line 58 of file vision.hpp.
Referenced by actions::shroud_clearer::clear_unit(), and write().
| int actions::clearer_info::sight_range |
Definition at line 55 of file vision.hpp.
Referenced by actions::shroud_clearer::clear_unit(), and write().
| bool actions::clearer_info::slowed |
Definition at line 56 of file vision.hpp.
Referenced by actions::shroud_clearer::clear_unit(), and write().
| std::size_t actions::clearer_info::underlying_id |
Definition at line 54 of file vision.hpp.
Referenced by actions::shroud_clearer::clear_unit(), and write().