71 Commits

Author SHA1 Message Date
Aaron Suen
d28a438063 Fix worn wooden tools being stone-tippable 2022-06-08 07:52:17 -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
5587c0cbcc Generalize brickmaking hints
Treat all "stone-like substances" as stone for purposes
of the hints.  You can chisel/bond any of stone, adobe,
sandstone, tarstone, etc. to get credit for the hints, so
there should no longer be hints hidden because you
haven't had the exact right kind of unetched concrete.
2022-05-01 19:08:37 -04: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
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
3c2104561a Explicit cobble fill for dungeon brick API
Instead of relying on base layers to replace dungeon cobble with
real cobble in the bricking logic, explicitly set a cobble node
name so that downstream consumers (e.g. nature mod) that extned
this API will reliably get all fill/brick/bonded members of the
material profile to transform consistently.
2021-09-27 08:15:53 -04:00
Aaron Suen
47d0b68dba Unify dungeon API RNG
Avoid having to have each dungeon generation method manage its
own RNG, which should save a lot of time on RNG seeding.
2021-09-27 08:04:09 -04:00
Aaron Suen
b5eb58d2bb Dungeon stonework API, restrict a few more loot items
Add a generic method to get stonework materials for dungeon
brick generation so we can extend dungeon bricking while keeping
the same pattern of mixed cobble/bricks/bonded.
2021-09-27 06:59:14 -04: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
02e0dcc8ea Ensure standard dungeon gen priorities 2021-09-06 21:07:05 -04:00
Aaron Suen
f5d968231a Recipe to unbond bricks
Pick the bonding back out of the grooves
with a metal or better pick.
2021-08-14 19:59:28 -04:00
Aaron Suen
5cbbae8cc9 Graveled adze recipe reform
Using stackapply recipe, it's no longer necessary to
sneak+place the gravel above the adze; it works
just like stone-tipping.
2021-08-14 08:11:12 -04:00
Aaron Suen
8237f8c400 Convert tool stone-tipping to stackapply recipe 2021-08-14 08:06:27 -04:00
Aaron Suen
197467d795 Fix missing adze graveling wear check 2021-08-11 18:25:18 -04:00
Aaron Suen
7d961a3bec Consistent "tip" in hints 2021-08-06 23:40:17 -04:00
Aaron Suen
46e60a2348 Graveled adze, new path to wood tech
Get rid of the intuitive leap necessary to climb a
tree to make planks.  Instead, a wooden adze
can be gravel-tipped (adzes are now represented
in all tiers) and can chop tree trunks.

The graveled adze is as powerful as a wooden
hatchet and spade combined, in terms of
diggability, but it breaks after a SINGLE use.
It doesn't consume the gravel it's made from,
but reapplying the tip each use is a lot of extra
process.
2021-08-06 23:39:39 -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
3dd945085e Remove the txp_* overlay image feature
- For inventory and wield images, this is already
  possible via override.txt since 5.3.
- For special tiles, this will be possible in 5.4.
- This complicates things, and introduces warning
  messages into mods built without awareness of
  this feaure.
- As far as I know, no texture packs have actually
  ever used this feature.
2021-04-11 10:42:27 -04:00
Aaron Suen
b6f4ebaca7 ABM inversion for brick bonding 2021-03-21 12:09:28 -04:00
Aaron Suen
319a3f7480 Fix dynamic lighting staying after torch goes out 2021-03-09 18:29:32 -05:00
Aaron Suen
95f0fb0ee9 Heaviest image compression option 2021-03-09 08:33:58 -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
b67a984967 Reduce dungeon brickiness
Bricks are a valuable resource, so we don't
want to give too many to the player just
for finding a dungeon.
2021-03-05 21:40:48 -05:00
Aaron Suen
3fe2d58872 Stone brickify dungeons 2021-03-05 20:56:47 -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
81df25633a Add stone brick doors 2020-09-12 21:20:46 -04:00
Aaron Suen
d712ad3668 Stone brick hints 2020-09-10 23:21:36 -04:00
Aaron Suen
18b01c1ae7 Redistribute hints into each mod
Hints themselves have not been tided up
much, but this makes the project of fixing the
hints for each mod a little more manageable
and breaks up the hard-to-navigate single
monolithic hints file in the old guide mod.

The old guide mod has now been completely
retired.  Hints are now a full-fledged API-layer
standard feature.
2020-09-04 19:07:45 -04:00
Aaron Suen
edea123a1e Start on new unified Hint API
- Move hint handling down to API layer
- Simplify stat data; old nc_stats counting can
  be moved out to a separate mod.  We only
  need whether the player has seen or not.
