OpenTTD/src/script/api
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
..
ai Add: AI API for vehicle group colours (#7336) 2019-03-08 18:13:33 +00:00
game Fix 13962a847, 00d28a500: forgotten squirrel_export run (#7345) 2019-03-08 21:15:00 +01:00
template Add: AI functions to get/set company colours. 2019-03-03 09:15:39 +01:00
ai_changelog.hpp Add: AI API for vehicle group colours (#7336) 2019-03-08 18:13:33 +00:00
Doxyfile_AI
Doxyfile_Game
doxygen_filter.awk
doxygen_filter.sh
game_changelog.hpp Change: Heading for 1.10 now (#7319) 2019-03-03 20:51:57 +01:00
generate_widget.awk Fix: keep the line ending when generating widget enums with bash/gawk on windows 2019-01-23 19:44:43 +01:00
generate_widget.sh Fix: line ending issues with MSYS2 2019-02-10 12:44:10 +01:00
generate_widget.vbs Add: generate_widget.vbs to allow script_window.hpp enums generation for users unable to run bash/gawk scripts 2019-01-23 19:44:43 +01:00
script_accounting.cpp (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
script_accounting.hpp
script_admin.cpp Remove: ENABLE_NETWORK switch 2019-03-20 19:24:55 +01:00
script_admin.hpp
script_airport.cpp Add: AI/GS GetMonthlyMaintenanceCost (#6897) 2018-11-01 18:06:08 +01:00
script_airport.hpp Add: AI/GS GetMonthlyMaintenanceCost (#6897) 2018-11-01 18:06:08 +01:00
script_base.cpp (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
script_base.hpp
script_basestation.cpp (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
script_basestation.hpp (svn r26307) -Add: [nogo] Allow GS to hide story page date 2014-02-06 19:50:34 +00:00
script_bridge.cpp Change: Give AI/GSBridge::GetName an extra parameter to refer the vehicle type (#6988) 2019-01-31 23:08:03 +00:00
script_bridge.hpp Change: Give AI/GSBridge::GetName an extra parameter to refer the vehicle type (#6988) 2019-01-31 23:08:03 +00:00
script_bridgelist.cpp (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
script_bridgelist.hpp
script_cargo.cpp (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
script_cargo.hpp (svn r27316) -Doc: Improve documentation on ScriptCargo::GetCargoLabel 2015-06-21 18:53:23 +00:00
script_cargolist.cpp (svn r26580) -Codechange: s/GES_PICKUP/GES_RATING/ (it has nothing to do with actual pickup), s/acceptance_pickup/status/ (the enum isn't called GoodEntryStatus for a reason; it's not only acceptance and pickup anymore) 2014-05-11 18:02:11 +00:00
script_cargolist.hpp
script_cargomonitor.cpp (svn r26685) -Fix: Tighten parameter bound checks on GSCargoMonitor functions, and return -1 on out-of-bound parameters. 2014-07-12 17:04:14 +00:00
script_cargomonitor.hpp (svn r26685) -Fix: Tighten parameter bound checks on GSCargoMonitor functions, and return -1 on out-of-bound parameters. 2014-07-12 17:04:14 +00:00
script_client.cpp Remove: ENABLE_NETWORK switch 2019-03-20 19:24:55 +01:00
script_client.hpp Feature #6459: API for querying network clients from GS (#6736) 2018-04-22 15:42:29 +02:00
script_clientlist.cpp Remove: ENABLE_NETWORK switch 2019-03-20 19:24:55 +01:00
script_clientlist.hpp Feature #6459: API for querying network clients from GS (#6736) 2018-04-22 15:42:29 +02:00
script_company.cpp Add: AI functions to get/set company colours. 2019-03-03 09:15:39 +01:00
script_company.hpp Add: AI functions to get/set company colours. 2019-03-03 09:15:39 +01:00
script_companymode.cpp Fix #6966: Only allow switching to a valid company. 2018-12-29 16:15:44 +01:00
script_companymode.hpp
script_controller.cpp (svn r26774) -Cleanup [Squirrel]: remove _SC macro 2014-09-06 17:46:56 +00:00
script_controller.hpp (svn r27111) -Doc: Extend script documentation with Save and Load functions. 2015-01-04 15:14:13 +00:00
script_date.cpp (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
script_date.hpp (svn r26307) -Add: [nogo] Allow GS to hide story page date 2014-02-06 19:50:34 +00:00
script_depotlist.cpp (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
script_depotlist.hpp
script_engine.cpp (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
script_engine.hpp (svn r27123) -Fix [FS#5371] [FS#6214]: API docs (krinn) 2015-01-20 19:11:31 +00:00
script_enginelist.cpp (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
script_enginelist.hpp
script_error.cpp (svn r27893) -Codechange: Use fallthrough attribute. (LordAro) 2017-08-13 18:38:42 +00:00
script_error.hpp
script_event_types.cpp (svn r27020) -Cleanup: some coding style consistency improvements (mostly spaces) 2014-10-15 18:31:37 +00:00
script_event_types.hpp Fix: Spelling in code comment (#6984) 2018-11-28 16:24:01 +01:00
script_event.cpp (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
script_event.hpp
script_execmode.cpp (svn r27379) -Codechange: Do not throw in the destructors of ScriptTest/ExecMode. 2015-08-10 20:04:31 +00:00
script_execmode.hpp (svn r27543) -Fix (r27379): ScriptExec/TestMode::FinalRelease is not part of the API. 2016-04-17 17:10:07 +00:00
script_game.cpp Remove: ENABLE_NETWORK switch 2019-03-20 19:24:55 +01:00
script_game.hpp
script_gamesettings.cpp (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
script_gamesettings.hpp
script_goal.cpp Remove: ENABLE_NETWORK switch 2019-03-20 19:24:55 +01:00
script_goal.hpp Feature: Add GS method to question a single client (#6748) 2018-04-28 17:37:59 +02:00
script_group.cpp Add: AI API for vehicle group colours (#7336) 2019-03-08 18:13:33 +00:00
script_group.hpp Add: AI API for vehicle group colours (#7336) 2019-03-08 18:13:33 +00:00
script_grouplist.cpp (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
script_grouplist.hpp
script_industry.cpp Feature: Non-rectangular sparse station catchment area. 2019-03-09 16:33:47 +00:00
script_industry.hpp
script_industrylist.cpp (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
script_industrylist.hpp
script_industrytype.cpp (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
script_industrytype.hpp (svn r26164) -Doc: Fix Game Script API docs on that deity can build/prospect independent of advanced setting for that 2013-12-17 20:41:51 +00:00
script_industrytypelist.cpp (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
script_industrytypelist.hpp
script_info_docs.hpp (svn r26038) -Fix: Doxygen syntax. 2013-11-18 20:09:09 +00:00
script_infrastructure.cpp (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
script_infrastructure.hpp
script_list.cpp (svn r27594) -Fix [FS#6473]: [Script] Kill scripts, when a non-suspendable valuator call takes way too long. 2016-05-30 21:03:11 +00:00
script_list.hpp (svn r27104) -Fix [FS#6194]: support 64 bits integere in the ScriptLists as well 2015-01-01 21:08:19 +00:00
script_log.cpp (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 2014-04-25 15:40:32 +00:00
script_log.hpp
script_map.cpp (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
script_map.hpp
script_marine.cpp (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
script_marine.hpp
script_news.cpp (svn r27164) -Add: [NoGo] Game scripts can point to a location, station, industry, or town when publishing news. 2015-02-22 17:25:29 +00:00
script_news.hpp (svn r27164) -Add: [NoGo] Game scripts can point to a location, station, industry, or town when publishing news. 2015-02-22 17:25:29 +00:00
script_object.cpp Remove: ENABLE_NETWORK switch 2019-03-20 19:24:55 +01:00
script_object.hpp
script_order.cpp Add: Conditional order for max. reliability (patch by Cirdan, #6360) (#7017) 2019-01-05 22:10:37 +01:00
script_order.hpp Doc: [AI] UnshareOrders empties the orders list of the vehicle. 2019-02-19 15:25:53 +01:00
script_rail.cpp Fix bf8d7df: Script/AI construction of rail track and waypoints (#6881) 2018-08-12 09:45:38 +02:00
script_rail.hpp
script_railtypelist.cpp (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
script_railtypelist.hpp
script_road.cpp (svn r27381) -Fix: Warnings due to C++11 requirements for explicit narrowing conversions in initializer lists. 2015-08-10 20:24:13 +00:00
script_road.hpp (svn r26149) -Fix [FS#5825]: [Script] Various API functions did not check whether ScrtipRoad::SetCurrentRoadType was called appropiately. 2013-12-08 15:44:09 +00:00
script_sign.cpp (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
script_sign.hpp
script_signlist.cpp (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
script_signlist.hpp
script_station.cpp (svn r27020) -Cleanup: some coding style consistency improvements (mostly spaces) 2014-10-15 18:31:37 +00:00
script_station.hpp Remove: Unused string "STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION" 2018-10-31 19:24:21 +01:00
script_stationlist.cpp Fix b4b98e5165: Use FALLTHROUGH attribute with correct indentation. 2018-04-30 21:52:40 +02:00
script_stationlist.hpp (svn r27003) -Cleanup: fix the use of spaces and asterices "around" some comments 2014-10-12 18:41:53 +00:00
script_story_page.cpp (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
script_story_page.hpp (svn r26307) -Add: [nogo] Allow GS to hide story page date 2014-02-06 19:50:34 +00:00
script_storypageelementlist.cpp (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
script_storypageelementlist.hpp (svn r26305) -Add: [nogo] ScriptStoryPageElementList() - a list of all story page elements for a given page 2014-02-06 19:41:56 +00:00
script_storypagelist.cpp (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
script_storypagelist.hpp (svn r26304) -Fix (26303): Forgot to add new files 2014-02-06 19:36:19 +00:00
script_subsidy.cpp (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
script_subsidy.hpp (svn r26307) -Add: [nogo] Allow GS to hide story page date 2014-02-06 19:50:34 +00:00
script_subsidylist.cpp (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
script_subsidylist.hpp
script_testmode.cpp (svn r27379) -Codechange: Do not throw in the destructors of ScriptTest/ExecMode. 2015-08-10 20:04:31 +00:00
script_testmode.hpp (svn r27543) -Fix (r27379): ScriptExec/TestMode::FinalRelease is not part of the API. 2016-04-17 17:10:07 +00:00
script_text.cpp (svn r27102) -Fix [FS#6194]: money values would end up wrong in strings when outside of the bounds of a 32 bits integer 2015-01-01 20:50:43 +00:00
script_text.hpp (svn r27544) -Fix-ish: Mark ScriptText::GetEncodedText as not part of any API, instead of relying on the export script to break on '/*'. 2016-04-17 19:50:27 +00:00
script_tile.cpp (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
script_tile.hpp
script_tilelist.cpp (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
script_tilelist.hpp (svn r27287) -Doc: Clarify radius and semantics of the industry producing/accepting tile functions. 2015-05-16 14:40:45 +00:00
script_town.cpp Fix #7112, fef8b831a9: incorrect precondition check (#7127) 2019-01-28 17:16:19 +01:00
script_town.hpp Change: Switch town growth rate and counter to actual game ticks (#6763) 2018-05-02 21:01:30 +02:00
script_townlist.cpp (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
script_townlist.hpp
script_tunnel.cpp (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
script_tunnel.hpp (svn r26149) -Fix [FS#5825]: [Script] Various API functions did not check whether ScrtipRoad::SetCurrentRoadType was called appropiately. 2013-12-08 15:44:09 +00:00
script_types.hpp (svn r27757) -Change: Make StringID 32bit. 2017-02-26 19:41:14 +00:00
script_vehicle.cpp (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
script_vehicle.hpp
script_vehiclelist.cpp (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
script_vehiclelist.hpp
script_viewport.cpp Feature: GS methods to scroll viewport for players (#6745) 2018-04-24 19:19:00 +02:00
script_viewport.hpp Feature: GS methods to scroll viewport for players (#6745) 2018-04-24 19:19:00 +02:00
script_waypoint.cpp (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
script_waypoint.hpp
script_waypointlist.cpp (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
script_waypointlist.hpp
script_window.cpp (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
script_window.hpp Change: Framerate window can now scroll and resize 2019-02-23 14:29:07 +01:00
squirrel_export.awk Fix: keep line endings when running squirrel_export.sh on windows 2019-01-14 00:34:52 +00:00
squirrel_export.sh Fix: line ending issues with MSYS2 2019-02-10 12:44:10 +01:00
squirrel_export.vbs Add: squirrel_export.vbs for users unable to run bash/gawk scripts 2019-01-14 00:34:52 +00:00