- 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.
We were using action log level for a lot of
things because by default MT does not seem
to capture info logs to stderr. On "production"
servers though this makes too much noise and
makes it hard to find actual player actions.
Servers that want info logging will just have
to configure/compile it in.
- Flexible discovery list format for discover and
witness APIs
- Add "discover" key to recipes that contains a list
of discoveries to give players so they can act like
recipe groups and allow different recipes to
complete hints
Recipe group system should be easier to setup for
hints than having to list all hints individually. We
can use them especially in recipes that are loop
generated.
Cooking recipes run in all visinv nodes, not just
item stacks, BUT non-stack-only nodes (i.e. all
storeboxes) block flame touchgroups so things
in boxes cannot be heated/melted.
This allows items dropped into boxes from ore
melting to cool, but prevents sand from being
melted in a box which would naively replace
the box with the molten glass entirely.
This also fixes an old rumored bug where forcing
glowing lode items into a shelf with a door would
cause them to stay hot indefinitely.
N.B. lode cooking/cooling used to assume it could
replace the entire node, and deleted the thing
as a fail-safe when an item of the given temper
was not found (e.g. tools w/ handles). This is
now gone, and invalid tempers will throw errors
if they can ever be achieved in practice.
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).
Standardize a "fair limiting" mechanism that
limits the items accepted into a queue, and
returns a uniform random sample when flushed.
Pass all cooking/curing smoke effects into fair
limit queue.
Apply fairl limit queue to fire sparks too.
Pliant concrete curing checks still seem to lag
the server somewhat, but at least now they
shouldn't hammer the client with particles and
kill framerate too.
- Unify logic for expanding nodenames/itemnames lists into indexes
of matching names, and comparing item names/defs to lists,
with group expansion and deferral.
- Add "autostart" option to DNTs which registers construction traps
and a patrol ABM automatically, use for some things that are a
good match.
- Note that some things are doing more complex logic in ABMs, such
as determining if a node is eligible, or custom timing logic;
leave these as-is for now.
- Run all settings through a common API.
- Use modname prefix consistently for setting
keys instead of "nodecore".
- Add automatic dumping of settingtypes.txt
metadata for maintenance.
- Include initial settingtypes.txt for game for
main menu use.
- Remove per-recipe tuning for pummel recipes,
as there were way too many of those to be
possibly useful and it was clogging up the
settings menu. Use tool rate adjustments to
control it instead.
- Remove vestigial enable_damage setting.
It was checking the craft before actually placing
the node, causing the crude glass recipe to
complete when molten glass flowed into a mold
with water below, then it got replaced by the
source node, then it re-quenched to chromatic on
the next ABM pass. Now it actually quenches
directly to chroma immediately like it should.
As soon as an item is placed run a cooking recipe
check, so auto-furnaces can run at maximum
designed speed instead of having to wait for ABMs,
which may lag. This should make MP performance
also a lot closer to SP performance...
Instead of checking for and immediately
completing a craft, the API can be told to
search for a recipe and return a function that
can be used to commit it later. This way,
we can search for a valid recipe during the
"check" phase of a craft check and then
commit it during the "after" phase.
If a player is close enough to an event when it
happens (withing "likely hearing" distance) then if
they later punch the node then they can "collect"
the discovery.
The idea is that if a player hears the sound of
something happening, then they might go and
investigate and discover the thing they thought
they had left there isn't what's there anymore.
In retrospect I may want to combine this with a
limited form of the visual witnessing, just as there
may be events that a player is less likely to touch
in aftermath, or may not be practical to (e.g.
if what's left behind is air)
- Move hint handling down to API layer
- Simplify stat data; old nc_stats counting can
be moved out to a separate mod. We only
need whether the player has seen or not.
- Invert inventory tab responsibility.
- Merge witness system in from crafting.
TODO:
- Redistribute hint registration responsibility
to individual mods.
- Test external mod compat.
- Retire old nc_stats and nc_guide systems.
- Add a way to reset hints.
- Merge the "legacy, could be anyting" sets
into every other set so we can do only 2
set lookups instead of 3.
- Make sure we don't do any duplicate
recipe checks.
N.B. the craft priority order MAY be different
now, since primary node recipes are
checked before visinv stacks.
By restricting the recipes we check based
on the name of the central object being
checked, we can do many fewer craft
checks per item and avoid expensive
checks.
If the item type does not at least pratially match any cooking/cooling recipe the first run, assume it never will and cache this fact
so we can quickly skip all stacks of the same
item next run.
Bug was introduced in 16a7c9fe, caused by
the fact that sometimes nodes are dug by nil,
i.e. the way the chisel is dug up automatically
in the chiseling process.
- Register groups for chiseling doors.
- Make recipe digging not use player inventory, but drop
as an item unconditionally. N.B. the old "replace with air
then drop item" method only worked with explicit item
names and not group detection.
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.