56 Commits

Author SHA1 Message Date
Aaron Suen
5bc651e067 Change leaf decay to use groups 2023-01-14 11:49:36 -05:00
Aaron Suen
63b9ba5909 Don't convert tree trunks to logs in falling ents 2022-12-10 14:06:15 -05:00
Aaron Suen
dd2a12d8c1 Hotfix for a texture alpha warning 2022-10-27 08:00:42 -04:00
Aaron Suen
af691675b9 Refactor, simplify, and limit to specific nodes
- Use the existing on_stack_change hook instead of creating new
  on_stack_[un]fill hooks, to simplify util_stack.
- Automatically register bulk nodes, but only for nodes being
  registered that request bulk optimization.
- Remove some code duplication and registration complexity.
- Hand-pick nodes for bulk storage optimization based on a survey
  of actual usage from a dump of the NodeCore Community server
  world map.
- Use a separate group for visinvs with hidden entities.
2022-10-26 07:58:23 -04:00
Aaron Suen
275cd18d43 Fix accidentally silk-touchable leaves
This was also apparently an item dupe bug at the
same time...
2022-04-05 19:10:40 -04:00
Aaron Suen
9637299f4c Fix leaf decay forcing, changed field name
Handles both natural decay and manual digging.
New field name more properly reflects actual meaning.
2022-01-16 14:04:42 -05:00
Aaron Suen
fb76d23f36 Expand peat grinding to groups
- Use groups so it's easier for mods to add things
  that can be ground into peat.
- Pretty much all flora can be ground into peat as well.
2021-12-16 20:47:13 -05:00
Aaron Suen
b2269d4424 Fix opaque leaves appearance
Draw faint (and code-configurable) outlines
of leaves when opaque, and don't let
texture_clean_transparent completely fill
in the gaps with green.
2021-08-19 00:48:14 -04:00
Aaron Suen
7a21096731 Accelerate leaf decay
When leaves decay, they accelerate checks for
decay of nearby leaves, so overall tree leaves
decay much faster, but without increasing load
at steady-state i.e. for stable trees.
2021-02-28 16:45:02 -05: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
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
73d2c4b5e8 Tree refinements, visible planted eggcorn.
- Make planted eggcorns evident via visual and
  description; it was too easy for new players to
  think they screwed up the recipe.
- Leaves inherit growth rate of trunk.
- Growth particles at tip of growing trunk.
- Code cleanup, refactoring, break up large files.
- Minor texture adjustments.
2020-01-20 06:50:34 -05:00
Aaron Suen
1743f02536 Make growing leaves stand out a bit more. 2020-01-19 19:44:01 -05:00
Aaron Suen
2d1179c4ad Growing leaves are now visually distinct. 2020-01-19 09:20:48 -05:00
Aaron Suen
2d73df30e7 New API to check if air passes thru node.
Can be used for things like sponge air exposure
or environmental exposure checks.
2020-01-18 09:57:39 -05:00
Aaron Suen
14b249a9f0 A couple more tree growth issues.
- Offline growth lost after sprouting.
- Trunks not growing through leaves.
2020-01-17 23:41:41 -05:00
Aaron Suen
f9fe2027b8 Standardize leaf placement, fix bugs. 2020-01-15 23:01:11 -05:00
Aaron Suen
6ebb08c146 Begin prototype for "growing" trees. 2020-01-15 21:27:12 -05:00
Aaron Suen
ed95bc1f33 Convert Tree Trunk item stacks to Logs. 2020-01-09 23:01:03 -05:00
Aaron Suen
87e181720f Crush damage for tree trunks. 2020-01-05 15:13:01 -05:00
Aaron Suen
f50e0ab359 Fix leaves incorrectly not marked as no repack. 2019-12-18 19:25:17 -05:00
Aaron Suen
6e1f3fee94 Standardize intra-line spacing in code. 2019-12-01 11:08:12 -05:00
Aaron Suen
3b546ef2ee Tree trunks fall, dig to logs, logs rotate. 2019-10-12 11:41:07 -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
8270724c07 Stumps now drop sticks instead of dirt.
There is now a "dirt cycle" in NodeCore ecology.  Trees consume
dirt, and stumps now no longer return it.  Players need to compost
leaves by burying them away from light near dirt, which will then
allow them to create new dirt.

