Jonathan G Rennison
cbdd9f84d8
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/console_gui.cpp
# src/lang/korean.txt
# src/video/sdl2_v.cpp
# src/video/sdl2_v.h
# src/window.cpp
# src/window_gui.h
2019-11-12 18:43:10 +00:00
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
2019-11-10 17:59:20 +00:00
Jonathan G Rennison
1f535915d1
Merge branch 'master' into jgrpp-nrt
...
# Conflicts:
# config.lib
# src/core/bitmath_func.hpp
# src/lang/korean.txt
# src/main_gui.cpp
# src/order_gui.cpp
# src/script/api/script_object.cpp
# src/station_cmd.cpp
# src/video/cocoa/wnd_quartz.mm
2019-09-18 01:18:28 +01:00
Niels Martin Hansen
0549a81c30
Fix b3fd7879
: Ignore command flags when verifying script commands
...
Multiplayer games has the server add some flags to the cmd value during the handling.
These flags should not be included in the verification, mask them out. Without this
masking out, scripts tend to die when executing their first command in multiplayer.
2019-09-07 19:38:13 +02:00
glx22
b3fd787959
Fix #7188 : check the validity of command callback for scripts ( #7701 )
2019-09-07 17:37:01 +01:00
Jonathan G Rennison
dbc5f1baed
Merge branch 'master' into jgrpp-nrt
...
# Conflicts:
# src/fontcache.cpp
# src/game/game_text.cpp
# src/lang/korean.txt
# src/os/macosx/crashlog_osx.cpp
# src/os/windows/crashlog_win.cpp
# src/station_cmd.cpp
# src/viewport.cpp
2019-07-11 20:03:23 +01:00
Niels Martin Hansen
140a96b3a0
Change: Limit memory allocations for each Squirrel instance
...
This can avoid out-of-memory situations due to single scripts using up the entire address space.
Instead, scripts that go above the maximum are killed.
The maximum is default 1 GB per script, but can be configured by a setting.
2019-05-11 15:34:33 +02:00
Jonathan G Rennison
674732cd68
Merge: Codechange: Use null pointer literal instead of the NULL macro
2019-04-11 18:14:13 +01:00
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
2019-04-10 23:22:20 +02:00
Jonathan G Rennison
4bf4862674
Add AI/game script DoCommand calls to command log
2019-04-04 23:43:54 +01:00
Jonathan G Rennison
ba34ec7ade
Merge branch 'master' into jgrpp
...
Replace build and refit, and group collapse implementations
Fix template creation build and refit
# Conflicts:
# Makefile.bundle.in
# config.lib
# src/animated_tile.cpp
# src/blitter/32bpp_anim.hpp
# src/blitter/32bpp_base.hpp
# src/blitter/8bpp_base.hpp
# src/blitter/null.hpp
# src/build_vehicle_gui.cpp
# src/command.cpp
# src/command_func.h
# src/console_gui.cpp
# src/core/smallstack_type.hpp
# src/date.cpp
# src/debug.cpp
# src/genworld_gui.cpp
# src/ground_vehicle.hpp
# src/group_gui.cpp
# src/lang/korean.txt
# src/linkgraph/linkgraph_gui.h
# src/main_gui.cpp
# src/misc_gui.cpp
# src/network/core/game.h
# src/network/core/packet.cpp
# src/network/core/udp.cpp
# src/network/core/udp.h
# src/network/network_content.cpp
# src/network/network_type.h
# src/network/network_udp.cpp
# src/newgrf_house.h
# src/openttd.cpp
# src/order_cmd.cpp
# src/order_gui.cpp
# src/os/unix/crashlog_unix.cpp
# src/os/windows/crashlog_win.cpp
# src/osk_gui.cpp
# src/pathfinder/opf/opf_ship.cpp
# src/rail_cmd.cpp
# src/rail_gui.cpp
# src/saveload/saveload.cpp
# src/settings.cpp
# src/settings_gui.cpp
# src/smallmap_gui.h
# src/station_base.h
# src/station_cmd.cpp
# src/table/gameopt_settings.ini
# src/table/newgrf_debug_data.h
# src/table/settings.ini
# src/timetable_gui.cpp
# src/toolbar_gui.cpp
# src/train_gui.cpp
# src/vehicle.cpp
# src/vehicle_gui.cpp
# src/vehiclelist.cpp
# src/viewport.cpp
# src/widgets/dropdown.cpp
# src/window_gui.h
2019-03-27 18:12:04 +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
Jonathan G Rennison
9b07287303
Add scope info logging to ScriptObject::DoCommand
2019-03-01 18:30:12 +00:00
patch-import
536a95dfd0
Import combined Enhanced viewport: zoom out, overlays & tooltips (r53_27127) patch
...
https://www.tt-forums.net/viewtopic.php?f=33&t=53394
2015-08-05 21:24:30 +01:00
rubidium
034735a54c
(svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL)
2014-04-25 15:40:32 +00: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
rubidium
2be4215f43
(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
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
ffa7693524
(svn r26093) -Fix (r26092): compilation error
2013-11-24 19:53:35 +00:00
rubidium
0460b78515
(svn r26093) -Fix (r26092): compilation error
2013-11-24 19:53:35 +00:00
rubidium
30a390b759
(svn r26092) -Fix [FS#5818]: prevent scripts from crashing OpenTTD when they send text with command codes to user editable texts such as sign and station names
2013-11-24 19:46:16 +00:00
rubidium
168fa4129d
(svn r26092) -Fix [FS#5818]: prevent scripts from crashing OpenTTD when they send text with command codes to user editable texts such as sign and station names
2013-11-24 19:46:16 +00:00
rubidium
9d41bcd010
(svn r25488) -Fix [FS#5613]: do not send encoded texts to names, but decode them into a plain C string and then pass them on
2013-06-27 19:57:41 +00:00
rubidium
19eca468fc
(svn r25488) -Fix [FS#5613]: do not send encoded texts to names, but decode them into a plain C string and then pass them on
2013-06-27 19:57:41 +00:00
zuu
65129db43c
(svn r25342) -Add: StoryPage data structures and GS API
2013-06-09 12:19:09 +00:00
zuu
9aa1bf0264
(svn r25342) -Add: StoryPage data structures and GS API
2013-06-09 12:19:09 +00:00
zuu
7661336b2d
(svn r25305) -Fix [FS#5561]: Game Script APIs that execute a DoCommand were returning the same result as in TestMode during world generation
2013-05-29 19:31:58 +00:00
zuu
a58427115c
(svn r25305) -Fix [FS#5561]: Game Script APIs that execute a DoCommand were returning the same result as in TestMode during world generation
2013-05-29 19:31:58 +00:00
rubidium
3b7d290f3e
(svn r24008) -Cleanup/doc: try not to mention (No)AI in script APIs
2012-03-04 16:54:12 +00:00
rubidium
22637f139f
(svn r24008) -Cleanup/doc: try not to mention (No)AI in script APIs
2012-03-04 16:54:12 +00:00
rubidium
314616727b
(svn r23778) -Fix [FS#4957]: trim all control codes and the likes from strings being passed into the AI. If the AI would be displaying them later we would be showing those control codes as question marks.
2012-01-08 21:51:08 +00:00
rubidium
df963509f6
(svn r23778) -Fix [FS#4957]: trim all control codes and the likes from strings being passed into the AI. If the AI would be displaying them later we would be showing those control codes as question marks.
2012-01-08 21:51:08 +00:00
rubidium
4ad23bbf98
(svn r23777) -Codechange: refactor allocating memory and fetching strings into a single function for scripts
2012-01-08 21:48:05 +00:00
rubidium
4479f90843
(svn r23777) -Codechange: refactor allocating memory and fetching strings into a single function for scripts
2012-01-08 21:48:05 +00:00
rubidium
d5eeab43b7
(svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files
2012-01-03 21:32:51 +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
95b199e313
(svn r23632) -Add: GSCompanyMode, to change company in GameScripts
2011-12-19 21:05:25 +00:00
truebrain
cc3f42794d
(svn r23632) -Add: GSCompanyMode, to change company in GameScripts
2011-12-19 21:05:25 +00:00
truebrain
ccf9b01f5d
(svn r23630) -Add: a Goal GUI to show your current goals
2011-12-19 21:03:17 +00:00
truebrain
3ada3b9cc5
(svn r23630) -Add: a Goal GUI to show your current goals
2011-12-19 21:03:17 +00:00
truebrain
fb2f2a0285
(svn r23611) -Add: run the begin of the script already while generating, and don't sleep on DoCommand while doing so
2011-12-19 20:56:50 +00:00
truebrain
83f2785f54
(svn r23611) -Add: run the begin of the script already while generating, and don't sleep on DoCommand while doing so
2011-12-19 20:56:50 +00:00
frosch
93a0bb32cb
(svn r23515) -Cleanup: Remove unused ScriptObject::GetNewTunnelEndtile() and relatives.
2011-12-14 20:13:18 +00:00
frosch
0a7b49e398
(svn r23515) -Cleanup: Remove unused ScriptObject::GetNewTunnelEndtile() and relatives.
2011-12-14 20:13:18 +00:00
truebrain
d319ccec27
(svn r23369) -Codechange: use script includes when possible, not ai includes
2011-11-29 23:27:17 +00:00
truebrain
2c877b074e
(svn r23369) -Codechange: use script includes when possible, not ai includes
2011-11-29 23:27:17 +00:00
truebrain
fe41ceb477
(svn r23367) -Codechange: refactor GetSetting to ScriptInstance, to avoid global variable in script_controller
2011-11-29 23:27:01 +00:00
truebrain
880f377fa6
(svn r23367) -Codechange: refactor GetSetting to ScriptInstance, to avoid global variable in script_controller
2011-11-29 23:27:01 +00:00
truebrain
ff5775638c
(svn r23361) -Codechange: move multiplayer DoCommand callback code so other script users can call their own
2011-11-29 23:21:42 +00:00
truebrain
ae8540f5e0
(svn r23361) -Codechange: move multiplayer DoCommand callback code so other script users can call their own
2011-11-29 23:21:42 +00:00