3275 Commits

Author SHA1 Message Date
Aaron Suen
e59b057783 Prevent unsuspend noise on loose leaves 2023-11-19 11:06:17 -05:00
Aaron Suen
7313aaab43 Force stuck item settling
If a "moving" item is not moving by at least 25cm per
second, then assume it's "stuck" and allow it to build
up "potential" for tunneling, up to a sane limit (to
prevent it from getting so large that it's likely to cover
mostly unloaded mapblocks, which would actually
reduce the probability of settling).

This should get rid of any remaining "deadlocked"
item entities that can happen in the normal course of
gameplay.
2023-11-19 10:30:02 -05:00
Aaron Suen
0a7a7199fb Stop asking for artwork help
It's apparent that the barrier of needing to be able to maintain
a consistent art style myself without depending on external artists
is a significant barrier to being able to accept all but the most
isolated artwork changes.  I really only NEED occasional help with
specific things, like maintaining the player character model and
animations, and in other cases it's probably better for people to
just make texturepacks for NodeCore and distribute them themselves.
2023-11-17 19:04:23 -05:00
Aaron Suen
746b934f83 Retire a bug that will be fixed in upcoming release 2023-11-17 19:03:44 -05:00
Aaron Suen
7207d953bb Upgrade a hopeless issue to hopeful again 2023-11-17 18:59:09 -05:00
Aaron Suen
1b0de71658 Prevent unsuspend noise on loose leaves 2023-11-16 18:12:59 -05:00
Aaron Suen
143c10a468 Fix missing api-managed annotations 2023-11-16 18:06:58 -05:00
Aaron Suen
0a430450f0 Add groups for etched concrete patterns 2023-11-16 18:04:40 -05:00
Aaron Suen
1d7889d14d 4dir pliant concrete can be rotated by hand 2023-11-14 20:59:40 -05:00
Aaron Suen
5ece643b48 Translation update 2023-11-08 23:17:40 -05:00
Aaron Suen
70a10826d2 Simplify progressive zoom controls
Just hold the zoom button for a couple of seconds
(gives the player a chance to take screenshots with
the fixed zoom level) and then progressive zoom will
kick in automatically as long as zoom and no other
input control is held down.

This also prevents problems with the sneak/aux
causing unwanted movement while zooming.
2023-11-05 12:40:32 -05:00
Aaron Suen
f79f869dc2 Document falling node mapfix issue. 2023-11-04 21:53:46 -04:00
Aaron Suen
aec3872243 More intelligent unsuspend queueing
If the below node is unloaded, kick the pos back
into the queue for reprocessing.

Do shuffled batches instead of just walking the
pend table in order, so that jobs stuck in the queue
due to unloads won't starve other positions for
checks.
2023-11-04 21:42:45 -04:00
Aaron Suen
ca1d06b8c2 Log node unuspends, don't unsuspend over ignore
Checking stuff at the bottom of the loaded map
causes apparently a lot of delay.

We probably should actually defer these for recheck
at some point...
2023-11-04 21:13:28 -04:00
Aaron Suen
ef176f883b Note about floating tree problem 2023-11-04 00:18:32 -04:00
Aaron Suen
babd919b85 Translation updates 2023-11-03 23:17:42 -04:00
Aaron Suen
d401348aa9 Clear cave-in rework from todo list 2023-11-03 23:11:00 -04:00
Aaron Suen
10379121fa Fix gravel sitting on bottom of mapchunks
In the special case of gravel that's at the bottom
of a mapchunk, we have no way to tell if it's held
up from below, so for safety, we don't want to
leave it potentially floating, but we also don't want
to carve out air voids underground just because
a gravel deposit sits at the bottom of a chunk, so
replace the bottom gravel with stone, so that the
column will be supported.  Underground, a little
extra stone that just so happens to hold up all
gravel that sits at certain y levels every 80m will
probably not seem remarkable (I was unable to
find obvious examples of this effect while testing
for far longer than it took to notice the air voids).
2023-11-03 23:09:40 -04:00
Aaron Suen
61d8b3af09 Remove gravelfalls instead of suspending
Adding cobble/sandstone just arbitrarily holding
up gravelfalls looks awkward.  Instead, just clear
them out, like they fell long ago when the stone
weakened into gravel but were scattered long ago.
2023-11-03 22:59:55 -04:00
Aaron Suen
94ffa39d2a Remove falling bricks from dungeon ceilings
Just leave holes behind for now, but also tweak the
probabilities so that there are a few more bonded
bricks up there.
2023-11-03 22:46:51 -04:00
Aaron Suen
869ba856dc Shore up cave formations by default
Instead of wasting compute cycles running falling
node physics on freshly generated terrain where
the player would only see the aftermath anyway,
just shore them up with non-falling alternatives.
2023-11-03 22:43:38 -04:00
Aaron Suen
0e69cd301e Rework falling node auto-correction
Nodes are checked for falling automatically upon
mapblocks being loaded, and also every now and
then in the background.  In most cases this should
mean that nodes that should fall will fall as soon as
they are loaded, or pretty shortly therafter, and in
rare cases where something is missed, they should
"catch up" eventually.

