Commit Graph

5941 Commits

Author SHA1 Message Date
Tamás Bálint Misius
e64c23d50d
Limit access to the LatentHeat property to LATENTHEAT builds 2023-12-09 00:38:12 +01:00
Tamás Bálint Misius
78314a8f7d
Move Simulation::platent to Element::LatentHeat
Also put the feature gated by the macro REALISTIC behind the constexpr LATENTHEAT in SimulationConfig.h.
2023-12-08 23:36:34 +01:00
Tamás Bálint Misius
f8ee7aa0f7
Sort out constness of Simulation::PlanMove
And a bunch of other member functions. This got rid of some nasty assumptions documented only in the form of comments, in exchange for some nasty template nonsense.
2023-12-08 22:40:46 +01:00
Tamás Bálint Misius
dd875987b9
Enable basic rendering of custom elements in secondary Renderers
By factoring element and other static-ish data out of Simulation and protecting basic graphical element properties (i.e. everything that contributes to graphics other than the Graphics callback) with an std::shared_mutex. This is taken exclusively (std::unique_lock) by the main thread when it changes these properties, and inclusively (std::shared_lock) by non-main-thread code that uses Renderer.
2023-12-08 22:40:44 +01:00
Tamás Bálint Misius
9f8449357f
List element IDs that don't have an identifier associated in a save
36800a76cd lists missing element identifiers but neglects to handle IDs that don't even have one associated.
2023-12-05 10:19:13 +01:00
Tamás Bálint Misius
66136c8866
Customize ghactions job names 2023-12-03 18:28:11 +01:00
Tamás Bálint Misius
daed1e7ae0
Deprioritize some ghactions jobs
This means they aren't run every single commit, only if something interesting is going on (non-dev branch, pull request, etc.)
2023-12-03 18:17:28 +01:00
Tamás Bálint Misius
1ff6a2d0ae
Add a --backend=vs job to the ghactions workflow
This also requires patching CREATEPROCESS_MANIFEST_RESOURCE_ID out of powder-res.template.rc because Meson generates a VS config that instructs VS to add its own and this conflicts with ours. TODO: Undo this hack once https://github.com/mesonbuild/meson/pull/12472 makes it into a release.

Also start using meson compile in place of ninja in some cases because it integrates better.
2023-12-03 18:17:26 +01:00
Saveliy Skresanov
2f25c3fe32 Merge branch 'resist' of https://github.com/The-Powder-Toy/The-Powder-Toy into resist 2023-11-26 22:11:32 +07:00
Saveliy Skresanov
bc5fad1500 Redo resist reactions. 2023-11-26 20:59:51 +07:00
Tamás Bálint Misius
a594ae996d
Fix android workflows
Meson 1.3.0 broke parentheses in machine files so we'll be using 1.2.3 for now.
2023-11-23 18:46:33 +01:00
Tamás Bálint Misius
1c1e3aaf5a
Enforce build numbers of official builds in build.sh
Also fix the current build numbers.
2023-10-27 18:11:28 +02:00
Tamás Bálint Misius
eb29915243
Use a proper ProgressBar in UpdateActivity
Can't have the update window not use my fancy clip rect progress bars, see 04455ada1c.
2023-10-25 22:20:13 +02:00
Tamás Bálint Misius
e2743a2be1
Fix the casing of the new upstream tpt.version keys 2023-10-25 20:12:48 +02:00
Tamás Bálint Misius
d56510b1ac
Use method indices as LuaLuna thunk upvalues
Rather than member function pointers, which are not necessarily simple pointers and are not necessarily convertible to void * sensibly. This also gets rid of the last instance of lua_pushlightuserdata, which apparently isn't super well-supported by luajit, and which thus often crash on android.
2023-10-25 15:25:54 +02:00
Tamás Bálint Misius
b5d40a49f8
Remove luajit ffi particle access
No point to having it sit around effectively commented out.
2023-10-25 15:20:06 +02:00
jacob1
d5681d8ed9
Remove unnecessary lua_pushlightuserdata usage, use commandInterface global instead
This causes a crash when using luajit on aarch64 Android builds. I didn't remove the lua_pushlightuserdata usage in LuaLuna.h because that's external code and beyond my understanding
2023-10-24 22:12:16 -04:00
Tamás Bálint Misius
7d337ab732
Give emscripten version a starcatcher-compatible name
This means that it can now be taken seriously and handler properly by the starcatcher mod/snapshot service.
2023-10-24 21:23:21 +02:00
Tamás Bálint Misius
f98561d33b
Fix workflows with complicated publish passwords 2023-10-24 20:31:25 +02:00
Tamás Bálint Misius
01728fe1f4
Make curl_multi_wakeup/curl_multi_poll usage optional
Thus dropping the minimum required libcurl version to at least 7.64, possibly further. We have compatibility macros all the way to 7.55 so yeah.

