mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-02 16:36:58 +00:00
Rename namespace "actions" to "action" (I just think it will read better).
This commit is contained in:
parent
3347a92755
commit
93fb1f27c9
@ -1252,7 +1252,7 @@ void advance_unit(map_location loc, const std::string &advance_to,
|
||||
// This is not normally necessary, but if a unit loses power when leveling
|
||||
// (e.g. loses "jamming" or ambush), it could be discovered as a result of
|
||||
// the advancement.
|
||||
std::vector<int> not_seeing = actions::get_sides_not_seeing(*u);
|
||||
std::vector<int> not_seeing = action::get_sides_not_seeing(*u);
|
||||
|
||||
// Create the advanced unit.
|
||||
bool use_amla = mod_option != NULL;
|
||||
@ -1267,7 +1267,7 @@ void advance_unit(map_location loc, const std::string &advance_to,
|
||||
u = resources::units->replace(loc, new_unit).first;
|
||||
|
||||
// Update fog/shroud.
|
||||
actions::shroud_clearer clearer;
|
||||
action::shroud_clearer clearer;
|
||||
clearer.clear_unit(loc, new_unit);
|
||||
|
||||
// "post_advance" event.
|
||||
@ -1280,7 +1280,7 @@ void advance_unit(map_location loc, const std::string &advance_to,
|
||||
// "sighted" event(s).
|
||||
clearer.fire_events();
|
||||
if ( u.valid() )
|
||||
actions::actor_sighted(*u, ¬_seeing);
|
||||
action::actor_sighted(*u, ¬_seeing);
|
||||
|
||||
resources::whiteboard->on_gamestate_change();
|
||||
}
|
||||
|
@ -785,7 +785,7 @@ bool place_recruit(const unit &u, const map_location &recruit_location, const ma
|
||||
}
|
||||
|
||||
// Fog clearing.
|
||||
actions::shroud_clearer clearer;
|
||||
action::shroud_clearer clearer;
|
||||
if ( !wml_triggered ) // To preserve current WML behavior.
|
||||
mutated |= clearer.clear_unit(current_loc, *new_unit_itor, true);
|
||||
|
||||
@ -800,7 +800,7 @@ bool place_recruit(const unit &u, const map_location &recruit_location, const ma
|
||||
// "sighted" event(s).
|
||||
mutated |= clearer.fire_events();
|
||||
if ( new_unit_itor.valid() )
|
||||
mutated |= actions::actor_sighted(*new_unit_itor);
|
||||
mutated |= action::actor_sighted(*new_unit_itor);
|
||||
|
||||
return mutated;
|
||||
}
|
||||
|
@ -316,7 +316,7 @@ namespace { // Private helpers for move_unit()
|
||||
std::deque<int> moves_left_; // The front value is what the moving unit's remaining moves should be set to after the next step through the route.
|
||||
std::vector<map_location> to_reveal_;
|
||||
|
||||
actions::shroud_clearer clearer_;
|
||||
action::shroud_clearer clearer_;
|
||||
};
|
||||
|
||||
|
||||
@ -876,7 +876,7 @@ namespace { // Private helpers for move_unit()
|
||||
|
||||
if ( begin_ != ambush_limit_ ) {
|
||||
// Cache the moving unit's visibility.
|
||||
std::vector<int> not_seeing = actions::get_sides_not_seeing(*move_it_);
|
||||
std::vector<int> not_seeing = action::get_sides_not_seeing(*move_it_);
|
||||
|
||||
// Prepare to animate.
|
||||
unit_display::unit_mover animator(route_, show);
|
||||
@ -939,7 +939,7 @@ namespace { // Private helpers for move_unit()
|
||||
// Finish animating.
|
||||
animator.finish(*move_it_);
|
||||
// Check for the moving unit being seen.
|
||||
event_mutated_ = actions::actor_sighted(*move_it_, ¬_seeing);
|
||||
event_mutated_ = action::actor_sighted(*move_it_, ¬_seeing);
|
||||
}
|
||||
}//if
|
||||
|
||||
|
@ -624,7 +624,7 @@ size_t undo_list::apply_shroud_changes() const
|
||||
return 0;
|
||||
|
||||
|
||||
actions::shroud_clearer clearer;
|
||||
action::shroud_clearer clearer;
|
||||
bool cleared_shroud = false; // for optimization
|
||||
size_t erase_to = 0;
|
||||
size_t list_size = undos_.size();
|
||||
|
@ -92,7 +92,7 @@ static bool can_see(const unit & viewer, const map_location & loc,
|
||||
}
|
||||
|
||||
|
||||
namespace actions {
|
||||
namespace action {
|
||||
|
||||
|
||||
/**
|
||||
@ -524,7 +524,7 @@ bool actor_sighted(const unit & target, const std::vector<int> * cache)
|
||||
}
|
||||
|
||||
|
||||
}//namespace actions
|
||||
}//namespace action
|
||||
|
||||
|
||||
/**
|
||||
@ -560,7 +560,7 @@ void recalculate_fog(int side)
|
||||
// This speeds up the invalidations within clear_shroud_unit().
|
||||
resources::screen->invalidate_all();
|
||||
|
||||
actions::shroud_clearer clearer;
|
||||
action::shroud_clearer clearer;
|
||||
BOOST_FOREACH(const unit &u, *resources::units)
|
||||
{
|
||||
if ( u.side() == side )
|
||||
@ -596,7 +596,7 @@ bool clear_shroud(int side, bool reset_fog, bool fire_events)
|
||||
|
||||
bool result = false;
|
||||
|
||||
actions::shroud_clearer clearer;
|
||||
action::shroud_clearer clearer;
|
||||
BOOST_FOREACH(const unit &u, *resources::units)
|
||||
{
|
||||
if ( u.side() == side )
|
||||
|
@ -33,7 +33,7 @@ class unit;
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace actions {
|
||||
namespace action {
|
||||
|
||||
/// Class to encapsulate fog/shroud clearing and the resultant sighted events.
|
||||
/// Note: This class uses teams as parameters (instead of sides) since a
|
||||
@ -107,7 +107,7 @@ std::vector<int> get_sides_not_seeing(const unit & target);
|
||||
bool actor_sighted(const unit & target, const std::vector<int> * cache = NULL);
|
||||
|
||||
|
||||
}//namespace actions
|
||||
}//namespace action
|
||||
|
||||
/// Function that recalculates the fog of war.
|
||||
void recalculate_fog(int side);
|
||||
|
@ -877,7 +877,7 @@ WML_HANDLER_FUNCTION(teleport, event_info, cfg)
|
||||
const map_location vacant_dst = find_vacant_tile(dst, pathfind::VACANT_ANY, pass_check);
|
||||
if (!resources::game_map->on_board(vacant_dst)) return;
|
||||
|
||||
actions::shroud_clearer clearer;
|
||||
action::shroud_clearer clearer;
|
||||
if (cfg["clear_shroud"].to_bool(true)) {
|
||||
clearer.clear_unit(vacant_dst, *u);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user