52 Commits

Author SHA1 Message Date
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
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
d1a937e973 Add crude glass.
This makes glassmaking more challenging, as glass that is quenched
when not molded, or left wandering too long, will tend to quench to
crude glass, which is inferior.

This also prevents molten glass from wandering the countryside
forever from failed glassmaking attempts, and precludes keeping
molten glass in "captivity" as a crude infinite light source.
2019-04-07 09:12:44 -04:00
Aaron Suen
4271290487 New stone chip/tool textures.
Make the chip darker, like loose cobble it comes from instead
of smooth stone.  Also make the chip larger and sit lower in
stacks and on shelves (e.g. against wooden base) to make it look
better and easier to see.

Make tool tips correspondingly darker too.
2019-04-06 22:20:08 -04:00
Aaron Suen
3614068263 Bug fixes, tidier craft excess handling. 2019-04-03 08:10:03 -04:00
Aaron Suen
4b1488ed3f Hints system overhaul.
- Included new content.
- Partially converted to base on recipes instead of just items.
- Added support for group and toolcap checks.

Fixed a number of small bugs elsewhere in the process.
2019-04-03 07:41:27 -04:00
Aaron Suen
547dfcdd96 Setup some crafting sounds. 2019-03-14 20:08:08 -04:00
Aaron Suen
fd5f4219f7 Sounds for some items, ash. 2019-03-14 01:16:44 -04:00
Aaron Suen
767934393f Planning, chipping stone produces gravel. 2019-03-09 19:21:32 -05:00
Aaron Suen
98b235511c Standardize use of include function. 2019-03-02 20:39:08 -05:00
Aaron Suen
393210db69 Start proper spectator support.
Make sure that non-built-in content respects the interact priv
and prevents spectator players from doing nasty stuff.
2019-02-24 21:54:33 -05:00
Aaron Suen
e6c3be714a Fix serious regression in stone-tipping tools. 2019-02-23 13:34:41 -05:00
Aaron Suen
f893f613c3 API refinements.
- Make node match operate on only one of node or stack, depending
  on whether node defers to stack via is_stack_only.  This should
  hopefully prevent future pummel recipe issues.
- Add new core stack API.  Needs to be deployed in a lot of places.
- Start work on system for allowing flammable containers; they
  eject their potentially non-flammable contents.
2019-02-23 09:44:22 -05:00
Aaron Suen
4b972b4d3b More recipe conversion, bugfixing. 2019-02-10 00:20:55 -05:00
Aaron Suen
b5bd67d5a7 Finished pummel-craft API, started converting recipes. 2019-02-09 22:44:56 -05:00
Aaron Suen
05d4d52eb4 Survey of how we're using pummels right now. 2019-02-08 21:12:10 -05:00
Aaron Suen
d67f736ac5 Merge node_is into match. 2019-02-03 12:44:33 -05:00
Aaron Suen
739ad29acc Be a little more forgiving on tool wear for stonifying wood tools.
Allow up to 2% wear.  Sometimes you're diggng with a stone tool and
the tip breaks off and you don't notice (there's no sound yet),
so you accidentally dig a little with the wood tool and get it a
little dirty.  Let's be a little forgiving, and allow the stone
tip applicaton to also apply a little "repair" to the underlying
wood tool.
2019-01-26 11:39:55 -05:00
Aaron Suen
ffac1253d7 Remove debug code. 2019-01-25 09:31:40 -05:00
Aaron Suen
fcb8463953 Stone-tipped tools.
- Add a bit of stone to the tip of a wooden tool to harden it.
- Stone tools wear back down to their wooden originals.
- Stone tools dig faster, but wear quickly, so you need to pay
  attention to wear levels and carry spare stone tips.

Also:
- Nerfed mining speeds again, but made higher-tier tools much
  faster relative to lower.
- Nerfed tool durability as well.

Also:
- Standardized item ejection logic.
2019-01-25 09:26:15 -05:00