118 Commits

Author SHA1 Message Date
Aaron Suen
aa64359cc3 Fix stylus etching using doors 2022-01-15 11:20:33 -05:00
Aaron Suen
d37b97bb95 Fix broken ablation check 2022-01-09 13:11:59 -05:00
Aaron Suen
d37e9e9ace Genericize lens beam emitters
Look for optic_lens_emit group instead of explicit
lens_on node, to support multiple lens beam emitting
nodes (e.g. glued/unglued) for firestarting, door
ablation, etc.
2022-01-09 13:07:16 -05:00
Aaron Suen
a0ae93f97a Allow door digging to bypass protection 2022-01-07 20:58:00 -05:00
Aaron Suen
7921a78404 Fix door tote placement
When bypassing custom on_place logic and
skipping directly to "place as node" logic, also
allow nodes to customize their "place as node"
logic with another hook, which the tote can use
to ensure it's rebuilt when door-placed.
2021-12-30 12:49:24 -05:00
Aaron Suen
1ef418acfc De-genericize metallurgy groups
When this was setup, it was named generically
in order to support future functionality that
used the same heating/tempering/annealing
mechanics.  Ironically this has actually only
caused problems.

Standard game mechanics will not mimic one
another, especially something this complex.
Anything worth making a system for nodecore
that's as complex as lode-working deserves its
own distinct mechanics rather than recycling
lode-working.  So vanilla NC will not reuse the
metal-working logic anyway.

Mods were able to reuse the existing logic, but
ironically the only one mod that would actually
have benefitted from it (i.e. uses very similar
heating/tempering/annealing) just copied and
pasted the code from NodeCore anyway, which
not only didn't take advantage of the existing
mechanic provided, but actually made the mod
break the game when installed, because the
mod would replace functionality in use by
vanilla with an older version, and the copying
will always keep that functionality locked in to
an older version, breaking whenever future
changes to the base mechanic are made.

Rename the base mechanic to (1) get out of
the way of the existing mod, and (2) make it
more clear that this is NOT generic functionality
that can be used to create new metals, but
only specifically for lode, and if somebody else
wants a clone of this logic, they would need to
rename it to make sense.
2021-12-29 11:34:30 -05:00
Aaron Suen
f936121be9 Tweak firestarting weights
Make sparks bias "downward" for igniting nearby
materials, making starting a fire on top of thatch
more useful, and making thatch a more useful
tinder material.
2021-12-13 23:42:28 -05:00
Aaron Suen
7d12ea4acb Use textures for all particles
These cannot be overridden by texturepacks
otherwise.
2021-12-13 22:18:06 -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
7dcbf273ee Add door catapult sounds 2021-12-10 07:16:00 -05:00
Aaron Suen
4aee5a8972 Fix missing door convey fall check 2021-12-10 00:16:37 -05:00
Aaron Suen
328e52d68d More pronounced door tool anim
Was hard to see on MP servers
2021-12-09 22:37:26 -05:00
Aaron Suen
6fb5ff1980 Animation for door dig/pummel 2021-12-09 22:30:39 -05:00
Aaron Suen
0f0f4efbff Make leaves and other non-walkables press-diggable
Check for a dig recipe first before attempting to
catapult item through the node.  This should make all
non-solid nodes diggable including loose leaves,
sedges, rushes, flowers, etc.
2021-12-02 18:33:24 -05:00
Aaron Suen
36d30ee1aa Storeboxes are always door-diggable from below 2021-12-01 07:46:07 -05:00
Aaron Suen
4acedd01a3 Fix door press crafting recipes
The door could not handle recipes with duplicate
labels, which now includes the anvil recipes.

Switch to just identifying them by reference.
2021-11-30 21:13:41 -05:00
Aaron Suen
b73d1d1290 Pre-clean-transparent filter on all textures
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).
2021-09-23 07:36:21 -04:00
Aaron Suen
293b3de9ee Move ablation cooldown to RAM, fix meta loss
Apparently metarefs are cached somehow such that
values written to them are not returned from subsequent
reads.  Must be an engine bug, but it's probably not
worth trying to fix it at this point.  Some startup jank
is apparently inevitable anyway, and a 2 second cooldown
time is not easily exploitable by restarting the world.
2021-07-10 18:31:18 -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
2a51c9af9b Fix reversed door hub movement priority
Items placed on top of a spinning horizontal door are
supposed to be flung outward preferentially and only
stay near the hub if held back by a wall.  Rewriting the
door conveyance logic apparently switched this.
2021-07-09 08:21:57 -04:00
Aaron Suen
7d41fc53c3 Door ablation check on load
Try to make sure doors don't have to wait arbitrarily long
for a patrol ABM to fire if their DNT was lost and they're
part of a stable circuit.  This seems to have caused some
sponge squeezers in particularly busy areas to stop for a
while when first loaded sometimes, which can interrupt
the water flow they provide, which can lead to a fire
hazard.
2021-07-09 08:18:55 -04:00
Aaron Suen
99254bf726 Simple visinv tweening
- On door convey
- On item ent settling

