386 Commits

Author SHA1 Message Date
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
Aaron Suen
1ddc9b52d0 API to dump inventory for mods. 2020-02-22 11:38:49 -05:00
Aaron Suen
5e27f5c175 Stronger depth light diminishing. 2020-02-22 10:41:18 -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
090417daf8 Set-velocity item scattering.
This prevents chopped planks from landing atop the
log below, and all sorts of other recipe annoyances
when items scattered are not necessarily scattered
far enough.
2020-02-22 09:11:24 -05:00
Aaron Suen
756b12b7d4 Better record damage/heal types for stats. 2020-02-20 07:16:19 -05:00
Aaron Suen
a8e9c7dbda Add a couple more sound registrations. 2020-02-20 07:16:00 -05:00
Aaron Suen
3271dba8b2 Limit damage FX replay for fully hurt players. 2020-02-19 22:32:19 -05:00
Aaron Suen
00aa460942 Some damage buffs.
- Player hp_max is 8 now, so most injuries will block
  a whole slot each time.
- Player can be reduced to 1 slot, not 2.  The 2 slots
  was from back in the day when players needed to go
  to the surface to heal faster, to help them get up
  there.  Now the 1 slot is only needed in case the
  player is trapped in fire or something.
- Damage effects now don't stop playing just because
  the player has reached maximum injury, and healing
  is also delayed by continued injury.
2020-02-19 19:48:51 -05:00
Aaron Suen
7aeaf31acc Only play node stack sounds for visinv. 2020-02-15 22:18:00 -05:00
Aaron Suen
06a94e4ffb Fix leech->leach spelling 2020-02-14 21:25:25 -05:00
Aaron Suen
266de04987 API for getting objects inside one node. 2020-02-09 10:11:13 -05:00
Aaron Suen
9deb64526e Offline tree growth tweaks.
- No tick delays during tree growth.
- Tree growth near unloaded areas will be delayed
  until the areas are loaded.
2020-02-08 14:23:45 -05:00
Aaron Suen
55eec8e011 Don't pre-scatter ejected items.
Supposedly some stacks are clipping through the nodes
surrounding them when ejected; this is theoretically
possible if the stacks are full enough, based on the
X/Z offsets and the collisionbox sizes.

Always start items near the center of the ejecting node
position, to minimize (in theory, eliminate) this risk.
2020-01-29 18:24:04 -05:00
Aaron Suen
38595cf79a Update translation source. 2020-01-21 21:46:06 -05:00
Aaron Suen
2d73df30e7 New API to check if air passes thru node.
Can be used for things like sponge air exposure
or environmental exposure checks.
2020-01-18 09:57:39 -05:00
Aaron Suen
2c47a151cc Started new mechanic for molten rock transport.
Quench lava to amalgam and it can be moved
around like loose cobble.  The tricky bit is that it
needs to STAY quenched at ALL TIMES, and is
not (currently) stackable, so water channels need
to be setup to transport it, and limited amounts
can be moved at a time.

It's also an igniter and thus will dry out sponges
left to keep it cool.
2020-01-16 23:09:55 -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
c5a4f42359 Fix (C) year in translations. 2020-01-12 11:28:02 -05:00
Aaron Suen
e096958d24 Translaton update. 2020-01-12 11:21:02 -05:00
Aaron Suen
361f69065d Make mapgen disable logic a bit more dynamic.
Mods may change singlenode mapgen to generate stone,
in which case we want them to be able to also reenable
the standard mapgen_shared hooks.

- If def.enabled == true, always run the hook.
- If def.enabled == false, never run it.
- If def.enabled is not set (nil) then run it based on
  standard logic, i.e. not on singlenode.
2020-01-12 11:01:30 -05:00
Aaron Suen
19de5dfd1e mapgen_shared improvements.
- Register def tables instead of bare funcs.
- Add labels for mod logic use.
- Automatically skip for singlenode mapgens,
  e.g. for the skyblock modpack.
