5969 Commits

Author SHA1 Message Date
catsoften
e8c24e7e23
Add squir... sound. Add sound 2024-03-30 22:33:13 -04:00
jacob1
7edc413cdc
Update build number v98.0.363 2024-03-26 20:53:34 -04:00
Tamás Bálint Misius
53b9b0e286
Fix gravity zones not being drawn in some cases
Namely, gravity zones would be rendered when the wrong wall (i.e. not Gravity wall) was selected if custom tools were present in the SC_WALL menu section. This was because their rendering was tied to a tool index into the SC_WALL menu section, rather than to a tool identifier.
2024-03-25 20:54:45 +01:00
Tamás Bálint Misius
99cd354a16
Fix dialuges looping infinitely in some cases
Namely, when no completion callback is specified, they use themselves, of all things, as their completion callback, because lua_gettop returns 0 and somehow Lua is ok with that stack index and thinks it refers to the function being executed.
2024-03-25 20:49:00 +01:00
Tamás Bálint Misius
d56e8387cf
Fix crash upon selecting a stamp too quickly
SaveButton relies on the SaveFile/SaveInfo passed to it at construction being alive until its destruction, or at least while it's being ticked (while its Tick is being called). While SaveButtons are owned by views, SaveFiles/SaveInfos associated with them are owned by models, so models need to immediately notify views (their observers) of changes made to SaveFiles/SaveInfos, or otherwise prevent views (and thus SaveButtons) from accessing stale SaveFile/SaveInfo pointers.

The online save browser model (SearchModel) correctly notifies its observer (SearchView) about changes to its list of SaveInfos. The local save browser (FileBrowserActivity) is not MVC and simply either fully exits when its SaveFile list changes, or it cleans up its SaveButtons beforehand. The stamp browser model (LocalBrowerModel), however, would make changes to its SaveFile list without notifying its observer (LocalBrowserView) when selecting a stamp, so the latter might tick its SaveButtons after SaveFiles associated with them had already been cleaned up. This commit adds the missing notification.

The crash would manifest when the SaveFile associated with a stamp was accessed for the GameSave it owned to be sent off for rendering with ThumbnailRendererTask.
2024-03-24 12:48:15 +01:00
Tamás Bálint Misius
c1c1daa9e5
Allow exporting Lua symbols
Which optionally enables loading Lua shared modules from within even static TPT. Not that anyone actually needs this.

