70 Commits

Author SHA1 Message Date
Aaron Suen
f01be30a00 Tidy up registration reporting 2020-07-16 07:29:11 -04:00
Aaron Suen
94401942ee Protect doors, standardize protection 2020-07-01 00:30:40 -04:00
Aaron Suen
72839b1a74 Fix press and other late-registered recipes 2020-06-27 19:03:49 -04:00
Aaron Suen
e7911dd7fd Fix crash on empty craft set 2020-06-27 13:32:03 -04:00
Aaron Suen
7ae24bf7fa Further craft set reductions
- Merge the "legacy, could be anyting" sets
  into every other set so we can do only 2
  set lookups instead of 3.
- Make sure we don't do any duplicate
  recipe checks.

N.B. the craft priority order MAY be different
now, since primary node recipes are
checked before visinv stacks.
2020-06-27 13:00:34 -04:00
Aaron Suen
b2f78c0daa Indexing for craft checks
By restricting the recipes we check based
on the name of the central object being
checked, we can do many fewer craft
checks per item and avoid expensive
checks.
2020-06-27 12:20:35 -04:00
Aaron Suen
e1a558b754 Sneak+punch prevents pummels 2020-06-19 13:45:51 -04:00
Aaron Suen
b8bf2322fa More work on DNTs
- DNTs can have default time value
- Automatic loop option
- Optional node name filter
- Use DNT for scaling particles
- A few tail call optimizations
2020-06-19 09:38:03 -04:00
Aaron Suen
4a4fd996a1 Register cooking to use DNTs 2020-06-19 00:29:49 -04:00
Aaron Suen
984e87e155 Consistent ABM labeling
- Make sure every ABM has a label
- Use consistent case
- More concise names / consistent voice
2020-06-17 07:09:20 -04:00
Aaron Suen
3d561a229b Optimize stack cook/cool check
If the item type does not at least pratially match any cooking/cooling recipe the first run, assume it never will and cache this fact
so we can quickly skip all stacks of the same
item next run.
2020-06-17 01:23:30 -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
a998009656 Merge branch 'master' of gitlab.com:yamanq/nodecore into dev 2020-06-09 18:57:34 -04:00
Aaron Suen
e9b9bd43d9 Protection support for storeboxes, pummel 2020-06-09 18:10:44 -04:00
Aaron Suen
5f165b4da3 Fix crash on completing stone brick chisel
Bug was introduced in 16a7c9fe, caused by
the fact that sometimes nodes are dug by nil,
i.e. the way the chisel is dug up automatically
in the chiseling process.
2020-06-01 18:08:59 -04:00
Aaron Suen
16a7c9fe26 Completing a dig resets pummel
This should fix false pummel detection on long
hard-stone dig/drop-in-place sequences
2020-05-31 08:51:02 -04:00
Yaman Qalieh
a8147e9875 Add levels to log messages 2020-05-27 14:04:00 -04:00
Aaron Suen
35292eb259 Switch to an internal sound API
Avoid mangling official Minetest API
functions that mods may want to
use directly.
2020-04-05 21:22:51 -04:00
Aaron Suen
e7d4d54b1c Genericize chisels, fix recipe digging
- Register groups for chiseling doors.
- Make recipe digging not use player inventory, but drop
  as an item unconditionally.  N.B. the old "replace with air
  then drop item" method only worked with explicit item
  names and not group detection.
2020-03-29 21:32:15 -04:00
Aaron Suen
98b7e21533 After chiseling a door, automatically dig rod
Also adds the ability to register recipes to automatically
attempt to dig a node upon completion.
2020-03-29 21:18:40 -04:00
Aaron Suen
e575cb9b26 Some more hint bugfixes. 2020-01-21 21:36:05 -05:00
Aaron Suen
7bc1a4ddad Standardize node placement sounds.
Add node placement sounds to processes
missing them, like tree growth.
2020-01-16 22:02:59 -05:00
Aaron Suen
25be3b07a8 Small pos key calc optimization. 2020-01-10 21:11:52 -05:00
Aaron Suen
c6584d79d4 Settle craft excess immediately. 2020-01-09 22:23:32 -05:00
Aaron Suen
dcfc80b367 Remove explicit names in mod.confs. 2020-01-05 12:38:45 -05: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
3eb21593b6 Block accidental new pummel recipes from hand-dig. 2019-12-29 14:08:27 -05:00
Aaron Suen
5b0459e4bb Speed adjustment settings for many long-running processes.
Many processes that have a significant speed/time component can
now have speeds adjusted (as a multiplier from base rate) via
settings.

