133 Commits

Author SHA1 Message Date
Aaron Suen
7c19e0aa07 Remove the old sneak-dig hack.
It was superseded effectively by the new inventory management
system.  To split stacks, count out the items to transfer onto the
ground using sneak-drop, select the destination slot and pick them
back up.
2019-03-24 18:34:17 -04:00
Aaron Suen
8a8533a8fc Convert lode to new cooking recipe system. 2019-03-22 22:55:30 -04:00
Aaron Suen
da54ec1815 Start to unify cooking/cooling into recipe system. 2019-03-22 21:55:02 -04:00
Aaron Suen
27770dfdb7 Try to fix stack node sounds.
Use same node_sound hook as punch hook, to limit sound rate.
2019-03-16 17:10:20 -04:00
Aaron Suen
38833a90a7 Limit punch sound interval. 2019-03-14 22:04:44 -04:00
Aaron Suen
2f3d2afff5 Sounds on tapping/pummeling nodes. 2019-03-14 21:48:29 -04:00
Aaron Suen
66e8352889 Fluid and ambient sounds. 2019-03-14 21:35:33 -04:00
Aaron Suen
293dd8c1fc Revert falling pileup tweaks due to issues with fluids. 2019-03-14 01:21:19 -04:00
Aaron Suen
5de0cc54ec Add stony sounds, and sounds for stacks/shelves. 2019-03-14 00:31:09 -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
bd0f201469 Allow excess items in recipe stacks (by default), eject excess.
This makes it a little easier to discover recipes, since you now
generally don't have to get the exact count right anymore; just
make sure you at least have enough.
2019-03-12 21:52:00 -04:00
Aaron Suen
4d0f0734ba Beginning of a bold new health system.
- Eliminate health and breath stat bars.
- Players NO LONGER DIE FROM INJURY.
- Players no longer lose walking speed or mobility.
- Players lose inventory slots in proportion to injury; they're
  stuffed with an "injury" item, and items they displace are
  ejected.  Slots are displaced in random order.
- Healing rate is much faster, so players are usually mildly
  inconvenienced by injury, but can soon enough pick up their
  stuff and leave.
- Health and breath HUDs are gone.  Health is visible based on
  number of lost slots, and breath uses a vignette to narrow
  tunnel vision for O2 loss.

Overall, the old health system has been more of an immersion-
breaking annoyance than anything.  This allows health to get out
of the way of the primary gameplay.

UNFINISHED: Need a replacement for the old "suicide to get unstuck"
mechanic.
2019-03-10 15:47:22 -04:00
Aaron Suen
1382af2fac Revert "Work around particle emission issues."
This reverts commit 78f1b2971abd5c221aea272d14a052d5fe65df00.

Turns out I was testing on an outdated client.
2019-03-10 03:48:44 -04:00
Aaron Suen
78f1b2971a Work around particle emission issues.
Seems like minetest doesn't behave very well on trying to spawn
more than 1 particlespawner during a single tick.

Work around this so smoke comes out correctly...
2019-03-10 03:32:59 -04:00
Aaron Suen
65d9400115 Add protection against the minetest:get_meta() class of bug. 2019-03-10 01:32:36 -05:00
Aaron Suen
50869403e0 Unified soaking/cooking API, smoke particles for cooling too. 2019-03-10 01:00:57 -05:00
Aaron Suen
1f932edab4 Add smoke particles to cooking recipes as they stand now.
Like pummeling, this should give feedback when players are doing
something right.
2019-03-10 00:24:16 -05:00
Aaron Suen
811186f835 Turn tools based on wear instead of count. 2019-03-09 21:24:17 -05:00
Aaron Suen
efa9007793 Change how visinv items handle rotation.
Rotation is now fixed, non-moving, and deterministic.  This fits
in better with the rest of the visuals in the game being
stationary when in steady-state, i.e. only things actually changing
are actually moving.

