Commit Graph

6216 Commits

Author SHA1 Message Date
jacob1
d2f83797b0 Snapshot 385 snapshot-385 2025-03-03 22:28:51 -05:00
jacob1
e2e2568200 Preserve deco in pipe, as long as the pipe wasn't already decorated 2025-02-27 00:37:05 -05:00
jacob1
38b7111821 Allow creating heat pipes by replacing BRCK with HEAC before color generation
Uses same flood-fill function as PPIP. Only runs before pipe is initialized, to prevent breaking older saves that may have HEAC next to pipe.
2025-02-27 00:04:28 -05:00
JasonS05
5ad7f35b02 Add heat conduction to pipes (#976) 2025-02-26 23:02:06 -05:00
Tamás Bálint Misius
3e571db922 Check cell count for being at most 255 when saving
Not important for vanilla but it might surprise modders when their saves get truncated. Better than a static_assert on CELLS because that's further upstream, and mods might like to be able to work even if they can't save.
2025-02-26 09:11:20 +01:00
Rebmiami
794045731a Update element descriptions (#983) 2025-02-25 23:47:50 -05:00
Tamás Bálint Misius
9991dc5524 Make sure elements include their headers
This helps catch type mismatches.
2025-02-23 20:58:18 +01:00
jacob1
53a1f8d8bc Version 99.3 (Build 3384) snapshot-384 v99.3.384 2025-02-21 20:53:37 -05:00
Tamás Bálint Misius
3aed58545f Missing element fix no.823712
Off-by-one in 4c2c95c72b. This would cause the most recently added element in any specific version of the game between versions 78.1 and 96.0 to be reported as missing in saves made with that version of the game.
2025-02-21 19:47:03 +01:00
Saveliy Skresanov
3b19f846b9 Fix infinite air in the lower right corner #580 . 2025-02-21 21:41:17 +07:00
Clay Stan
0eed65ae80 Fixed a typo in the rules (#994) 2025-02-20 22:09:13 -05:00
Saveliy Skresanov
f226f18db7 Revert the STKM change since it breaks controllers.
This reverts commit cb7d9ff310.
2025-02-20 21:58:41 +07:00
Saveliy Skresanov
cb7d9ff310 Use a more "relaxed" default position for stickmen. 2025-02-20 21:20:34 +07:00
jacob1
4e346cc7d2 Snapshot 383 snapshot-383 2025-02-15 22:36:30 -05:00
Tamás Bálint Misius
f15ecdd09b Fix prop sampling ignoring temperature scale
So it would always sample in K. For example, sampling something with a temp of 20C would sample the string "295.15" without specifying a scale, which would then translate to 295.15C once OK'd.
2025-02-15 20:44:17 +01:00
jacob1
bca4d66ace Fix possible game crash when using invalid coordinates in !bubble
Point arguments are supposed to look like "x,y", but if you gave it anything after y, it would crash. The comma split data is stored by reference, but the String it was referencing goes out of scope and is potentially destructed. Fix it by expliticly keeping a String object in scope until we're done.
2025-02-12 23:07:01 -05:00
jacob1
a153b614ea Fix !set commands defaulting to Kelvin, instead of to current temperature scale
An old hack got deleted that converted values for "temp" to StringType, to force it down the string conversion flow which handles temperature scales. I added that code back.
2025-02-12 23:03:11 -05:00
jacob1
9c45e99c36 fix rx/ry arguments to toolBox 2025-02-08 18:52:59 -05:00
Tamás Bálint Misius
c07ac20d99 Fix compatibility sim.TOOL_* constants 2025-02-08 20:53:36 +01:00
jacob1
8a9713cd83 CAUS.cpp - return 1 when type changes to RFRG
CAUS will convert multiple nearby GAS to RFRG when this reaction triggers. Perhaps it should have been a 1:1 conversion, but it's been like this from the start and nerfing the conversion rate could break reactors that don't input enough CAUS
2025-02-05 23:46:02 -05:00
jacob1
8926e48103 VIBR.cpp: change std::clamp to restrict_flt to handle NaNs 2025-02-04 23:36:34 -05:00
jacob1
03770dff78 cap VIBR .tmp and explosion .temp 2025-02-04 10:11:35 -05:00
Tamás Bálint Misius
51f5259de3 Make gravity mask accessible from Lua 2025-02-04 08:24:02 +01:00
Tamás Bálint Misius
da111d5244 Add gravity mask to snapshots
This fact that this was missing was overlooked in 7e9d9686dd because the gravity mask had not been stored in Snapshots even then, ever since edad8f46af.
2025-02-04 08:23:58 +01:00
jacob1
1b900031f6 Version 99.2 (Build 382) snapshot-382 v99.2.382 2025-02-01 17:00:17 -05:00
Tamás Bálint Misius
22a68d257f Fix some jerky animations on emscripten 2025-02-01 19:02:54 +01:00
Tamás Bálint Misius
b131567345 Remove remaining dependence on tick rate
Similar to ce2f36c0a9, except this fixes up all code that assumed that dt was always 1, which is even funnier.
2025-01-31 16:11:39 +01:00
Tamás Bálint Misius
d1c0680a54 Snapshot 381 snapshot-381 2025-01-30 22:56:36 +01:00
Tamás Bálint Misius
ce2f36c0a9 Remove dt 2025-01-30 22:50:03 +01:00
Tamás Bálint Misius
fa4f2ae54f Do simulation rendering at a lower rate than UI rendering
Specifically, either at the UI rendering rate or the FPS cap, whichever is lower, or simply at the UI rendering rate if there is no FPS cap.

Also, always render the UI at the screen refresh rate; importantly, even when the simulation is unpaused. Unpausing the simulation would lower the UI rendering rate to the FPS cap to prevent rendering from being too out of sync with the simulation, but this is now impossible.

Also stop displaying 0 FPS when the simulation is paused. This now closely matches the way FPS used to be displayed, i.e. display simulation tick rate when the simulation is unpaused, display renderer tick rate when it's paused, and don't display SDL tick rate anywhere.
2025-01-30 22:50:03 +01:00
Tamás Bálint Misius
3d2d8f4936 Prevent our colour codes from making it to stdout 2025-01-26 10:25:32 +01:00
Tamás Bálint Misius
3ee6741fcb Fix PIPE rendering garbage when carrying PIPE
Broken since 0f1218df0c where I neglected to port a memset over.
2025-01-25 23:59:19 +01:00
Tamás Bálint Misius
c97a43b58f Fix some tick schedule bugs
Client wouldn't get ticked if the simulation was paused >_> Also fix some old bugs that would allow weird delay values to be derived when tick schedule was given weird target FPS values.
2025-01-25 21:22:19 +01:00
Tamás Bálint Misius
bdcc753dff Fix misleading message about updates
Specifically, when TPT is actually configured at build time to ignore updates.
2025-01-25 21:18:42 +01:00
Tamás Bálint Misius
53230ee102 Disable fake newer version check for stable builds
It's really annoying when a stable workflow fails because nextVersion didn't get updated, whereas we actively seek out this variable when planning a new version between stables.
2025-01-25 19:38:32 +01:00
jacob1
2b163b4b5d Version 99.1 (Build 380) v99.1.380 2025-01-25 13:18:58 -05:00
jm211
b5872657c5 Fix ACID sometimes eating one more particle than allowed (#982) 2025-01-25 00:19:45 -05:00
jacob1
04dac4c020 Very safe optimizations 2025-01-24 22:28:50 -05:00
Tamás Bálint Misius
e8921ca6db Separate emscripten debug info 2025-01-24 11:55:34 +01:00
Tamás Bálint Misius
cb65cf8ffd Fix crash on startup on emscripten
Parts::data was never initialized, and this mattered on emscripten, even though it didn't matter anywhere else.
2025-01-24 01:19:24 +01:00
Tamás Bálint Misius
ea93bae302 Make emscripten work with draw limits 2025-01-23 23:59:55 +01:00
Tamás Bálint Misius
e87f404d90 Provide a default refresh rate when it cannot be queried 2025-01-23 23:31:38 +01:00
Saveliy Skresanov
79f2bbcae5 Fix LITH breaking temperature limits. 2025-01-23 19:50:46 +07:00
Saveliy Skresanov
3da994c3b8 Prevent heat convection in liquids looking farther than 1px away. 2025-01-23 01:19:07 +07:00
Saveliy Skresanov
2e27cbfddf Fix "far away" air heat and velocity code working correctly only in one direction. 2025-01-23 00:50:02 +07:00
Tamás Bálint Misius
c32166efdc Make the fps cap a per-view property
And have ui.fpsCap set only GameView's fps cap. This is the closest we'll be getting to the fps cap being true to its name (i.e. actually controlling frames per second, rather than ticks per second) with this iteration of the user interface. Also disable SRT if the sim is paused. Together, these changes fix some old problems such as non-sim user interfaces burning CPU for no reason when the fps cap is removed.
2025-01-22 17:22:10 +01:00
Tamás Bálint Misius
6576872074 Remove emscripten-only vsync fps limit type
This was ill-designed: "vsync" should be a draw cap limit, if anything. We can't currently think of a way to allow both vsync and a different arbitrary fps limit without banishing the simulation to another thread, so this gets shelved now.
2025-01-22 16:15:17 +01:00
Tamás Bálint Misius
99f3aabbf6 Don't tick the entire user interface every sim tick
So now user interface ticks (event processing, animation, etc) happen in tandem with drawing the user interface. This happens to solve some weird lag issues on linux with ibus, and who knows how many other similar performance problems we're not aware of.
2025-01-22 15:47:39 +01:00
Tamás Bálint Misius
7aee6b77e3 Allow http.post to specify form part content type 2025-01-18 21:37:28 +01:00
Tamás Bálint Misius
48fb16292a Fix some warnings 2025-01-17 20:55:44 +01:00