2020-01-12 10:30:02 -05:00
Aaron Suen
25be3b07a8 Small pos key calc optimization. 2020-01-10 21:11:52 -05:00
Aaron Suen
d0e6dcc410 Add "stasis" option and command.
This freezes many things that normally happen automatically
in the world, including most ABMs and AISMs, and a few other
custom step logic items like the player "hot potato" logic.

This can be used for "creative mode" purposes to setup a complex
build without it running itself away from you, and for texture
pack authors, to have time to see things that are normally
transient or difficult to observe because of the effects they have
on nearby things or players.
2020-01-10 06:26:07 -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
047f420cdf Make a note of an architectural issue. 2020-01-05 10:18:03 -05:00
Aaron Suen
b1fab67491 Start work on unifying/simplifying builtins.
falling_node rebuilt from scratch so far.
2020-01-04 10:51:10 -05:00
Aaron Suen
511455fff9 Player/ent freefall physics cleanup.
- Thrown objects inherit initial velocity.
- Player and objects have matched terminal
  velocity and can free-fall in tandem.
- Thrown objects experience horizontal air
  friction too.
2020-01-02 23:03:23 -05:00
Aaron Suen
0d3f26b861 Fix particles for non-16x textures.
Resize base texture down to 16x first, so mask works
as expected.  Some textures may be blurred, but
we're more concerned with getting the overal color
right more than showing actual patterns.
2019-12-30 14:16:14 -05:00
Aaron Suen
c7a90debcb Fix scaling and charcoal writing.
Making hand dig everything broke logic that was
depending on things being "not hand diggable".
Continue to treat things as not-hand-diggable if they
would take a long enough time to dig.
2019-12-29 13:57:49 -05:00
Aaron Suen
8add276587 Make falling things bounce off players.
If the falling item/node causes enough damage to
trigger a "hurt" effect, then it loses much of its energy
and bounces upward off the player.

This will also reduce the "scraping" effect when nodes
fall through a player.  Hopefully the damage from
falling things is a little more consistent now.
2019-12-29 12:12:08 -05:00
Aaron Suen
df19716624 Make everything diggable by hand.
This should keep players from being able to trap
themselves permanently by burying or sealing
themselves inside a room with no tools, in theory.

Adjust silk touch logic to prevent presence of dig times
by hand from tripping it.

This may affect game balance of things like not being
able to punch trees in the early game, but since dig
times by hand are so very long, hopefully the effect
will be small.

Item drops are left as-is for now; it just takes a LOT
of patience to dig something without the right tool.
2019-12-29 11:51:25 -05:00
Aaron Suen
7132121ec4 Translation sync. 2019-12-27 11:37:26 -05:00
Aaron Suen
585672c81b Dirt/humus leaching via soaking.
- Add humus->dirt leeching recipe.
- Use soaking API, track dirt leeching progress across
  offline time.
2019-12-27 10:09:00 -05:00
Aaron Suen
70b34b1def Liquids apply repacking pressure too. 2019-12-27 10:01:47 -05:00
Aaron Suen
8801e30e7d Fix AISM soaking failing to reset.
This was causing Lux tool infusion not to reset when
tools are removed from lux, i.e. putting a tool back
into the lux flow will "credit" the tool with infusion time
for the time since it was removed.
2019-12-25 16:05:47 -05:00
Aaron Suen
f529a92801 Always play both node+stack sounds. 2019-12-24 15:27:10 -05:00
Aaron Suen
e93416e67a Fix quote escaping in translations. 2019-12-19 07:08:08 -05:00
Aaron Suen
401b1acd02 One more .ru translation fix from Kimapr. 2019-12-18 23:08:44 -05:00
Aaron Suen
792a00073b Translation updates, fix parsing script.
The weblate txt files sometimes seem to weirdly
have the msgstr value as a separate string on the
next line instead of inline; handle those too.
2019-12-18 22:52:34 -05:00
Aaron Suen
b66c636aa7 Doors can't push nodes into players directly. 2019-12-18 19:52:07 -05:00
Aaron Suen
1492f1c527 Russian translation provided by Kimapr. 2019-12-18 19:33:18 -05:00