Permalink
Browse files

Play Now! loads a 0-save world if available

  • Loading branch information...
BrettDong committed Dec 28, 2018
1 parent d8ad3af commit 3a09a02e7dec6bacff06c42cd6916f78075ad7a9
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/worldfactory.cpp
@@ -361,8 +361,14 @@ WORLDPTR worldfactory::pick_world( bool show_prompt )
else if( world_names.empty() ) {
return make_new_world( show_prompt );
}
// If we're skipping prompts, just return the first one.
// If we're skipping prompts, return the world with 0 save if there is one
else if( !show_prompt ) {
for( const auto &name : world_names ) {
if( get_world( name )->world_saves.empty() ) {
return get_world( name );
}
}
// if there isn't any, adhere to old logic: return the alphabetically first one
return get_world( world_names[0] );
}

0 comments on commit 3a09a02

Please sign in to comment.