Processing falling stuff is surprisingly expensive,
especially when loading an ocean floor where nearly
every node is a sand node, so a lot of complex
optimizations and limits were put in place to prevent
this from lagging the game.  Pre-checks are done to
avoid calling MT's builtin falling check code, which
is surprisingly inefficient (even by MT standards) and
limits prevent it from either taking too much time
itself or spawning falling_node entities beyond a
safe limit.
2023-11-03 22:15:34 -04:00
Aaron Suen
38f852e93d Remove spontaneous cave-ins from vibrations
This basically gets rid of the "jumpscare" factor, and
leaves suspended nodes in place until they are
disturbed directly by players.
2023-11-03 20:08:53 -04:00
Aaron Suen
aba2ea5eb9 Plan to rework the falling node / cave-in mechanic
Spontaneous node falling was intended to serve two
purposes originally:

- Prevent falling nodes from remaining nonsensically
  suspended indefinitely from bad mapgen.
- Add a bit of tension to the game, back when it was
  envisioned as more "hardcore" in more traditional
  a sense.

The feature no longer fits with the tone and themes
of the game today.  Sudden cave-ins caused by the
"sound/vibrations" of players disturbing an area are
largely indifferent to most players, confusing to
some, and very much hated by a few.
2023-11-03 20:07:53 -04:00
Aaron Suen
5b0b48fb76 Make the special "nothing" item not opaque 2023-11-02 02:09:29 -04:00
Aaron Suen
e78eaeb24f Centralized API to keep track of player idle time
Any input control, including chat messages, resets
the idle time.  This can be used to support
mechanics that take effect based on player idle.
2023-11-02 01:52:53 -04:00
Aaron Suen
54c2c0d636 Move AoE cheats to server priv
Snuff, ignite, and growtrees now use server priv
instead of debug, to be more consistent with other
server maintenance cheats like quell and stasis.
The "debug" priv may be granted to give players
read-only access to more info in the world, so use
the "server" priv for more read/write access.
2023-11-01 21:36:56 -04:00
Aaron Suen
4c20d53b26 Merge branch 'opaqueitems' into dev 2023-11-01 21:13:12 -04:00
Aaron Suen
a31d256caa A bit more notes cleanup 2023-11-01 20:57:44 -04:00
Aaron Suen
ee80619d70 Add notice of the change to the description page 2023-11-01 19:51:53 -04:00
Aaron Suen
1f8f2cc28b Make all non-node items follow the same rules
Before, non-node items (tools and craftitems) were
exempted from opacity entirely and were always
transparent.  Now, they use the same optic_opaque
and optic_transparent groups, are opaque by default,
and honor the sunlight_propagates heuristic (even
though this is rarely used for non-node items).
2023-11-01 18:59:01 -04:00
Aaron Suen
9407dc65a0 MAJOR: Make many things optic-beam-opaque
The following things were nodes that were defined as
sunlight_propagates = true but NOW will be opaque:

- shaftcraft items like sticks, staves, bars, rods, ladders,
  frames, and torches
- flora such as rushes and flowers
- sedges, but only at max growth (make it now possible
  to detect and automate sedge growth)
2023-11-01 18:55:48 -04:00
Aaron Suen
93717fa421 Small optimization to storebox check 2023-11-01 18:42:01 -04:00
Aaron Suen
47f20ac2f0 Don't pack/unpack varargs in nodecore.door_operate
Instead of using variadics, hard-code array accesses for the
expected arity of door_operate_core, throwing away any
"future-proofing" that variadics were supposed to offer.

