removed further references to gamestatus methods...

...by their tod_manager equivalents
This commit is contained in:
Eugen Jiresch 2009-06-17 14:52:04 +00:00
parent 05f945de21
commit 5ea9a1120a
5 changed files with 6 additions and 6 deletions

View File

@ -659,7 +659,7 @@ double ai_default::power_projection(const map_location& loc, const move_map& dst
map_location locs[6];
get_adjacent_tiles(loc,locs);
const int lawful_bonus = state_.get_time_of_day().lawful_bonus;
const int lawful_bonus = tod_manager_.get_time_of_day().lawful_bonus;
int res = 0;

View File

@ -826,7 +826,7 @@ WML_HANDLER_FUNCTION(store_time_of_day, /*event_info*/, cfg)
const map_location loc = cfg_to_loc(cfg, -999, -999);
const size_t turn = lexical_cast_default<size_t>(cfg["turn"], 0);
const time_of_day tod = turn ? rsrc.status_ptr->get_time_of_day(0,loc,turn) : rsrc.status_ptr->get_time_of_day(0,loc);
const time_of_day tod = turn ? rsrc.controller->get_tod_manager().get_time_of_day(0,loc,turn) : rsrc.controller->get_tod_manager().get_time_of_day(0,loc);
std::string variable = cfg["variable"];
if(variable.empty()) {
@ -1043,7 +1043,7 @@ WML_HANDLER_FUNCTION(store_turns, /*event_info*/, cfg)
if(var_name.empty()) {
var_name = "turns";
}
int turns = rsrc.status_ptr->number_of_turns();
int turns = rsrc.controller->number_of_turns();
rsrc.state_of_game->get_variable(var_name) = lexical_cast_default<std::string>(turns);
}

View File

@ -57,7 +57,7 @@ namespace game_events
unit_map *units;
std::vector<team> *teams;
game_state *state_of_game;
gamestatus *status_ptr;
gamestatus *status_ptr; //FIXME: give resources_t its own tod_manager
LuaKernel *lua_kernel;
play_controller *controller;
};

View File

@ -1589,7 +1589,7 @@ void connect::load_game()
if (params_.random_start_time)
{
if (!gamestatus::is_start_ToD(level_["random_start_time"]))
if (!tod_manager::is_start_ToD(level_["random_start_time"]))
{
level_["random_start_time"] = "yes";
}

View File

@ -504,7 +504,7 @@ void play_controller::do_init_side(const unsigned int team_index){
game_events::fire("turn refresh");
}
const time_of_day &tod = status_.get_time_of_day();
const time_of_day &tod = tod_manager_.get_time_of_day();
current_team.set_time_of_day(int(turn()), tod);
if (int(team_index) + 1 == first_player_)