124 Commits

Author SHA1 Message Date
Aaron Suen
ad852b8782 "Wood" in names for stick tools
Now that we have non-wooden versions of
these, suffix material name for consistency.
2020-09-16 20:19:18 -04:00
Aaron Suen
aebc0c6124 Expand stickwork selection hulls 2020-09-16 20:18:15 -04:00
Aaron Suen
1632b6352a Revert "Appease 5.4-dev texture_alpha warnings"
This reverts commit 253c2282917ecade5b8356d592edab40b1d517f5.

Apparently this warning is full of crap.  Explicitly
setting use_texture_alpha in the node def does
something DIFFERENT than what the engine says
it's doing enabling it internally.  use_texture_alpha
enables alpha BLENDING, which is what we
don't want with interpolation filters, whereas
leaving it off enables alpha THRESHOLDING which
is exactly what we want.
2020-09-05 23:46:44 -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
ef4b320193 Multimodal Rake API
Based on what's being dug, rakes can have
different dig volumes and checks.

Lode rake now has 3 modes depending on
what's being dug:
- Loose things, same as wooden rake
- 3x3x3 exfoliating
- 3x1x1 soil tilling/digging
2020-09-02 07:53:05 -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
253c228291 Appease 5.4-dev texture_alpha warnings
Apparently we will be required to enable
use_texture_alpha explicitly for anything using
any level of transparency, not just alpha
blending, in some future version.
2020-08-31 23:36:35 -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
ad0952a773 Optimize rake entity handling 2020-06-23 23:38:32 -04:00
Aaron Suen
f514990ea4 Merge more issues from discord. 2020-06-20 10:45:44 -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
acfd3d08dd Clean up a few log items, fix levels 2020-06-09 19:05:39 -04:00
Aaron Suen
6c640a11b1 Validate log message levels 2020-06-09 19:02:07 -04:00
Yaman Qalieh
a8147e9875 Add levels to log messages 2020-05-27 14:04:00 -04:00
Aaron Suen
c2fab4b12d Rakes should be flammable
How did we miss that for so long...?
2020-05-22 15:34:39 -04:00
Aaron Suen
c69d0a1cff Infodump config, dump texture override template 2020-04-20 08:15:53 -04:00
Aaron Suen
0012c2673b More scaling time definitions
Also, scaling_time completely overrides
group-based scaling time logic.
2020-03-29 08:13:41 -04:00
Aaron Suen
64f4abff59 New texture for staff/ladder/frame.
Grain of bark now runs along the stick/staff in each direction,
rather than having "rings" along some axes.
2020-02-21 07:30:32 -05:00
Aaron Suen
828312d452 Cache to account for metadata jitteriness.
It seems that when we access metadata too rapidly
it pulls data out of order or something, so that the
player damage time stuff is unstable, and healing can
start immediately, or more than 8 seconds later.

Caching this stuff manually seems to work around the
issue, and it seems that the metadata system is at
least EVENTUALLY consistent, so it's still good for
long-term use or across world unloads.
2020-02-19 21:05:20 -05:00
Aaron Suen
1a9eafd04f Fix wood tool tint mismatching planks. 2020-02-18 21:34:01 -05:00
Aaron Suen
484c1a337f More subdued look for molten glass, image opt. 2020-02-18 20:10:08 -05:00
Aaron Suen
2ac5403149 The last few texture tweaks. 2020-02-18 19:57:30 -05:00
Aaron Suen
91b5d55320 Fix rakes digging when picked up. 2020-02-14 21:22:14 -05:00
Aaron Suen
b44263e332 Fix rakes losing or duplicating items. 2020-02-14 21:15:24 -05:00
Aaron Suen
efea4c0047 Rake reforms and cleanup.
- Simplify and then optimize code.
- Default rake mode digs up all rakable items in area.
- Sneak+dig digs up only matching items/stacks.
2020-02-09 10:12:16 -05:00
Aaron Suen
2bd26f790e Don't stack-as-node unless falling_repose=1.
...except for fluids and hot potatoes.
2020-01-29 08:50:04 -05:00
Aaron Suen
b220480f35 Wooden frames should not stack-as-node. 2020-01-29 08:47:59 -05:00
Aaron Suen
39f8abb703 Adzes can dig grass.
They act like a weak shovel now.  This should
ease some early game frustrations for new
players until they figure out proper tools.
2020-01-12 15:07:45 -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
7050568938 Dammit dammit z-fighting hacks.
- Unbake the scaling tweak from models, apply it
  using mesh scaling in MT instead.
