Commit Graph

16 Commits

Author SHA1 Message Date
Patric Stout ba67f39db6
Codechange: vendor the nlohmann-json library (#11290) 2023-09-13 16:11:34 +02:00
Patric Stout 00f13282a9
Codechange: keep how we convert string <-> JSON private (#11269) 2023-09-08 19:03:10 +02:00
Patric Stout 5f9b8aaa95
Codechange: [Script] use nlohmann for Squirrel <-> JSON conversion (#11251) 2023-09-06 13:14:12 +02:00
Patric Stout 993e7be707
Fix: [Script] GSAdmin.Send() could generate invalid JSON (#11250) 2023-08-31 16:52:52 +00:00
glx22 67a4c5e0db Codechange: Use {fmt} for script_admin JSON generation 2023-03-06 00:32:12 +01:00
rubidium42 e58581f1f8 Codechange: [Network] Let admin-game script use std::string 2021-05-30 10:15:22 +02:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
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.
2019-03-20 19:24:55 +01:00
rubidium 33ab505567 (svn r26774) -Cleanup [Squirrel]: remove _SC macro 2014-09-06 17:46:56 +00:00
rubidium 7c4e9dd71d (svn r26771) -Cleanup: remove OTTD2SQ and SQ2OTTD 2014-09-06 17:30:33 +00:00
rubidium ae46990636 (svn r26492) -Fix (r26491): obviously it's too late 2014-04-23 21:33:29 +00:00
rubidium 567bf962fd (svn r26491) -Fix: compilation failure when networking is disabled 2014-04-23 21:32:41 +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 6d6be50ae0 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 2012-01-03 21:32:51 +00:00
truebrain 3a535690d4 (svn r23623) -Add: allow bi-directional communication with the AdminPort and GameScript 2011-12-19 21:00:32 +00:00