This currently can't work on Windows because DLLs there import symbols by [module name, symbol name] rather than just symbol name. One could in theory export Lua symbols from TPT (I don't know the exact MSVC hack this would require, .def files?) and place a lua51.dll next to the executable that just re-exports them, see https://learn.microsoft.com/en-us/cpp/build/reference/exports?view=msvc-170 , but I've yet to try this.
2024-03-24 08:37:38 +01:00
Tamás Bálint Misius
bfdfebc1d5
Remove unused MD5 code 2024-03-24 08:27:06 +01:00
jacob1
502df57cae
Fix local saves being sorted Z-A instead of A-Z 2024-03-23 23:41:41 -04:00
jacob1
a0ba5f5398
Fix some label cutoff and component overlap bugs
Profile Viewer: a few "Not Provided" labels were cutoff. The score labels overlapped with the scrollbar and prevented clicking on it.
Save Preview: Views label cutoff on saves with over 10M views (aka only id:2198). authorDate label cutoff on saves with really long usernames. This one I "fixed" by making it overlap again like it used to. It only affects a few 2nd and 3rd page saves.
Options UI: Fix ambient air temp label overlapping with textbox. Fix all checkbox secondary desc labels overlapping with checkbox itself. I "fixed" this by adding the checkbox after the label so that clicks take priority, rather than actually fixing the overlap.
2024-03-23 17:26:34 -04:00
jacob1
178519dbb0
Call ren->clearScreen() in renderer if save is invalid, fixes pixel garbage appearing in final thumbnail 2024-03-23 16:10:46 -04:00
Tamás Bálint Misius
bb471e63e1
Fix panels forwarding clicks from anywhere
Very similar to ab28f93753e3. Broken by 69e0a8b0aaa1 where I added an extra MouseDownInside check to the OnMouseDown (used to be OnMouseClick) of every component except that of sliders AND apparently panels, great.
2024-03-18 18:05:28 +01:00
Tamás Bálint Misius
4b866c409a
Move unlisted stamps to the back
Rather than to the front. It's nice to immediately see stamps that you haven't seen in years but it's even nicer if your most recently used stamps stay easily accessible.
2024-03-18 12:25:14 +01:00
jacob1
3fb356e2a9
Fix renderer crashing due to SimulationData not being instantiated early enough 2024-03-17 23:05:31 -04:00
jacob1
8452d96bf6
Fix update prompt showing up when no update is available if logged out and using the beta channel v98.0.362b 2024-03-17 18:16:53 -04:00
jacob1
eef8943a3c
Fix large screen prompt not showing on first run
desktopWidth/desktopHeight were initialized only at the end of SDLOpen, after we checked if larger scales were supported. Need to initialize the window first, then recreate the window after if the scale can be larger. The window won't be centered, but otherwise it works.
2024-03-17 18:15:54 -04:00
jacob1
5160f4ad33
Update version numbers and README 2024-03-17 16:29:14 -04:00
jacob1
7870ec56a3
Limit saves with ETRD with .tmp or .tmp2 set to 98.0 2024-03-17 16:13:56 -04:00
jacob1
16f50b808d
Add limit onto various textboxes, now that textbox width no longer artificially limits it
Save Name is limited to 50 characters by the db column, so stop it there
Ambient Air Temp glitches out when it's too long, so limit to 9
Limit profile location to 40 to prevent spam / abuse
Limit tags to 16 because that's the max the server accepts
2024-03-17 15:14:22 -04:00
jacob1
aa8ee76fbb
Saves with RSST and RSSS are now restricted to 98.0 2024-03-17 14:32:28 -04:00
jacob1
228d559ccd
Replace b_strip with strip in github actions script snapshot-361 2024-03-15 22:42:27 -04:00
jacob1
758d34c4eb
Snapshot 361 2024-03-15 22:12:26 -04:00
jacob1
596e6cece1
Add DECOSPACE_ constants 2024-03-13 21:22:12 -04:00
jacob1
3a3a8c1cc3
Fix save history button not working except on your own saves 2024-03-06 23:11:00 -05:00
Tamás Bálint Misius
f47d0a9828
Make emscripten snapshots use starcatcher as the backend 2024-03-06 22:06:19 +01:00
Tamás Bálint Misius
7cd684ccfe
Unhardcode powdertoy.co.uk from most places
Namely, everywhere except in the network part (first line) of the intro text, since that should be customized more extensively by a client+server developer.
2024-03-06 22:03:51 +01:00
Tamás Bálint Misius
82bcb0ef9e
Fix element buttons missing from element search
Visible since c3cd4f1691b4, which made element search scrollable.

The last row of buttons was only shown if it had exactly as many buttons as many fit.
2024-03-05 16:10:07 +01:00
Tamás Bálint Misius
c85ebe4a0a
Fix tooltips in element search
Visible since c3cd4f1691b4, which made element search scrollable.

They would behave as if the scroll panel was never actually scrolled, i.e. tooltips might be shown that belonged to buttons far outside the visible part of the panel's inner area. This was because Panel invoked the OnMouseHover of its children wrong, without taking scrolling into account.
2024-03-05 16:09:34 +01:00
Tamás Bálint Misius
ab28f93753
Fix sliders accepting clicks from anywhere
Broken by 69e0a8b0aaa1 where I added an extra MouseDownInside check to the OnMouseDown (used to be OnMouseClick) of every component except that of sliders.
2024-03-03 19:35:12 +01:00
jacob1
a7e71db9a0
Fix mingw github builds snapshot-360 2024-03-01 22:31:32 -05:00
jacob1
d9172faa17
Snapshot 360 2024-03-01 22:15:38 -05:00
Tamás Bálint Misius
ef308c1e48
Fix crash if tpt.installScriptManager fails
In which case the request completion handler code neglected to reset the unique_ptr holding the request.
2024-02-29 19:04:02 +01:00
Tamás Bálint Misius
79f45eb096
Use the recommended ghactions action to set up msys2 2024-02-24 22:26:53 +01:00
jacob1
0310ac08a8
Fix potential crash when sparking ETRD 2024-02-23 10:20:39 -05:00
jacob1
ea7cd41975
compat.lua: Fix tpt.brushx, tpt.brushy, and tpt.watertest 2024-02-19 22:27:19 -05:00
jacob1
f4b836deb1
draw air before "beforesimdraw" event is fired, so that graphics work in velocity / pressure display modes 2024-02-09 23:37:12 -05:00
jacob1
a250894a12
update error message when starting font editor with no arguments 2024-02-09 23:37:11 -05:00
Tamás Bálint Misius
c3cd4f1691
Make element search scrollable
But this is very buggy, ToolButtons don't lose their hover state when they get scrolled out from under the cursor and the scroll bar ignores clicks if they land on a component under it.
2024-02-06 14:56:53 +01:00
Tamás Bálint Misius
e6e36a6b7c
Fix OnMouseEnter/Leave inside Panels
Also remove OnMouseMovedInside and the dx and dy parameters of OnMouseMoved because nothing used these for anything.
2024-02-06 14:56:53 +01:00
Tamás Bálint Misius
588fe293ec
Add panning to ScrollPanel when TouchUI is enabled 2024-02-06 14:28:59 +01:00
Tamás Bálint Misius
69e0a8b0aa
Clean up OnMouseClick/Unclick madness
This is a prerequisite for making ScrollPanel work nicely on touch screens.