Only able to support limited cases, and still can't
usefully animate nodes, but at least this makes
some item placement behavior look smoother.
2021-07-05 13:42:46 -04:00
Aaron Suen
11a3790bc6 Fix door ablation spurious refiring 2021-07-05 12:10:47 -04:00
Aaron Suen
2e27f9963f Iterative new approach to compact conveyors
If something is blocked, store it in a separate retry
queue.  If the thing that blocked it moved out of
the way, re-queue the things waiting on it for retry.
This is probably theoretically less efficient than the
old approach since it relies on finding opportunities
to move items on the fly and probably queues a
number of retries that will ultimately fail, but it's
simpler and easier to maintain than the old way.
2021-07-05 10:44:31 -04:00
Aaron Suen
56379676af Massively simplified door conveyance
The old logic was extremely over-complicated, in
an attempt to allow door conveyance to work with
no gaps and support loops.  This led to code that
was unmaintainable, and a node deletion bug that
was too difficult to fix.

The drawback to the new approach is that things
cannot be pushed by doors into spaces that are
occupied by another thing, even if that thing will
be pushed out of the way by the doors on the same
cycle.  This means that chains of items on
conveyors will always have an air-gap between
them.
2021-07-05 10:19:24 -04:00
Aaron Suen
c5d59fcc55 Fix node destruction bug
Unfortunately this also causes conveyors to jam for
one turn if there is no airgap between nodes on
certain conveyors, but it's better than the original
bug.
2021-07-04 19:45:26 -04:00
Aaron Suen
8a11db9825 Fix doors unable to push single item into storeboxes
The special case of trying to push a single item into a storebox
is an overlap between the item catapult and the place-node recipe.
Change the priority order so the catapult check is done first.
This is not expected to cause problems in other cases because in
those, the presence of a "backstop" node causes them not to overlap.
2021-07-01 19:15:58 -04:00
Aaron Suen
56b718f479 Door ablation particles 2021-04-03 19:21:09 -04:00
Aaron Suen
13c633e19e Fix long-standing infinite loop freeze in door logic
Thanks to NoComment for discovering, researching, and reporting.
2021-03-11 08:15:39 -05:00
Aaron Suen
817a9692da Remove redundant door registrations
Don't make door panels out of doors/panels.
2021-03-11 07:58:27 -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
b3af182427 Prevent a door item destruction bug
If two stacks try to move into the same spot at the
same time, both will be placed there and one will
overwrite the other; instead, we should do a check for
the "head" of a moving item chain (the only one that
can be moving into a space not being vacated by
another) and block collisions.
2020-10-15 20:04:01 -04:00
Aaron Suen
08be3a497e Hint wording tweak 2020-10-05 22:01:18 -04:00
Aaron Suen
9bb5c23c39 Fix silk touch when digging by machine 2020-10-05 21:34:28 -04:00
Aaron Suen
a83e2e9e25 New door automation hints 2020-09-29 23:27:41 -04:00
Aaron Suen
16641ff3e9 Fixed door pummel/dig handling
- Use catapult infrastructure instead
- Checks for storebox open sides
- All manual tests passed
2020-09-29 22:54:28 -04:00
Aaron Suen
15282c88a7 Initial working door digging/pummeling 2020-09-29 22:44:09 -04:00
Aaron Suen
8bb999f631 Make sure stack fits in target box 2020-09-29 22:27:05 -04:00
Aaron Suen
a63b38f72a Press injecting into storeboxes 2020-09-29 21:28:34 -04:00
Aaron Suen
9a23e1f65f Separate press/catapult code 2020-09-29 21:13:31 -04:00
Aaron Suen
e776723a3f Code format 2020-09-29 20:52:31 -04:00
Aaron Suen
502192b6ab Presses can eject items out of shelves 2020-09-29 20:52:18 -04:00
Aaron Suen
3203ddc6a9 Fix door hints not saying "hinged panel" 2020-09-26 22:12:57 -04:00
Aaron Suen
723d30897d Fix a couple more hints 2020-09-26 14:55:15 -04:00
Aaron Suen
b03b047f0a Buff door catapult, esp higher level doors 2020-09-16 19:46:10 -04:00
Aaron Suen
81df25633a Add stone brick doors 2020-09-12 21:20:46 -04:00
Aaron Suen
de87702497 Door crafting hints and witnessing 2020-09-11 01:08:20 -04:00
Aaron Suen
c47008bc44 Door presses can now place nodes and craft
Thanks to Kimapr for the basic approach, and proving
the concept.

Doors pressing a single-item stack now place that
item as a node, and trigger placement recipes.  Doors
pressing nodes that don't have a single item stack
node form (sticks, leaves) also trigger placement
craft recipes.

All craft pressing recipes require some form of
backstop to provide pressure.
2020-09-07 10:53:51 -04:00
Aaron Suen
18b01c1ae7 Redistribute hints into each mod
Hints themselves have not been tided up
much, but this makes the project of fixing the
hints for each mod a little more manageable
and breaks up the hard-to-navigate single
monolithic hints file in the old guide mod.

The old guide mod has now been completely
retired.  Hints are now a full-fledged API-layer
standard feature.
2020-09-04 19:07:45 -04:00