28 Commits

Author SHA1 Message Date
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
9a4dd3684c Don't rely on falling_node for stack nodes.
Falling nodes containing a node that contains an inventory can
cause a crash on trying to serialize.
2019-01-13 20:57:31 -05:00
Aaron Suen
45441071ab Make items on ground have a shadow.
There are 4 different states for things in the world:
- Regular node in world
- Item stack on ground
- Item entity (falling)
- Falling node entity

The entity states are not interactable at all, and regular node
doesn't rotate.  We can help differentiate node-in-air vs
node-stack-on-ground with a shadow visual.

Sometimes a node will get stuck as an entity inside another node's
negative space (e.g. a nodebox) and having a way to tell that it's
not a real one should maybe help.
2019-01-06 18:46:00 -05:00
Aaron Suen
f9abfc5e22 Fire refinements.
- Make some more materials flammable.

- Flammable items in stack form burn up too.

- Some items burn away without converting into fuel.
2019-01-06 14:51:09 -05:00
Aaron Suen
e2dd2de5ba Leaf decay, woodcraft wears tools. 2019-01-05 23:11:38 -05:00
Aaron Suen
6d5432bd6b Prevent pummeling non-single stacks.
Allowing this could let you pound a whole stack of loose sand
into a single node of regular sand.
2019-01-05 21:33:15 -05:00
Aaron Suen
3b0d6b4b57 Fixed various right-click-place issues, stub for new wood tools. 2019-01-04 20:11:04 -05:00
Aaron Suen
93b123ada5 Prevent placing a stack of nothing via right-click. 2019-01-03 23:54:49 -05:00
Aaron Suen
0e73d15ac4 Fix errors, remove debugging hook. 2019-01-03 23:52:05 -05:00
Aaron Suen
a8a0c6f753 Fix missing falling check on placement.
Note that craft check still takes place before falling, so items
can still be placed into a suspended position to complete a craft.
2019-01-03 23:49:19 -05:00
Aaron Suen
45a6c259ce Infrastructure (hack) for placing/crafting with non-node items.
Right-clicking with an item now by default places one as a stack
node.  When placing this way, crafting detection applies.

Had to copy in a bit of code from builtin.
2019-01-03 23:42:53 -05:00
Aaron Suen
0c730c9501 Better tool chipping process: pummel them in itemstack form. 2018-12-30 19:37:59 -05:00
Aaron Suen
aa1da28637 Simplify knowledge, add pummel support, stack breaking particles. 2018-11-03 21:18:39 -04:00
Aaron Suen
7bd9c4e63a Use adze to split logs into planks. 2018-11-03 18:56:07 -04:00
Aaron Suen
f69fd6ce72 Setup crack_anylength, fix a bug in loose repacking. 2018-11-03 12:02:44 -04:00
Aaron Suen
b7e3048fd7 API cleanup, librarify "visible inventory" functionality.
If we later implement solo-stack open containers, then this will
be reusable for that as well.
2018-11-03 08:46:14 -04:00
Aaron Suen
20e79f0db1 Add more resources to be harvested from tree canopies. 2018-11-02 22:55:14 -04:00
Aaron Suen
99ceadf677 More repose tweaks/fixes/improvements. 2018-11-02 22:00:39 -04:00
Aaron Suen
15e71cfd3b Have to use hand to pack earth, code cleanup, fixes, optimization. 2018-11-02 21:20:51 -04:00
Aaron Suen
3a7ac241fc Disable normal punch mechanism; MUST settle into node-space first. 2018-11-02 18:52:02 -04:00
Aaron Suen
7e9fcf296d API-ify some node behavior upon registration. 2018-11-02 18:47:44 -04:00
Aaron Suen
8260805612 Sync stack visual scale with item_entity. 2018-11-02 07:58:19 -04:00
Aaron Suen
b8b4b24982 Start unified API, add angle-of-repose logic.
"Loose" versions of materials will only allow a certain maximum
angle of repose, and will shuffle around sideways and fall if
that angle is exceeded.  Softer materials like sand, leaves, loose
items, will all have shallow angles, while sturdier stuff like
dirt, gravel, etc. may allow steeper ones.
2018-11-02 07:52:23 -04:00
Aaron Suen
28f6a3919b Polish stack visuals. 2018-10-30 20:05:46 -04:00
Aaron Suen
05f8ae46a8 Smooth up item grid stacking further. 2018-10-30 19:54:28 -04:00
Aaron Suen
6b9e083776 Got stack node working more-or-less smoohly. 2018-10-30 11:12:36 -04:00
Aaron Suen
5f72f9131f "Stack" node/entity for items in world on grid.
- Need to search for open space for ents trapped inside a node.
- Look into a smoother way to handle the drops hack for the
  stack node; maybe a central API with ext_drops supporting
  functions?
2018-10-30 10:18:49 -04:00