16 Commits

Author SHA1 Message Date
Aaron Suen
034ecef2a9 Reuse envsound fx ents from a pool
This seems to reduce steady-state bandwidth
usage when standing still significantly, at least
according to rudimentary tests.

Try to reuse the entity that is already physically
closest to the target position, so to maximize
the chance that nearby player(s) already have
the entity transferred and only need the new
pos data, in case MT is intelligent enough to send
only the needed changes.
2022-01-22 21:49:11 -05:00
Aaron Suen
1e0b9dbbaa Disallow wind from passing thru solids 2021-12-07 00:35:02 -05:00
Aaron Suen
3ea2ce8827 Much more palpable wind sounds
Instead of statically-positioned wind sounds, many
of which are often outside of hearing range,
attach sounds to moving entities which often tend
to move across the player's position.
2021-12-07 00:11:15 -05:00
Aaron Suen
c10e80ef87 Set name in mod.conf as demanded by 5.5+ 2021-03-01 20:10:27 -05:00
Aaron Suen
0929d007ce Use nodecore.interval where appropriate
Fixes deprecated get_connected_players() at load time issue
2020-06-23 06:43:34 -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
6db8d9fc26 Adjust things to work in twilight.
- Lenses no longer produce light from sun at all;
  artificial light is always needed.
- Grass and trees survive, don't do dual-time check.
- Breeze sounds work in twilight.
- Sponge drying only requires twilight, now also can
  happen under artificial light.
- Peat to grass happens under twilight.
2020-02-22 16:55:42 -05:00
Aaron Suen
c7a322941e Experimental new natural light system.
- No day/night cycle, no sun/moon.
- Get rid of clouds too.
- Skybox is now 100% texture-packable.
- Natural light diminishes with depth.

Night-time no longer disrupts gameplay topside, but
skylights are no longer useful to an infinite depth and
artificial light is necessary for all deep mining.
2020-02-22 10:38:03 -05:00
Aaron Suen
5e97fc3bcb Envsound consistency for multiple players.
Ensure players can't cause a blast of loud
wind or drip sounds to happen within the near
clipping boundaries of other nearby players
just because they're in the same general
area and played their sounds first in the tick.
2020-01-11 08:31:33 -05:00
Aaron Suen
4d47ab2e75 NC API dependency simplification.
Treat all API mods as a "layer", and use the new
nc_api_all registration to indicate that a mod depends
on the NC API (which ALL NC mods assume they do).
This means that each non-API mod does not need to
worry about which API mods it really needs and which
it does not, nor will they need to be updated for any
internal API restructures.

This is a game, not a modpack, so all mods will be
loaded anyway, and we only care about order.  That
means that we don't really need to worry about
having excess dependencies because any mod we
don't actually need will be needed by something that's
loaded anyway.  If somebody wants to reuse a
component elsewhere, they're likely to need to do
some work to untangle it anyway, because of the
amount that NodeCore mechanics interact and
interdepend.
2020-01-05 12:59:12 -05:00
Aaron Suen
dcfc80b367 Remove explicit names in mod.confs. 2020-01-05 12:38:45 -05:00
Aaron Suen
89020e8340 Major rebuild of item_entity.
This created a ton of dependency inversions, which
necessitated moving a number of API functions up into
higher layers, and restructuring dependency lists for
a number of mods.

BOLO: non-deterministic load errors due to missed
dependencies.
2020-01-05 11:42:22 -05:00
Aaron Suen
c147da4dde Convert from depends.txt to mod.conf 2019-10-05 11:24:16 -04:00
Aaron Suen
310ce1bc6c Treat NodeCore as a unified thing.
- Collapse all nodecore "core" mods in the /mods listing, so it's
  easier to find the actual add-on mods.
- Parameterize in-game branding to make renaming derivatives just
  a little easier.
2019-09-07 09:08:57 -04: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