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.
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
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
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
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>
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.
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.
That wrap_if_needed call would sometimes cause empty newlines
to appear under otherwise already well-wrapped blocks of text.
The idea is that whenever a new character is about to be appended,
the current line is checked for being too long with that character
included, and the character is only actually appended after the
wrapper makes sure that appending it won't overflow the line by
inserting a newline. This means that wrap_if_needed is only ever
called before pushing the current character to records, never
after, as was the case here.