Commit Graph
605 Commits
Author SHA1 Message Date
Patric StoutandGitHub d70fb74ac6 Codechange: use setting name instead of index for CmdChange(Company)Setting (#9306)
This is mostly done as there are now constraints on settings.ini you might not
expected. For example, conditional settings always have to come last, as otherwise
they would influence the index.
2021-05-29 23:27:01 +02:00
glx22andLoïc Guilloux 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 2021-05-29 21:08:25 +02:00
rubidium42andrubidium42 2e136285e1 Codechange: move from C-string to std::string for DoCommand 2021-05-29 19:02:18 +02:00
Patric StoutandPatric Stout 7713c3e3cc Codechange: move casting a "const char *" to "char *" to the caller
It is not nice to have your definition say you won't change a value
while in fact the whole reason for your existance is to change it.
2021-05-29 16:23:59 +02:00
Patric StoutandPatric Stout 665e3c1f45 Fix: ScriptObject::DoCommand could modify "text" while defined "const"
This could have unwanted side-effects, as it could change the
source for ever and ever.
2021-05-29 16:23:59 +02:00
Patric StoutandGitHub ca9a7df752 Codechange: rename str_validate to StrMakeValid(InPlace) (#9304)
This to be more explicit the function changes the value, and not
returns yes/no.
2021-05-29 11:21:38 +02:00
rubidium42andrubidium42 86c9ef8134 Codechange: remove SettingDescType in lieu of the actual classes 2021-05-27 18:49:43 +02:00
rubidium42andrubidium42 425d50372f Codechange: let SettingDesc extend SettingDescBase 2021-05-27 18:49:43 +02:00
rubidium42andrubidium42 8ffb4122df Codechange: just pass the SettingDesc to SetSettingValue and remove distinction between (non)company 2021-05-27 18:49:43 +02:00
rubidium42andrubidium42 4d246cda73 Codechange: [Network] Let NetworkClientInfo use std::string 2021-05-16 10:07:51 +02:00
rubidium42andrubidium42 44ca7d9377 Change: Use gender-neutral pronouns 2021-05-15 10:16:48 +02:00
rubidium42andrubidium42 0f062b3882 Codechange: clean up C-string support from settings 2021-05-13 23:13:17 +02:00
rubidium42andrubidium42 a032714dc4 Codechange: move script settings to std::string 2021-05-13 23:13:17 +02:00
Rubidiumandrubidium42 7755f81bb8 Codechange: make explicit that virtual functions in a con/destructor are resolved statically
This as during construction the sub class has not been initialized yet, and
during destruction the sub class has already been destroyed, so the overriding
virtual function would be accessing uninitialized data.
2021-05-13 10:03:26 +02:00
glx22andLoïc Guilloux 38c97e1492 Codechange: Replace TILE_AREA_LOOP with range-based for loops 2021-05-13 00:13:54 +02:00
William DavisandGitHub 881e1da51d Change: Use gender-neutral pronouns in console command messages (and comments) (#9203) 2021-05-08 11:02:30 +01:00
glx22andLoïc Guilloux 983c7ade60 Codechange: Replace FOR_ALL_SEARCHPATHS with range-based for loops 2021-05-03 19:46:57 +02:00
glx22andLoïc Guilloux 34215f7faa Codechange: Replace FOR_ALL_TARS with range-based for loops 2021-05-03 19:46:57 +02:00
glx22andLoïc Guilloux 9a8756d7ed Codechange: Replace FOR_ALL_CARGOSPECS with range-based for loops 2021-04-29 21:08:24 +02:00
Loïc GuillouxandGitHub 356bbbb90a Fix: [MinGW] Set minimum OS version to Windows XP (#9135) 2021-04-29 14:26:08 +02:00
peter1138andMichael Lutz c56fce70b4 Codechange: Replace CMD_SET_GROUP_REPLACE_PROTECTION with generic CMD_SET_GROUP_FLAG. 2021-04-22 22:57:00 +02:00
peter1138andMichael Lutz 27a956ba62 Codechange: Replace Group::replace_protection with Group::flags 2021-04-22 22:57:00 +02:00
RubidiumandMichael Lutz e5fedcd6da Fix #6322: [Script] Try to let the script die when no memory can be allocated instead of crashing the whole game 2021-04-17 22:24:52 +02:00
RubidiumandMichael Lutz 4400bbfa96 Change: [Script] Let Script_FatalError use std::string instead of const char * 2021-04-17 22:24:52 +02:00
Patric StoutandGitHub 9bfa7198fd Change: Heading for 1.12 now (#8862) 2021-03-14 20:47:31 +01:00
Patric StoutandGitHub 9a3dbf3122 Fix 02e770ff: allow estimating CloneVehicle if short on money (#8748)
CheckCompanyHasMoney() was also executed when not using DC_EXEC,
resulting in an error about shortage of money instead of the
estimation.
This mostly is a problem for AI players, as they will have no
way to know how much it would have cost.
2021-02-26 16:22:58 +01:00
dPandLoïc Guilloux 91cc414588 Feature: [GS] Allow non-question type windows to have no buttons 2021-02-14 23:21:43 +01:00
dPandCharles Pigott bab7de6cf2 Feature: Allow GameScripts to add additional text to Industry view window 2021-01-22 09:50:53 +00:00
Pavel StupnikovandGitHub 4b42ecb0f6 Feature: Add tile parameter for GSCompany.ChangeBankBalance to show text effect if needed (#8573) 2021-01-22 10:28:26 +01:00
SamuXarickandMichael Lutz 6298d9221a Fix 218f40e: Warning about 32-bit shift implicitly converted to 64 bits 2021-01-10 22:31:01 +01:00
Patric StoutandGitHub 218f40eea2 Add: [Script] ScriptCargo::GetName, to get the human readable name of a cargo (#8544)
Of course this translates into AICargo.GetName() for AIs and
GSCargo.GetName() for GameScripts.
2021-01-09 15:15:14 +01:00
Charles PigottandGitHub 9b800a96ed Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
glx22andglx22 f7e48cac87 Fix #8453: [Script] Don't truncate loan variation to 32bit 2020-12-28 16:51:15 +01:00
SamuXarickandGitHub dc5b8020cc Fix #6452: Reset only editable and visible settings from GUI (#7890)
Also enables the Reset button while in-game for AI configs.
2020-12-27 15:05:47 +01:00
Michael Lutz b408fe77f7 Codechange: Use std::string in file scanners. 2020-12-27 13:19:25 +01:00
Michael Lutz 65f65ad2ad Codechange: Convert some more FIO functions to take std::string. 2020-12-27 13:19:25 +01:00
Michael Lutz f3326d34e7 Codechange: Use std::string in FIO search path handling. 2020-12-27 13:19:25 +01:00
glx22andCharles Pigott d8605ad18d Codechange: Replace FOR_VEHICLE_ORDERS with range-based for loops 2020-12-27 10:28:46 +00:00
Patric StoutandGitHub f66baa444f Codechange: use C++11 constructs for for-each loops (#8432) 2020-12-25 19:38:18 +01:00
Patric StoutandPatric Stout 29e3331055 Codechange: move block a bit lower to increase readability
It was rather confusing that "library_name" was calculated, and
then not used to do the FindLibrary() call. Flipping those two
blocks around makes it a bit more sane to read.
2020-12-25 17:03:44 +01:00
Patric StoutandGitHub 8c0e4ab07f Doc: for over 10 years now, we do not load the exact AI version first (#8431)
See commit fae34ee7 for details. The documentation simply never
got updated.
2020-12-25 17:03:31 +01:00
Pavel StupnikovandGitHub 9a45a0f535 Feature: Set exclusive access to industry from GS (#8115) 2020-12-22 14:29:48 +01:00
Niels Martin HansenandGitHub b7751c483e Feature: Influence industry production changes from GS (#7912) 2020-12-22 14:21:31 +01:00
glx22andglx22 d1fa6b129c Add: [CMake] Option to only build tools/docs 2020-12-13 22:46:46 +01:00
glx22andglx22 6fae0b83d9 Add: [CMake] targets to generate documentation 2020-12-12 15:48:04 +01:00
Rasmus JonssonandCharles Pigott 0b2dd2c5cd Fix: [NoAI] don't notify caught exceptions 2020-12-02 17:11:36 +00:00
Charles Pigott 348c231e12 Codechange: Make codestyle for CMake files consistent for 'control' statements 2020-09-25 14:43:13 +01:00
glxandglx22 4079c47b6c Change: rewrote squirrel_export in CMake 2020-07-16 00:53:26 +02:00
glxandglx22 8794c61f25 Change: rewrote generate_widget in CMake 2020-07-16 00:53:26 +02:00
TrevorSheltonandCharles Pigott c39d62c245 Update: Disuse of STR_ERROR_INCOMPATIBLE_ROAD 2020-07-10 14:47:55 +01:00