2296 Commits

Author SHA1 Message Date
Aaron Suen
cf4bd2d749 Fix quench check on heating recipes
If there's any coolant near a node, that blocks
all application of heat and prevents it from being
cooked, and also prevents any passive slow-cooling
recipes from operating on it (i.e. racing against
the quenched recipes).

Use coolant neargroups for quench check too,
for consistency.  Add memoization to the recipe
data on the check, so to avoid doing the quench
scan for each recipe separately.
2022-04-05 20:32:33 -04:00
Aaron Suen
275cd18d43 Fix accidentally silk-touchable leaves
This was also apparently an item dupe bug at the
same time...
2022-04-05 19:10:40 -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
563324c8fe Fall check immediately after raking 2022-04-05 19:05:51 -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
03d81b873a Translation updates 2022-03-29 08:11:28 -04:00
Giuseppe Bilotta
44a537e705 Fix placement of eggcorns on top of shelves
Right-clicking on the top of a shelf would place a legacy plantlike
eggcorn. This was due to the storebox right-click override
unconditionally calling `item_place_node` when placing an item against an
inaccessible side of a storebox.

The solution would be to call `item_place` instead, since that function
has the logic to handle `place_as_item` correctly. However, this cannot
be called from the storebox right-click override directly because
`item_place` calls the `pointed_thing` `on_rightclick`, which would
cause an infinite recursion.

Solve this by refactoring the placement logic into a new
`minetest.item_place_node_or_stack` which is called by `item_place`,
as well as by the storebox right-click override when placing items.
2022-03-25 19:15:02 +01:00
Giuseppe Bilotta
8d6d8237c8 Fix form contents not falling on stack below
If an item stack is present in the node below a form,
the stack in the form will not fall into it even if it could add to it
(e.g. a 16-sand stack in the form will not fall into a 2-sand stack
below).
This is due to the item stack node being non-buildable-to and missing a
can_item_fall_in method, causing the stack_can_fall_in checks in
storebox_check_item_fall_out from failing when the shouldn't.

Fix by implementing the can_item_fall_in method for item stack nodes.
The implementation follows the storebox one, without any “geometric”
checks on accessible sides.
2022-03-23 22:29:07 +01:00
Aaron Suen
96b4947c13 Simplify node/stack change optic notification
Instead of adding a special hook for storeboxes, just treat all
stack changes as node changes and notify all update listeners.
2022-03-14 07:13:43 -04:00
Aaron Suen
c433b36f2b Formatting, add contributor to license 2022-03-14 07:03:44 -04:00
Giuseppe Bilotta
31223ddb00 Typo fix in group name 2022-03-13 23:24:17 +01:00
Giuseppe Bilotta
512c6b05cd Properly check for param2 in optic_commit 2022-03-13 23:24:17 +01:00
Giuseppe Bilotta
bdc27cf304 Fix typo 2022-03-13 23:24:17 +01:00
Giuseppe Bilotta
26ca863b68 Check dependent optics on storebox content change
Changes to the stack stored in a storebox do not trigger a node update,
which meant that affected optics to not get updated until the next ABM.

Use the newly introduced storebox_register_on_stack_change to trigger
a check on dependent optics just like node updates.
2022-03-13 23:24:17 +01:00
Giuseppe Bilotta
925de33418 Make storebox_on_stack_change extensible 2022-03-13 23:24:17 +01:00
Giuseppe Bilotta
0cc6604207 Storeboxes should let light through their open sides
Storeboxes such as shelves do not let sunshine propagate because some of
the sides are opaque, but some sides are still open, and these should
still let light through.

During the optic scan phase, handle opaque nodes with visible inventory
by checking if the light travel direction also allows storebox access,
(from both the front and back face) and consider the node transparent in
such a case (unless, of course, the contained items are opaque).
2022-03-13 23:24:17 +01:00
Aaron Suen
834b13e6ad Fix sedges not stacking in containers
Placing a sedge into a container via right-click would
randomly transform the sedge to one of the 5 different
random stages of growth, same as placing on the
ground would, causing non-sedge_1 sedge items to
exist which don't stack with normal sedge_1 anymore.

Instead, simplify the growth feature to apply the
change to the sedge in node form after it's been
placed, instead of manipulating items.
2022-02-27 21:25:40 -05:00
Aaron Suen
e54ca43c5c Translation updates 2022-02-27 19:29:49 -05: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
57ea4270cf Don't drop one item when dropping many
Aux+sneak+drop is supposed to drop all stacks
that match, but it was dropping one item from the
selected stack first before dropping the rest.  This
caused (1) dropping a stack of 1 might cause the
rest of the matching items not to drop, and (2)
dropping leaves or sticks or other stack-as-node
items would place a node.

