2654 Commits

Author SHA1 Message Date
Aaron Suen
eaa1f34c3f Fix peat auto-fermenting bug
Peat should never ferment on its own, it should require face
contact with some kind of soil.  Unifying it with tree growth rate
code caused it to ferment on its own because the assumption that
tree roots contain their own soil and base moisture.  Peat should
only have its own moisture but not its own soil.

This also allows peat to be used as an emergency "moist" node on
its own in e.g. skyrealms for cultivating flora, as long as it's
contained so that only its moisture can leak out but it cannot
be exposed to fermenting microorganisms from nearby soil.
2023-05-06 19:48:28 -04:00
Aaron Suen
e75aa98b35 Support inprogress callbacks from recipes too 2023-05-05 21:01:46 -04:00
Aaron Suen
f1f26fee6c Oops, place_as_item is NOT a group 2023-05-05 19:24:26 -04:00
Aaron Suen
87f573b513 plantlike_rooted nodes are NOT breathable for grass survival 2023-05-03 19:55:24 -04:00
Aaron Suen
591dc2c23b Notes check, small hint tweak 2023-04-28 22:00:34 -04:00
Aaron Suen
00a274e763 Fix damage when trying to chop glowing lode in node form
There's now a separate damage_pickup group that only damages you
if you try to actually pick up the thing, not if you try to
punch/pummel it.
2023-04-28 21:17:17 -04:00
Aaron Suen
cfbea05d14 Add braced wooden forms to address an annoyance
When trying to use wooden forms for their "items fall through the
bottom" feature, e.g. for stack hoppers or "laundry chutes",
accidentally putting something like planks or glass into it will
permanently transform it into a storage container that no longer
has the desired property.  Also, forms used in machines will
transform into frames if hit by a door when there's nothing
inside.

Allow players to put a stick inside to "brace" the form to stay
as a form permanently, disabling its use for any other purpose and
preventing other accidental transformations.
2023-04-28 19:56:31 -04:00
Aaron Suen
7b4d953c1f Prevent ticking-automation exploits
The soaking-tickling mechanism was intended only to speed up
otherwise very boring "waiting" gameplay gates in skyblock play,
by allowing players to trade attention for time.  It seems it has
been exploited in vanilla play, though, by triggering the tickling
recipes far faster than they normally should be triggered by
hand, using doors, breaking the time cost balance of things like
leaching or growing trees.

Add a "cuddly" dig group to the hand, and ONLY the hand, and make
the tickling recipes use this group so they only work with the
player's actual hand.

N.B. this group can be used for other pummel recipes in mods,
where a gentler touch is needed that cannot be gotten from a tool
or a machine, such as petting animals.
2023-04-26 07:10:34 -04:00
Aaron Suen
342488e33a Fix translation junk in server logs from update message 2023-04-23 15:37:02 -04:00
Aaron Suen
6d3794efac Retire non-positional sound detection warning
It appears we have always been consistently requesting sounds to
be played with appropriate position, so the failure to play
sound positionally sometimes seems to be an engine bug and outside
of our ability to detect or prevent.
2023-04-23 15:29:07 -04:00
Aaron Suen
dacafd8f13 Retire time-of-day warning/hack
This was supposed to prevent shadows from showing up in certain
pre-release versions of MT before shadows were off by default for
the official release.  It's no longer necessary as shadows are
now properly controlled by the API.
2023-04-22 21:22:31 -04:00
Aaron Suen
8b6bbd9959 Retire a probably-no-longer-necessary check
Also, if somebody really wants to make an API-compatible "default"
mod that works on top of NodeCore to allow MTG mods to work with
NodeCore or something, that's fine too.
2023-04-22 21:20:45 -04:00
Aaron Suen
c1d165031c Don't drop unsoftened ores
Fixes inconsistencies with high-tier tools in custom mods
2023-04-22 19:39:49 -04:00
Aaron Suen
7950f62fde Promote sponge survival check to public API
Allowing matching logic to be used in mods
2023-04-21 18:23:09 -04:00
Aaron Suen
e4be594862 Translations 2023-04-21 08:37:38 -04:00
Aaron Suen
2545124756 Boost the default brightness a bit 2023-04-14 20:40:04 -04:00
Aaron Suen
73cc6ced50 Enable experimental dynamic exposure
Players still need to enable some settings:
- Enable shaders in Settings
- Hunt for "auto exposure" in advanced settings and enable it

