374 Commits

Author SHA1 Message Date
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
Aaron Suen
c0570db089 Fix lode yield probability distribution.
Also refactored exponential random transform function
into core API.
2019-12-16 09:20:00 -05:00
Aaron Suen
fa24151782 Fix the jumping eggcorn bug. 2019-12-15 08:43:33 -05:00
Aaron Suen
d7819762e5 Full proper support for spectator mods.
If players are invisible, NodeCore will not add any visible or
audible effects for them, allowing such players to be completely
non-interactive with gameplay.

This allows things like spectator or stealth-admin mods to
function properly.
2019-12-11 06:52:09 -05:00
Aaron Suen
ddfbd8e863 Another z-fighting regression... 2019-12-09 20:50:57 -05:00
Aaron Suen
10022fb761 Bump default stack max to an even 100. 2019-12-09 07:51:53 -05:00
Aaron Suen
b59482358b Prevent absurd stack ent sizes. 2019-12-09 07:51:08 -05:00
Aaron Suen
dc8c483e01 Standardize virtual items, prevent them dropping. 2019-12-09 04:46:33 -05:00
Aaron Suen
7050568938 Dammit dammit z-fighting hacks.
- Unbake the scaling tweak from models, apply it
  using mesh scaling in MT instead.
- Standardize ratio definition in one place.
- Default all nodeboxes to winning z-fights.
2019-12-08 23:14:56 -05:00
Aaron Suen
c29c2ed9d0 Fix one more nodebox regression. 2019-12-08 18:43:36 -05:00
Aaron Suen
3d11536b81 Fix ugly frames/ladders/staves/rods.
Automatic z-fighting prevention was causing some
nodes to fail to connect to neighbors due to the tiny
gaps.  Allow certain nodes to "win" the z-fight instead
so they also connect to neighbors properly.
2019-12-08 17:19:47 -05:00
Aaron Suen
ce58f8294c Refactor shelf API/assets into its own module. 2019-12-08 16:41:59 -05:00
Aaron Suen
a53030cdcf Use a mesh instead of nodebox for shelves.
In principle this should be equivalent to 2 cuboids
instead of 6.  In practice, FPS improvements are
hard to measure.
2019-12-08 16:13:44 -05:00