The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
unit_creator Class Reference

#include <unit_creator.hpp>

Public Member Functions

 unit_creator (team &tm, const map_location &start_pos, game_board *board=nullptr)
 
unit_creatorallow_show (bool b)
 
unit_creatorallow_get_village (bool b)
 
unit_creatorallow_rename_side (bool b)
 
unit_creatorallow_invalidate (bool b)
 
unit_creatorallow_discover (bool b)
 
unit_creatorallow_add_to_recall (bool b)
 
map_location find_location (const config &cfg, const unit *pass_check=nullptr)
 finds a suitable location for unit More...
 
void add_unit (const config &cfg, const vconfig *vcfg=nullptr)
 adds a unit on map without firing any events (so, usable during team construction in gamestatus) More...
 

Private Member Functions

void post_create (const map_location &loc, const unit &new_unit, bool anim)
 

Private Attributes

bool add_to_recall_
 
bool discover_
 
bool get_village_
 
bool invalidate_
 
bool rename_side_
 
bool show_
 
const map_location start_pos_
 
teamteam_
 
game_boardboard_
 

Detailed Description

Definition at line 31 of file unit_creator.hpp.

Constructor & Destructor Documentation

unit_creator::unit_creator ( team tm,
const map_location start_pos,
game_board board = nullptr 
)

Definition at line 50 of file unit_creator.cpp.

Member Function Documentation

void unit_creator::add_unit ( const config cfg,
const vconfig vcfg = nullptr 
)
unit_creator & unit_creator::allow_add_to_recall ( bool  b)

Definition at line 98 of file unit_creator.cpp.

References add_to_recall_.

Referenced by team_builder::place_units(), and game_events::WML_HANDLER_FUNCTION().

unit_creator & unit_creator::allow_discover ( bool  b)

Definition at line 91 of file unit_creator.cpp.

References discover_.

Referenced by team_builder::place_units(), and game_events::WML_HANDLER_FUNCTION().

unit_creator & unit_creator::allow_get_village ( bool  b)

Definition at line 71 of file unit_creator.cpp.

References get_village_.

Referenced by team_builder::place_units(), and game_events::WML_HANDLER_FUNCTION().

unit_creator & unit_creator::allow_invalidate ( bool  b)

Definition at line 84 of file unit_creator.cpp.

References invalidate_.

Referenced by team_builder::place_units(), and game_events::WML_HANDLER_FUNCTION().

unit_creator & unit_creator::allow_rename_side ( bool  b)

Definition at line 78 of file unit_creator.cpp.

References rename_side_.

Referenced by team_builder::place_units(), and game_events::WML_HANDLER_FUNCTION().

unit_creator & unit_creator::allow_show ( bool  b)

Definition at line 64 of file unit_creator.cpp.

References show_.

Referenced by team_builder::place_units(), and game_events::WML_HANDLER_FUNCTION().

map_location unit_creator::find_location ( const config cfg,
const unit pass_check = nullptr 
)
void unit_creator::post_create ( const map_location loc,
const unit new_unit,
bool  anim 
)
private

Member Data Documentation

bool unit_creator::add_to_recall_
private

Definition at line 58 of file unit_creator.hpp.

Referenced by add_unit(), and allow_add_to_recall().

game_board* unit_creator::board_
private

Definition at line 66 of file unit_creator.hpp.

Referenced by add_unit(), find_location(), and post_create().

bool unit_creator::discover_
private

Definition at line 59 of file unit_creator.hpp.

Referenced by allow_discover(), and post_create().

bool unit_creator::get_village_
private

Definition at line 60 of file unit_creator.hpp.

Referenced by allow_get_village(), and post_create().

bool unit_creator::invalidate_
private

Definition at line 61 of file unit_creator.hpp.

Referenced by allow_invalidate(), and post_create().

bool unit_creator::rename_side_
private

Definition at line 62 of file unit_creator.hpp.

Referenced by allow_rename_side().

bool unit_creator::show_
private

Definition at line 63 of file unit_creator.hpp.

Referenced by allow_show(), and post_create().

const map_location unit_creator::start_pos_
private

Definition at line 64 of file unit_creator.hpp.

Referenced by find_location().

team& unit_creator::team_
private

Definition at line 65 of file unit_creator.hpp.

Referenced by add_unit(), and find_location().


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