Instead of rotation speed indicating a full stack, rotation angle
now does; non-full stacks will always be off significantly from
orthogonal, while full ones will be perfectly square.
2019-03-08 19:11:05 -05:00
Aaron Suen
19bfab1c1f Glass now cools/quenches.
Almost done with this new feature; just need to craft lenses and
prisms from chroma glass...
2019-03-07 22:21:04 -05:00
Aaron Suen
0f21dcd29c Merge branch 'dev' into optics 2019-03-07 10:08:46 -05:00
Aaron Suen
cbb7f823c3 Fix node dig prediction, allow limited zoom. 2019-03-07 10:08:22 -05:00
Aaron Suen
0652636e47 Remove redundant rotations, simplifying node spinning. 2019-03-07 10:04:32 -05:00
Aaron Suen
cb78b5a334 Got immediate triggering working. 2019-03-07 01:40:26 -05:00
Aaron Suen
94082bc86a Prism and full logic basically working.
There seems to be an issue triggering events, so a lot of work
is being done by the abm to cover over this problem...

Much like my earlier work with sz_rotary, I suspect a lot of
fine-tuning will be needed.
2019-03-07 00:58:37 -05:00
Aaron Suen
e68693c062 Optic API works, lens basically works. 2019-03-07 00:35:27 -05:00
Aaron Suen
8c2bc87748 Merge branch 'master' into optics 2019-03-06 23:13:14 -05:00
Aaron Suen
8e1c845611 Fix unknown item support. 2019-03-06 11:16:43 -05:00
Aaron Suen
76b74ae465 Merge branch 'master' into optics 2019-03-05 23:18:38 -05:00
Aaron Suen
3bb18e195e A little refactoring... 2019-03-05 23:05:56 -05:00
Aaron Suen
47fc0a958c Fix. 2019-03-05 20:57:51 -05:00
Aaron Suen
81aac617a4 Fix item duplication bug. 2019-03-05 20:55:22 -05:00
Aaron Suen
3b08a8ee9a Documentation updates, new player guide interface.
Also restructured the player_inv/player_setup thing AGAIN.
Now setup is all rules and inv is all interface.
2019-03-05 19:20:38 -05:00
Aaron Suen
3a299e712f Some minor API cleanup (celebrating 5.0 release). 2019-03-04 19:33:55 -05:00
Aaron Suen
a6b454b1a3 Fix items being deleted on sneak-dig.
Cannot change the wielded item because this is overwritten between
getting and handling node drops, so we can only sneak items into
the other slots.
2019-03-03 16:46:30 -05:00
Aaron Suen
3ef32c0206 Sneak-digging an item stack prefers keeping the stack separate.
This is allows you to split a stack by throwing individual items
with sneak-drop, letting them settle into a single stack, and
then sneak-digging the stack to keep it separate in your inventory.

This makes it possible to split stacks into arbitrary quantities
without having to use the inventory GUI.
2019-03-03 16:22:02 -05:00
Aaron Suen
3bef72b665 Unify detecting old version of MT. 2019-03-03 12:08:47 -05:00
Aaron Suen
ab2132a035 Fix shelf not accepting ANY items. 2019-03-02 22:53:28 -05:00
Aaron Suen
5a83a15b48 Definitively block placing shelves/totes inside shelves. 2019-03-02 21:41:25 -05:00
Aaron Suen
0635ccd5ac Fix bad global. 2019-03-02 19:35:36 -05:00
Aaron Suen
08a6a484d1 Make facial recognition distance linear with light level. 2019-03-02 19:33:34 -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
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
fb75424335 Encumbered injured players walk slower.
Encumbrance is calculated from inventory slots filled (ignoring
count within stacks), compared to health; players can freely carry
the same proportion of slots as their health.

Players who are encumbered lose up to 80% of their walking speed
(i.e. for a full hotbar and no health).

This is another disadvantage for being injured, and an incentive
for players to take care of their health.
2019-02-24 13:54:58 -05:00
Aaron Suen
6e0d5a0778 Strata overhaul
- Apply stratification last in shared mapgens, so it can see all
  already-placed ores.
- Support stratification for nodes other than plain stone.
- Register lode stone and lode ore for stratification.
2019-02-24 10:19:22 -05:00
Aaron Suen
44b6a1d228 Shared mapgen API, add hard stone strata. 2019-02-23 22:48:39 -05:00
Aaron Suen
2091c6621e Nudge stack ents up to prevent z-fighting w/ bottom of shelves. 2019-02-23 21:30:35 -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
480b999705 Make shelves easier to build.
- Double recipe yield
- Bash planks directly to sticks with mallet

- Remove debug code.
2019-02-23 10:39:38 -05:00
Aaron Suen
58cd080fdf Apply big stack refactor. 2019-02-23 10:21:27 -05:00