60 Commits

Author SHA1 Message Date
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
Aaron Suen
3bafe76629 Remove dead files. 2019-03-10 17:31:29 -04:00
Aaron Suen
4d0f0734ba Beginning of a bold new health system.
- Eliminate health and breath stat bars.
- Players NO LONGER DIE FROM INJURY.
- Players no longer lose walking speed or mobility.
- Players lose inventory slots in proportion to injury; they're
  stuffed with an "injury" item, and items they displace are
  ejected.  Slots are displaced in random order.
- Healing rate is much faster, so players are usually mildly
  inconvenienced by injury, but can soon enough pick up their
  stuff and leave.
- Health and breath HUDs are gone.  Health is visible based on
  number of lost slots, and breath uses a vignette to narrow
  tunnel vision for O2 loss.

Overall, the old health system has been more of an immersion-
breaking annoyance than anything.  This allows health to get out
of the way of the primary gameplay.

UNFINISHED: Need a replacement for the old "suicide to get unstuck"
mechanic.
2019-03-10 15:47:22 -04:00
Aaron Suen
e6cbc33e1c More reasonable positioning on non-pathological screens. 2019-03-06 14:00:35 -05:00
Aaron Suen
3be4f221ff Completely different approach to the item name tip thing.
Can't get HUDs to align right on high-DPI/android at all.  Give up
on the combination breath/wield bar, switch back to a much earlier
version of the code for that.

For wield names, add a new tooltip to the center of the screen, and
show it transiently so that it doesn't disrupt all gameplay.

As a bonus, this is also a logical place to put a "what am I
touching" display, so hook this up for punching.  Now you can
tell what you're touching even when you can't dig it.  This is
like a WAILA mod, but doesn't require tracing.
2019-03-06 13:50:54 -05:00
Aaron Suen
8e1c845611 Fix unknown item support. 2019-03-06 11:16:43 -05:00
Aaron Suen
23a1a7b5da Expand font to full USA 101-key keyboard support. 2019-03-06 11:02:37 -05:00
Aaron Suen
db0f5895b6 Attempt to work around HUD issues by using image HUD.
On android (and possibly other very high DPI displays) the position
of the HUD is calculated incorrectly for text HUDs.  According to
rubenwardy, "the HUD sucks", so it seems unlikely that this will
get fixed soon.  Switch to using a sequence of image HUDs and a
bitmap font to render the hotbar text.  This is currently limited,
but expandable.
2019-03-06 10:07:09 -05:00