132 Commits

Author SHA1 Message Date
Aaron Suen
c268b70938 Fix tools pummeling instead of digging 2022-05-02 07:05:38 -04:00
Aaron Suen
e28584b881 Add subtle door indicators
It was always weird that the player character could
sense hinged panels even when the faces shown were
completely undifferentiated from their non-panel
counterparts.  Add a fairly subtle visual indicator that
makes it obvious why the player can spot them.

Players can still hide doors in plain sight, they may
just need to take more advantage of shadows and
other geometry tricks to ensure they don't stand out
against a field of similar nodes, or use psychological
tricks to distract other players from spotting the
patterns.
2022-05-01 19:46:25 -04:00
Aaron Suen
6ce87f27bd Fix door catapult crash 2022-05-01 03:51:54 -04:00
Aaron Suen
eea39a773f Fix raking sand/gravel by machine 2022-05-01 01:41:29 -04:00
Aaron Suen
e803155cbc Fix stylus patterns/training with doors 2022-05-01 01:36:16 -04:00
Aaron Suen
2aa19581f9 Merge branch 'dev' into rakedoor 2022-05-01 01:10:11 -04:00
Aaron Suen
00439a2ebf Clarify a hint message
Make it clear that it only includes place-assembly
recipes, not pummel crafts.
2022-04-05 19:07:27 -04:00
Aaron Suen
d872119fd7 Multiple press-craft fixes
- Fix door place-craft discovery not triggering due
  to wrong label name
- Fix many door witnesses not working because the door
  itself obstructs view of the action; "spread" the witness
  event to multiple positions and give the player credit
  if they can observe any part of the interacting nodes.
2022-03-29 09:06:15 -04:00
Aaron Suen
e3aef49a11 Make crafting work with non-node items
For example, making torches, assembling tools.
2022-03-29 08:28:18 -04:00
Aaron Suen
b6232f4f99 Fix freeze due to door infinite loop
A certain arrangement of door-gears with a couple of
pieces of sand next to it can get in a situation that
causes an infinite loop, e.g. as if the sand nodes are
trying to switch places with one another and form a
circular dependency.

The simplest patch for it is just to limit recursion
for now.  Randomness in the depth reduces the risk
that machines themselves can get stuck in some
pathological state.
2022-02-26 15:16:32 -05:00
Aaron Suen
6ea71897ad Fix min delay calc 2022-02-13 20:51:02 -05:00
Aaron Suen
f7e43026e4 Ensure deferred door DNT doesn't loop 2022-02-13 20:35:19 -05:00
Aaron Suen
a2f81d9ee1 DNT auto-start refinements
- Regen with LBM too.
- Allow different delay time for "just loaded" case.
- Use DNT auto-start for more things, replacing
  regen ABM/LBM where possible.

Also tried to improve door ablation reliabiity:
- Use DNT autostart for door ablation.
- Faster DNT check so we don't need the ABM
  neighbor scan anymore.
- On early ablation trigger, set DNT for right after
  cooldown ends instead of letting DNT loop die,
  removing one scenario that could cause
  sponge squeezer stalls.
2022-02-10 22:08:58 -05:00
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
b7e4809e85 Make rakes at least somewhat useful with doors
- Normal non-selective raking mode works when
  pushing a rake with a door.
- The rake does not pick itself up.
- Collected things are dumped at the location of
  the direct raking target.

This doesn't seem super useful right now, but
a rake digging a full stack of some item will cause
all additional stacks of items in its range to settle
near the full stack, which could end up over a chute
allowing the item to fall down, and thus could be
used to collect items that scatter over a wider area.

Before releasing this we might consider making
rake digging selective by default, so these can be
used to sort and filter items.

May also consider making it possible to dig with a
rake in other circumstances, e.g. pushing a rake
against an open side of a storebox that has no room
for the rake will cause the rake to dig that stack and
all nearby matches?

May also consider cleaning up the raking API entirely
to make it easier to directly invoke a rake via
machine digging ... or tidy up the machine digging
API so it's no so hacky.
2021-12-16 18:01:23 -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