Commandline: Encapsulate skip_story in play_controller
This commit is contained in:
parent
f7be872da2
commit
1d1d260350
3 changed files with 5 additions and 1 deletions
|
@ -153,6 +153,7 @@ play_controller::play_controller(const config& level,
|
|||
, statistics_context_(new statistics::scenario_context(level["name"]))
|
||||
, replay_(new replay(state_of_game.get_replay()))
|
||||
, skip_replay_(skip_replay)
|
||||
, skip_story_(state_of_game.skip_story())
|
||||
, linger_(false)
|
||||
, init_side_done_now_(false)
|
||||
, map_start_()
|
||||
|
|
|
@ -242,6 +242,8 @@ public:
|
|||
|
||||
void do_autosave();
|
||||
|
||||
bool is_skipping_story() const { return skip_story_; }
|
||||
|
||||
void do_consolesave(const std::string& filename);
|
||||
|
||||
events::mouse_handler& get_mouse_handler_base() override;
|
||||
|
@ -451,6 +453,7 @@ protected:
|
|||
std::unique_ptr<replay> replay_;
|
||||
|
||||
bool skip_replay_;
|
||||
bool skip_story_;
|
||||
bool linger_;
|
||||
|
||||
/**
|
||||
|
|
|
@ -227,7 +227,7 @@ LEVEL_RESULT playsingle_controller::play_scenario(const config& level)
|
|||
}
|
||||
sound::commit_music_changes();
|
||||
|
||||
if(!this->is_skipping_replay() && !saved_game_.skip_story()) {
|
||||
if(!this->is_skipping_replay() && !this->is_skipping_story()) {
|
||||
// Combine all the [story] tags into a single config. Handle this here since
|
||||
// storyscreen::controller doesn't have a default constructor.
|
||||
config cfg;
|
||||
|
|
Loading…
Add table
Reference in a new issue