161 Commits

Author SHA1 Message Date
Aaron Suen
28108e1e40 Add translation support, esp. for TouchTips.
Translations are currently by holistic strings, i.e.
no parameterization.  This may create some busy
work for translators, but gives them more freedom
to account for differences between languages.

A translation template file is written out to the world
path on game start, so translators have a seed to
work from.
2019-08-23 20:40:33 -04:00
Aaron Suen
8c2181b250 Make node sounds on spinning too. 2019-08-14 21:46:55 -04:00
Aaron Suen
5651e94100 Slightly randomize sound pitch by default.
This will make stacked/repeated sounds play slightly differently
so you can hear from the interference patterns that there is more
going on underneath the surface.  It also adds volume to dispersed
ambient effects like fire.
2019-08-14 18:28:24 -04:00
Aaron Suen
86cc55c12b Basic door node setup and recipes.
- Craft door panels by chiseling with a rod.
- Rotate door panels.
- Hammer in rod to act as hinge pin.
- Dig out hinge pin, dig up panel.
2019-08-13 21:06:13 -04:00
Aaron Suen
22e11bf471 Revert "Remove (expensive) issue8738 workaround."
This reverts commit 68c6f6671121b1b72b62db97858c25c82f6e834f.

I was able to reproduce the issue, in a case when it was definitely
NOT a falling_node mishap.  Snuffing fire by placing a node against
the last bare face of embers apparently creates a race condition,
in which the node you place can be removed instead of only fire
being removed.
2019-04-13 00:11:03 -04:00
Aaron Suen
db5cbd3de4 Avoid lighting bugs, players messing w/ inventory via CSM. 2019-04-09 21:06:55 -04:00
Aaron Suen
3a8908e9d8 Sound code crash. 2019-04-07 17:45:26 -04:00
Aaron Suen
54293a24be Oops... 2019-04-07 00:03:06 -04:00
Aaron Suen
c1828219e6 Refactor social sounds subsystem.
Standardize the "play a sound for everybody except the player who
is already playing it client-locally" logic into one place.

Fix failure to correctly detect tool speeds for some things, i.e.
when the player is using a tool but the capability used on a node
is actually inherited from the hand.

Note that this may allow pummeling with wrong tools (e.g. repacking
soils with spades) along with accompanying inappropriate tool wear,
but this should be minor and avoidable, and can be fixed later...
2019-04-06 23:51:05 -04:00
Aaron Suen
eba101c93a Fix sound doubling issues. 2019-04-06 23:42:23 -04:00
Aaron Suen
617aa4704f Dug sounds for old node, not new. 2019-04-06 21:28:11 -04:00
Aaron Suen
68c6f66711 Remove (expensive) issue8738 workaround.
I suspect that the problem that I actually observed was caused by
falling_node behavior, and NOT by an abm.  This workaround cannot
remain without firm evidence that it solves an actual problem.
2019-04-06 20:50:58 -04:00
Aaron Suen
80d3d9708c Deprecate player:get/set_attribute to player:get_meta(). 2019-04-06 20:46:13 -04:00
Aaron Suen
a674184df0 Fix deprecated getpos -> get_pos. 2019-04-06 20:34:13 -04:00
Aaron Suen
fe727d0145 Social digging/placing sounds.
Normally these play only locally for the client doing the
digging/placing.  Explicitly play them to other nearby clients.
2019-04-06 20:14:04 -04:00
Aaron Suen
68d996e1f3 Begin EOS for MT 0.4.
We actually haven't been testing in 0.4 at all for quite a while
now.  Since this is a standalone base game without complex
interdependency relationships, there isn't really any need to
maintain compat with old versions of the engine.  Players can
upgrade to play; keeping a separate copy just to play on old 0.4
servers is even still an option.

There is some internal cruft that has been building up to support
0.4, and this allows us to purge most of it.  The larger benefit
may come when we're able to remove line_of_sight in favor of the
more efficient raycast (still yet to be done).
2019-04-06 11:21:34 -04:00
Aaron Suen
507f5ae98e Sounds for tools wearing out and breaking. 2019-04-01 00:39:30 -04:00
Aaron Suen
ab5f6bcdbb Attempt to work around engine bug 8378.
Hopefully calling minetest.get_node_or_nil() again for all ABM's
will bypass the broken node cache.  We should see warning messages
in the logs if this is the case.
2019-03-31 23:55:05 -04:00
Aaron Suen
cd5dbc8268 Make collision boxes just a LITTLE bigger for realism. 2019-03-31 21:32:11 -04:00
Aaron Suen
2fe4875e6b Shrink now annoyingly-big collision box.
This is interfering with being able to toss items down chutes
that are purposefully made too small for players to fit.
2019-03-31 21:30:10 -04:00
Aaron Suen
ef1eb45ea5 And, of course, with the debug code I forgot to remove... 2019-03-30 23:05:07 -04:00
Aaron Suen
359c625df8 Larger, bolder, easier to see item and stack ents.
This restores an old visual scale from the extremely early days
of NodeCore.  That style was removed to syncrhonize the scale of
stack nodes with item ents.  The syncrhonization can work the
other way, too, though.

This was triggered by wanting to make loose item ents more
visually distinct at a glance from settled stack nodes, by making
loose item ent rotation faster.  Since we were going to change the
properties either way, given that, then we might as well use the
better visual.

Since making stack nodes have a full-size collision hull, it was
distracting having the items inside be so mismatched in scale.
Also, the "pointing around stacks" thing becomes less important
in long-run gameplay with shelves in play, which do not allow
pointing around/through anyway.
2019-03-30 22:07:23 -04:00
Aaron Suen
85f87d1c17 Simplify some selectionboxes significantly. 2019-03-30 21:23:02 -04:00
Aaron Suen
dca1e58a85 Yet more inventory/pickup changes.
- Intercept /give commands.
- Provide an API for giving the player an item and inserting it
  into the inventory in the right place(s).
- Change the fill order.  We try to fill the current slot first,
  the continue to the right to the end of the bar, and then
  finally work our way left to the beginning.  I think this fill
  order should be most comfortable, in terms of having items tend
  to fall close to the cursor.
2019-03-28 22:52:48 -04:00
Aaron Suen
47b4ae9bc6 Promote inventory pickup changes to a first-class feature mod.
Use interception where possible to modify destintion for items
directly instead of relying on post-hoc inventory rearrangement.

This should resolve the glitches where items appear in the wrong
place in inventory for a flash before being moved.
2019-03-27 22:10:45 -04:00
Aaron Suen
e8c698d571 Removed logtrace (moved to szutilpack). 2019-03-27 06:37:10 -04:00
Aaron Suen
9f53c5b43d Fix crash on punching lava.
minetest.[de]serialize apparently does attempt to serialize
functions (e.g. the on_punch) hook now, but all upvalues become
nil in the process.
2019-03-24 22:32:36 -04:00
Aaron Suen
45160f7270 Oops, fix regression in stack dig node sounds. 2019-03-24 18:42:32 -04:00
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