67 Commits

Author SHA1 Message Date
Aaron Suen
2d1f61ee97 Touchtips support "touch thru" API
Allow the "above" node to override the "under"
node's description.  Use this mechanism to
append charcoal glyph descriptions to the
touchtips, but only when punching a face that
has a glyph on it.
2020-06-28 12:38:14 -04:00
Aaron Suen
466805da48 Enroll skybox, fix some bugs 2020-06-22 23:17:01 -04:00
Aaron Suen
5648331c9f Replace all perplayer with playerstep 2020-06-22 22:47:33 -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
32e30328eb Delay breath HUD onset
The hack to start new players with full breath does
not apparently work with existing players, so players
are joining to find their breath half gone at the start
of play.

Instead, let's just hide the breath HUD entirely for the
initial half of underwater movement, and only show it
when the player is running low.  This effectively hides
the fact that players are losing the top half of breath
when joining, in the common case.

Players joining and being immediately submerged in
water is an uncommon enough case that this will
probably not affect gameplay significantly.
2020-06-07 14:17:20 -04:00
Aaron Suen
5fa2483d87 Refactor, fix new players starting a half breath 2020-06-07 12:26:27 -04:00
Aaron Suen
0a5565a3ea Buff player breath 2020-06-07 12:15:56 -04:00
Aaron Suen
b903ddd42a Image optimizations. 2020-04-16 01:27:54 -04:00
Aaron Suen
a6ef71d9dd More breath HUD redoing 2020-04-13 00:00:31 -04:00
Aaron Suen
0e6327ca2d Custom theme-matching crosshair 2020-04-09 23:18:39 -04:00
Aaron Suen
e987a87bd8 Simplify breath hud handling 2020-03-22 08:14:51 -04:00
Aaron Suen
4d47ab2e75 NC API dependency simplification.
Treat all API mods as a "layer", and use the new
nc_api_all registration to indicate that a mod depends
on the NC API (which ALL NC mods assume they do).
This means that each non-API mod does not need to
worry about which API mods it really needs and which
it does not, nor will they need to be updated for any
internal API restructures.

This is a game, not a modpack, so all mods will be
loaded anyway, and we only care about order.  That
means that we don't really need to worry about
having excess dependencies because any mod we
don't actually need will be needed by something that's
loaded anyway.  If somebody wants to reuse a
component elsewhere, they're likely to need to do
some work to untangle it anyway, because of the
amount that NodeCore mechanics interact and
interdepend.
2020-01-05 12:59:12 -05:00
Aaron Suen
dcfc80b367 Remove explicit names in mod.confs. 2020-01-05 12:38:45 -05:00
Aaron Suen
ffb8b12ab6 Re-quantize/optimize breath image. 2019-12-31 13:29:54 -05:00
Aaron Suen
24decd3c47 Fade bottom of breath HUD to unobscure hotbar. 2019-12-31 13:25:08 -05:00
Aaron Suen
76e43ed07f Fix breath HUD regression. 2019-12-31 13:23:36 -05:00
Aaron Suen
7fa3d405cd Merge multiline handling into nc_api_hud.
Most of the complexity of touchtip multiline handling
is now done in the unified HUD API.
2019-12-31 09:51:07 -05:00
Aaron Suen
248dbda2da Create unified HUD API.
- Handles upsert, TTL, caching, players leaving.
- Unify breath and player name HUD logic for now.

