The Battle for Wesnoth  1.19.0-dev
Static Public Member Functions | List of all members
replay_helper Class Reference

#include <replay_helper.hpp>

Static Public Member Functions

static config get_recruit (const std::string &type_id, const map_location &loc, const map_location &from)
 
static config get_recall (const std::string &unit_id, const map_location &loc, const map_location &from)
 
static config get_disband (const std::string &unit_id)
 
static config get_movement (const std::vector< map_location > &steps, bool skip_sighted, bool skip_ally_sighted)
 Records a move that follows the provided steps. More...
 
static config get_attack (const map_location &a, const map_location &b, int att_weapon, int def_weapon, const std::string &attacker_type_id, const std::string &defender_type_id, int attacker_lvl, int defender_lvl, const std::size_t turn, const time_of_day &t)
 
static config get_auto_shroud (bool turned_on)
 Records that the player has toggled automatic shroud updates. More...
 
static config get_update_shroud ()
 Records that the player has manually updated fog/shroud. More...
 
static config get_init_side ()
 
static config get_event (const std::string &name, const map_location &loc, const map_location *last_select_loc)
 
static config get_lua_ai (const std::string &lua_code)
 

Detailed Description

Definition at line 24 of file replay_helper.hpp.

Member Function Documentation

◆ get_attack()

config replay_helper::get_attack ( const map_location a,
const map_location b,
int  att_weapon,
int  def_weapon,
const std::string &  attacker_type_id,
const std::string &  defender_type_id,
int  attacker_lvl,
int  defender_lvl,
const std::size_t  turn,
const time_of_day t 
)
static

Definition at line 88 of file replay_helper.cpp.

References a, config::add_child(), b, and t.

Referenced by events::mouse_handler::attack_enemy_(), and ai::attack_result::do_execute().

◆ get_auto_shroud()

config replay_helper::get_auto_shroud ( bool  turned_on)
static

Records that the player has toggled automatic shroud updates.

Definition at line 120 of file replay_helper.cpp.

Referenced by playsingle_controller::play_ai_turn(), wb::manager::set_active(), and events::menu_handler::toggle_shroud_updates().

◆ get_disband()

config replay_helper::get_disband ( const std::string &  unit_id)
static

Definition at line 48 of file replay_helper.cpp.

Referenced by gui2::dialogs::unit_recall::dismiss_unit().

◆ get_event()

config replay_helper::get_event ( const std::string &  name,
const map_location loc,
const map_location last_select_loc 
)
static

◆ get_init_side()

config replay_helper::get_init_side ( )
static

Definition at line 136 of file replay_helper.cpp.

References resources::controller, and play_controller::current_side().

◆ get_lua_ai()

config replay_helper::get_lua_ai ( const std::string &  lua_code)
static

Definition at line 159 of file replay_helper.cpp.

◆ get_movement()

config replay_helper::get_movement ( const std::vector< map_location > &  steps,
bool  skip_sighted,
bool  skip_ally_sighted 
)
static

Records a move that follows the provided steps.

This should be the steps to be taken this turn, ending in an apparently-unoccupied (from the moving team's perspective) hex.

Definition at line 63 of file replay_helper.cpp.

References write_locations().

Referenced by actions::move_unit_and_record().

◆ get_recall()

config replay_helper::get_recall ( const std::string &  unit_id,
const map_location loc,
const map_location from 
)
static

◆ get_recruit()

config replay_helper::get_recruit ( const std::string &  type_id,
const map_location loc,
const map_location from 
)
static

◆ get_update_shroud()

config replay_helper::get_update_shroud ( )
static

Records that the player has manually updated fog/shroud.

Definition at line 130 of file replay_helper.cpp.

Referenced by playmp_controller::play_human_turn(), and events::menu_handler::update_shroud_now().


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