66 Commits

Author SHA1 Message Date
Aaron Suen
650b44f7c0 Add LiberaPay link 2022-10-20 18:35:59 -04:00
Aaron Suen
ee99c24d52 More aggressive priv caching strategy
Instead of caching privs only for the current tick, and only for
NodeCore itself, change the base API to use caching universally,
including for naive mod code.  Privs are cached until invalidated
by a change; it's assumed here that the "auth_reload" command
exists in the first place because this kind of caching is allowed
and accounted for, even if it's not actually done by the engine
or builtin.
2022-10-07 06:59:04 -04:00
Aaron Suen
243f67c0d7 Change player guide climbing spot wording 2022-09-29 23:51:18 -04:00
Aaron Suen
433161466b Unify cached privs checks
All base-game priv checks should now only
require one priv lookup per player per tick,
except in special cases where a player's privs
changed during that tick.
2022-09-24 00:20:27 -04:00
Aaron Suen
4cec30a2eb Add tip about tedium 2022-06-08 08:21:28 -04:00
Aaron Suen
3c96fbb246 Players w/ debug privs can see "future" hints
This is to help debugging the hint system.
2022-04-12 18:17:49 -04:00
Aaron Suen
de979d87e3 Remove guide entry about 3x3 recipes
They should no longer exist, officially.
2022-01-07 20:48:12 -05:00
Aaron Suen
f8df58eb67 Typo 2021-12-13 20:58:38 -05:00
Aaron Suen
8120a5c715 Re-rename hints/challenges to discovery
NodeCore is supposed to be a "player vs self" mental
challenge, neither tourism/spectacle, nor a "player vs
environment" conquest.  Players are supposed to find
their own goals, as well as applying the effort to
achieve them, and the nature of the goals is
purposefully as open-ended as possible, ideally with
no bias toward any kind of "completionism."

The name "Hints" implied some kind of assistance, and
thus was inappropriate.  The name "Challenges"
similarly implies an extrinsic source of motivation,
which the system is only marginally designed to
provide; especially, it helps new player gain some
momentum, but players are supposed to find their own
motivation eventually instead of chasing after
hint completion as a goal, especially since they will
miss the most compelling aspects of the game.

Somewhat experimentally, rename these once again
to "discovery"/"discoveries" and remove language that
suggests progress toward completion.  Add stronger
language suggesting that there is much more to
discover outside of this, hinting at emergent systems
as an example
2021-12-12 14:17:29 -05:00
Aaron Suen
95a27184d8 Refresh player guide upon closing it 2021-12-12 00:36:24 -05:00
Aaron Suen
26369a9d54 Generic priv notify for any/all GUI tabs 2021-12-10 08:01:45 -05:00
Aaron Suen
22a848a0d2 Update tabs immediately on priv grant/revoke 2021-12-10 07:57:28 -05:00
Aaron Suen
bebac9d511 Reorganize tabs for players w/o Challenges tab
- Hide the Challenges tab for players who don't have interact
  privs and thus can't use them.
- If there are fewer tabs than the horizontal limit, expand all
  remaining tabs to fill the horizontal space instead of leaving
  a gap at the right side, which looks bad when there's a
  scrollbar in the content below.
2021-12-10 07:42:33 -05:00
Aaron Suen
af44989f7a Add simple "current tab" indicator 2021-12-02 07:33:01 -05:00
Aaron Suen
44b2aa4b25 Formal API for pushing events into inventory tabs
Mods that are responsible for inventory tabs can setup their
own event hooks, then call inventory_notify to alert inventory
tabs of certain events.

Inventory tabs can include registered handlers for specific events
allowing them to e.g. clear caches, and then if the handler
evaluates to true, the tab is updated.
2021-12-02 07:09:07 -05:00
Aaron Suen
6866bade5b Remember player's last inventory tab
Note that some tabs may have time-dependent contents (e.g. the
hints/challenges tab, or add-on mod tabs) and need to be notified
of this in the event that they are the current tab.  It will
be the responsibility of each tab to watch for appropriate events
and perform background updates as necessary.  The hint tab does
this on an event-driven basis from player discovery.
2021-12-02 06:55:09 -05:00
Aaron Suen
9120c78511 Compact mod list formatting
Make it easier to fit long lists of related mods in
the About box if possible
2021-11-29 20:41:09 -05:00
Aaron Suen
16022542d9 List non-game mods directly on About screen 2021-11-27 22:03:18 -05:00
Aaron Suen
1b06213fea Add "hopelessly stuck -> ask community" tip 2021-11-25 12:30:00 -05:00
Aaron Suen
feca258e63 Rebrand "hints" as "challenges"
There seems to be a common misconception among
new players that the "hint" system is supposed to
help provide guidance when they're stuck, when what
they're really for is hinting that something exists and
challenging the player to find out how to access it.

Change the name of "hints" to "challenges" for all
text display purposes to try to clarify.
2021-11-24 21:26:34 -05:00
Aaron Suen
533b2a840c More flexible player guide API for mods
- Tab content can now be "raw" instead of plaintext, in
  which case it will not be escaped or embedded in a
  textbox and can have arbitrary controls.
- Tab content function is now passed geometry that
  would be used for textarea, to inform placement of
  custom form controls.
- Tab content function is passed list of current
  formspec content in mostly-complete form, so that it
  can modify any other form data, including replacing
  the entire form if it wants.
- Falsy tab content (or content function return) prevents
  showing the formspec at all, allowing mods to show
  their own formspec entirely, but navigation back to
  the guide is the mod's responsibility.