Also fix RequestManagerImpl::~RequestManagerImpl not doing a wakeup after setting running = false. This meant that in the worst case the worker would wake up 1000ms later and only then notice running = false and exit, making the game take overall longer to exit.
2023-10-24 06:50:52 +02:00
Tamás Bálint Misius
3b6d607d98
Fix stable/beta ghaction workflows 2023-10-23 18:05:17 +02:00
Tamás Bálint Misius
ba5883ff84
Fix changelog spam in the update window
That is, in some cases (read: starcatcher, which uses the very last component of the user agent to determine the build ID), you'd get all changelog entries ever, not only the ones between the current version and the one the update server has.
2023-10-22 20:15:37 +02:00
Tamás Bálint Misius
8c2a7e4312
Add surface normal debug tool 2023-10-22 17:57:23 +02:00
Tamás Bálint Misius
dda3e8a9c7
Expose debug constants to lua
Also clean up related resource management code a bit.
2023-10-22 10:57:49 +02:00
Tamás Bálint Misius
ac99fb8a11
Factor PlanMove out of Simulation::UpdateParticles
This will be useful later for a debug feature I'm planning to add.
2023-10-22 10:57:46 +02:00
Tamás Bálint Misius
edcbeaca56
Sort out scopes in Simulation::UpdateParticles 2023-10-22 10:28:17 +02:00
Tamás Bálint Misius
1c1ef12761
Fix prop tool not remembering settings in some cases
Namely, it would not write its settings to powder.pref if the property dropdown was changed with the up/down arrows.
2023-10-21 22:43:09 +02:00
Tamás Bálint Misius
a9ffc8527c
Fix exe description on windows
Apparently ProductName is less important than FileDescription so the latter is what will say "The Powder Toy" and similar from now on.

Also fix the copyright character in LegalCopyright by telling the resource compile that the file is utf-8.
2023-10-19 18:11:14 +02:00
Tamás Bálint Misius
414f8ba27f
Use curlftpfs for uploading to starcatcher in workflows 2023-10-19 12:51:11 +02:00
Tamás Bálint Misius
a9cbd784f7
Remove snapshot_id
It is now consistently replaced by build_num. The next snapshot will be snapshot-353.
2023-10-19 12:51:11 +02:00
Tamás Bálint Misius
7fc3fb4c15
Sort out version info
The idea is to have the following version information included:

 - 1-component save version
   - 2-component under the hood but the minor component shouldn't ever change again
   - see currentVersionMajor in GameSave.cpp
 - 1-component website API version
   - again, currently 2-component because that's what the website code expects
   - see apiVersion in requestmanager/Common.cpp
 - 2-component display version, entirely cosmetic
   - exposed as meson options display_version_major and display_version_minor
   - see APP_VERSION in Config.template.h
 - 1-component business logic version aka build number
   - exposed as meson option build_num
   - see APP_VERSION in Config.template.h
 - variant id aka mod id, tightly coupled with the build number
   - exposed as meson option mod_id
   - see MOD_ID in Config.template.h
 - display and business logic versions repeated for the upstream
   - exposed as meson options upstream_version_major, upstream_version_minor, and upstream_build_num
   - we'll have to update these alongside display_version_major, display_version_minor, and build_num, but mod owners can just merge our changes
   - see UPSTREAM_VERSION in Config.template.h
 - update channel, makes sense in the context of the variant (and yes, this would later enable mod snapshots)
   - currently not exposed as a meson option but derived from meson options snapshot and mod_id
   - see IDENT_RELTYPE in Config.template.h
 - vcs tag aka git commit hash
   - set by build.sh in ghactions workflows
   - see VCS_TAG in VcsTag.tempalte.h

