2852 Commits

Author SHA1 Message Date
Aaron Suen
48f571cf5a Use mask for armless players
IIRC the weird use of colorkey was copied in from
a mod that predates NodeCore by several years,
including before [mask: was a thing.
2022-10-30 15:09:01 -04:00
Aaron Suen
4acf592b86 Standardize version update announcements
Announce to global chat on startup (for chat
bridges) and to each player on join, if the version
is different than the last time.
2022-10-30 14:28:12 -04:00
Aaron Suen
a0d1c69ddc Fix deprecated game.conf key 2022-10-30 13:43:40 -04:00
Aaron Suen
e765fa53e8 Merge branch 'master' into dev 2022-10-30 13:24:08 -04:00
Aaron Suen
b8bffd8a77 Don't crash on deleting player w/o YCTIWY data
Some players may not have YCTIWY database
entries, this should not trigger an error.
2022-10-30 13:23:54 -04:00
Aaron Suen
8db3eac646 Enable backface culling for bulk nodes
Cut down on rendered faces, and make
loose leaves match non-full stack entity
appearance.
2022-10-29 20:40:43 -04:00
Aaron Suen
fc74702afa Make falling items less destructive
Now we dig nodes much more rarely when
landing, so that there's a good chance that
merely dropping an item is non-destructive,
unless we have no other choice.  There is still
a chance of a random dig, so that "item
fountain" exploits are still self-resolving.
2022-10-29 10:06:30 -04:00
Aaron Suen
db28bcd726 Fix loose leaf falling 2022-10-29 09:42:52 -04:00
Aaron Suen
180e4e7625 Make lit torches work with /giveme
...since lanterns do already.
2022-10-28 22:22:36 -04:00
Aaron Suen
0a1a9e8e44 Certain cheats always count, even without interact 2022-10-28 22:02:47 -04:00
Aaron Suen
beaafe6bac Translation sync 2022-10-28 21:25:32 -04:00
Aaron Suen
c030ce81e9 Make AISMs run properly in falling_node ents 2022-10-28 20:43:00 -04:00
Aaron Suen
cf9d1a78bc Falling items can hand-dig non-walkables
This prevents people from trivially creating
perpetual item traps out of sedges of leaves
that could otherwise lag a server.
2022-10-28 20:16:38 -04:00
Aaron Suen
cf8cfbba47 Fix nonstandard group expansion 2022-10-28 20:01:46 -04:00
Aaron Suen
945b07739f Falling nodes dig hand-diggables, not displace
Having a piece of gravel fall onto a sedge and have it
move the sedge over intact was immersion-breaking
and "cheaty" as it allowed players to move things that
normally they would have to mature in-place, harvest,
and then replant.
2022-10-28 19:52:33 -04:00
Aaron Suen
7336c042a9 Animate player model on throwing an item, too. 2022-10-28 08:16:48 -04:00
Aaron Suen
b4b8f64a19 Cooldown for waving animation
It seems some players actually use the "aux1 = climb down" setting,
which can cause them to wave randomly when they're climbing on
ladders and such.  Disable the waving animation for a second or
so after any player movement other than standing or waving, to
minimize this.
2022-10-28 08:08:57 -04:00
Aaron Suen
94f38efdf8 Merge branch 'lantern-nonlinear' into dev 2022-10-28 07:51:00 -04:00
Aaron Suen
8a74b34907 Lantern rebalancing and nonlinear charge response
Using Oblomov's proposed sinusoidal brightness profile, making
the bright and dim extremes of the lantern's range shorter, and
stretching the middle.  Also nerfed the total useful lifetime
of lanterns since we no longer have to inflate it by as large of
a "useless" range at the bottom end.
2022-10-28 07:48:11 -04:00
Aaron Suen
3687f715e0 Merge branch 'dev' into lantern-nonlinear 2022-10-28 07:31:31 -04:00
Aaron Suen
a63eb4987a Fix coal/ember layer order
Always build up texture with lower layers inside and
higher layers outside.  This will fix the need for an
override in the NodeCore Improved Community Edition
texturepack for refined charcoal.
2022-10-27 19:35:16 -04:00
Aaron Suen
2d9b4b9417 Fix wrong texture identification
Misordering issue discovered when attempting to copy the textures
for hinged door panels into a texturepack to update overrides.
2022-10-27 08:18:16 -04:00
Aaron Suen
dd2a12d8c1 Hotfix for a texture alpha warning 2022-10-27 08:00:42 -04:00
Aaron Suen
ba9d47a25c Notes updates 2022-10-27 07:46:20 -04:00
Aaron Suen
b1d191f798 Merge branch 'full-stack-nodeboxes' into dev
This change seems to reduce the number of CAO's being drawn in scenes
across NCC from 25% in lightly-developeda areas, to closer to 50% in
more complex areas, and up to 90% in some special cases, like "cobble
pits" from players who mass-dig.  Since CAO rendering in MT is
particularly inefficient, this is expected to better preserve
framerate for weaker client hardware in some more pathological cases.

The change is applied conservatively for now, i.e. only on nodes
specifically registered as likely warranting special bulk treatment,
and those nodes were selected based on an emprical survey of the
NodeCore Community server world, which has a mix of both new and
old player settlements, and different play styles.
2022-10-26 08:33:52 -04:00
Aaron Suen
cc6c0c236f Reorder/simplify bulk stack check 2022-10-26 08:32:07 -04:00
Aaron Suen
0586c69481 Pseudorandom rotation for bulk stack nodes
They don't exactly match the rotation that the entities use, but
relative to each other they help break up the isotropy in about
the same manner.
2022-10-26 08:24:51 -04:00
Aaron Suen
21e8575465 Fix nc_items:stack vs group:is_stack_only usage
Now that there are multiple is_stack_only nodes, always use the
group where possible.
2022-10-26 08:14:52 -04:00
Aaron Suen
af691675b9 Refactor, simplify, and limit to specific nodes
- Use the existing on_stack_change hook instead of creating new
  on_stack_[un]fill hooks, to simplify util_stack.
- Automatically register bulk nodes, but only for nodes being
  registered that request bulk optimization.
- Remove some code duplication and registration complexity.
- Hand-pick nodes for bulk storage optimization based on a survey
  of actual usage from a dump of the NodeCore Community server
  world map.
- Use a separate group for visinvs with hidden entities.
2022-10-26 07:58:23 -04:00
Aaron Suen
062838e491 Merge branch 'dev' into full-stack-nodeboxes
Code formatting, linting, cleanup
2022-10-26 07:23:59 -04:00
Aaron Suen
46549becef Translation sync 2022-10-25 07:53:03 -04:00
Aaron Suen
b393ce0a93 Improve player zoom control, doc updates
Players can use sneak and/or aux1 for far-zooming, so they can
far-zoom while treading water in an ocean to look at distant
islands, instead of using the aux1=climb down hack, which causes
all sorts of weird issues with other features that try to detect
movement controls
2022-10-25 07:48:01 -04:00
Aaron Suen
36fef1771f Players who are trying to move are not pushed out
...even if they're not actually successfully moving
2022-10-24 21:11:45 -04:00
Aaron Suen
7bc091dd2b Differentiate solids for head vs feet
Pointable/"viscous" liquids are "solid" when present at the head
location, but not at the feet location, so that players can still
wade on the surface of these liquids.
2022-10-24 21:07:29 -04:00
Aaron Suen
2117d11f9e Prevent players getting trapped in pumwater or similar liquids
If the liquid is "pointable" then it can block players from being
able to emergency-dig the container; in these cases, just push the
player out immedately.  This should only apply to some liquids
like pumwater, molten glass, or concrete.
2022-10-24 20:31:41 -04:00
Aaron Suen
d05cfa99ba Merge branch 'master' into dev 2022-10-23 16:24:56 -04:00
Aaron Suen
159c35b3e1 Fix missing explicit hyperlink in markdown 2022-10-23 16:24:40 -04:00
Aaron Suen
882ae45d63 Continuing to tweak, still not satisfied
Seems like with higher exponents, the lantern quickly discharges
to virtual uselessness and actually spends most of its charge
range at a zero emission level.
2022-10-23 15:15:24 -04:00
Aaron Suen
e7c8fd9451 Merge branch 'dev' into lantern-nonlinear 2022-10-23 15:00:16 -04:00
Aaron Suen
01a301e778 Notes tidying 2022-10-23 14:58:16 -04:00
Aaron Suen
ba39e9998d Cleaner, safer boolean expression 2022-10-23 14:35:01 -04:00
Aaron Suen
6fef1d9035 Fix importing mechanism
We can't check initial conditions because the legacy mod would
load after this one (to detect that it needs to be disabled), so
we have to provide an API entry point for it instead.
2022-10-23 14:24:33 -04:00
Aaron Suen
20fdb7e907 Path for auto importing from old external mod 2022-10-23 14:21:38 -04:00
Aaron Suen
adc8710a91 Shrink empty mod storage, earlier recheck on join/leave
When a player joins or leaves, schedule a recheck on the next
tick to prevent entities from lingering out of date by several
seconds.
2022-10-23 14:00:29 -04:00
Aaron Suen
ee7bc90ba9 Fix bug in disabled db pruning 2022-10-23 13:56:06 -04:00
Aaron Suen
d123dbded9 Fix core mod registration, settings 2022-10-23 13:44:59 -04:00
Aaron Suen
0673f3094a Add options to disable YCTIWY
There's a "soft disable" that just hides the entities
but keeps the database up to date, and a "hard
disable" that clears the database, keeping only
minimal data, until existing transactions (taken
items, dumped inventories) are flushed to the
world.
2022-10-23 13:22:14 -04:00
Aaron Suen
941d1545f2 Import YCTIWY mod nearly unaltered
I had wanted this to be a standard feature of the
game for a while but put off merging it because:
- I had hoped to find a better visual design for the
  ghost player entities that matched the bandolier
  in nc_player_wield better, and
- I had scalability concerns with large servers with
  thousands of offline players.

However, in practice it seems like the scalability
issues are not as critical, and the visuals are
acceptable as they are for now.

In making this a standard game feature, it
will probably also make sense to add an option
to effectively disable parts of it (e.g. avoiding
creating the ents, or even avoiding filling the
database except where players' items are already
taken).
2022-10-23 12:44:25 -04:00
Aaron Suen
90976fa618 First attempt at non-linear-izing lantern charge:glow ratio
Higher exponents >1 cause lantern to lose intense glow fast, but
glow dimly for longer, making them more realistic and "safer," as
players will have more time to get back to a charging station once
they start to feel the pressure of a dimming lantern.

Lower exponents <1 would cause a lantern to glow more intensely
but burn out quicker once it starts to dim, similar to torches,
making them also dangerous as it's easier to overestimate remaining
charge when budgeting time to get back out of a cave.

The new formula has some values that can be tweaked to alter the
gameplay balance effect of this, in addition to total max charge
and discharge rate.
2022-10-23 12:27:09 -04:00
Aaron Suen
8f1a538452 Lantern charging/discharging reforms/simplification
- Clean up group expansion logic
- Lanterns covered in lux will never net-discharge, even if they
  are not getting enough power to charge, so that they can be
  carried and installed as light fixtures, with a supply of
  flux from above, and can be "paused" in a flux flow when not
  in use without discharging.
2022-10-21 21:39:52 -04:00