Instead, suppress immediately dropping any
items at all when using aux+drop or
aux+sneak+drop and handle all drops in the
delayed stage.
2022-02-10 22:36:26 -05:00
Aaron Suen
194063d1ac Support new count_meta
https://github.com/minetest/minetest/pull/8448
2022-02-10 22:27:36 -05:00
Aaron Suen
dd5127c6c4 Upper limit for "saved" soaking tickle time 2022-02-10 22:13:39 -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
0ba60c624a Translation sync 2022-02-10 06:55:54 -05:00
Aaron Suen
c5bcb15a60 End-of-support 5.3 2022-02-10 06:52:29 -05:00
Aaron Suen
766aafa72b Fix crash on stack meta field reordering
Reconstructing a stack by transferring items from another
stack into an empty one, and then re-serializing, can cause
the fields to end up in a different order in serialization, which
causes a false positive detecting stack changes, which cause
another recheck, leading to a stack overflow.

Compare objects structurally, i.e. their key/value pairs,
rather than relying on stable serialization.  The old method
only worked reliably in the case of objects having only one
meta field, which accidentally had worked out most of the
time, but doesn't work well with some mods, e.g. cats that
have both a name and furball metadata.
2022-02-04 20:48:22 -05:00
Aaron Suen
2e6e1dde34 Fix crash on nil dnt_get 2022-01-30 09:56:39 -05:00
Aaron Suen
a8c521caea Add missing dnt_get API 2022-01-30 09:39:43 -05:00
Aaron Suen
b14a6fd272 Add an (almost) blank file for weblate 2022-01-25 01:00:34 -05:00
Aaron Suen
144f45e13b Update to hosted weblate 2022-01-24 23:48:45 -05:00
Aaron Suen
600f1380a7 Add a blank template for weblate 2022-01-24 23:07:14 -05:00
Aaron Suen
4d05be735d Make fire ambiance a bit more audible 2022-01-23 17:41:00 -05:00
Aaron Suen
9555a1ecba Optimize ABM delay
Only register a single job with after() per tick.
Store actual node processing to do in a much
simpler linear array.
2022-01-23 17:28:48 -05:00
Aaron Suen
1da5ebcc7f Soaking tickle recipes require placed nodes 2022-01-23 16:51:39 -05:00
Aaron Suen
9022332cc6 Merge branch 'master' into dev 2022-01-23 15:52:57 -05:00
Aaron Suen
66a338b680 Fix lode rake recycling/wearout recipes 2022-01-23 15:52:46 -05:00
Aaron Suen
d9d33d1a4f Fix rad damage blocking
Instead of trying to skip everything (and not
updating stats), just set rate to 0.
2022-01-22 22:17:35 -05:00
Aaron Suen
c4f41348e0 Fix skybox being sent every step 2022-01-22 22:11:55 -05:00
Aaron Suen
034ecef2a9 Reuse envsound fx ents from a pool
This seems to reduce steady-state bandwidth
usage when standing still significantly, at least
according to rudimentary tests.

Try to reuse the entity that is already physically
closest to the target position, so to maximize
the chance that nearby player(s) already have
the entity transferred and only need the new
pos data, in case MT is intelligent enough to send
only the needed changes.
2022-01-22 21:49:11 -05:00
Aaron Suen
b9d5b42268 Fix skybox being sent every step 2022-01-22 21:01:45 -05:00
Aaron Suen
a0a14f9195 Fix amalgamation melting in falling node form 2022-01-22 16:52:20 -05:00
Aaron Suen
91e5c615c2 ABM delay, prevent "prompt critical" ignition
During processing of the flammable ignition ABM,
nodes could ignite, causing the new ember nodes
created by this ignition to trigger fire propagation
instantly during the same tick by nodes still yet
to be processed for ABM checks during the same
scan.  This often caused large areas of flammable
nodes, like wooden plank skyblocks, to be ignited
instantly in a specific direction from any source
ignition.  This led to some "cheap shots" where
players were ruined by fire far more rapidly than
they should be.

Instead of processing flammability checks in
sync, delay them until the next tick, so that we
find all flammables to check before any new
igniters are created.  This should tame fire
spreading back down to normal levels.
2022-01-22 16:20:10 -05:00
Aaron Suen
86a53392ec More diagnostic logging
- Log pos of first missed ABM
- Log fire ignitions
2022-01-22 15:30:41 -05:00
Aaron Suen
46241b06d4 Invincible players also clear rad HUD 2022-01-22 14:52:11 -05:00
Aaron Suen
a75e2ca886 Make non-visible players not interact with luxrad
Also remove HUDs from things that don't affect
non-visible players.
2022-01-22 14:47:28 -05:00
Aaron Suen
029e765a42 Remove backup file 2022-01-22 13:23:22 -05:00
Aaron Suen
c63a188f32 Tighten up frame blend a bit.
Make transitions between animations a little
more crisp.
2022-01-22 13:21:17 -05:00