91 Commits

Author SHA1 Message Date
Aaron Suen
3ea043214c Show message when kicking outdated clients 2020-09-14 22:06:53 -04:00
Aaron Suen
5556797e45 Genericize rake logic
This makes it possible to register additional
rakes with different capabilities.
2020-09-01 21:07:37 -04:00
Aaron Suen
f01be30a00 Tidy up registration reporting 2020-07-16 07:29:11 -04:00
Aaron Suen
1e11f9d81e Remove compat hacks, bump min ver to 5.2+ 2020-07-14 08:20:46 -04:00
Aaron Suen
d000db43f6 Minor code cleanup 2020-07-14 08:08:16 -04:00
Aaron Suen
a999356558 Clean up legacy ents from really old worlds 2020-07-06 21:23:02 -04:00
Aaron Suen
ea43981588 Condense startup log noise 2020-07-05 09:45:53 -04:00
Aaron Suen
77bb713b77 Raise minimum log level to "action"
Log entries of "info" don't end up in server log
trace output by default; it's hard-coded to
LL_ACTION in main.cpp.
2020-07-05 08:14:52 -04:00
Aaron Suen
b4c72c9b2c Default almost all node meta fields to private.
Trying to isolate server performance issues, it was pointed out
that clients are spending a LOT of time receiving and rebuilding
mapblock meshes, and that updating node meta triggers this, even
when that meta is not relevant to the rendering of nodes.

Rubenwardy added a suggestion to change this in the engine:
	https://github.com/minetest/minetest/issues/10127
This patch implements this suggestion at the game level, since
in NodeCore's case we already were making the assumption that
nearly all metadata fields were private.
2020-06-30 18:19:49 -04:00
Aaron Suen
e86545f5e7 Texture modifier helper library
Useful for more complex transformations like assembling
animations or tiling.

