Commit Graph

34 Commits

Author SHA1 Message Date
Loïc Guilloux 845b894fd8
Remove: [Script] random_deviation from setting description table (#12221) 2024-03-05 12:41:04 +01:00
Loïc Guilloux 8d9fa0ea89
Change: [Script] Use company randomizer when adding random deviation (#12065) 2024-02-11 18:58:41 +00:00
Loïc Guilloux 977aba73be
Change: Store running AI config inside Company (#12003) 2024-02-09 22:55:49 +01:00
Loïc Guilloux ab1407fc43
Fix: [Script] Apply random deviation only at script start (#11944) 2024-02-01 10:48:40 +01:00
Patric Stout e28edf6945
Remove: [Script] CONFIG_RANDOM from AddSetting flags (#11942)
It had a very weird interaction, and was only ever used by a single
AI.
2024-01-31 22:24:36 +00:00
Rubidium 48825e1a8e Codechange: rewrite script string-to-settings conversion to C++ 2023-05-14 22:54:10 +02:00
Rubidium 9f2fc860ad Codechange: use std::optional<std::string> for changing the script over char * 2023-05-14 22:54:10 +02:00
Rubidium 0fd9eb0faa Codechange: use std::string for script info/library finding 2023-05-14 22:54:10 +02:00
Rubidium 1ae7eb1594 Codechange: use std::map over SmallMap and std::string of stredup(char*) 2023-05-09 23:14:48 +02:00
Rubidium bc389a86c9 Codechange: use std::string as std::map key, instead of stredup string 2023-05-09 23:14:48 +02:00
Rubidium 877349c13d Codechange: use std::string for text file name resolution 2023-05-05 08:54:29 +02:00
Patric Stout ed83c4b0da
Change: replace per-AI "start_date" with a global "competitors_interval" (#10653)
The per-AI "start_date" is a lot of custom code, and was rarely
used in the way it was meant.

While at it, also ported this part over to the new timer system.
2023-04-16 20:14:22 +02:00
SamuXarick bb2ac8b3c4 Fix: [Script] Save config item values up to 10 digits + 1 for sign + 1 for termination, enough to fit min and max int 2023-02-21 00:28:21 +01:00
Rubidium 921c6591f9 Codechange: do not use interactive random anymore for script configuration 2023-01-14 22:00:11 +01:00
Loïc Guilloux fe30f66570
Fix #9720: Delay start of GS/AI to after loading of savegame (#9745) 2022-12-28 05:02:26 +01:00
rubidium42 a032714dc4 Codechange: move script settings to std::string 2021-05-13 23:13:17 +02:00
Rubidium 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
SamuXarick 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
Patric Stout f66baa444f
Codechange: use C++11 constructs for for-each loops (#8432) 2020-12-25 19:38:18 +01:00
SamuXarick 8f9654c5c6 Fix: [Script] Random deviation upper bound range should be inclusive 2020-03-31 22:33:19 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
SamuXarick 41fb7cb15e Fix #6892: [Script] CONFIG_RANDOM did not use the full parameter range (#6902) 2018-09-20 22:31:38 +02:00
rubidium 9ed12b0f07 (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 2014-04-25 15:40:32 +00:00
frosch fad2d3c709 (svn r26505) -Fix (r23634, r26493): Incorrect usage of strecpy/strecat 2014-04-24 19:09:17 +00:00
rubidium b4914b91d9 (svn r26493) -Codechange: use strecat to concatenate script settings instead of manually accounting for the amount of characters that has been written 2014-04-24 04:41:54 +00:00
rubidium 5b82822c12 (svn r26486) -Codechange: replace a number of snprintfs with seprintf 2014-04-23 21:12:09 +00:00
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 2014-04-23 20:13:33 +00:00
rubidium 81ce9ad189 (svn r25592) -Fix [FS#5644]: Changing the script difficulty level in-game would also change the settings using the default even though they were not allowed to change in-game 2013-07-12 18:54:27 +00:00
frosch e43bf5dabd (svn r24788) -Change: Detach script settings from difficulty settings. Always allow changing all script settings without setting difficulty to custom. 2012-12-05 19:35:38 +00:00
frosch a499435351 (svn r24786) -Codechange: Add SettingsProfile enum for difficulty profiles and highscore tables. 2012-12-05 19:34:45 +00:00
rubidium 6356178a25 (svn r23936) -Feature [FS#5047]: readme/licence/changelog viewer for AI and game scripts (LordAro) 2012-02-12 10:58:18 +00:00
rubidium 6d6be50ae0 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 2012-01-03 21:32:51 +00:00
truebrain 34d7f01ccc (svn r23364) -Codechange: refactor AIConfig, moving it mostly to Scriptconfig 2011-11-29 23:26:35 +00:00