26 #include <boost/dynamic_bitset.hpp> 56 void print_help_once();
61 bool can_modify_game_state()
const;
63 bool can_activate()
const;
67 void set_active(
bool active);
69 void set_invert_behavior(
bool invert);
77 bool can_enable_execution_hotkeys()
const;
79 bool can_enable_modifier_hotkeys()
const;
81 bool can_enable_reorder_hotkeys()
const;
83 bool allow_leader_to_move(
const unit& leader)
const;
85 bool allow_end_turn();
90 void on_finish_side_turn(
int side);
93 void on_gamestate_change();
94 void on_viewer_change(std::size_t team_index);
95 void on_change_controller(
int side,
const team&
t);
103 void send_network_data();
105 void process_network_data(
const config&);
110 static bool current_side_has_actions();
113 void validate_viewer_actions();
135 void create_temp_move();
139 void erase_temp_move();
142 void save_temp_move();
151 bool save_recruit(
const std::string& name,
int side_num,
const map_location& recruit_hex);
158 void save_suppose_dead(unit& curr_unit,
const map_location& loc);
161 void contextual_execute();
164 bool execute_all_actions();
166 void contextual_delete();
168 void contextual_bump_up_action();
170 void contextual_bump_down_action();
178 bool unit_has_actions(unit
const* unit)
const;
182 int get_spent_gold_for(
int side);
186 bool should_clear_undo()
const;
194 void set_planned_unit_map();
196 void set_real_unit_map();
198 void validate_actions_if_needed();
200 void update_plan_hiding(std::size_t viewing_team);
201 void update_plan_hiding();
208 bool print_help_once_;
230 std::unique_ptr<pathfind::marked_route>
route_;
267 : future_map_(cond ? new
future_map() : nullptr)
whiteboard_lock unit_map_lock_
bool initial_planned_unit_map_
This class represents a single unit of a specific type.
bool initial_planned_unit_map_
std::set< std::size_t > units_owning_moves_
used to keep track of units owning planned moves for visual ghosting/unghosting
std::shared_ptr< highlighter > highlighter_
std::vector< arrow_ptr > move_arrows_
whiteboard_lock activation_state_lock_
Reference counted "lock" to allow preventing whiteboard activation state changes. ...
bool has_actions()
Return whether the whiteboard has actions.
std::shared_ptr< bool > whiteboard_lock
const std::unique_ptr< CKey > key_poller_
bool executing_all_actions_
Track whether we're in the process of executing all actions.
std::vector< fake_unit_ptr > fake_units_
std::vector< map_location > hidden_unit_hexes_
bool is_executing_actions() const
Is the whiteboard in the process of executing an action?
bool planned_unit_map_active_
std::weak_ptr< highlighter > get_highlighter()
Get the highlight visitor instance in use by the manager.
This class stores all the data for a single 'side' (in game nomenclature).
whiteboard_lock unit_map_lock_
Reference counted "lock" to prevent the building of the unit map at certain times.
Applies the planned unit map for the duration of the struct's life.
This class is the frontend of the whiteboard framework for the rest of the Wesnoth code...
bool gamestate_mutated_
Track whether the gamestate changed and we need to validate actions.
bool initial_planned_unit_map_
std::shared_ptr< action > action_ptr
std::unique_ptr< pathfind::marked_route > route_
const std::unique_ptr< future_map > future_map_
bool preparing_to_end_turn_
true if we're in the process of executing all action and should end turn once finished.
bool active_
Tracks whether the whiteboard is active.
bool has_planned_unit_map() const
Whether the planned unit map is currently applied.
Encapsulates the map of the game.
std::vector< config > net_buffer_
net_buffer_[i] = whiteboard network data to be sent "from" teams[i].
ONLY IF whiteboard is currently active, applies the planned unit map for the duration of the struct's...
bool is_active() const
Determine whether the whiteboard is activated.
std::size_t temp_move_unit_underlying_id_
whiteboard_lock get_activation_state_lock()
Prevents the whiteboard from changing its activation state, as long as the returned reference is held...
boost::dynamic_bitset team_plans_hidden_
team_plans_hidden_[i] = whether or not to hide actions from teams[i].
bool has_temp_move() const
Informs whether an arrow is being displayed for move creation purposes.
Ensures that the real unit map is active for the duration of the struct's life.
Abstract base class for all the whiteboard planned actions.
A config object defines a single node in a WML file, with access to child nodes.
bool executing_actions_
Track whenever we're modifying actions, to avoid dual execution etc.
Class that keeps track of all the keys on the keyboard.
std::unique_ptr< mapbuilder > mapbuilder_
const std::vector< map_location > & route_