16 Commits

Author SHA1 Message Date
Aaron Suen
3493e8222b Add new pumice material
- Flowing lava quenches to pumice
- Pumice can spontaneously melt back to flowing
  lava, when touching lava, and sometimes even
  when still quenched.
- Pumice cannot be harvested or moved, it's
  utterly destroyed by digging.
2020-06-06 08:23:29 -04:00
Aaron Suen
85b50092eb Work around stack placement double sounds
Regression introduced when placement
prediction was added for non-node items.
2020-05-31 20:24:41 -04:00
Aaron Suen
b04c4596af Vary sound pitch by dig group level
This should make nodes that have hardness variations
like different kinds of stone have audible differences.
2020-05-30 21:34:50 -04:00
Aaron Suen
35292eb259 Switch to an internal sound API
Avoid mangling official Minetest API
functions that mods may want to
use directly.
2020-04-05 21:22:51 -04:00
Aaron Suen
4a41aae4a8 Default all sounds to ephemeral
NodeCore was already using sounds this way, i.e. assuming
they can't meaningfully be managed (may not be heard by
players just entering the area) so might as well get the
supposed performance benefit.

Added an override to allow sounds to be marked as NOT
ephemeral just in case it's needed.
2020-04-05 21:18:30 -04:00
Aaron Suen
a8e9c7dbda Add a couple more sound registrations. 2020-02-20 07:16:00 -05:00
Aaron Suen
7aeaf31acc Only play node stack sounds for visinv. 2020-02-15 22:18:00 -05:00
Aaron Suen
7bc1a4ddad Standardize node placement sounds.
Add node placement sounds to processes
missing them, like tree growth.
2020-01-16 22:02:59 -05:00
Aaron Suen
f529a92801 Always play both node+stack sounds. 2019-12-24 15:27:10 -05:00
Aaron Suen
07850123d7 Standardize high-resolution gametime.
Use high-res version in a few places we were using integer-res
timer before.  This should e.g. smooth time variation of wind
strength for ambient sounds.
2019-11-10 08:10:34 -05:00
Aaron Suen
3a4bfdb258 One last refactor to ambient sounds.
Make tree sounds managed by the mod that defines the nodes in
question using register_ambient, consistent with other things like
fluids.

nc_envsounds is now responsible for just the air moving and
cave dripping sounds made by air itself.

Common windiness logic moved into api layer.
2019-09-02 11:34:14 -04:00
Aaron Suen
25b2831826 Add cave dripping, rename environment sound mod one more time. 2019-09-02 11:24:03 -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
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