19 Commits

Author SHA1 Message Date
Aaron Suen
6891ca5e6e Clean up debug code 2022-05-01 01:42:55 -04:00
Aaron Suen
f8ebcec543 Simplify stylus etch code 2022-05-01 01:42:32 -04:00
Aaron Suen
e803155cbc Fix stylus patterns/training with doors 2022-05-01 01:36:16 -04:00
Aaron Suen
d668c5c06b Certain puffs of smoke can block optics
This can be used to detect some recipe
completions, esp. cooking, cooling, quenching,
and curing.
2022-05-01 00:42:19 -04:00
Aaron Suen
aa64359cc3 Fix stylus etching using doors 2022-01-15 11:20:33 -05:00
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
f5e966480b Fix delayed witness mis-ordering
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.
2021-12-12 00:04:37 -05: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
ce4a77ab79 Concrete hints 2020-09-11 00:29:58 -04:00
Aaron Suen
c910ef30c4 Make sure patterns are translatable 2020-06-28 12:56:38 -04:00
Aaron Suen
a707e3bf51 Fix crash on legacy styluses 2020-06-27 21:31:29 -04:00
Aaron Suen
6cd52698c2 Styluses now have "memory"
This makes mass-production of etched concrete
nodes a lot less tedious and more interesting.
There's now an incentive to manage multiple
separate styluses for larger projects.
2020-06-27 21:26:17 -04: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
9c85cfd5d3 Lengthen concrete curing 2020-04-12 21:41:44 -04:00
Aaron Suen
46646f7b83 Fix concrete curing
Make sure to use separate metadata fields for wet-to-pliable
vs. pliable-to-hardened concretes.
2020-04-10 21:52:18 -04:00
Aaron Suen
fde6378910 Stylus recipe, more image optimize 2020-04-05 19:39:41 -04:00
Aaron Suen
683d1b82ca Stylus etching, full cycle curing 2020-04-05 16:07:18 -04:00