Merge branch 'master' into jgrpp

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

@ -241,7 +241,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [windows-latest, windows-2016] os: [windows-latest, windows-2019]
arch: [x86, x64] arch: [x86, x64]
runs-on: ${{ matrix.os }} 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 ### 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). 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); Backup<CompanyID> cur_company(_current_company, FILE_LINE);
if (!_settings_game.economy.infrastructure_maintenance) { /* Pay Infrastructure Maintenance, if enabled */
for (const Station *st : Station::Iterate()) { if (_settings_game.economy.infrastructure_maintenance) {
cur_company.Change(st->owner);
CommandCost cost(EXPENSES_PROPERTY, _price[PR_STATION_VALUE] >> 1);
SubtractMoneyFromCompany(cost);
}
} else {
/* Improved monthly infrastructure costs. */ /* Improved monthly infrastructure costs. */
for (const Company *c : Company::Iterate()) { for (const Company *c : Company::Iterate()) {
cur_company.Change(c->index); cur_company.Change(c->index);

@ -95,7 +95,6 @@ static void _GenerateWorld()
_generating_world = true; _generating_world = true;
if (_network_dedicated) DEBUG(net, 3, "Generating map, please wait..."); 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 */ /* 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); _random.SetSeed(_settings_game.game_creation.generation_seed);
/* Generates a unique id for the savegame, to avoid accidentally overwriting a save */ /* 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)); _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! */ /* Load the right landscape stuff, and the NewGRFs! */
GfxLoadSprites(); GfxLoadSprites();
InitialiseExtraAspectsVariable(); InitialiseExtraAspectsVariable();

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

@ -7751,6 +7751,10 @@ static uint32 GetPatchVariable(uint8 param)
case 0x16: case 0x16:
return SPR_SHORE_BASE; return SPR_SHORE_BASE;
/* Game map seed */
case 0x17:
return _settings_game.game_creation.generation_seed;
default: default:
grfmsg(2, "ParamSet: Unknown Patch variable 0x%02X.", param); grfmsg(2, "ParamSet: Unknown Patch variable 0x%02X.", param);
return 0; return 0;

@ -1649,8 +1649,14 @@ CommandCost CmdRemoveLongRoad(TileIndex start_tile, DoCommandFlag flags, uint32
cost.AddCost(ret); cost.AddCost(ret);
had_success = true; had_success = true;
} else { } else {
/* Ownership errors are more important. */ /* Some errors are more equal than others. */
if (last_error.GetErrorMessage() != STR_ERROR_OWNED_BY) last_error = ret; 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", u8"Bac\u0103u",
"Baia Mare", "Baia Mare",
u8"B\u0103ile Herculane", u8"B\u0103ile Herculane",
u8"B\u0103ilesti", u8"B\u0103ile\u0219ti",
u8"B\u00e2rlad", u8"B\u00e2rlad",
"Bicaz", "Bicaz",
u8"Bistri\u021ba", u8"Bistri\u021ba",
@ -1955,11 +1955,11 @@ static const char * const _name_romanian_real[] = {
"Borsec", "Borsec",
u8"Boto\u0219ani", u8"Boto\u0219ani",
u8"Br\u0103ila", u8"Br\u0103ila",
u8"Bra\u021bov", u8"Bra\u0219ov",
u8"Bucure\u0219ti", u8"Bucure\u0219ti",
"Buftea", "Buftea",
u8"Buz\u0103u", u8"Buz\u0103u",
u8"C\u0103l\u0103rasi", u8"C\u0103l\u0103ra\u0219i",
u8"Caransebe\u0219", u8"Caransebe\u0219",
u8"Cernavod\u0103", u8"Cernavod\u0103",
"Cluj-Napoca", "Cluj-Napoca",
@ -1970,12 +1970,12 @@ static const char * const _name_romanian_real[] = {
"Deva", "Deva",
"Dorohoi", "Dorohoi",
"Drobeta-Turnu Severin", "Drobeta-Turnu Severin",
u8"Dr\u0103g\u0103sani", u8"Dr\u0103g\u0103\u0219ani",
u8"F\u0103g\u0103ras", u8"F\u0103g\u0103ra\u0219",
u8"F\u0103lticeni", u8"F\u0103lticeni",
u8"Fete\u0219ti", u8"Fete\u0219ti",
u8"Foc\u0219ani", u8"Foc\u0219ani",
u8"Gala\u0219i", u8"Gala\u021bi",
"Gheorgheni", "Gheorgheni",
"Giurgiu", "Giurgiu",
u8"H\u00e2r\u0219ova", u8"H\u00e2r\u0219ova",
@ -2019,10 +2019,10 @@ static const char * const _name_romanian_real[] = {
"Sovata", "Sovata",
"Suceava", "Suceava",
"Sulina", "Sulina",
u8"T\u0103nd\u0103rei", u8"\u021a\u0103nd\u0103rei",
u8"T\u00e2rgoviste", u8"T\u00e2rgovi\u0219te",
u8"T\u00e2rgu Jiu", u8"T\u00e2rgu Jiu",
u8"T\u00e2rgu Mures", u8"T\u00e2rgu Mure\u0219",
"Tecuci", "Tecuci",
u8"Timi\u0219oara", u8"Timi\u0219oara",
"Tulcea", "Tulcea",

@ -477,6 +477,7 @@ HandleKeyPressResult Textbuf::HandleKeyPress(WChar key, uint16 keycode)
case WKC_RETURN: case WKC_NUM_ENTER: return HKPR_CONFIRM; case WKC_RETURN: case WKC_NUM_ENTER: return HKPR_CONFIRM;
case (WKC_CTRL | 'V'): case (WKC_CTRL | 'V'):
case (WKC_SHIFT | WKC_INSERT):
edited = this->InsertClipboard(); edited = this->InsertClipboard();
break; break;

Loading…
Cancel
Save