The Battle for Wesnoth  1.15.0-dev
Public Member Functions | Public Attributes | List of all members
actions::clearer_info Struct Reference

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
 
movetype::terrain_costs costs
 

Detailed Description

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 41 of file vision.hpp.

Constructor & Destructor Documentation

◆ clearer_info() [1/2]

actions::clearer_info::clearer_info ( const unit viewer)

Constructor from a unit.

Definition at line 102 of file vision.cpp.

◆ clearer_info() [2/2]

actions::clearer_info::clearer_info ( const config cfg)

Constructor from a config.

Definition at line 113 of file vision.cpp.

Member Function Documentation

◆ write()

void actions::clearer_info::write ( config cfg) const

Writes to a config.

Definition at line 124 of file vision.cpp.

References config::add_child(), costs, sight_range, slowed, underlying_id, and movetype::terrain_info::write().

Referenced by actions::shroud_clearing_action::write().

Member Data Documentation

◆ costs

movetype::terrain_costs actions::clearer_info::costs

◆ sight_range

int actions::clearer_info::sight_range

◆ slowed

bool actions::clearer_info::slowed

◆ underlying_id

std::size_t actions::clearer_info::underlying_id

Definition at line 42 of file vision.hpp.

Referenced by actions::shroud_clearer::clear_unit(), and write().


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