- Standardize ratio definition in one place.
- Default all nodeboxes to winning z-fights.
2019-12-08 23:14:56 -05:00
Aaron Suen
3d11536b81 Fix ugly frames/ladders/staves/rods.
Automatic z-fighting prevention was causing some
nodes to fail to connect to neighbors due to the tiny
gaps.  Allow certain nodes to "win" the z-fight instead
so they also connect to neighbors properly.
2019-12-08 17:19:47 -05:00
Aaron Suen
ce58f8294c Refactor shelf API/assets into its own module. 2019-12-08 16:41:59 -05:00
Aaron Suen
a53030cdcf Use a mesh instead of nodebox for shelves.
In principle this should be equivalent to 2 cuboids
instead of 6.  In practice, FPS improvements are
hard to measure.
2019-12-08 16:13:44 -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
a695ac4071 Fix runaway shelf-item fires. 2019-12-01 16:54:15 -05:00
Aaron Suen
6e1f3fee94 Standardize intra-line spacing in code. 2019-12-01 11:08:12 -05:00
Aaron Suen
b9e2f822f8 New flexible find_nodes_around api. 2019-11-30 10:28:35 -05:00
Aaron Suen
e769727f93 Simplify name of Adze. 2019-11-23 09:36:31 -05:00
Aaron Suen
a9531b5225 Show bandolier slots as placeholder ents. 2019-11-18 20:28:58 -05:00
Aaron Suen
6f3bb30825 Fix rake taking credit for hand-digging nodes.
When you have a thing in your hand that doesn't help
you dig a node, but you can dig that node by hand,
then apparently the after_use callback still seems to
trigger, causing the rake effect, and wear-out.
2019-10-31 21:33:53 -04:00
Aaron Suen
aebbef9720 Rake also gathers excess loose items to center.
Any items that don't fit in the player's inventory will gather
to the center of the raked area, so they can combine and pile
together for easier pickup later.
2019-10-30 07:59:36 -04:00
Aaron Suen
11314033e8 Rake tool easily cleans up messes. 2019-10-29 23:20:09 -04:00
Aaron Suen
4eb4e80bc7 Fix log splitting. 2019-10-13 09:19:08 -04:00
Aaron Suen
0ed1c497fd Missing some coremod registrations...?! 2019-10-05 17:42:02 -04:00
Aaron Suen
c147da4dde Convert from depends.txt to mod.conf 2019-10-05 11:24:16 -04:00
Aaron Suen
77de117ea1 Place certain stacks as nodes.
If a node is specially tagges with the stack_as_node group, and
the stack size is exactly 1, place as a real node instead of a
stack node.

This reinstates logic from WAY back in the super-early pre-alpha
days, except only for nodes explicitly tagged this way.

This should be applied only to nodes that aren't transformed in
any non-desirable way when placed as nodes instead of stacks, and
can be dug the same ways as stacks (i.e. snappy = 1 or
crumbly = 1).

Currently applied to sticks, staves, leaves, ladders/frames,
and torches.  Ladder/frame placement offers some interesting
possibilities in terms of throwing ladders to rappel down holes.
2019-10-01 18:59:53 -04:00
Aaron Suen
54cc3445d3 Further shelf placement fixes. 2019-09-21 12:12:52 -04:00
Aaron Suen
2a3e0cc3ca Fix vertical shelf building.
Placing a shelf against the side of another shelf was possible
with a simple right-click, but placing one against the top or
bottom of another shelf didn't work.  This fixes that.
2019-09-21 09:50:26 -04:00