Things that can be adjusted:
- Tool speeds (including digging and pummeling)
- Cooking and pummel recipe durations
- Soaking processes like tree growth, peat fermentation

The settings are hierarchical, so groups of rates can be
adjusted together, and a further multiplier can be applied to
each member of the group.

The settings are calculated dynamically, for power users only,
and documenting them is out of scope for the project.

Specifically, this should help tuning for Kimapr's SkyBlock, and
possibly other mods involving signficant gameplay rebalancing.
2019-12-06 07:01:12 -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
20e4432598 Apply "press" recipes to nodes jamming doors.
Nodes need to have a "backstop" node of some kind
holding them in place.  Automatically convert all
thumpy pummel recipes to press recipes too.
2019-11-01 20:42:44 -04:00
Aaron Suen
e5f54b49f6 Add witness system for cooking/soaking recipes. 2019-10-27 10:05:57 -04:00
Aaron Suen
c147da4dde Convert from depends.txt to mod.conf 2019-10-05 11:24:16 -04:00
Aaron Suen
7e75fd149a Quote consistency. 2019-09-14 09:49:06 -04:00
Aaron Suen
07239de73c Scaling overhaul as a "navigate caves by feel" system.
- Make handhold nodes glow, to visually simulate the player
  character's now "familarity" with them by feel.  We have to
  represent it synesthetically because the game only gives us
  sight and sound to work with.
- Make floors "scalable" so that they glow, even though they
  don't affect maneuverability.

The effect of this is to allow a player who has fallen into a dark
cavern to navigate, slowly, by feel, allowing more extensive
self-rescue possibilities.
2019-09-09 08:14:07 -04:00
Aaron Suen
52de19a28c Unified falling check, check after craft. 2019-09-09 07:05:01 -04:00
Aaron Suen
0c9544d6b5 Some scaling/particle cleanup, make scaling particles distinct. 2019-09-07 09:32:36 -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
007ccf081d Fix smoke API for external mods (nc_reative crash). 2019-09-01 12:18:13 -04:00
Aaron Suen
39dea8a2ae MAJOR: Code quality audit using luacheck.
- Removed lots of unused variables, a few shadowed identifiers.
- Removed a few sections of dead code.
2019-08-31 09:26:53 -04:00
Aaron Suen
47f5e17560 Scaling handholds should disappear when node under is dug. 2019-08-28 21:22:45 -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
560b068bd7 Fix crafting, standardize recipe callback params. 2019-08-24 06:31:27 -04:00
Aaron Suen
0c02eec17f Rework concrete curing to work a lot more like glass. 2019-08-23 23:16:59 -04:00
Aaron Suen
86cc55c12b Basic door node setup and recipes.
- Craft door panels by chiseling with a rod.
- Rotate door panels.
- Hammer in rod to act as hinge pin.
- Dig out hinge pin, dig up panel.
2019-08-13 21:06:13 -04:00
Aaron Suen
24bbeb135b Make pummeling pace easier, esp for android. 2019-04-14 00:11:02 -04:00
Aaron Suen
3614068263 Bug fixes, tidier craft excess handling. 2019-04-03 08:10:03 -04:00
Aaron Suen
14db333484 New sizzling sounds.
They sound silly, i.e. melting sand/steel now sounds like
sizzling bacon.  They're distinct from the "hiss of steam" sound
that cooking completion makes, and it's about the best way to
symbolize "something's cooking" I can think of.
2019-03-23 11:36:22 -04:00
Aaron Suen
cff62c1281 Reset cooking/cooling recipe if stack quantities change. 2019-03-22 23:15:47 -04:00
Aaron Suen
8a8533a8fc Convert lode to new cooking recipe system. 2019-03-22 22:55:30 -04:00