Commit Graph

5251 Commits

Author SHA1 Message Date
Tamás Bálint Misius
3c6ae35cc4
Fix PMAPBITS compile-time sanity check 2020-01-24 22:25:15 +01:00
Tamás Bálint Misius
5dfda0c528
Only make the request a POST if POST parameters are present
This is a compatibility thing, eww. This also fixes handling ptsave from the command line.
2020-01-21 22:54:52 +01:00
Tamás Bálint Misius
7330d0412a
Fix random warnings from clang 8.0.0 2020-01-21 14:43:22 +01:00
jacob1
467be1dcb9 change to 1L because technically the argument is a long 2020-01-20 11:16:33 -05: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
jacob1
7c916a528a Don't look at generated/ anymore (fixes compile error) 2020-01-20 00:29:21 -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
194c50ae3c
Much good #defining ENFORCE_HTTPS does if we don't include Config.h 2020-01-16 20:33:54 +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
QuanTech0
78203fc219 Division by Zero fix (#689) 2020-01-01 23:03:35 -05:00
jacob1
2576175762 remove unnecessary arguments to FloodINST. Fix random warning. 2019-12-23 00:34:21 -05:00
jacob1
5b4a0bf93b Fix MSVC compile 2019-12-21 16:17:37 -05:00
Secundario
a05e20f1bf Do a single CoordStack allocation per thread 2019-12-21 13:14:40 -05:00
Piotr Szegda
ac0bb01dec Update appdata.xml (#680) 2019-12-21 11:50:47 -05:00
suve
110250fe6a Guess best scale on startup (#684)
Guess best window scale at startup
2019-12-21 17:39:32 +01:00
suve
e6e4c2ed1d Add a man page 2019-12-21 17:38:33 +01:00
Tamás Bálint Misius
a43463b137
If you don't assign the callback, it won't be called 2019-12-17 10:49:35 +01: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
jacob1
131b965af2 Add Lua apis to interact with DefaultProperties, Create, CreateAllowed, and ChangeType 2019-12-09 22:32:30 -05:00
jacob1
bf7d182de5 Add CreateAllowed and ChangeType events
Used in create_part, kill_part, and part_change_type, allows us to remove element-specific stuff in those functions
Note: difference between Create and ChangeType is that Create is called when we want to initialize default element properties, but ChangeType is called every time a particle is changed to that type, even if it doesn't need default properties set. ChangeType is mainly used for things that need accurate state tracking, like the stkm spawn status.
ChangeType is called every time a particle is changed to or from its type, which includes if the particle is deleted, and also Lua.

Neither of these functions are called when loading saves, that's probably an oversight, will fix later
2019-11-29 19:32:33 -05:00
jacob1
9993290b72 Add Create function, handles setting default properties for elements that need randomness or special code
Most of the switch statement in create_part is gone. There's a few others that I will get rid of in future commits. There will also be a CreateAllowed function, and a ChangeType. ChangeType will handle stuff that is duplicated in both create_part and part_change_type. Considering making a Destroy function instead of ChangeType, though.

Later on, Lua events will be made for all 3

Credit to jacksonmj for the original design of all of this, I copied it into my mod years ago
2019-11-28 00:22:17 -05:00
Tamás Bálint Misius
5c1ea5ef0d
Blacklist SPRK in PCLN's and PBCN's ctypeDraw function
Apparently it used to be blacklisted before ctype-drawing got redone.
2019-11-27 21:00:47 +01: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
459790ffe0 also allow nil here 2019-11-24 23:20:22 -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
7af51b55ac Fix STK2 rocket boots not saving in saves 2019-11-03 10:31:18 -05: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
5f7dd033ec
Revert previous change, add NewtonianGravity element property instead 2019-10-17 22:29:24 +02:00
Tamás Bálint Misius
6b85231f23
Incorporate Gravity property into calculation of acceleration due to newtonian gravity 2019-10-16 01:27:48 +02:00
jacob1
a50b172999 Fix clang 8 compile warnings 2019-10-04 00:21:10 -04:00
Tamás Bálint Misius
ec2576d37f
Keep GameModel brush radius consistent 2019-09-30 14:55:17 +02:00
Nick Renieris
024c3c1b45 gui/game/brush: Add smooth/organic elliptical brush
Not sure why TPT's ellptical brush currently looks like that,
when you type "pixel circle" on Google every result is the
smooth version.

Got the idea from this post:
https://powdertoy.co.uk/Browse/View.html?ID=2464991

Signed-off-by: Nick Renieris <velocityra@gmail.com>
2019-09-26 22:25:32 +02:00
Tamás Bálint Misius
0b1cd53377
Add link to up-to-date build instructions to README.md 2019-09-25 09:26:26 +02:00
Tamás Bálint Misius
1cea59e521
Make sRGB the default colour space for deco tools, see 51e5f2b 2019-09-22 23:10:57 +02:00
Tamás Bálint Misius
742e030a13
Add gamma = 2.2 and 1.8 modes, see 51e5f2b 2019-09-21 22:16:52 +02: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
51e5f2bffa
Add option to make deco tools use sRGB colour space
Currently only affects the smudge tool. I'd have to look
into the others to decide if they need chaging. They probably
do though, they're not exactly intuitive.

I also fixed a bug with DropDowns where their popup would
show up in some random place if the parent window was a
ScrollPanel, and changed a few alignments here and there.
Notably, DropDowns now align the popup so that the currently
selected item is vertically centered and doesn't move when
the popup is opened.
2019-09-21 21:37:34 +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
66ef37e778
Don't destroy the new command being entered in ConsoleView
Not a perfect solution as it doesn't remember the modifications
made to previous commands, but it's more common to be concerned
about the command being entered than about the changes made to
the previous commands.
2019-09-14 19:38:49 +02:00
Tamás Bálint Misius
0e237a1f4b
Remove unused variables from Simulation::FloodINST
These were left behind from before the CoordStack update.
2019-09-14 19:19:24 +02:00
jacob1
88d165fb24 Fix deleting stamps not working 2019-09-13 00:35:36 -04:00
Sebastián Mestre
da5f8068c0 Use CoordStack for INST Flooding (#676) 2019-09-07 19:56:23 -04:00
Nick Renieris
c08b333909 graphics/gldrawmethods: Fix compilation
Was probably broken by ff27d69424

Signed-off-by: Nick Renieris <velocityra@gmail.com>
2019-09-06 09:33:40 -04:00
suve
3db7feaeff Add the --no-install-prompt option to Sconscript 2019-09-06 09:33:02 -04:00
Tamás Bálint Misius
f22c27e977
Fix VS warning complaining about std::fill(float *, float *, int) 2019-09-04 14:52:38 +02:00