Skip to content

Commit

Permalink
Merge branch 'master' into area-objects
Browse files Browse the repository at this point in the history
  • Loading branch information
2TallTyler committed Mar 15, 2022
2 parents c5b715d + 0d9fded commit 882ca47
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-build.yml
Expand Up @@ -237,7 +237,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, windows-2016]
os: [windows-latest, windows-2019]
arch: [x86, x64]

runs-on: ${{ matrix.os }}
Expand Down
3 changes: 2 additions & 1 deletion src/genworld.cpp
Expand Up @@ -93,7 +93,6 @@ static void _GenerateWorld()
_generating_world = true;
if (_network_dedicated) Debug(net, 3, "Generating map, please wait...");
/* Set the Random() seed to generation_seed so we produce the same map with the same seed */
if (_settings_game.game_creation.generation_seed == GENERATE_NEW_SEED) _settings_game.game_creation.generation_seed = _settings_newgame.game_creation.generation_seed = InteractiveRandom();
_random.SetSeed(_settings_game.game_creation.generation_seed);
SetGeneratingWorldProgress(GWP_MAP_INIT, 2);
SetObjectToPlace(SPR_CURSOR_ZZZ, PAL_NONE, HT_NONE, WC_MAIN_WINDOW, 0);
Expand Down Expand Up @@ -302,6 +301,8 @@ void GenerateWorld(GenWorldMode mode, uint size_x, uint size_y, bool reset_setti
_settings_game.construction.map_height_limit = std::max(MAP_HEIGHT_LIMIT_AUTO_MINIMUM, std::min(MAX_MAP_HEIGHT_LIMIT, estimated_height + MAP_HEIGHT_LIMIT_AUTO_CEILING_ROOM));
}

if (_settings_game.game_creation.generation_seed == GENERATE_NEW_SEED) _settings_game.game_creation.generation_seed = _settings_newgame.game_creation.generation_seed = InteractiveRandom();

/* Load the right landscape stuff, and the NewGRFs! */
GfxLoadSprites();
LoadStringWidthTable();
Expand Down
4 changes: 4 additions & 0 deletions src/newgrf.cpp
Expand Up @@ -7046,6 +7046,10 @@ static uint32 GetPatchVariable(uint8 param)
case 0x16:
return SPR_SHORE_BASE;

/* Game map seed */
case 0x17:
return _settings_game.game_creation.generation_seed;

default:
grfmsg(2, "ParamSet: Unknown Patch variable 0x%02X.", param);
return 0;
Expand Down
1 change: 1 addition & 0 deletions src/textbuf.cpp
Expand Up @@ -475,6 +475,7 @@ HandleKeyPressResult Textbuf::HandleKeyPress(WChar key, uint16 keycode)
case WKC_RETURN: case WKC_NUM_ENTER: return HKPR_CONFIRM;

case (WKC_CTRL | 'V'):
case (WKC_SHIFT | WKC_INSERT):
edited = this->InsertClipboard();
break;

Expand Down

0 comments on commit 882ca47

Please sign in to comment.