328 Commits

Author SHA1 Message Date
Aaron Suen
7e5f70da9b Move visinv efficiency reforms
- Push early activation externally.
- Fix bug with ents fooling visinv checker into
  thinking pos is handled even when marked
  for removal
- Eliminate a redundant stack_get call
2020-06-21 09:38:54 -04:00
Aaron Suen
500ef347e1 Fully passivize visinvs
Now use an LBM to load ents, and skip the
ABM entirely.  I think we've finally found all
the "leakage" points.
2020-06-21 03:52:09 -04:00
Aaron Suen
9879a23680 Mapgen determinism
This should cause maps that have the same
seeds to have much more similar results
than before, e.g. sponge deposits will be in
the same places determined by seed and not
random each regeneration of the map.

- Mapgen shared now provides an RNG which
  will be deterministic when feasible, for
  repeatable mapgen results.
- Make existing rng-using mapgen hooks use
  the new deterministic RNG.
- Mapgen shared hooks are also run in
  deterministic order too.
- Tidy up mapgen_shared API a little more.
2020-06-20 23:48:29 -04:00
Aaron Suen
70efb016af Add auditing for player stack movement 2020-06-18 07:20:15 -04:00
Aaron Suen
ec822aa034 Optimize leaf decay check with caching 2020-06-17 00:54:21 -04:00
Aaron Suen
79674b7519 Swimming hysterisis, "swim stand" anim 2020-06-16 21:37:56 -04:00
Aaron Suen
338e4784e6 Automatic profiler labels for ents 2020-06-15 07:35:32 -04:00
Aaron Suen
e0156b4742 Add profiler instrumentation metadata everywhere
N.B. the MT built-in profiler doesn't yet actually support reading
labels from bare-function registrations, so a builtin hack is
needed.
2020-06-15 07:21:39 -04:00
Aaron Suen
acfd3d08dd Clean up a few log items, fix levels 2020-06-09 19:05:39 -04:00
Aaron Suen
6c640a11b1 Validate log message levels 2020-06-09 19:02:07 -04:00
Aaron Suen
a998009656 Merge branch 'master' of gitlab.com:yamanq/nodecore into dev 2020-06-09 18:57:34 -04:00
Aaron Suen
c3d0aed881 Tool breakage particles
Makes mining with stone tools less crappy with
sound turned off.
2020-06-07 18:14:32 -04:00
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
f70c34cf8e Refactor amalgam into its own mod
This declutters nc_terrain and paves the way for
more igneous content
2020-06-06 08:00:59 -04:00
Aaron Suen
5343b100c2 Pitch variation never lowers base pitch
Totes were sounding really weird with very deep
pitch before this, since their base level was 3, but
totes were hand-diggable.
2020-06-04 07:27:22 -04:00
Aaron Suen
e7430e47c0 Fix sound pitch order-of-operations bug 2020-06-03 11:35:21 -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
4a784aeb8f Trigger visinv checks more smoothly
- Check item on same tick as creation.
- Stagger rechecks across ticks.
2020-05-31 10:36:11 -04:00
Aaron Suen
62ea6de01d Fix drop_in_place/silktouch item duplication
When digging a node that defines both a drop_in_place
and a drop (e.g. tarstone) silktouch wasn't canceling the
drop as well as the drop_in_place.

When we're using silktouch, assume that both drop and
drop_in_place are meant to be canceled, and move
the drop into a new drop_non_silktouch member, so
the builtin/engine doesn't process the drop.
2020-05-31 09:26:31 -04:00
Aaron Suen
b21b7c2da2 Fix pathological visinv scalabilty
Defer and coalesce visinv entity creation/removal
checks until the next tick, so we can process them more
efficiently in a batch.

