33 Commits

Author SHA1 Message Date
Aaron Suen
92be21a5dc Allow tree trunks to grow through other trees' leaves. 2019-09-08 12:56:51 -04:00
Aaron Suen
07d381624e Tree growth noises.
If trees are gonna suddenly blast out of the ground, then they
should make a sound worthy of that.
2019-09-05 23:01:06 -04:00
Aaron Suen
cbf035e0d5 Finished Soaking API, converted trees and infusion to it. 2019-09-05 22:48:30 -04:00
Aaron Suen
ce80cf7a19 Make sure we don't accept t = 0 as a valid start time. 2019-08-31 10:32:07 -04:00
Aaron Suen
859b70fab5 Track tree-growth while player is distant.
As long as the game clock is running, even if the area is not
loaded and processing ABMs, tree growth will "catch up" when the
area gets loaded.

I was hoping to build a time-integrated "soaking API" to deal with
this and short-circuit the box-mueller calculation to do model the
soak as time-continuous in O(1) time, but this is good enough to
get the expected behavior for now.

If I add more long-term time-integrated stochastic processes (i.e.
not just cooking recipes) then I can do the refac at that time.
2019-08-31 10:27:29 -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
fe00eb65c0 Wet sponges contribute to tree growth too. 2019-08-23 20:51:19 -04:00
Aaron Suen
37dbcb3474 Make planted eggcorns look like regular dirt.
You now need to use the particle visual cue to
differentiate them.
2019-08-23 20:38:31 -04:00
Aaron Suen
5a115bdaa8 Particle effects for growing trees.
Intensity of particle effect indicates rate of growth.
This should help players get feedback that their trees are,
indeed, actually incubating.
2019-04-06 21:02:58 -04:00
Aaron Suen
59a16d44f2 Eggcorns deserve their own sounds... 2019-03-25 00:15:05 -04:00
Aaron Suen
a3d1487890 Shrink eggcorns down 25% (again). 2019-03-23 20:05:56 -04:00
Aaron Suen
367013941c Resimplify eggcorn planting.
- Allow applying dirt to eggcorns w/o sneak again.
- Allow dirting any face; basically just do the custom check
  directly.
- Back out the "shove eggcorns into placed dirt" recipe.
2019-03-23 16:56:02 -04:00
Aaron Suen
a8dbfb221f EggCorn Overhaul!
- Place EggCorns as items, not as nodes.
- Tweak visual scales, thicken them up a bit.
- Allow planting eggcorns into dirt, as well as throwing dirt
  over eggcorns, to make planting easier.
2019-03-23 13:01:31 -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
611733d7d8 Naming refinements. 2019-03-06 21:52:53 -05:00
Aaron Suen
2231d1dffe Add wield description HUD.
Swap it out with the breath bar, since the breath bar won't be
displaying most of the time, so we can afford to not read what an
item is until we come up for air to look at it.

Also, "eggcorn" is a single word.
2019-03-04 00:52:21 -05:00
Aaron Suen
63d587cf8b Missed files in prev commit. 2019-02-21 14:59:41 -05:00
Aaron Suen
1ba1d13fcc Craft eggcorn dirt instead of abming it. 2019-02-04 20:21:33 -05:00
Aaron Suen
a8009f4c0c Make eggcorns "attached" instead of "falling".
Functionally, When they land, they'll land as an item stack instead
of placing as a node.  Visually, they won't look huge as they fall
anymore.
2019-02-03 13:22:43 -05:00
Aaron Suen
08a27aaae2 Downscale eggcorn inventory/falling image. 2019-02-03 13:20:19 -05:00
Aaron Suen
0627c22101 More tree nerfs. Too many leaves. 2019-02-01 22:17:06 -05:00
Aaron Suen
03fd234f44 MORE tree nerfing. 2019-02-01 21:39:46 -05:00
Aaron Suen
7de5a4d7e3 Nerf tree growth rates.
- Trees now take a long time to develop after planting.
- Environmental factors are important.  Growth is aide by access
  to dirt for roots, and extra moisture from nearby water sources.
2019-02-01 18:34:03 -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
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
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
7d29907ab2 Some API refactors.
- Clean up utils into multiple files.

- Standardize limited ABM.

- Standardize debug trace handling.  Instead of using chat_send_all
  to debug, and then having to remember to remove before release,
  allow privileged players to receive all server debug messages.
2019-01-06 12:02:37 -05:00
Aaron Suen
674f169090 Various touch-up. 2018-11-05 00:21:02 -05:00
Aaron Suen
7bd9c4e63a Use adze to split logs into planks. 2018-11-03 18:56:07 -04:00
Aaron Suen
146d50bcb1 Very basic tree growth from EggCorns.
Right now, the growth timing is purely stochastic, and does not
factor in environment, light, space, or cumulative time.
2018-11-03 12:55:26 -04:00
Aaron Suen
37c8b0865c Separate tech trees in tree mod. 2018-11-03 11:26:15 -04:00