This is because in Lua 5.1, the length of arrays that contain
nil values anywhere in the sequence is apparently undefined, and
implementations are free to return the position of any value that
is followd by a nil, so length of {1, nil, 3} could be 1 or 3.
PUC lua seems to generally return 3, but LuaJIT takes more
liberties here (presumably exploiting UB for optimizations).
The problem arises when trying to unpack({1, nil, 3}) and LuaJIT
sees the length as 1 so return only <1>, instead of <1, nil, 3>.
This means that calling nodecore.door_operate(pos, ni, dir),
which was INTENDED for this API (it would look up node for you if
you didn't provide one) could result in the dir param being
lost due to packing the args into an array to defer them, and then
that array getting only partially unpacked.

Reference to WONTFIX bug where LuaJIT claims this is allowed UB:
https://github.com/LuaJIT/LuaJIT/issues/527

The solution for now is to stop relying on unpack (which is sort
of easy in its own way since I never really liked it).  In the
specific case of nodecore.door_operate in particular, adding
more positional args (it already has 3) would be bad for other
reasons (should switch to a named passing style).
2023-11-01 01:07:19 -04:00
Aaron Suen
34f09bcd88 Try to canonicalize doors before moving
Some external rotation mods may change the way
node rotation works and put doors into a state where
they are one of the 12 "reversed" rotations instead of
the 12 "canonical" ones.  Renormalize door facing
before processing rotations to ensure that these doors
are corrected automatically.
2023-10-29 03:07:09 -04:00
Aaron Suen
966ed012b2 Expose node spin data in registrations
Deprecate the old APIs that used to close over the
metadata about valid node rotations.  Now expose
this data in the node definition, and use a generic
non-closure function to handle the callback.

nodedef.spindata contains:

qty = number of allowed rotations total
cycle = table keyed on current param2 and valued with
  next param2 for next rotation
equiv = table keyed by each possible param2 (24 keys)
  and valued with canonical equivalent for that param2
2023-10-29 02:49:22 -04:00
Aaron Suen
1e3e56fea6 Move some ideas into a separate megaproject 2023-10-28 16:32:51 -04:00
Aaron Suen
c1f192126a Document some more ambitious usablity ideas 2023-10-28 16:12:25 -04:00
Aaron Suen
e35b45c011 Fix getting "find lux" hint upon making a lantern 2023-10-28 15:37:00 -04:00
Aaron Suen
9a0804fae0 Fix broken stylus programming
...along with possibly other downstream bugs.

We had stripped the metadata off the wield item in the
pummel state tracking to make it so that changes to
wield item metadata (especially things that could be
changed by AISM while the player is using the thing)
would not cancel a pummel, but forgot that the wield
metadata that gets put into the pummel state is ALSO
fed to the recipe check.  Use a separate key for this
stripped only-for-comparison version, and keep the
proper itemstack with full meta for recipe checks.
2023-10-28 15:36:40 -04:00
Aaron Suen
09783a1a70 Document some issues 2023-10-28 15:20:56 -04:00
Aaron Suen
0910265cc0 Add a storebox_sealed_always group
NodeCore will probably never use this itself, but it
can be used for mod content (i.e. Winter's waterlogged
containers) that will never allow infiltration of air
whether the sides are open or not.
2023-10-28 11:46:18 -04:00
Aaron Suen
085c862d33 Merge 'copygirl/fix/register-item-strip-colon' into dev 2023-10-27 07:29:08 -04:00
copygirl
2804ad2392 Remove unnecessary ":" prefix stripping 2023-10-27 09:29:51 +02:00
copygirl
84a832ac0f Strip ":" prefix in overridden register_item 2023-10-27 09:09:07 +02:00
Aaron Suen
997cd73cdd Translation update 2023-10-26 20:12:03 -04:00
Aaron Suen
5a10a8cfc5 Translation sync 2023-10-25 00:34:11 -04:00
Aaron Suen
29d044f40d Put the weblate link in the community footer too 2023-10-23 21:15:09 -04:00
Aaron Suen
8d08eb3518 Translation update 2023-10-23 19:53:19 -04:00
Aaron Suen
b5060b34cd Don't discredit "same as source" translations in stats
While we don't need to include these in the .tr file, if the
translators verified that the translated string matches the
source string (e.g. lines with only a URL or other technical
information) it still counts toward translation completion %.
2023-10-23 06:57:59 -04:00