The spawn area of the Community MP server was
lagging to something like 6x the dedicated step size,
due to the huge number of dropped items.  This code,
on the same machine, seems to appear the same to the
player, but produces almost no measurable lag.
2020-05-30 22:33:13 -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
Yaman Qalieh
a8147e9875 Add levels to log messages 2020-05-27 14:04:00 -04:00
Aaron Suen
856eadcafc Prevent NodeCore being loaded on top of another game
Apparently some users have had problems installing NodeCore because
they assumed it was a modpack and just copied the mods/* into
~/.minetest/mods and enabled them in an MTG game world.  The result
apparently didn't immediately crash but wasn't really playable
either.

Detect NodeCore being combined with a mod named "default" and
throw an error immediately.  This should catch like 90% of the
games out there.  Some like LoTT or IKEA don't use a default, but
they're also not the ones that players would naively try to run
arbitrary mods on top of.
2020-05-27 07:00:13 -04:00
Aaron Suen
8a04c5163b Make damage touch ignore non-pointables 2020-05-26 20:52:54 -04:00
Aaron Suen
39cf68a575 Speed up objects_at_pos (in theory) 2020-05-25 00:00:40 -04:00
Aaron Suen
fe23c34208 Player buoyancy fixes/refinements
- Nerf effect by 50% to be less disruptive
- Effect can be avoided by not being in a
  swimming position (matching model anim)
- Refactor swimming check into API
- Special checking and handling for linkdead
  players, for whom client knockback
  wouldn't work anyway.
2020-05-22 07:30:12 -04:00
Aaron Suen
9a3c37b02d Update translation sources 2020-04-20 08:38:45 -04:00
Aaron Suen
b9028d0b01 Trim blank lines 2020-04-20 08:17:02 -04:00
Aaron Suen
c69d0a1cff Infodump config, dump texture override template 2020-04-20 08:15:53 -04:00
Aaron Suen
cf7ae16287 More Russian translation updates 2020-04-20 07:30:25 -04:00
Aaron Suen
e9998bddf2 Negate touch damage by using appropriate tool
NodeCore vanilla shouldn't be affected, since things that are
damaging are already not diggable, but for mods, this allows
some nodes to be damaging if punched, but diggable with the right
tool.  Note that they will have to drop something other than
themselves because touch damage will still apply to carrying the
item in inventory (i.e. "hot potato" mechanic).
2020-04-09 07:16:33 -04:00
Aaron Suen
920fba34ee Separate node stand/touch/radiant damage types
Don't reuse damage_per_second for damage on punch and radiant
damage.  This allows these to be defined separately, i.e. no longer
assuming that all damage is from "heat" and can radiate.  This
allows for things like thorny plants that hurt if you touch them
or stand in them but not if you stand near them.

Thanks to WintersKnight94 for reporting this.
2020-04-09 06:56:18 -04:00
Aaron Suen
b1f2828f5c Fix player air friction physics
If a player has sufficient upward velocity, then the gravity
reduction meant to slow downward acceleration instead slows upward
deceleration and the player flies ridiculously high.  Doesn't
happen normally in vanilla, but can happen with mods.

Thanks to Lone_Wolf for reporting this.
2020-04-09 06:39:58 -04:00
Aaron Suen
f240bc54c6 Fix is_full_sun error 2020-04-05 22:35:33 -04:00
Aaron Suen
a036f13851 Block 5.2+ redundant dig/place sounds 2020-04-05 21:36:45 -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
6d86458dd5 Explicitly disable MT5.2+ tool punch wear 2020-04-05 21:09:03 -04:00
Aaron Suen
94129d5067 Hack to let TP authors override inv/wield images 2020-04-05 20:35:51 -04:00
Aaron Suen
683d1b82ca Stylus etching, full cycle curing 2020-04-05 16:07:18 -04:00
Aaron Suen
f37a918f0f Scaling and touch-hurt reforms
- Storeboxes are now scalable.
- Standardize touch-hurt operation.
- Touch-hurt damage on scaling.
- Now possible to alter scaling time via scaling_time
  group (percent of original scaling time)
2020-03-29 07:55:54 -04:00
Aaron Suen
397e9f5072 Translation updates. 2020-03-27 07:11:56 -04:00
Aaron Suen
cfcbb4bdb0 Fix broken bounds calc. 2020-03-22 11:07:20 -04:00
Aaron Suen
d27c9cbc86 Mapgen limit API cleanup. 2020-03-22 10:59:06 -04:00
Aaron Suen
cdb32ebc36 Only detect "full sun" where not diminished. 2020-03-15 09:16:34 -04:00
Aaron Suen
7444a0248b Fix fog color (again) and a crash bug.
Sadly I don't have a way to make fog color texture
pack customizable, so it will have to be hard-coded
for now, and TP artists may want to advise players
to just disable fog if they can, or maybe a CSM could
work...
2020-02-22 19:08:51 -05:00
Aaron Suen
42ec1d7d5a Merge highly experimental perpetual twilight.
This removes the day/night cycle from NodeCore,
which experience seems to suggest may be more of
an annoyance than a useful and interesting gameplay
feature.

Some aspects of gameplay are notably altered, such
as the balance between artificial and natural light,
and the operation of optics (no more solar lenses).

The overall atmosphere of the game is also deeply
changed by this, taking on a timeless, dream-like
quality.  It remains to be seen whether this change is
beneficial or even tolerable.
2020-02-22 17:42:43 -05: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
5b2b334fe4 Bathe the world in twilight, not sunlight. 2020-02-22 16:36:27 -05:00
Aaron Suen
f12cbd2c61 Merge branch 'master' into dev 2020-02-22 11:39:02 -05:00