58 Commits

Author SHA1 Message Date
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
3865c1a795 Some more cleanup stuff. 2019-03-11 23:52:18 -04:00
Aaron Suen
96b5863fc0 Tools melt down to prills; reworking is necessary. 2019-03-08 23:22:14 -05:00
Aaron Suen
b012fd2356 Change item "desperate" placement logic.
Avoid above-grade placement, but randomly allow it, allowing
items that are "stuck" in a pile of leaves to gradually
random-walk their way out into a stable position.
2019-03-06 22:07:18 -05:00
Aaron Suen
7cc662a854 No, simplify: just always allow a bump-up by 1. 2019-03-05 23:18:09 -05:00
Aaron Suen
21137f0465 Allow "bump-up" for stack placement inside walkables.
Observed items falling among stacks and getting ejected out to the
sides instead of stacking above.
2019-03-05 23:11:29 -05:00
Aaron Suen
d1e52fb303 Tote bug fixing.
The major bug was the lode heating/cooling logic wiping out the
tote's inventory when it was sitting in a stack node.

Also setup description text.
2019-02-28 23:47:36 -05:00
Aaron Suen
ce46564f8e Bare stacks coalesce, but items don't fall into top of shelves. 2019-02-27 23:12:19 -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
58cd080fdf Apply big stack refactor. 2019-02-23 10:21:27 -05:00
Aaron Suen
b6650068a1 Trying to find a saner way to handle node stack recipes. 2019-02-23 02:29:16 -05:00
Aaron Suen
ceb95efae1 Fix itemstack repose/falling crash.
With item_eject trying to place stack nodes now instead of ents,
converting stack nodes to ents was causing an infinite loop.
Impart a tiny velocity on ents to make them ineligible for
automatic immediate stack placement.

Hacky.  Should probably have a separate API to indicate ejection
as an ent or as ent/stack or something.
2019-02-21 10:10:36 -05:00
Aaron Suen
d184209521 Fix item settling behavior.
The old code wasn't working in v5.0+, due to the separation of
item entity physical_state into separate moving/sliding states.
Instead, just check to see if its position has remained unchanged
for a nominal amount of time before settling.
2019-02-19 00:34:12 -05:00
Aaron Suen
70d9e7a320 Resolve flammable itemstack regression.
Using a separate ABM for this.  We may want the burn-up effect with
containers later, but it may have to be handled differently in
those cases as the container itself may have flammability
characteristics to take into account.

This SHOULD also resolve the problem with transient states of the
stack node (i.e. wherein it was temporarily empty) burning up,
which caused some things to burn up when they shouldn't.
Particularly egregious was the destruction of hot lode prills when
they dropped into forgefire.
2019-02-10 12:16:00 -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
2b8cc8fba2 Finished refactoring crafting into a separate mod.
Appears to work with existing functionality.

Next step will be to rework pummel to use a "recipe" system and
reuse most of the useful parts of the crafting system.
2019-02-03 12:10:27 -05:00
Aaron Suen
9ef8b8520f Rip out the snooper and consolidate statistics/knowledge yet again.
Nobody was using the snooper; not worth the bother to host it.
Instead, consolidate player statistics tracking for the achievement
system.  We can still use it for statistics collection, but users
would probably have to post world dumps for that.
2019-01-30 21:02:19 -05:00
Aaron Suen
968bbcfe8b Allow adding 1 to a stack.
This should make pack-exact-stack recipes a little easier.
2019-01-29 23:12:07 -05:00
Aaron Suen
2d3b468c65 Knock out a bunch of small low-hanging issues.
- Eggcorn cleanup.  They look a little better falling out of the
  tree, and we don't have so many now.
- Crushing damage fixes.  Crushing is nuanced now, and most things
  don't smush you, and many do reduced damage.  A few may do more.
- Item stack convenience.  Items landing on a stack or right-
  clicked onto one attempt to merge into it.
- Ladders now fall (they don't connect to sides).  Use the new
  full-scale frames for ones that don't.
2019-01-29 20:41:29 -05:00
Aaron Suen
e4dc398b3a Start work on usage survey.
- Refactor player knowledge into player mod, to declutter API.
- Move player knowledge into mod storage so players don't need to
  be connected to access.  Old knowledge will be reset, but I
  doubt there was very much of it to lose.
- Start gathering some basic stats.
  - Main glaring omission is player moving and idle time.
2019-01-26 16:39:07 -05:00
Aaron Suen
bfad55456c Allow single-item loose stacks again.
Thrown single nodes placing themselves and then requiring the
proper tool to dig again was getting too annoying.
2019-01-26 16:14:01 -05:00
Aaron Suen
169f226ba7 Punch item entities to jar them loose if they get "stuck". 2019-01-26 12:50:06 -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
Aaron Suen
d70c20cd3b Item stacking refinements.
Try to place items into existing stacks when searching for a
settling location.

Try to launch items from reasonable corners of a source node in
item_eject so they don't self-collide and end up in one pile.
2019-01-25 01:15:14 -05:00
Aaron Suen
83481827f9 Break loose cobble into stone chips.
- Chip apart loose cobble with a pick.
- Hammer stones back together with a mallet.
- Repacking with mallets now wears tool.
2019-01-25 00:12:29 -05:00
Aaron Suen
375ed437d0 Significantly incrase item settling distance. 2019-01-24 23:34:08 -05:00
Aaron Suen
b6a83b2791 Pummel API overhaul.
- Make check/resolve functions naturally paired instead of having
  to test the "check" value, so we can use the "check" value for
  more specific parameter stuff.
- Make existing pummel logic use a standard tool speed check.
2019-01-24 23:16:12 -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
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
8a316dea75 Lighter, less coal-like particles. 2018-11-03 21:24:25 -04: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