Tamás Bálint Misius
9c3b966c18
Expose new features to Lua
...
math.random now uses our rngs. In most cases, this means the interface rng, but it means the sim rng during simulation events.
2023-04-15 22:19:54 +02:00
jacob1
6d4f6218a4
Create wrapper around lua_pcall that properly tracks Lua execution time
...
A bug existed before where certain events would not update Engine's lastTick. If the sim was lagging hard, then this could cause "script is not responding" errors to appear in unintentional situations.
The starting execution time is tracked in LuaScriptInterface instead now, and set in tpt_lua_pcall
2023-02-17 21:58:57 -05:00
Tamás Bálint Misius
4f0c365e05
Preprocessor purge round 19: Split and minimize usage of Config.h
...
Also mostly banish it from other headers, and shuffle standard header includes to minimize cross-contamination between headers.
2023-01-27 09:27:32 +01:00
Tamás Bálint Misius
dc8d63fb15
Preprocessor purge round 10: LUACONSOLE
2023-01-27 09:26:39 +01:00
Tamás Bálint Misius
36d034dc2e
Fix 8-bit-uncleanliness of most of the Lua API
...
This fixes bugs like "type\0hello mom" being a property name sim.partProperty accepts and half-fixes bugs like text formatting codes making gfx.drawText exit prematurely.
2022-08-22 19:42:51 +02:00
jacob1
a0016a2b9c
Fix exception when passing nil to some functions in interface api, fixes #849
2022-07-20 21:52:03 -04:00
Tamás Bálint Misius
360297c338
Mesonification
2020-12-14 20:16:52 +01:00
Tamás Bálint Misius
fd032eff36
Fix LuaSmartRefs acting on dead Lua states
...
This fixes problems with degenerate cases such as:
local button
assert(coroutine.resume(coroutine.create(function()
button = Button(10, 10, 20, 20)
end)))
button:action(function()
print("hi")
end)
2020-08-21 11:16:11 +02:00
Tamás Bálint Misius
7629c98f22
Get rid of tiny callback classes, round No.1
...
I say round No.1 because I'm not sure if there are any left.
Hopefully there aren't.
2019-12-16 21:20:33 +01:00
Tamás Bálint Misius
0179cefc78
Flatten include trees
2019-04-20 15:36:11 +02:00
Tamás Bálint Misius
06e2836726
Fix Lua reference leaks ( fixes #638 )
2019-04-09 15:28:40 +02:00
jacob1
55e6074942
use override in all possible places
2019-03-09 21:07:32 -05:00
mniip
ff27d69424
Switch from std::string to String/ByteString in most of the code
...
Also switch SimulationData from weird arrays to std::vector
2018-04-30 21:13:24 +03:00
jacob1
6749c2547f
New SConscript (hopefully better)
...
Fixes a lot of bugs, also almost all options are no longer needed and are just auto-detected
2014-06-08 19:33:58 -04:00
jacob1
f66679e551
a little reorganization (maybe more later)
2014-01-20 13:52:53 -05:00