Engine used the terms MouseClick and MouseUnclick to refer to events that are traditionally called MouseDown and MouseUp, this was fixed with simple renaming.

Component and friends similarly used the terms MouseClick and MouseUnclick to refer to events that are traditionally called MouseDown and MouseUp and, succumbing to their own confusing terminology, also implemented behaviours associated with both the actual events MouseDown and MouseClick in code that was responsible for handling only the actual event MouseDown (i.e. what they called MouseClick).

This had been overlooked for a long time because nobody cares that a checkbox changes state when the mouse button is pressed on it rather than when it is released.

The fix is to migrate many pieces of code that run in response to MouseDown events, such as checkbox state change code, to MouseClick events, and to redefine a MouseClick to mean a sequence of MouseDown and MouseUp inside the component, rather than just a MouseDown. This is complicated by the fact that MouseClick events report mouse coordinates relative to the top left corner of the component, while MouseDown events report them relative to the top left corner of the container of the component.

Other pieces of code that make sense to be run in response to MouseDown events, such as label selection code, were left alone.
2024-02-06 13:25:53 +01:00
Tamás Bálint Misius
ae07c55f4d
Add some sign api constants 2024-01-27 19:19:56 +01:00
Tamás Bálint Misius
09ae62ac9e
Make sure vs-env.sh actually found vs
Because of course vcvarsall.bat doesn't bother to set a nonzero exit code even if it fails.
2024-01-27 18:53:17 +01:00
Tamás Bálint Misius
622df75c29
Update some more github-maintained actions
No idea why these didn't show up before I did the previous commit.

> Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/upload-artifact@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
2024-01-24 19:23:53 +01:00
Tamás Bálint Misius
cd1855fbdd
Update some github-maintained actions
> Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-python@v4. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
2024-01-24 19:00:51 +01:00
Tamás Bálint Misius
7a10847780
Eliminate polymorphism from the CommandInterface hierarchy
This is similar to what I did to Gravity in 9068920de3dd. The idea is that we can choose between the implementations at compile time.
2024-01-24 18:49:34 +01:00
Tamás Bálint Misius
d87130bd66
Remove TPTScriptInterface
It was an unnecessary level in the CommandInterface hierarchy.
2024-01-24 18:09:29 +01:00
Tamás Bálint Misius
1cb8f0378f
Organize Lua API into multiple TUs 2024-01-24 11:28:27 +01:00
Tamás Bálint Misius
2a43e8aef0
Fix a deprecation warning about std::result_of_t
We still have one about std::char_traits<unsigned char> (indirectly through std::basic_string_view) though, but our lord and savouir mniip said we can migrate off of it once we're c++20.
2024-01-21 19:39:47 +01:00
Tamás Bálint Misius
3f503bcb1c
Disable custom executable manifest in vs ghactions workflows
See 1ff6a2d0ae3a for the original problem. The fix in that commit was a bad idea, the patch got stale and broke the previous commit.
snapshot-359
2024-01-21 14:17:32 +01:00
Tamás Bálint Misius
a637a619c9
Disable exe icons in mingw ghactions builds
So 1ef0c1a3e0a2 didn't help at all, great. Either I'm terrible enough at C++ to get the same thing wrong twice, or this is a mingw bug, in which case I'm not willing to waste time trying to figure it out.
2024-01-21 13:49:26 +01:00