2021-08-14 08:54:02 -04:00
Aaron Suen
138e3c80a9 A little more whitespace in about dialog
Separate out group of "where to get it" from
group of "where to chat about it"
2021-07-23 23:52:40 -04:00
Aaron Suen
9780f1fc8a Revert "Re-shrink player guide a little"
This reverts commit e684ead12829f1330773cc4cc6b53b894a0bc743.
2021-07-03 11:30:26 -04:00
Aaron Suen
e684ead128 Re-shrink player guide a little
Issues reported on mobile devices (non-flagship
phone models or non-16:9 screens) that seem to
be because formspec size doesn't fit on screen so
tab buttons don't respond.

Rename the "movement" tab to "motion" even
though it's not a perfect synonym, to make it fit
inside the button better.
2021-07-03 11:21:48 -04:00
Aaron Suen
174231c151 More guide expansion, update translations 2021-06-26 09:58:03 -04:00
Aaron Suen
c242b27c24 Tweak player guide dimensions again
- Parameterize and calculate more things.
- Expand size again to fit more content.
2021-06-26 09:51:56 -04:00
Aaron Suen
c102758133 Revert "Add an emergeny escape feature"
This reverts commit a722bd8a9fbf21ce25facb1ff5b00840d9c39aa7.

...in anticipation of yet another alternative approach.
2021-06-23 19:59:17 -04:00
Aaron Suen
5a0220f2ee Return hints to shuffle instead of sort
- The sorting actually only worked in English, and
  not in any translated languages.
- The ordering would bias players towards focusing
  on alphabetically-first hints, which are not
  necessarily the best to try.  Shuffling instead
  should suggest alternative options each time the
  tab is brought up.
- The ordering-bias effect is probably worse for
  non-English where it's less obvious that there's
  a mundane and non-meaningful reason why they
  are in a particular order.

In theory we're losing the ability to quickly check
for a hint with known text is in one of the lists on
the tab for English speakers but this is not really
a core intended use-case for hints.
2021-06-23 00:49:37 -04:00
Aaron Suen
a722bd8a9f Add an emergeny escape feature
Described in player guide "movement" tab.
It's analogous to the old "/stuck" command that
was removed once long ago, but much more
tedious to execute, so players still have an
incentive to extricate themselves manually.
2021-06-20 10:23:41 -04:00
Aaron Suen
5344012ce9 Expand player guide
- Break into more sections
- Add more content
- Enlarge layout
2021-06-20 10:13:10 -04:00
Aaron Suen
5ac25775a9 Officialize the matrix room 2021-06-01 06:18:42 -04:00
Aaron Suen
883eaf6859 Officially move IRC to Libera.chat 2021-05-26 19:20:19 -04:00
Aaron Suen
c88f439b87 Full scrolling hint list
Since we switched to a textarea and have proper
word wrap and scrollbars, we might as well use the
space and let players see ALL their hints.
2021-04-02 22:35:45 -04:00
Aaron Suen
4e3e502fed Emergency digging tip no longer needed 2021-03-24 09:41:20 -04:00
Aaron Suen
668ea4cb4e Fix copyright dates 2021-03-11 07:36:11 -05:00
Aaron Suen
eb933c5d4f ContentDB versioning fixed for now 2021-03-02 20:01:52 -05:00
Aaron Suen
c10e80ef87 Set name in mod.conf as demanded by 5.5+ 2021-03-01 20:10:27 -05:00
Aaron Suen
b73e70d351 Fix some translate inform warnings. 2020-09-27 09:30:57 -04:00
Aaron Suen
8324abfab9 "Dev Version" = "Dev/CDB Version"
ContentDB's .gitattributes export-subst support
has been broken for a while now, and apparently
won't be fixed (it's depending on an upstream
that is similarly ignoring the issue).

We need to account for the fact that what looks
like a dev version might actually be a CDB
version that's simply not tagged right.
2020-09-05 08:44:09 -04:00
Aaron Suen
edea123a1e Start on new unified Hint API
- Move hint handling down to API layer
- Simplify stat data; old nc_stats counting can
  be moved out to a separate mod.  We only
  need whether the player has seen or not.
- Invert inventory tab responsibility.
- Merge witness system in from crafting.

TODO:
- Redistribute hint registration responsibility
  to individual mods.
- Test external mod compat.
- Retire old nc_stats and nc_guide systems.
- Add a way to reset hints.
2020-09-04 16:28:27 -04:00
Aaron Suen
de4748591c Reorg docs, close a couple minor issues. 2020-06-25 07:07:51 -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
8935df061d Refactor player guide 2020-06-10 08:04:59 -04:00
Aaron Suen
f203f4a01d Replace discord invite link.
New link points to the #rules channel for new users.
2020-03-27 18:37:16 -04:00
Aaron Suen
d4a2c74425 Add message about misleading debug info. 2020-03-27 07:07:27 -04:00
Aaron Suen
04250fbf19 Some guide improvements.
- Fix scaling tip so mobile users can figure it out.
- 3x3 recipe and symmetry hints.
2020-03-15 07:54:24 -04:00
Aaron Suen
76c0a813e5 Switch player guide to use read-only texteareas.
According to the lua_api.txt doc blame, these were improved
around the time of the 5.0 release.  Since we've dropped 0.4
support long ago, we can use these now.

The appearance is roughly unchanged on "normal" large screens,
but on small screens where text used to clip, it should now
wrap (usually, except for long URLs) and have scrollbars if
necessary.
2020-01-23 06:48:03 -05: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
93c59357fc Update copyright year.
We already had one revision this year that
wasn't recorded correctly...
2020-01-02 21:05:06 -05:00