Touchtips are more complex (multiline, translate) so
those will need more work to unify.
2019-12-31 09:32:17 -05:00
Aaron Suen
83c394dcdd Fix node stack names not translating. 2019-12-29 10:22:55 -05:00
Aaron Suen
2c023da125 Simplify wear gauge appearance. 2019-12-27 12:13:11 -05:00
Aaron Suen
124ac24792 Add wear gauge to tool descriptions too. 2019-12-27 11:57:10 -05:00
Aaron Suen
045a9fc5b3 Don't show count estimate for inventory stacks.
This is redundant and silly considering that we have
the exact count in the hotbar.
2019-12-27 11:30:03 -05:00
Aaron Suen
a9a2315932 Rough count of stacks in touchtip.
Player can count up to 9 items exactly, and can
estimate to nearest 10 up to 100.  Stacks still need to
be picked up for an exact count.
2019-12-27 11:27:47 -05:00
Aaron Suen
ae3b150814 One more TouchTip fix... 2019-12-05 22:57:52 -05:00
Aaron Suen
40f724a86d Nil guard touchtips. 2019-12-05 22:50:38 -05:00
Aaron Suen
20b5b25e0c Debounce touchtips.
- Defer update until tick, coalesce updates from same tick.
- Behaves more stably when pulling items from shelves.
- Prevents flicker.
- Wield changes supersede node touch (esp shelves).
2019-12-05 22:41:47 -05:00
Aaron Suen
658100cd7e TouchTip overhaul.
- Support centered multiline descriptions.
- Automatically include visinv stack descriptions.
- Translations per-line.
- API for custom TouchTips.
2019-12-05 22:26:44 -05:00
Aaron Suen
a12d44c4f8 Tighten up interact checks. 2019-11-28 08:55:09 -05:00
Aaron Suen
bd3246c16c Non-interacting players have no inventory either.
Consistent with removal of the arms and wield hud,
remove the hotbar HUD and dump all inventory items
on the ground at time of revocation, if necessary.
2019-11-25 20:36:13 -05:00
Aaron Suen
290d0dd9c2 Show/hide HUD elements based on interact priv.
If player is not allowed to interact, their model already lacked
arms, so this prevents the player from seeing their hand
on-screen.
2019-11-24 20:02:42 -05:00
Aaron Suen
02f663df03 Fix drowning HUD bugs:
- Pay attention to enable_damage setting.
- Fix faint HUD being on all the time.
- Fix excessive hud_change calls, maybe improve traffic?
2019-11-17 09:04:45 -05:00
Aaron Suen
c147da4dde Convert from depends.txt to mod.conf 2019-10-05 11:24:16 -04:00
Aaron Suen
6a012aeacb Move all src dirs to subdirs of output targets.
This should make organization a little more consistent, and more
specific.
2019-10-04 19:13:30 -04:00
Aaron Suen
4f7a31dbd9 Tiniest formatting fix. 2019-09-12 20:05:05 -04:00
Aaron Suen
580c2f205d Re-optimize breath HUD overlay. 2019-09-08 13:30:34 -04:00
Aaron Suen
6c650e85c7 New drowning HUD that's easier to see in already-dark environs. 2019-09-08 13:24:12 -04:00
Aaron Suen
0c9544d6b5 Some scaling/particle cleanup, make scaling particles distinct. 2019-09-07 09:32:36 -04:00
Aaron Suen
310ce1bc6c Treat NodeCore as a unified thing.
- Collapse all nodecore "core" mods in the /mods listing, so it's
  easier to find the actual add-on mods.
- Parameterize in-game branding to make renaming derivatives just
  a little easier.
2019-09-07 09:08:57 -04:00
Aaron Suen
f0b4a9a686 Fix touchtip showing "Air" in client/server race.
Reported by MagikEh.
https://discordapp.com/channels/507234450615042048/530756875839340574/618628052066238495
2019-09-04 18:23:30 -04:00
Aaron Suen
39dea8a2ae MAJOR: Code quality audit using luacheck.
- Removed lots of unused variables, a few shadowed identifiers.
- Removed a few sections of dead code.
2019-08-31 09:26:53 -04:00
Aaron Suen
fe2c153f9e Clean up all lua code style.
Formatting rules based on Paul Kulchenko's perl-based formatter...
http://notebook.kulchenko.com/programming/lua-beautifier-in-55-lines-of-perl
...using a single tab for indent.

Mostly pure whitespace changes.
2019-08-27 19:14:51 -04:00
Aaron Suen
8a0319e7d1 Fix new player guide translations... 2019-08-26 01:01:58 -04:00
Aaron Suen
12b580ade0 Fix touchtip translations to cover ALL text. 2019-08-25 18:53:22 -04:00
Aaron Suen
28108e1e40 Add translation support, esp. for TouchTips.
Translations are currently by holistic strings, i.e.
no parameterization.  This may create some busy
work for translators, but gives them more freedom
to account for differences between languages.

A translation template file is written out to the world
path on game start, so translators have a seed to
work from.
2019-08-23 20:40:33 -04:00
Aaron Suen
41963a009a Exclude some large files from exports.
- Consolidate any "source-only" files into "src" dirs.
- Exclude "docs" dir, mainly in root atm.
- Exclude all dotfiles.

This significantly reduces the size of delivered files, since
esp the player model .blend file is very large.
2019-04-09 07:54:46 -04:00
Aaron Suen
a8dbfb221f EggCorn Overhaul!
- Place EggCorns as items, not as nodes.
- Tweak visual scales, thicken them up a bit.
- Allow planting eggcorns into dirt, as well as throwing dirt
  over eggcorns, to make planting easier.
2019-03-23 13:01:31 -04:00
Aaron Suen
9607bcc6a6 Start working on sounds, plus minor refinements.
- Clean up registered_* usage patterns.
- Reduce tendancy of leaves to create stack nodes.
  Now they tend to stack up properly in-world more often.
- Tweak damage system to create "headroom" where minor
  damage doesn't cost inv slots immediately.
- Make player hand skin color match model skin.
- Cleanup/unify grass abm logic.
- Start installing new sounds by MagikEh

Sound source:
  https://github.com/MagikEh/SoundsOfWarr
2019-03-13 23:51:59 -04:00
Aaron Suen
92d1877b99 Hotbar textures.
Hexagonal gradients aren't actually a thing, but 6 linear gradients
are a thing.  Render them in high-res to minimize the effect of
anti-aliasing gaps, and then shrink them to fit.
2019-03-11 21:53:32 -04:00
Aaron Suen
f98cb76fc5 Make HUDs a little more usable in low light conditions. 2019-03-10 20:39:20 -04:00
Aaron Suen
7c8cbfaf3e Breath HUD tidy up. 2019-03-10 18:11:35 -04:00