Commit Graph

82 Commits (bab5a8a78713299a4ea6be0ac6b94830c031fd57)

Author SHA1 Message Date
Rubidium bab5a8a787 Codechange: use std::source_location over __FILE__ and __LINE__ for Backup 3 months ago
Loïc Guilloux ef40c5e240
Fix #12225, 977aba7: [Script] Missing AI:ResetConfig support for running AI config (#12226) 3 months ago
Loïc Guilloux 845b894fd8
Remove: [Script] random_deviation from setting description table (#12221) 3 months ago
Loïc Guilloux 25d1238907
Fix #12133: [Script] Don't crash when emergency saving (#12138) 4 months ago
Loïc Guilloux 8d9fa0ea89
Change: [Script] Use company randomizer when adding random deviation (#12065) 4 months ago
Loïc Guilloux 977aba73be
Change: Store running AI config inside Company (#12003) 4 months ago
Loïc Guilloux ab1407fc43
Fix: [Script] Apply random deviation only at script start (#11944) 4 months ago
Peter Nelson 0ca4b4e146 Change: Allow opening multiple script debug windows by holding Ctrl. 6 months ago
Rubidium 07860e67e2 Codechange: use fmt::format_to to format the help message 1 year ago
Rubidium 9f2fc860ad Codechange: use std::optional<std::string> for changing the script over char * 1 year ago
Rubidium 0fd9eb0faa Codechange: use std::string for script info/library finding 1 year ago
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.
1 year ago
glx22 b080f24bd8 Codechange: move windows common to AI and GS out of ai_gui 1 year ago
SamuXarick df89c34e03
Fix 7e1e275: Measure AI Collect Garbage performance (#9924) 1 year ago
Loïc Guilloux fe30f66570
Fix #9720: Delay start of GS/AI to after loading of savegame (#9745) 1 year ago
Charles Pigott 9059215b3b Fix #10073: Stop truncating output of list_ai and friends commands 2 years ago
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 3 years ago
glx22 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 3 years ago
glx 3a14cea068 Codechange: Replace FOR_ALL_COMPANIES with range-based for loops 5 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Charles Pigott 5b34c8019f Codechange: Remove Company/OwnerByte types 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Patric Stout e3c639a09f Remove: ENABLE_NETWORK switch
This switch has been a pain for years. Often disabling broke
compilation, as no developer compiles OpenTTD without, neither do
any of our official binaries.

Additionaly, it has grown so hugely in our codebase, that it
clearly shows that the current solution was a poor one. 350+
instances of "#ifdef ENABLE_NETWORK" were in the code, of which
only ~30 in the networking code itself. The rest were all around
the code to do the right thing, from GUI to NewGRF.

A more proper solution would be to stub all the functions, and
make sure the rest of the code can simply assume network is
available. This was also partially done, and most variables were
correct if networking was disabled. Despite that, often the #ifdefs
were still used.

With the recent removal of DOS, there is also no platform anymore
which we support where networking isn't working out-of-the-box.

All in all, it is time to remove the ENABLE_NETWORK switch. No
replacement is planned, but if you feel we really need this option,
we welcome any Pull Request which implements this in a way that
doesn't crawl through the code like this diff shows we used to.
5 years ago
Niels Martin Hansen 7e1e2756d4 Add: Show performance of AI and GS in framerate window 5 years ago
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 10 years ago
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 11 years ago
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
zuu f3f4c562ff (svn r24537) -Feature: Scripts can be suspended even if the game is still progressing, thus break-on-log now works also for Game Scripts. 12 years ago
yexo fe31aa28c4 (svn r24487) -Codechange [FS#5236]: make several DoesContentExist return the path instead of a boolean (LordAro) 12 years ago
frosch d7d89bc806 (svn r24108) -Fix [FS#5142]: When starting GS or AI, always use the settings of the game, not the new-game settings. 12 years ago
truebrain 251687f795 (svn r23746) -Fix: also set 'info' to NULL if 'instance' dies (for both AI and GS); avoids invalid memory reads 13 years ago
rubidium 6d6be50ae0 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 13 years ago
rubidium 37b136576d (svn r23718) -Fix [FS#4936]: rescanai caused crash when the AI settings of an AI was opened 13 years ago
truebrain cc3f42794d (svn r23632) -Add: GSCompanyMode, to change company in GameScripts 13 years ago
truebrain 2ecbe89509 (svn r23524) -Codechange: move the name of the scanner to a level deeper 13 years ago
truebrain a8b22e5292 (svn r23386) -Fix: debug script related events to 'script' (removes 'ai') 13 years ago
rubidium 582601b2f7 (svn r23377) -Fix: compilation failure when networking is disabled 13 years ago
truebrain 34d7f01ccc (svn r23364) -Codechange: refactor AIConfig, moving it mostly to Scriptconfig 13 years ago
truebrain e37149a1de (svn r23362) -Codechange: refactor AIScanner, splitting it in AIScannerInfo and AIScannerLibrary 13 years ago
truebrain ae8540f5e0 (svn r23361) -Codechange: move multiplayer DoCommand callback code so other script users can call their own 13 years ago
truebrain 98103121d4 (svn r23355) -Codechange: rename all AI* to Script* (Rubidium) 13 years ago
truebrain afdb67a353 (svn r23354) -Codechange: move all src/ai/api/ai_*.[hc]pp files to src/script/api/script_* (Rubidium) 13 years ago
truebrain d03bbdd4ac (svn r23295) -Codechange: put ImportLibrary in AIController (and document the parameters for NoAI docs) 13 years ago
rubidium 4ae8bbea07 (svn r23222) -Codechange: reduce tar scanning calls to the bare minimum 13 years ago
truebrain b7a655bf4c (svn r23209) -Codechange: track the current active script instance directly, instead of assuming the current company points you to the right one. 13 years ago
rubidium f5dd74499b (svn r22829) -Codechange: unify the dirtying of windows after an AI scan 13 years ago
yexo cf11a1e98e (svn r22534) -Fix [FS#4631] (r21250): doing rescan_ai in a game with running AIs caused a crash 13 years ago
rubidium 79fd8a362b (svn r22007) -Change: only show one AI per unique ID instead of all versions in the output of "openttd -h" 14 years ago
yexo 8e3e93b96f (svn r21703) -Feature [FS#4372]: list_ai_libs console command to get a list of recognized AI libraries (dihedral) 14 years ago
rubidium 30f2afac9b (svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers 14 years ago