Skip to content

[dev] Merged Timeout.as & DecayUnused.as#2463

Open
mugg91 wants to merge 2 commits intotranshumandesign:masterfrom
mugg91:mugg91-merge-timeout-and-decayunused
Open

[dev] Merged Timeout.as & DecayUnused.as#2463
mugg91 wants to merge 2 commits intotranshumandesign:masterfrom
mugg91:mugg91-merge-timeout-and-decayunused

Conversation

@mugg91
Copy link
Contributor

@mugg91 mugg91 commented Nov 23, 2025

Description

Fixes #2447

This merges Timeout and DecayUnused.
Now only the latter is used.

Grain and Steak now use the latter instead of the former.
They will decay after 60 seconds, unless they are moving, like before.
To check if blob is moving, a new Tag "decay not moving" is used.

Tested in offline and online, works as intended.

There are some changes to mention:

  • DecayUnused will check for movement every 60th tick. Used to be 30 in Timeout.
  • DecayUnused will not check if the blob's inventory is empty like was done in Timeout. Implementing this would require some rewriting. For now, this is not of consequence since the corresponding blobs don't have an inventory.
  • Grain.as now uses this.getCurrentScript().runFlags |= Script::remove_after_this; because after running onInit() there is no reason to keep the script alive.

Testing Steps

Place some trampolines on the ground.
Spawn bomb materials, grains and steaks.
Have a bomb material, grain and steak bounce on trampolines and have a bomb material, grain and steak lie on the ground.

After 60 seconds, grain and steak on the ground should disappear.
(If you picked it up and place it down again before disappearing, it will take another 60 seconds.)

After 5 minutes, bomb materials on the trampoline and on the ground should both disappear, same behavior as before this change.

@Vam-Jam Vam-Jam added the kind: Change A change to an existing feature or mechanic label Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind: Change A change to an existing feature or mechanic

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Timeout.as and DecayUnused.as do the same thing

2 participants