- Invert inventory tab responsibility.
- Merge witness system in from crafting.

TODO:
- Redistribute hint registration responsibility
  to individual mods.
- Test external mod compat.
- Retire old nc_stats and nc_guide systems.
- Add a way to reset hints.
2020-09-04 16:28:27 -04:00
Aaron Suen
9a05788a06 Fine-tune brick appearance 2020-09-03 21:32:17 -04:00
Aaron Suen
7eb6557870 Genericized brickmaking API
You can now chisel and bond bricks of other
smooth stone types, i.e. the kind made in
concrete processes.
2020-09-03 21:24:59 -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
42f125c716 Make most recipes indexable
Register a "rootmatch" property for all
recipes that represents a broader, quicker
test for recipe eligibility.  False positives are
allowed but false negatives are not.

Since most recipes are eligible, we can
use this to build an index for fast lookups
of subsets of recipes to run and skip most
of the other ones.
2020-06-27 11:06:43 -04:00
Aaron Suen
cb844813f0 Refactor and nerf stone hardening 2020-06-18 06:40:19 -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
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
23527e264b Artificial stone hardening process
Stone is hardened by creating an elecric field via the Peltier
effect that causes internal crystals to align.  Or something like
that.

Stone hardens over time when touching both lava and water.
All stratafiable stone types (lode sign, lode ore, lux ore) are
affected.
2020-06-04 08:09:30 -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
94129d5067 Hack to let TP authors override inv/wield images 2020-04-05 20:35:51 -04:00
Aaron Suen
6758904185 Switch from picking to chiseling for stone brick
Any chisel shape/temper is acceptable (bar/rod,
anneled/tempered)
2020-03-29 21:37:36 -04:00
Aaron Suen
c6cabca0e9 Stone bricks by WintersKnight94
- Original texture by WintersKnight94.
- Node definitions and recipes adapted from original.
- Added some hooks in a few other places to make new
  recipes work.

- Chip smooth stone with a lode pick or better to make brick.
- Bricks fall but don't repose.
- Apply mortar (wet aggregate) to bond stone bricks
- Bonded bricks can be moved but don't fall anymore.
2020-03-29 20:55:55 -04:00
Aaron Suen
c294ae3ec5 Revert stone chipping recipe change.
- Be more consistent with other similar recipes.
- Changes to item ent mechanics may have rendered
  the original problem obsolete anyway.
2020-01-31 19:49:55 -05:00
Aaron Suen
23e7a789cb Try to make stone chipping recipe less boring.
- Items don't down settle when rising.
- Give stone chips some upward kick.
2020-01-09 22:32:33 -05:00
Aaron Suen
4d47ab2e75 NC API dependency simplification.
Treat all API mods as a "layer", and use the new
nc_api_all registration to indicate that a mod depends
on the NC API (which ALL NC mods assume they do).
This means that each non-API mod does not need to
worry about which API mods it really needs and which
it does not, nor will they need to be updated for any
internal API restructures.

This is a game, not a modpack, so all mods will be
loaded anyway, and we only care about order.  That
means that we don't really need to worry about
having excess dependencies because any mod we
don't actually need will be needed by something that's
loaded anyway.  If somebody wants to reuse a
component elsewhere, they're likely to need to do
some work to untangle it anyway, because of the
amount that NodeCore mechanics interact and
interdepend.
2020-01-05 12:59:12 -05:00
Aaron Suen
dcfc80b367 Remove explicit names in mod.confs. 2020-01-05 12:38:45 -05:00
Aaron Suen
c147da4dde Convert from depends.txt to mod.conf 2019-10-05 11:24:16 -04:00
Aaron Suen
9a75f4c87a More flexible burning API.
Stone, lode, and lux tools now all have their handles burn, and
eject the non-flammable portions of the tool.

Now using a unified on_ignite hook for when flammable things catch
fire.  The call is made BEFORE the node is replaced, and has an
opportunity to look at node metadata and eject anything
non-flammable.

It can be a function, e.g. for shelves, or a static value in the
same format that the function would return (e.g. for lode tools
which need string values for temper substitutions).

If it returns a string or itemstack, it will eject that from the
position where the node burned.  If it returns a table it will
eject all the values of that table.
2019-09-07 11:28:51 -04:00
Aaron Suen
6385ce9843 Allow picking stone chips out of non-loose cobble too. 2019-09-07 10:56:43 -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
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