14 Commits

Author SHA1 Message Date
Aaron Suen
c10e80ef87 Set name in mod.conf as demanded by 5.5+ 2021-03-01 20:10:27 -05:00
Aaron Suen
51b5aa8b94 Playerstep microoptimization
Avoid calling get_player_name too much
2021-03-01 18:58:34 -05:00
Aaron Suen
7cbd681d54 Fix issues with dig-by-mod
Crashes when a non-player digs a node, i.e.
having mod automation perform a dig_node()
2020-09-29 22:39:06 -04:00
Aaron Suen
fb6a4d7dd1 Hyrbid immediate/delayed witnessing
If we have line of sight to see the event happen
now, then discover it immediately, otherwise save
it for delayed witnessing on punch.
2020-09-26 20:17:31 -04:00
Aaron Suen
64e917fc95 New witnessing system
If a player is close enough to an event when it
happens (withing "likely hearing" distance) then if
they later punch the node then they can "collect"
the discovery.

The idea is that if a player hears the sound of
something happening, then they might go and
investigate and discover the thing they thought
they had left there isn't what's there anymore.

In retrospect I may want to combine this with a
limited form of the visual witnessing, just as there
may be events that a player is less likely to touch
in aftermath, or may not be practical to (e.g.
if what's left behind is air)
2020-09-26 17:52:09 -04:00
Aaron Suen
35186ec076 Hint for throwing an item really fast
Also expand player discover API to allow passing
multiple keys in a single call, saving db lookup/save
repetition.
2020-09-26 16:29:28 -04:00
Aaron Suen
6752808a81 Expand tote hint prereqs 2020-09-26 16:10:39 -04:00
Aaron Suen
3b864e5330 Fix and cache hint key expansion 2020-09-26 15:33:23 -04:00
Aaron Suen
77464e725a Reduce witness log noise 2020-09-26 15:04:34 -04:00
Aaron Suen
90e932bf9d Fix lode smelting hint 2020-09-26 14:19:12 -04:00
Aaron Suen
de87702497 Door crafting hints and witnessing 2020-09-11 01:08:20 -04:00
Aaron Suen
05d985c635 Expand hint system a bit
- Add reset command
- Reset alerts on resetting state
- Add option to hide hints
- Add option to add custom hint attrs
- Add option to pass in an already-fully-formed
  hint object and skip construction helpers
- Tidy up terrain hints a bit
2020-09-05 16:08:17 -04:00
Aaron Suen
db0bb65e57 Fix discovery API bugs
Crashes, broken stat names
2020-09-04 16:55:40 -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