Merge branch 'master' into jgrpp

pull/379/head
Jonathan G Rennison 2 years ago
commit 34af4844d1

@ -241,7 +241,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, windows-2016]
os: [windows-latest, windows-2019]
arch: [x86, x64]
runs-on: ${{ matrix.os }}

@ -265,5 +265,5 @@ If you would not like to accept this risk, please do either commit anonymously o
### Attribution of this Contributing Guide
This contributing guide is adapted from [Bootstrap](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md) under the [Creative Commons Attribution 3.0 Unported License](https://github.com/twbs/bootstrap/blob/master/docs/LICENSE) terms for Bootstrap documentation.
This contributing guide is adapted from [Bootstrap](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md) under the [Creative Commons Attribution 3.0 Unported License](https://creativecommons.org/licenses/by/3.0/) terms for Bootstrap documentation.
The GDPR notice is adapted from [rsyslog](https://github.com/rsyslog/rsyslog/blob/master/CONTRIBUTING.md) under the [GNU General Public License](https://github.com/rsyslog/rsyslog/blob/master/COPYING).

@ -705,13 +705,8 @@ static void CompaniesGenStatistics()
Backup<CompanyID> cur_company(_current_company, FILE_LINE);
if (!_settings_game.economy.infrastructure_maintenance) {
for (const Station *st : Station::Iterate()) {
cur_company.Change(st->owner);
CommandCost cost(EXPENSES_PROPERTY, _price[PR_STATION_VALUE] >> 1);
SubtractMoneyFromCompany(cost);
}
} else {
/* Pay Infrastructure Maintenance, if enabled */
if (_settings_game.economy.infrastructure_maintenance) {
/* Improved monthly infrastructure costs. */
for (const Company *c : Company::Iterate()) {
cur_company.Change(c->index);

@ -95,7 +95,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);
/* Generates a unique id for the savegame, to avoid accidentally overwriting a save */
@ -311,6 +310,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();
InitialiseExtraAspectsVariable();

@ -2232,7 +2232,6 @@ struct NetworkJoinStatusWindow : Window {
{
if (StrEmpty(str)) {
NetworkDisconnect();
ShowNetworkGameWindow();
return;
}

@ -7751,6 +7751,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;

@ -1649,8 +1649,14 @@ CommandCost CmdRemoveLongRoad(TileIndex start_tile, DoCommandFlag flags, uint32
cost.AddCost(ret);
had_success = true;
} else {
/* Ownership errors are more important. */
if (last_error.GetErrorMessage() != STR_ERROR_OWNED_BY) last_error = ret;
/* Some errors are more equal than others. */
switch (last_error.GetErrorMessage()) {
case STR_ERROR_OWNED_BY:
case STR_ERROR_LOCAL_AUTHORITY_REFUSES_TO_ALLOW_THIS:
break;
default:
last_error = ret;
}
}
}

@ -1947,7 +1947,7 @@ static const char * const _name_romanian_real[] = {
u8"Bac\u0103u",
"Baia Mare",
u8"B\u0103ile Herculane",
u8"B\u0103ilesti",
u8"B\u0103ile\u0219ti",
u8"B\u00e2rlad",
"Bicaz",
u8"Bistri\u021ba",
@ -1955,11 +1955,11 @@ static const char * const _name_romanian_real[] = {
"Borsec",
u8"Boto\u0219ani",
u8"Br\u0103ila",
u8"Bra\u021bov",
u8"Bra\u0219ov",
u8"Bucure\u0219ti",
"Buftea",
u8"Buz\u0103u",
u8"C\u0103l\u0103rasi",
u8"C\u0103l\u0103ra\u0219i",
u8"Caransebe\u0219",
u8"Cernavod\u0103",
"Cluj-Napoca",
@ -1970,12 +1970,12 @@ static const char * const _name_romanian_real[] = {
"Deva",
"Dorohoi",
"Drobeta-Turnu Severin",
u8"Dr\u0103g\u0103sani",
u8"F\u0103g\u0103ras",
u8"Dr\u0103g\u0103\u0219ani",
u8"F\u0103g\u0103ra\u0219",
u8"F\u0103lticeni",
u8"Fete\u0219ti",
u8"Foc\u0219ani",
u8"Gala\u0219i",
u8"Gala\u021bi",
"Gheorgheni",
"Giurgiu",
u8"H\u00e2r\u0219ova",
@ -2019,10 +2019,10 @@ static const char * const _name_romanian_real[] = {
"Sovata",
"Suceava",
"Sulina",
u8"T\u0103nd\u0103rei",
u8"T\u00e2rgoviste",
u8"\u021a\u0103nd\u0103rei",
u8"T\u00e2rgovi\u0219te",
u8"T\u00e2rgu Jiu",
u8"T\u00e2rgu Mures",
u8"T\u00e2rgu Mure\u0219",
"Tecuci",
u8"Timi\u0219oara",
"Tulcea",

@ -477,6 +477,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;

Loading…
Cancel
Save