The game will try to adjust the brightness automatically based on
the local light level.  Unfortunately there are problems with it
(e.g. it seems to detect light based on the light level where you
are standing instead of where you're looking) but it may help
improve the "caving" experience without having to mess with gamma
curves.
2023-04-14 07:15:04 -04:00
Aaron Suen
0178fb67f3 Sort discoveries chronologically, newest first
Note that if the exact wording of a hint changes, then those hints
may be pushed to the top of the list.  This is an internal
limitation and cannot be prevented without assigning some other
stable unique identifier to hints (a lot of work and probably not
worth it for now).

A tiny amount of timing jitter is applied to hint discover time
(<1ms) to ensure that hints are always in a stable order.

Hints are identified by a short hash of the hint text, so it is
also possible (but unlikely) to have collisions that cause
hints to sort earlier in order than they normally should.
2023-04-07 20:29:45 -04:00
Aaron Suen
71311e284b Refactor visinv stack pick into an "add node drop" API
Using the new API, it is now possible to register custom logic to
operate on a node drop list at each time a node is dropping its
drops, in list form, before they're processed into the player
inventory or into entities.

This can be used by a number of the "add extra drops to ores" 3rd
party mods like WC Adamant, YCTIE, and LuxGates, to add drops to
existing ores *without* overwriting other mods' changes.
2023-04-04 19:41:18 -04:00
Aaron Suen
4b2bc0a026 Do not expire artificial water near unloaded area boundary
Sometimes sponge squeezers are built too close to a mapblock
boundary, and rarely fail due to the artificial water being
loaded but the lens powering the squeezer being unloaded or
inactive.  Try to detect these borderline cases and prevent the
water from disappearing.  It would be somewhat unfair to expect
players to predict and prevent this failure mode, especially in
certain high stakes play modes like skyblocks, so try to prevent
it if we can.
2023-04-04 06:09:48 -04:00
Aaron Suen
bff4ecf148 Revert "Remove liberapay link for now"
This reverts commit 08dfff17e5f77cc49a100aa42c70cee2ae96ebea.

LiberaPay works now with Stripe
2023-03-28 22:56:35 -04:00
Aaron Suen
f6324fbb82 Purge abandoned translations with no strings done 2023-03-27 07:25:45 -04:00
Aaron Suen
68c26a7225 Fix all translations to parameterize (C) end year 2023-03-27 07:04:25 -04:00
Aaron Suen
19bf18519f Fix stagnant (C) year in About tab 2023-03-27 06:57:40 -04:00
Aaron Suen
70ae0a0ed0 Fix major startup slowdown from craft index
While remaining compatible with the old functionality
(we allow registering craft recipes at runtime,
whether this is really sane or not), significantly
reduce the number of craft index rebuilds we do, to
only up to one per tick, only when new recipes have
been registered.  This should be fine because no
recipe should be actually used until at least one
tick after it was registered.
2023-03-20 20:26:12 -04:00
Aaron Suen
f49af76666 Translation 2023-03-20 19:46:35 -04:00
Aaron Suen
4026b2cb01 Snapshot items before iterating in retroactive on_register
One potential source of the "missed item registration" bug could
be the on_register callback running multiple times for an item if
it was registered during a retroactive on_register scan.  The
behavior of pairs() if the table being iterated is modified is
apparently undefined.  In fact, it may be possible for a table to
get rehashed, such that some items might be skipped.  Taking
a snapshot first and iterating that instead should be more
stable overall.
2023-03-17 22:19:53 -04:00
Aaron Suen
46cf4471c9 Merge remote-tracking branch 'origin/master' 2023-03-10 20:39:10 -05:00
Aaron Suen
8d0f1f38a5 Merge branch 'fix-tote-crash-bug' into 'master'
fix crash with door and tote

See merge request sztest/nodecore!27
2023-03-11 01:27:08 +00:00
Aaron Suen
c44399c739 Merge branch 'dev' into 'dev'
Add lode crate and form to metallic group

See merge request sztest/nodecore!28
2023-03-11 01:13:18 +00:00
Aaron Suen
3df09ceb43 Merge branch 'gluefix' into 'dev'
Fix allowing glueing of lens and prism items

See merge request sztest/nodecore!31
2023-03-11 01:04:24 +00:00
J. Edward Jewell
2ca11eddcf Disallow glueing of lens and prism items 2023-03-10 20:00:37 -05:00
J. Edward Jewell
c2070b001b Format with luatools 2023-03-05 12:51:30 -05:00
J. Edward Jewell
da454ad0d8 Refactored Jeremy's code to be much cleaner and more idiomatic. Also removed the backstop requirement for thumpy 5+ for bashing again. 2023-03-05 12:20:20 -05:00
Jeremy Hussell
de9326afc1 Split rotated logs and tree trunks, with backstop. 2023-03-05 12:20:20 -05:00
Jeremy Hussell
8bf8894b15 Bash planks from any direction, but only if there's a fixed backstop. 2023-03-05 12:20:20 -05:00
Edward Jewell
a5c8ebf01c Added lode crate and form to metallic group 2023-03-04 19:42:11 +00:00
Aaron Suen
1d2ba522ec Translation updates 2023-03-03 20:18:14 -05:00
Aaron Suen
4351fe126a Translations, fix zh_* language codes.
https://gitlab.com/sztest/nodecore/-/issues/18
2023-02-19 09:26:02 -05:00
NoComment
15874f4eef fix crash with door and tote
minetest.get_player_privs crashes on nil
2023-02-03 18:58:53 +00:00
Aaron Suen
8ef7b1311f Switch door ablation cooldown key to pos_to_string
This was done for doors in operate.lua, when
hash_node_position caused all sorts of problems,
including freezes.  Never did actually figure out
WHY, but the change worked there.  Since door
ablation is suffering its own reliability issues,
maybe it's time to try that change here too?
2023-01-25 21:15:10 -05:00
Aaron Suen
f732fe793e Translation update 2023-01-18 21:12:40 -05:00
Aaron Suen
ee79cfaf9a Fix problematic "moist soil" language 2023-01-18 21:11:04 -05:00
Aaron Suen
4f73985c45 Merge 'hexagon-recursion-dev-patch-57836' into dev 2023-01-18 20:19:03 -05:00
Aaron Suen
cc35486f10 Translation sync 2023-01-18 20:11:17 -05:00
Aaron Suen
61d1e60de0 Sync up admin tool rename w/ translations 2023-01-16 16:04:54 -05:00
Aaron Suen
5bc651e067 Change leaf decay to use groups 2023-01-14 11:49:36 -05:00
Aaron Suen
79128f1c27 Fix AISMs removing player hand model
Apparently AISMs DO work on the "hand" slot, so
detect this and avoid it.
2023-01-14 09:58:28 -05:00
Aaron Suen
aba4068f65 Detect and clean cheat items too 2023-01-14 09:56:57 -05:00
Aaron Suen
134ce0a471 Fix admin tool, rename to "admin tool" 2023-01-14 09:43:51 -05:00