Use in a couple places to try it out, esp. the new living
sponge animation.
2020-06-30 07:10:48 -04:00
Aaron Suen
8b96b96a29 Tidy up startup reports 2020-06-27 18:49:17 -04:00
Aaron Suen
085f700982 Fix ABM muxing, maybe?
Results so far are quite good: reduced ABM
total count from 82 to 36 (~60%) and got it
under the magic cache limit of 64.
2020-06-27 17:36:42 -04:00
Aaron Suen
338e4784e6 Automatic profiler labels for ents 2020-06-15 07:35:32 -04:00
Aaron Suen
e0156b4742 Add profiler instrumentation metadata everywhere
N.B. the MT built-in profiler doesn't yet actually support reading
labels from bare-function registrations, so a builtin hack is
needed.
2020-06-15 07:21:39 -04:00
Aaron Suen
6c640a11b1 Validate log message levels 2020-06-09 19:02:07 -04:00
Aaron Suen
c3d0aed881 Tool breakage particles
Makes mining with stone tools less crappy with
sound turned off.
2020-06-07 18:14:32 -04:00
Aaron Suen
b04c4596af Vary sound pitch by dig group level
This should make nodes that have hardness variations
like different kinds of stone have audible differences.
2020-05-30 21:34:50 -04:00
Aaron Suen
856eadcafc Prevent NodeCore being loaded on top of another game
Apparently some users have had problems installing NodeCore because
they assumed it was a modpack and just copied the mods/* into
~/.minetest/mods and enabled them in an MTG game world.  The result
apparently didn't immediately crash but wasn't really playable
either.

Detect NodeCore being combined with a mod named "default" and
throw an error immediately.  This should catch like 90% of the
games out there.  Some like LoTT or IKEA don't use a default, but
they're also not the ones that players would naively try to run
arbitrary mods on top of.
2020-05-27 07:00:13 -04:00
Aaron Suen
c69d0a1cff Infodump config, dump texture override template 2020-04-20 08:15:53 -04:00
Aaron Suen
94129d5067 Hack to let TP authors override inv/wield images 2020-04-05 20:35:51 -04:00
Aaron Suen
f37a918f0f Scaling and touch-hurt reforms
- Storeboxes are now scalable.
- Standardize touch-hurt operation.
- Touch-hurt damage on scaling.
- Now possible to alter scaling time via scaling_time
  group (percent of original scaling time)
2020-03-29 07:55:54 -04:00
Aaron Suen
d27c9cbc86 Mapgen limit API cleanup. 2020-03-22 10:59:06 -04:00
Aaron Suen
89020e8340 Major rebuild of item_entity.
This created a ton of dependency inversions, which
necessitated moving a number of API functions up into
higher layers, and restructuring dependency lists for
a number of mods.

BOLO: non-deterministic load errors due to missed
dependencies.
2020-01-05 11:42:22 -05:00
Aaron Suen
b1fab67491 Start work on unifying/simplifying builtins.
falling_node rebuilt from scratch so far.
2020-01-04 10:51:10 -05:00
Aaron Suen
10022fb761 Bump default stack max to an even 100. 2019-12-09 07:51:53 -05:00
Aaron Suen
dc8c483e01 Standardize virtual items, prevent them dropping. 2019-12-09 04:46:33 -05:00
Aaron Suen
ce58f8294c Refactor shelf API/assets into its own module. 2019-12-08 16:41:59 -05:00
Aaron Suen
dd0cf19784 Centrally fix water z-fighting on ALL nodeboxes. 2019-12-07 22:24:09 -05:00
Aaron Suen
e99c72154d Shelf standarization and tweaks.
- Refactor common code.
- Allow placement of wood shelves inside lode crates.
2019-12-07 18:25:05 -05:00
Aaron Suen
07850123d7 Standardize high-resolution gametime.
Use high-res version in a few places we were using integer-res
timer before.  This should e.g. smooth time variation of wind
strength for ambient sounds.
2019-11-10 08:10:34 -05:00
Aaron Suen
fdd881ae53 Active ItemStack Modifier overhaul.
AISM's now tick against stacks, including in piles, shelves,
and player inventories, (hopefully) efficiently compared to
the old way with separate ABMs.  Item entity support is also
possible, but not necessary yet.

This started out as a bugfix for being able to put a torch inside a
shelf, which didn't make much sense gameplay-wise.  It ended up
going quite a bit further.

- Aggregate now gets wet in stack form.  Swimming with dry
  concrete now has consequences.
- Lux reactions, radiation, and infusion should now behave more
  consistently.
- Sponges can now wet or dry in stack form, including inside
  containers.
- Torch ignition, quenching, and extinguishing is now more
  consistent regardless of context, and torches are now more
  dangerous, and can ignite things in more contexts.
2019-10-29 20:03:18 -04:00
Aaron Suen
afcce4d05d Start Active ItemStack Modifiers. 2019-10-29 07:12:01 -04:00
Aaron Suen
e5f54b49f6 Add witness system for cooking/soaking recipes. 2019-10-27 10:05:57 -04:00
Aaron Suen
828f4a06d9 Try to fix faling node columns.
Before, settling was being processed out of order, so nodes could
fall into the space of nodes below and kick them out as items, so a
solid column of nodes could collapse and eject some nodes as items.
This makes hopper-feeding systems a pain to use.

Instead, explicitly signal upwards (tail-recursive) to settle all
falling nodes on the same tick, since they should already be falling
and accelerating downwards in lock-step.

This isn't perfect, as there are possible race conditions with things
being added into the node-space of the falling column while it's
falling, but it seems to work for now...
2019-10-15 20:35:26 -04:00
Aaron Suen
a4f53947a2 Official issue number. 2019-10-13 09:38:07 -04:00
Aaron Suen
8cffc156ba Workaround for another builtin bug. 2019-10-13 09:31:22 -04:00
Aaron Suen
52de19a28c Unified falling check, check after craft. 2019-09-09 07:05:01 -04:00
Aaron Suen
310ce1bc6c Treat NodeCore as a unified thing.
- Collapse all nodecore "core" mods in the /mods listing, so it's
  easier to find the actual add-on mods.
- Parameterize in-game branding to make renaming derivatives just
  a little easier.
2019-09-07 09:08:57 -04:00
Aaron Suen
cbf035e0d5 Finished Soaking API, converted trees and infusion to it. 2019-09-05 22:48:30 -04:00
Aaron Suen
7d1d1e9602 Fix a long-standing race condition bug in limited_abm processing.
ABM action calls are delayed until a background timer picks them
up, but it passes in the original args and assumes that the nodes
haven't changed.  In addition, it bypasses our bug #8378 hack,
because that check is done in the abm action call but NOT the
background worker timer.

Do a check in the worker to make sure the node to be acted on has
not changed since the call was queued, and just let the call miss
and waste in that case.

Note that this automatically implicitly handles any #8378 issues
that may still be present since it has to force a fresh check of
the node to be operated on anyway.
2019-08-30 23:49:00 -04:00
Aaron Suen
458043fa18 Make ezschematic from tree growth into a full-fledged API.
I may use this for other companion content.
2019-08-27 21:41:03 -04:00
Aaron Suen
fe2c153f9e Clean up all lua code style.
Formatting rules based on Paul Kulchenko's perl-based formatter...
http://notebook.kulchenko.com/programming/lua-beautifier-in-55-lines-of-perl
...using a single tab for indent.

Mostly pure whitespace changes.
2019-08-27 19:14:51 -04:00
Aaron Suen
28108e1e40 Add translation support, esp. for TouchTips.
Translations are currently by holistic strings, i.e.
no parameterization.  This may create some busy
work for translators, but gives them more freedom
to account for differences between languages.

A translation template file is written out to the world
path on game start, so translators have a seed to
work from.
2019-08-23 20:40:33 -04:00
Aaron Suen
22e11bf471 Revert "Remove (expensive) issue8738 workaround."
This reverts commit 68c6f6671121b1b72b62db97858c25c82f6e834f.

I was able to reproduce the issue, in a case when it was definitely
NOT a falling_node mishap.  Snuffing fire by placing a node against
the last bare face of embers apparently creates a race condition,
in which the node you place can be removed instead of only fire
being removed.
2019-04-13 00:11:03 -04:00
Aaron Suen
c1828219e6 Refactor social sounds subsystem.
Standardize the "play a sound for everybody except the player who
is already playing it client-locally" logic into one place.

Fix failure to correctly detect tool speeds for some things, i.e.
when the player is using a tool but the capability used on a node
is actually inherited from the hand.

Note that this may allow pummeling with wrong tools (e.g. repacking
soils with spades) along with accompanying inappropriate tool wear,
but this should be minor and avoidable, and can be fixed later...
2019-04-06 23:51:05 -04:00
Aaron Suen
68c6f66711 Remove (expensive) issue8738 workaround.
I suspect that the problem that I actually observed was caused by
falling_node behavior, and NOT by an abm.  This workaround cannot
remain without firm evidence that it solves an actual problem.
2019-04-06 20:50:58 -04:00
Aaron Suen
507f5ae98e Sounds for tools wearing out and breaking. 2019-04-01 00:39:30 -04:00
Aaron Suen
ab5f6bcdbb Attempt to work around engine bug 8378.
Hopefully calling minetest.get_node_or_nil() again for all ABM's
will bypass the broken node cache.  We should see warning messages
in the logs if this is the case.
2019-03-31 23:55:05 -04:00
Aaron Suen
e8c698d571 Removed logtrace (moved to szutilpack). 2019-03-27 06:37:10 -04:00
Aaron Suen
9f53c5b43d Fix crash on punching lava.
minetest.[de]serialize apparently does attempt to serialize
functions (e.g. the on_punch) hook now, but all upvalues become
nil in the process.
2019-03-24 22:32:36 -04:00