This reverts commit 16ed60d43fdba76d01d5800e561bd0c401085399.
After playing with this for a while, it's too ugly and the sprout
bit itself isn't really tall enough to warrant a tiny extra
selectionbox. I had done this because the catrealm mod has a
bush stem node that's bigger, and applying it to the bush sprout
was consistent, and thus the eggcorn sprout too ... but maybe
it makes more sense to just exempt the tiny sprouts.
Peat should never ferment on its own, it should require face
contact with some kind of soil. Unifying it with tree growth rate
code caused it to ferment on its own because the assumption that
tree roots contain their own soil and base moisture. Peat should
only have its own moisture but not its own soil.
This also allows peat to be used as an emergency "moist" node on
its own in e.g. skyrealms for cultivating flora, as long as it's
contained so that only its moisture can leak out but it cannot
be exposed to fermenting microorganisms from nearby soil.
The soaking-tickling mechanism was intended only to speed up
otherwise very boring "waiting" gameplay gates in skyblock play,
by allowing players to trade attention for time. It seems it has
been exploited in vanilla play, though, by triggering the tickling
recipes far faster than they normally should be triggered by
hand, using doors, breaking the time cost balance of things like
leaching or growing trees.
Add a "cuddly" dig group to the hand, and ONLY the hand, and make
the tickling recipes use this group so they only work with the
player's actual hand.
N.B. this group can be used for other pummel recipes in mods,
where a gentler touch is needed that cannot be gotten from a tool
or a machine, such as petting animals.
Apparently the eggcorn_planted node needs to
have paramtype="light" to have actual light for
the sprout part, and we have to deal with the
fact that the base probably passes light now.
Using smooth lighting hides the lighting glitch.
- Use the existing on_stack_change hook instead of creating new
on_stack_[un]fill hooks, to simplify util_stack.
- Automatically register bulk nodes, but only for nodes being
registered that request bulk optimization.
- Remove some code duplication and registration complexity.
- Hand-pick nodes for bulk storage optimization based on a survey
of actual usage from a dump of the NodeCore Community server
world map.
- Use a separate group for visinvs with hidden entities.
The problem was pointed out by Josh
(gitlab.com/krazy-j) in merge request !22.
Apparently MT is not very smart about marking
mapblocks dirty to send to clients based on
calling mt.set_node(), i.e. it will mark them
dirty presumptively even if you set the node to
the same value it had already been.
This behavior can be confirmed by registering
an ABM against a common node like grass and
setting action = minetest.set_node. This
causes every mapblock containing that node
to be invalidated every interval, causing a big
spike in the packets received each interval
that you can clearly see on the F5 graph.
Rather than just fixing it for the most easily
observed case (fire checks), add utlity functions
to check this for ALL node change situations,
and apply it more or less universally anywhere
that we are not certain that the node is being
changed and we don't need to worry about the
extra overhead cost of the check.
Note that we don't need a
nodecore.set_loud_check call, as set_loud was
only ever being used already in cases where
we were pretty sure we were actually changing
a node.
A single eggcorn that finds itself "forced" into a node
of loose dirt (e.g. by being displaced by a falling loose
dirt node that settles where it was) will become a
sprout.
This can be useful for skyblock mods to ensure that a
"starting tree" has at least enough of certain items to
craft basic tools and start sustained tree farming.
- Made grass from peat more common
- Flowers spontaneously grow on humus under sun
- Sedges spontaneously grow on grass
- Rushes can spawn near water and sedges
- New near_unloaded API that supports custom
distance parameter, map bounds check, and
some optimizations.
- Add area automatic unload check support to ABM
API and add to applicable ABMs, replacing many
old manual checks.
Note that the explicit unload check is only strictly
necessary when something will happen due to
a node NOT being present in the area, e.g. something
igniting due to absent coolant, or soaking quantity
being reset due to missing sources. In simple cases
where the absence of a thing causes the ABM to do
nothing, then the standard check can work because
the default action is to do nothing anyway.
Witness checks include data about the node in
place at the time that the witness even occurred,
so players are not awarded credit if the node they
see there was changed again afterwards. A lot of
old witness code inserted the witness right
before the node was changed, since the node
change was done as a tail call, but this does not
work with delayed witnessing because the
delayed witness data would be tied to the old
node, not the replacement one.
Moving witness to after node setting should fix
a number of broken hints that should have been
delayed-witnessable, e.g. brick bonding.
This is a design compromise to knock out the
worst offender in ABM cost, by requiring a node
that must be created by player action instead
of ubiquitous naturally-occuring nodes that all
need to be checked.
Leaching is really meant to be more of a minor
gameplay element anyway, for either skyblock
purposes, or for people who are bored enough
that they want to take on a challenge like a
neutral eco footprint; most normal players just
gather the materials from mapgen and hardly
bother with leaching recipes anyway.
Some users may use filtering but not have the "clean transparent"
filter enabled in the Minetest engine config. Bake this filter
into all images to (1) avoid the consequences of this (i.e. black
halos), and (2) possibly speed up startup time (the filter will
converge immediately).
Lock more things behind prerequisite hints, even if
they're not absolutely strictly necessary to complete
in that order, if they would commonly be done in
that order. This reduces players being overwhelmed
by available hints very early in the game, and avoids
red herrings like "find lux" which can technically be
accomplished but yields no useful results until the
player can act on them.
For "applying" an item to a stack using right-click.
So far, replaces the old eggcorn planting recipe; to
be done include tool stone-tipping and adze
graveling.
Using the new recipe allows more inversion of control
/ dependency injection, so we don't have to override
on_place or on_rightclick in definitions anymore, and
stop having to recreate some of the base logic from
the crafting system, e.g. discovery, placement sounds.
These cause some issues, like the ability to soak
dirt under water for a short time to initialize the
soaking metadata, then remove the water flow,
then add it in and have leaching complete instantly
because the neighbor check prevented the soaking
ABM from firing to detect that the water was
removed.
In the course of investigating why ABMs are so slow
to begin with, it was discovered that having neighbor
checks can slow an ABM down by a factor of something
like 7x, so clearly the assumption that the neigbor check
being done in C++ as "efficient" was false. This means
that we may be better off just always firing the ABM and
letting Lua check only a couple of relevant nodes (e.g.
for water flows in the space above) instead for
performance.
The main performance concern was dirt leaching, since
dirt generates naturally in the world in bulk, but if the
single check for water above may be faster than checking
all 26 neighbors in C++ anyway, we might as well let the
soaking API run for it so that it can detect the water having
been removed and reset the counters.
- For inventory and wield images, this is already
possible via override.txt since 5.3.
- For special tiles, this will be possible in 5.4.
- This complicates things, and introduces warning
messages into mods built without awareness of
this feaure.
- As far as I know, no texture packs have actually
ever used this feature.
Just as surrounding sprouts with higher quality
soil causes them to mature faster, planting them
direcly in higher-quality soil gives them a oneshot
boost (since the soil quality is consumed
immediately).
When leaves decay, they accelerate checks for
decay of nearby leaves, so overall tree leaves
decay much faster, but without increasing load
at steady-state i.e. for stable trees.