20 Commits

Author SHA1 Message Date
Aaron Suen
a1b2df3941 Begin standardization of unload bounds check
- 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.
2021-12-18 11:28:14 -05:00
Aaron Suen
7244d6d11d Fix loose self-repacking when sitting on top of loose nodes
The original idea was that stacks of loose nodes should repack
from the bottom up, and self-repacking should never "race" against
reposing.

If the node is sitting on a solid node, it can always self-repack.
If it's sitting on a loose node, then only repack if the node
below is not itself in the process of self-repacking, and if the
node itself isn't awaiting reposing.
2021-08-05 08:21:54 -04:00
Aaron Suen
9fb4cf55b2 Deprecate register_limited_abm
This has just been an alias to minetest.register_abm
for a while now, and all ABM enhancement features
have been added directly to the core API.
2021-07-10 11:09:44 -04:00
Aaron Suen
025e237be0 Make loose repacking not lose meta
This affects things like witness hints, and may have
been causing witness hints not to work for leaching
if the leached nodes self-repack afterwards.
2021-06-28 23:34:22 -04:00
Aaron Suen
1e64c191a0 drop_in_place rework
- Apply logic as first-class support so we can still
  have custom after_dig_node hooks.
- Shared flag nodecore.silktouch_digging that can
  be used in after_dig_node callbacks to determine
  if we're in the middle of a silk-touch dig.
- Add coal particles to tarstone digging if the coal
  is destroyed/dispersed during the dig operation.
2021-04-06 22:24:05 -04:00
Aaron Suen
95f0fb0ee9 Heaviest image compression option 2021-03-09 08:33:58 -05:00
Aaron Suen
410ebd5d8d Recompression using ECT
https://github.com/fhanau/Efficient-Compression-Tool
2021-03-09 08:16:23 -05:00
Aaron Suen
c10e80ef87 Set name in mod.conf as demanded by 5.5+ 2021-03-01 20:10:27 -05:00
Aaron Suen
b2f78c0daa Indexing for craft checks
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.
2020-06-27 12:20:35 -04:00
Aaron Suen
42f125c716 Make most recipes indexable
Register a "rootmatch" property for all
recipes that represents a broader, quicker
test for recipe eligibility.  False positives are
allowed but false negatives are not.

Since most recipes are eligible, we can
use this to build an index for fast lookups
of subsets of recipes to run and skip most
of the other ones.
2020-06-27 11:06:43 -04:00
Aaron Suen
984e87e155 Consistent ABM labeling
- Make sure every ABM has a label
- Use consistent case
- More concise names / consistent voice
2020-06-17 07:09:20 -04:00
Aaron Suen
df2bb58793 Finish tree + terrain textures, new "rusty" lode look. 2020-02-18 06:30:43 -05:00
Aaron Suen
bc5708b343 Bold new look for lode! 2020-02-18 00:07:59 -05:00
Aaron Suen
2c47a151cc Started new mechanic for molten rock transport.
Quench lava to amalgam and it can be moved
around like loose cobble.  The tricky bit is that it
needs to STAY quenched at ALL TIMES, and is
not (currently) stackable, so water channels need
to be setup to transport it, and limited amounts
can be moved at a time.

It's also an igniter and thus will dry out sponges
left to keep it cool.
2020-01-16 23:09:55 -05:00
Aaron Suen
7bc1a4ddad Standardize node placement sounds.
Add node placement sounds to processes
missing them, like tree growth.
2020-01-16 22:02:59 -05:00
Aaron Suen
2c4e502c21 Soaking API requires explicit field name.
This guards against possible bugs caused by
running multiple conflicting processes on the
same thing.
2020-01-11 08:42:23 -05:00
Aaron Suen
d0e6dcc410 Add "stasis" option and command.
This freezes many things that normally happen automatically
in the world, including most ABMs and AISMs, and a few other
custom step logic items like the player "hot potato" logic.

This can be used for "creative mode" purposes to setup a complex
build without it running itself away from you, and for texture
pack authors, to have time to see things that are normally
transient or difficult to observe because of the effects they have
on nearby things or players.
2020-01-10 06:26:07 -05:00
Aaron Suen
4d47ab2e75 NC API dependency simplification.
Treat all API mods as a "layer", and use the new
nc_api_all registration to indicate that a mod depends
on the NC API (which ALL NC mods assume they do).
This means that each non-API mod does not need to
worry about which API mods it really needs and which
it does not, nor will they need to be updated for any
internal API restructures.

This is a game, not a modpack, so all mods will be
loaded anyway, and we only care about order.  That
means that we don't really need to worry about
having excess dependencies because any mod we
don't actually need will be needed by something that's
loaded anyway.  If somebody wants to reuse a
component elsewhere, they're likely to need to do
some work to untangle it anyway, because of the
amount that NodeCore mechanics interact and
interdepend.
2020-01-05 12:59:12 -05:00
Aaron Suen
dcfc80b367 Remove explicit names in mod.confs. 2020-01-05 12:38:45 -05:00
Aaron Suen
89020e8340 Major rebuild of item_entity.
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.
2020-01-05 11:42:22 -05:00