Trying to isolate server performance issues, it was pointed out
that clients are spending a LOT of time receiving and rebuilding
mapblock meshes, and that updating node meta triggers this, even
when that meta is not relevant to the rendering of nodes.
Rubenwardy added a suggestion to change this in the engine:
https://github.com/minetest/minetest/issues/10127
This patch implements this suggestion at the game level, since
in NodeCore's case we already were making the assumption that
nearly all metadata fields were private.
Useful for more complex transformations like assembling
animations or tiling.
Use in a couple places to try it out, esp. the new living
sponge animation.
Apparently some users have had problems installing NodeCore because
they assumed it was a modpack and just copied the mods/* into
~/.minetest/mods and enabled them in an MTG game world. The result
apparently didn't immediately crash but wasn't really playable
either.
Detect NodeCore being combined with a mod named "default" and
throw an error immediately. This should catch like 90% of the
games out there. Some like LoTT or IKEA don't use a default, but
they're also not the ones that players would naively try to run
arbitrary mods on top of.
- Storeboxes are now scalable.
- Standardize touch-hurt operation.
- Touch-hurt damage on scaling.
- Now possible to alter scaling time via scaling_time
group (percent of original scaling time)
This created a ton of dependency inversions, which
necessitated moving a number of API functions up into
higher layers, and restructuring dependency lists for
a number of mods.
BOLO: non-deterministic load errors due to missed
dependencies.
Use high-res version in a few places we were using integer-res
timer before. This should e.g. smooth time variation of wind
strength for ambient sounds.
AISM's now tick against stacks, including in piles, shelves,
and player inventories, (hopefully) efficiently compared to
the old way with separate ABMs. Item entity support is also
possible, but not necessary yet.
This started out as a bugfix for being able to put a torch inside a
shelf, which didn't make much sense gameplay-wise. It ended up
going quite a bit further.
- Aggregate now gets wet in stack form. Swimming with dry
concrete now has consequences.
- Lux reactions, radiation, and infusion should now behave more
consistently.
- Sponges can now wet or dry in stack form, including inside
containers.
- Torch ignition, quenching, and extinguishing is now more
consistent regardless of context, and torches are now more
dangerous, and can ignite things in more contexts.
Before, settling was being processed out of order, so nodes could
fall into the space of nodes below and kick them out as items, so a
solid column of nodes could collapse and eject some nodes as items.
This makes hopper-feeding systems a pain to use.
Instead, explicitly signal upwards (tail-recursive) to settle all
falling nodes on the same tick, since they should already be falling
and accelerating downwards in lock-step.
This isn't perfect, as there are possible race conditions with things
being added into the node-space of the falling column while it's
falling, but it seems to work for now...
- Collapse all nodecore "core" mods in the /mods listing, so it's
easier to find the actual add-on mods.
- Parameterize in-game branding to make renaming derivatives just
a little easier.
ABM action calls are delayed until a background timer picks them
up, but it passes in the original args and assumes that the nodes
haven't changed. In addition, it bypasses our bug #8378 hack,
because that check is done in the abm action call but NOT the
background worker timer.
Do a check in the worker to make sure the node to be acted on has
not changed since the call was queued, and just let the call miss
and waste in that case.
Note that this automatically implicitly handles any #8378 issues
that may still be present since it has to force a fresh check of
the node to be operated on anyway.
Translations are currently by holistic strings, i.e.
no parameterization. This may create some busy
work for translators, but gives them more freedom
to account for differences between languages.
A translation template file is written out to the world
path on game start, so translators have a seed to
work from.
This reverts commit 68c6f6671121b1b72b62db97858c25c82f6e834f.
I was able to reproduce the issue, in a case when it was definitely
NOT a falling_node mishap. Snuffing fire by placing a node against
the last bare face of embers apparently creates a race condition,
in which the node you place can be removed instead of only fire
being removed.
Standardize the "play a sound for everybody except the player who
is already playing it client-locally" logic into one place.
Fix failure to correctly detect tool speeds for some things, i.e.
when the player is using a tool but the capability used on a node
is actually inherited from the hand.
Note that this may allow pummeling with wrong tools (e.g. repacking
soils with spades) along with accompanying inappropriate tool wear,
but this should be minor and avoidable, and can be fixed later...
I suspect that the problem that I actually observed was caused by
falling_node behavior, and NOT by an abm. This workaround cannot
remain without firm evidence that it solves an actual problem.
Hopefully calling minetest.get_node_or_nil() again for all ABM's
will bypass the broken node cache. We should see warning messages
in the logs if this is the case.