Tamás Bálint Misius
bcbcdbe06b
Make custom can_move settings persistent ( fixes #764 )
2021-04-17 21:23:39 +02:00
Tamás Bálint Misius
6a6b14f871
Redo and add type parameter to sim.neighbours
2021-04-17 10:40:10 +02:00
jacob1
ffb88259d6
Split Simulation::IsValidElement into IsElement and IsElementOrNone
...
Allows finer control over whether you want none included or not.
Fixes some invalid things being allowed for element 0 in legacy lua api
Fixes {ctype} signs showing 0 instead of NONE
2021-04-11 23:20:33 -04:00
Tamás Bálint Misius
1681ca77d8
Add Lua support for composition
2021-04-02 10:21:54 +02:00
Doxin
cc2022504a
Add ren.showBrush to the LUA api to allow hiding the brush
2021-03-18 16:13:15 -04:00
Tamás Bálint Misius
4b7e85c2fb
Fix a metric ton of MSVC warnings
2021-02-15 21:24:44 +01:00
Tamás Bálint Misius
92ccb12d70
Update luasocket, embed eventcompat.lua differently
2021-01-04 16:43:31 +01:00
Tamás Bálint Misius
360297c338
Mesonification
2020-12-14 20:16:52 +01:00
Vladimir
f137bad7f8
Limit redrawing frequency ( #693 )
...
Co-authored-by: Tamás Bálint Misius <lbphacker@gmail.com>
2020-10-11 11:58:52 +02: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
QuanTech0
dda7747688
safeguard FloodParts and kill_part ( #717 )
2020-05-11 10:20:01 -04:00
QuanTech0
49963980e6
Constrain brushx and brushy values ( #716 )
2020-05-09 13:54:12 -04:00
Tamás Bálint Misius
a2a8c876b3
Finalize latin-1 supplement changes
...
Swap both versions of O with acute and grave accents
Fix a few ASCII-isms
Fix intro text; the latin-1 changes broke the line under The Powder Toy
2020-03-09 23:44:18 +03:00
jacob1
0c588c48fe
allow making POST requests with empty body
2020-01-20 11:11:56 -05:00
jacob1
afefd045c8
split http.request into http.get and http.post (for api reasons)
...
It's cleaner together, but it's not a good api.
2020-01-20 00:30:30 -05:00
Tamás Bálint Misius
89282806e6
Make NOHTTP transparent to the Lua API
...
Also, HTTPRequest:status would never have returned queued since
the request is started immediately on creation.
2020-01-18 01:33:40 +01:00
Tamás Bálint Misius
fe87203eb4
Add HTTP API for Lua
...
Also fix a bug with Requests where any connection that took
longer to finish than 15 seconds would be killed. Should have
used CURLOPT_CONNECTTIMEOUT instead of CURLOPT_TIMEOUT when
specifying the timeout, oops.
2020-01-16 20:05:31 +01:00
Tamás Bálint Misius
4d52531889
Ditch element and tool classes
2020-01-09 19:22:11 +01:00
jacob1
131b965af2
Add Lua apis to interact with DefaultProperties, Create, CreateAllowed, and ChangeType
2019-12-09 22:32:30 -05:00
jacob1
0078fb4c6f
Add DefaultProperties, replaces some of the case statements in create_part
...
The rest will will in a commit soon that adds the Create event and some other stuff
Lua events will come after that
PLSM default temp lowered to MAX_TEMP
2019-11-25 22:08:18 -05:00
jacob1
876a9b3096
Fix crashes if returning invalid arguments from graphics or ctypeDraw lua functions
2019-11-24 23:12:22 -05:00
jacob1
b09158220f
Fix crash if error happens in ctypeDraw lua function
2019-11-22 23:37:17 -05:00
Tamás Bálint Misius
d17c67b3a4
Fix unsigned integer properties being returned as signed integers from Lua functions
2019-11-14 00:28:27 +01:00
jacob1
9ed7f1e85a
Fix crash if any built-in scripts try to use the interface api
...
We don't have any scripts like this and never will. But if we did, this would fix the crash.
2019-10-17 23:56:40 -04:00
Tamás Bálint Misius
a6127bc1fb
Add Lua API for deco tool colour space, see 51e5f2b
2019-09-21 21:58:50 +02:00
Tamás Bálint Misius
51b78be139
Nicer implementation of sim.parts
2019-09-15 22:14:46 +02:00
jacob1
28d5345bf9
Fix off-by-one issue in sim.parts, fixes #678
2019-09-15 15:37:54 -04:00
Tamás Bálint Misius
de1fc0f906
Revise ctype-drawing ( fixes #657 )
2019-07-27 19:12:05 +02:00
jacob1
9faf95a858
misc whitespace changes
2019-07-23 00:11:48 -04:00
Tamás Bálint Misius
dbd5999d1c
Reinstate inversion of inclusion of pressure when shift is held
...
This feature was removed temporarily in a407aba
.
Whether pressure is included when saving or loading is
determined as follows:
* load-like operations (which invoke Simulation::Load) always
include pressure;
* save-like operations (which invoke Simulation::Save) include
pressure if the Simulation.IncludePressure preference node
is true;
* finally the state of the shift key inverts the decision.
2019-07-16 19:43:52 +02:00
Tamás Bálint Misius
a407aba087
Make Simulation.IncludePressure pref node accessible from OptionsView
...
Also remove ugly and messy behaviour depending on whether
shift is being held while copying or stamping.
2019-07-10 00:35:49 +02:00
Tamás Bálint Misius
8897c6daea
Make elem.free rebuild menus ( fixes #649 )
...
Also make sure removed elements don't stay selected.
2019-06-11 21:12:22 +02:00
Tamás Bálint Misius
75e6ece184
Expose transition constants to Lua ( fixes #654 )
2019-06-11 20:43:34 +02:00
Tamás Bálint Misius
07b0d52f90
Add more transition type checks and fix tpt.eltransition
...
Though I'm quite sure nobody actually cares about that table. It's been broken for a
very long time.
The PROP tool now properly calls part_change_type when type is being set.
2019-06-03 19:27:06 +02:00
Tamás Bálint Misius
97bde1111d
Fix part_change_type not being called by sim.partProperty
2019-06-03 12:59:39 +02:00
Tamás Bálint Misius
8671332e60
Fix transition properties not being validated
...
Also clean up some more of the Lua API code, again. Eww.
2019-06-02 17:49:21 +02:00
jacob1
20c98e9b48
Add sim.CELL constant + some other change I made a while ago for some reason
2019-05-15 00:21:17 -04:00
Tamás Bálint Misius
0179cefc78
Flatten include trees
2019-04-20 15:36:11 +02:00
Tamás Bálint Misius
9d92b77163
Clean up sign-related code a bit
...
Also draw search signs with purple text and thread signs with red.
2019-04-12 17:09:34 +02:00
Tamás Bálint Misius
59afaec70f
Fix Element::Identifier assignment leak ( closes #205 )
...
I didn't use 'fixes' because this doesn't strictly fix that specific
bug (I think?). Anyway, it does remove strdup which is mentioned in the
issue.
Also fix elem.free not allowing DEFAULTFOO_PT_STUFF and similar to
be freed.
2019-04-12 00:27:27 +02:00
Tamás Bálint Misius
06e2836726
Fix Lua reference leaks ( fixes #638 )
2019-04-09 15:28:40 +02:00
Tamás Bálint Misius
47f898ca5a
Tweak replace mode and specific delete mode ( fixes #631 )
2019-03-30 23:59:20 +01:00
jacob1
2e17b848b1
Make element names a String (unicode support)
...
This won't be used by official elements, but mods or lua scripts could and do use unicode
2019-03-12 00:10:43 -04:00
Tamás Bálint Misius
30c7f6ded7
Rename Download* to Request* and move HTTP stuff inside src/client/http
2019-03-07 22:56:08 -05:00
jacob1
9e110cba73
zoom api changes: throw errors instead of returning bools, zoomEnabled takes book as arg, some small refactoring
2019-03-05 23:43:41 -05:00
ssccsscc
a9b862645a
Added Lua function for working with zoom
2019-03-05 23:43:41 -05:00
jacob1
3b3775addf
Add blur lua event, called when opening another interface window
2018-12-27 21:17:24 -05:00
jacob1
d0dd9ec22f
fix sim.brush being double size, fix compile warning
2018-11-21 12:38:26 -05:00
jacob1
2929264885
embed event api compatibility lua script
...
probably temporary, can't deprecate and remove an extremely common api in the same version.
lua script embed code mostly copied from my mod
2018-11-17 00:09:48 -05:00
Tamás Bálint Misius
e48bd482f6
Add close event
2018-11-16 23:02:05 -05:00