Rather importantly, the save and website API versions are now allowed to change independently of the display version.

These changes also allowed me to remove the ugly sed hacks in build.sh used to provision some manifest files; they are now provisioned by meson.

Also add version info for windows and android.
2023-10-19 12:51:03 +02:00
Tamás Bálint Misius
7f0f9ad132
Auto-focus the input field in the tag list 2023-10-17 09:55:47 +02:00
Tamás Bálint Misius
9f50249ca8
Handle back button on android 2023-10-16 23:41:57 +02:00
Tamás Bálint Misius
73be29aa61
Make the previous commit work with mod elements too
For this to work, loading code needed to stop trusting DEFAULT_PT_ identifiers, which it trusted because there have been some identifier changes between vanilla releases. I dug these up and listed them explicitly; they are now taken into account as needed when loading old enough saves.
2023-10-15 19:23:39 +02:00
Tamás Bálint Misius
36800a76cd
Complain about missing custom elements when opening online saves
The complaint manifests as a button in the bottom right corner of the half-size preview.

Also convert the loading error popup to such a button.
2023-10-15 13:30:28 +02:00
Tamás Bálint Misius
374209eebe
Remove a few outdated windows-only preprocessor hacks 2023-10-15 12:04:22 +02:00
Tamás Bálint Misius
9605e0fcb9
Fix spurious timeout errors from some callbacks
Mainly the new ones I added >_> Don't use lua_pcall, kids. tpt_lua_pcall records when control flow was "last seen" on the C++ side, so you have to call it rather than just lua_pcall if you want to avoid timeout ("script not responding") errors.

For the record, I had a really hard time reproducing these errors. I had to tune the timeout to such a low value that the errors might as well have not been spurious, i.e. not much could have been done in such a short period of time anyway, bugs or no bugs.
2023-10-15 11:32:00 +02:00
Tamás Bálint Misius
8534be2bf9
Fix guess best scale prompt showing up even when it guesses the default
Also fix a few warnings.
2023-10-14 15:38:37 +02:00
Tamás Bálint Misius
04b8378de4
Add bound checking to Simulation::clear_area
Fixes a crash easily reproducible with sim.clearRect(-10000000, -10000000, 20000000, 20000000)
2023-10-09 23:48:57 +02:00
jacob1
b2045c067e
Make save history icon not so hard to find, and show up on all saves (not just your own)
The icon is now shown whenever you hover over the save, not just when you hover over where the icon is supposed to be
2023-10-08 19:08:03 -04:00
Saveliy Skresanov
f5f275e657
Add descriptions for RSST and RSSS. 2023-10-08 19:33:01 +02:00
Saveliy Skresanov
15a22c6906
Add ctype mechanics. 2023-10-08 19:33:01 +02:00
Saveliy Skresanov
c4db637887
Add reactions of resist with other elements. 2023-10-08 19:33:01 +02:00
Saveliy Skresanov
4377f83184
Add liquid resist (RSST) and solid resist (RSSS). 2023-10-08 19:33:01 +02:00
Saveliy Skresanov
84b790ceaf Add descriptions for RSST and RSSS. 2023-10-09 00:20:15 +07:00
Saveliy Skresanov
0165a9b121
Fix a bug in the font editor where the last row of a symbol is cleared
when shifting the whole symbol up.
2023-10-08 12:25:14 -04:00
Saveliy Skresanov
48a3bf45fc
Center more icons. 2023-10-08 12:25:14 -04:00
Saveliy Skresanov
3428ccc80a
Center sensors, search and pause icons. 2023-10-08 12:25:14 -04:00
jacob1
dd5e5b1f3a
misc: Fix sim.partNeighbors table being 0-indexed, rename SIM_MAXVELOCITY to MAX_VELOCITY 2023-10-08 12:19:06 -04:00
Tamás Bálint Misius
7541273640
Add blurry scaling option
This looks slightly nicer on very pixel-dense screens (scale factors 5 and up) than nearest neighbour fractional upscaling does.

Also fix window icon disappearing at times and the window being resized after configuration changes.

We should maybe start preserving window size also at some point, the way we do position now.
2023-10-06 15:04:29 +02:00