Add: [NewGRF] Map seed as global variable.

This is useful to provide a feature-agnostic, stable random value that differs between games.
One of the possible uses is to e.g. use it to create pseudo-random regions for towns or industries.
This commit is contained in:
Michael Lutz
2022-03-13 11:21:40 +01:00
parent 68ec2a7877
commit 08a5478a93
2 changed files with 6 additions and 1 deletions

View File

@@ -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;