This is one step closer to viable skyblock gameplay.
2019-09-14 15:34:27 -04:00
Aaron Suen
3dd2092945 Exempt a few materials from ever being silktouch-dug this way.
Stone should be made via concrete.  Tree stumps should only be
made by growing trees.
2019-09-04 19:09:42 -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
2d4445c976 Tweak flammability, esp of charcoal/ash mixtures. 2019-03-31 21:38:26 -04:00
Aaron Suen
aa7473377f Fix missing waving leaves shader support. 2019-03-31 00:05:27 -04:00
Aaron Suen
4f600d046f Make leave sounds swishy. 2019-03-16 11:23:37 -04:00
Aaron Suen
a20c5401d2 No, "log" doesn't work for a GROWING tree trunk. 2019-03-14 21:59:56 -04:00
Aaron Suen
7eb26b5511 Simplify some names. 2019-03-14 21:58:30 -04:00
Aaron Suen
9607bcc6a6 Start working on sounds, plus minor refinements.
- Clean up registered_* usage patterns.
- Reduce tendancy of leaves to create stack nodes.
  Now they tend to stack up properly in-world more often.
- Tweak damage system to create "headroom" where minor
  damage doesn't cost inv slots immediately.
- Make player hand skin color match model skin.
- Cleanup/unify grass abm logic.
- Start installing new sounds by MagikEh

Sound source:
  https://github.com/MagikEh/SoundsOfWarr
2019-03-13 23:51:59 -04:00
Aaron Suen
fd94d67389 Fix awkwardness with leaf digging prediction. 2019-03-10 00:23:54 -05:00
Aaron Suen
332f42bdc7 Rename a thing. 2019-03-07 21:06:53 -05:00
Aaron Suen
611733d7d8 Naming refinements. 2019-03-06 21:52:53 -05:00
Aaron Suen
9fe3f296b9 Tree stumps can finally be ground up by lode axes. 2019-02-24 16:36:53 -05:00
Aaron Suen
726f385e52 Add player natural healing.
- Players heal over time at variable speed, depending on subtle
  environmental factors.
- This frees us up to work on the death mechanic, since it's no
  longer the only way to restore health and prevent an untimely
  death.
2019-02-23 13:14:09 -05:00
Aaron Suen
ef8a756f8e Workaround https://github.com/minetest/minetest/issues/7020 2019-02-03 09:47:42 -05:00
Aaron Suen
0627c22101 More tree nerfs. Too many leaves. 2019-02-01 22:17:06 -05:00
Aaron Suen
8e47b687d0 TOOL CAPABILITIES / LEVELS OVERHAUL
Try to standardize the way we handle tools, materials, digtimes.
- Levels start at 1 and work upwards.
  - Level 1 is for "hand" or "primitive" tools.
  - Levels 2+ are wood, stone, metal, etc.
- Link dig times, tool levels, and durability together.
- Material groups now define standard "base dig times" which
  are the main thing that makes e.g. stone harder to dig than dirt.

The speed of digging almost everything will probably have changed,
in some cases not for the better; much testing will be needed.
2019-01-24 22:08:05 -05:00
Aaron Suen
464a0e1d89 Finite fire rework.
- There are now 6 degrees of embers.  Better fuel sources will
  make better embers.
- Embers differ only in lifespan; each class lasts twice as long
  as the previous.  Top-grade fuels may last 15 minutes or
  longer.
- Embers decay stochastically.
- Embers decay 16x as fast when smothered, but still go through
  the same lifecycle.

Also:
- Plain ash now reposes.

There are no infinite fuel sources, nor are any specifically
planned at this time.
2019-01-17 00:01:00 -05:00
Aaron Suen
62f0db49e0 Fire mod is now basically functional.
"Qualitative" fire now works, spreads, etc.

Rub 2 sticks/staves together to start a fire in nearby flammables.
2019-01-06 13:04:07 -05:00
Aaron Suen
e2dd2de5ba Leaf decay, woodcraft wears tools. 2019-01-05 23:11:38 -05:00
Aaron Suen
82d88b2e42 Make tree logs choppable! 2019-01-04 20:36:46 -05:00
Aaron Suen
90574771c6 Simplify trees, since logs currently cannot be moved.
Presumably this will change in the future, but it's also not
a given that we should have a falling or rotating version of the
tree (or that it should also split to planks).
2018-11-03 19:18:28 -04:00
Aaron Suen
7bd9c4e63a Use adze to split logs into planks. 2018-11-03 18:56:07 -04:00
Aaron Suen
37c8b0865c Separate tech trees in tree mod. 2018-11-03 11:26:15 -04:00
Aaron Suen
24e4f73213 Basic adze tool, able to break trees now.
Much TODO:
- Primitive adze should not harvest trees whole; need to split into
  planks from end only.
- Not entirely satisfied with crafting experience from gameplay nor
  API perspective.
- Need an easier way to register these kinds of recipe checks.
- Need more gameplay actions to commmit a craft, e.g. have to pound
  the tool head into place.
2018-11-02 23:54:43 -04:00
Aaron Suen
20e79f0db1 Add more resources to be harvested from tree canopies. 2018-11-02 22:55:14 -04:00