49 Commits

Author SHA1 Message Date
Aaron Suen
b05180da02 Make scaling exempt from protection
...similar to how loose items are.
- They're emphemeral/air-like anyway
- Prevent exploiting protection areas to make traps to
  capture players or their items.
2021-03-23 22:24:53 -04:00
Aaron Suen
95f0fb0ee9 Heaviest image compression option 2021-03-09 08:33:58 -05:00
Aaron Suen
410ebd5d8d Recompression using ECT
https://github.com/fhanau/Efficient-Compression-Tool
2021-03-09 08:16:23 -05:00
Aaron Suen
bf8841f963 Add horizontal movement to wall scaling
This allows players a little more scaling mobility
when scaling a wall, and especially the ability to
navigate around outside corners.
2021-03-04 19:07:25 -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
dc912f776c Make sure all things have explicit descriptions
This avoids issues with the translation informer
including technical names in the translation source
2020-10-18 11:50:04 -04:00
Aaron Suen
18b01c1ae7 Redistribute hints into each mod
Hints themselves have not been tided up
much, but this makes the project of fixing the
hints for each mod a little more manageable
and breaks up the hard-to-navigate single
monolithic hints file in the old guide mod.

The old guide mod has now been completely
retired.  Hints are now a full-fledged API-layer
standard feature.
2020-09-04 19:07:45 -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
94401942ee Protect doors, standardize protection 2020-07-01 00:30:40 -04:00
Aaron Suen
544b306660 Fix more protection mechanics
- Report violation on scaling
- Prevent optic rotation
2020-06-30 23:48:21 -04:00
Aaron Suen
e34ce24d74 Scaling node placement respects protection
Players can still product dynamic "touch"
lights in protected areas, but can't place
actual climbable scaling nodes.
2020-06-30 23:38:03 -04:00
Aaron Suen
3367ca1857 Fast optic path obstruction response
Optics keep track of path dependency info
used in calculating state.  When a node is
added/removed in the path via the mod API
(i.e. not schematics, vmanip, etc.) then the
nodes whose state decisions depended on
paths going through there are automatically
triggered for a recheck.

This should make things like furnace sand
auto-loaders respond snappily.

Granted, memory use with this approach is
a concern, but we will just have to monitor it
under normal usage patterns.
2020-06-19 10:01:25 -04:00
Aaron Suen
b8bf2322fa More work on DNTs
- DNTs can have default time value
- Automatic loop option
- Optional node name filter
- Use DNT for scaling particles
- A few tail call optimizations
2020-06-19 09:38:03 -04:00
Aaron Suen
984e87e155 Consistent ABM labeling
- Make sure every ABM has a label
- Use consistent case
- More concise names / consistent voice
2020-06-17 07:09:20 -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
a5752fd9b6 Yet another emergency lighting redo
- Players no longer constantly glow in darkness.
- Players can now place light spots by scaling, faster
  than actual climbing spots.
- Climbing spots appear if player continues placement
  after light appears.
- Floor traversal mechanism is now obsolete.

This allows players to traverse dark caves reasonably
well, still, but only voluntarily, so darkness stealth
mechanics are possible again.
2020-05-30 19:00:22 -04:00
Aaron Suen
a43c915710 Buff scaling glow by 50%
Lots of issues with players being unable to figure out traversal
of dark caves.  Total darkness is probably too much of an ostacle
for players who haven't already learned how to avoid those kind
of circumstances.
2020-05-12 07:14:35 -04:00
Aaron Suen
48473ea34c A little tighter "airlike" detection. 2020-03-29 20:05:11 -04:00
Aaron Suen
0012c2673b More scaling time definitions
Also, scaling_time completely overrides
group-based scaling time logic.
2020-03-29 08:13:41 -04:00
Aaron Suen
1c612ee1f7 Cobbley group, generic scaling factors by group 2020-03-29 08:05:13 -04:00
Aaron Suen
f37a918f0f Scaling and touch-hurt reforms
- Storeboxes are now scalable.
- Standardize touch-hurt operation.
- Touch-hurt damage on scaling.
- Now possible to alter scaling time via scaling_time
  group (percent of original scaling time)
2020-03-29 07:55:54 -04:00
Aaron Suen
3200149cc4 Buff torch and scaling light sources.
- Better compat with low gamma play.
- Torch now emits some light when in inventory, even
  if not actively wielded.
- Dynamic light API for mod use.
2020-02-22 21:57:08 -05:00
Aaron Suen
c7a322941e Experimental new natural light system.
- No day/night cycle, no sun/moon.
- Get rid of clouds too.
- Skybox is now 100% texture-packable.
- Natural light diminishes with depth.

Night-time no longer disrupts gameplay topside, but
skylights are no longer useful to an infinite depth and
artificial light is necessary for all deep mining.
2020-02-22 10:38:03 -05:00
Aaron Suen
d0e6dcc410 Add "stasis" option and command.
This freezes many things that normally happen automatically
in the world, including most ABMs and AISMs, and a few other
custom step logic items like the player "hot potato" logic.

This can be used for "creative mode" purposes to setup a complex
build without it running itself away from you, and for texture
pack authors, to have time to see things that are normally
transient or difficult to observe because of the effects they have
on nearby things or players.
2020-01-10 06:26:07 -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
89020e8340 Major rebuild of item_entity.
This created a ton of dependency inversions, which
necessitated moving a number of API functions up into
higher layers, and restructuring dependency lists for
a number of mods.

BOLO: non-deterministic load errors due to missed
dependencies.
2020-01-05 11:42:22 -05:00
Aaron Suen
c7a90debcb Fix scaling and charcoal writing.
Making hand dig everything broke logic that was
depending on things being "not hand diggable".
Continue to treat things as not-hand-diggable if they
would take a long enough time to dig.
2019-12-29 13:57:49 -05:00
Aaron Suen
0fd31152ca Relax scaling requirements (e.g. trees).
Nodes cannot be scaled only if they are BOTH falling
nodes AND diggable by hand.  Mostly this just means
sand cannot be scaled and needs to be dug out
instead.
2019-11-30 09:13:07 -05:00
Aaron Suen
f48b103e58 Players can only see nearby scaling particles.
If watching someone else scaling a cliff from a distance, you will not
see where the handholds are, but if you are nearby, you will be able to
see and share them.
2019-11-10 10:42:23 -05:00
Aaron Suen
cd3300a72e Scaling hints. 2019-11-10 10:09:03 -05:00
Aaron Suen
a90d49404b More scaling refinements.
- Cannot do "floor feeling" if floor is already lit.
- No need for steady-state particles on "floor feeling" nodes.
2019-11-10 10:03:15 -05:00
Aaron Suen
52dcebc696 Fix up scaling node upgrading.
- Prevent downgrading.
  Should prevent player from falling when overhangers replaced.
- Allow hanging construction through other scaling nodes.
  Should prevent full overhangs from being blocked by wall scaling.
2019-11-10 09:40:15 -05:00
Aaron Suen
126039e3ed Scaling Generation 3.
- Repeat/hold place (right-click) with empty hand instead of pummel.
- Otherwise, works similarly to first generation.
- Scaling nodes can overwrite each other now (upgrade wall to ceiling).
- Visuals are now particle-based instead of texture, like Gen 2.
2019-11-10 09:33:40 -05:00
Aaron Suen
ac77b41af5 Revert "Scaling overhaul."
While this makes scaling a little easier to do, it still doesn't
fix the fundamental problem of scaling being distracting and too
easy to trigger accidentally.

The "pummel" version of scaling caused some confusion when one
player accidentally triggered it trying to figure out how to get
lode out of lode ore.  The current one triggers accidentally all
the time just from tabbing out of a game with it running (e.g. it
isn't paused in multiplayer) leaving the character staring at a
wall.  While such a player WOULD have opportunity to find
handholds in the wall, we aren't differentiating between a player
who's scrutinizing a surface from one staring off into space.

The scaling needs to be made harder to trigger accidentally, like
reinstating the need for an empty hand.  Using a right-click
action may also help distinguish it from pummelng recipes.

Removing this from the alpha branch so players don't get too
accustomed to this functionality and then have it change AGAIN.

This reverts commit 943604cf9588a316dce19e0a60a4219b52c4d905.
2019-10-24 20:16:37 -04:00
Aaron Suen
943604cf95 Scaling overhaul.
- Remove pummel recipes.  Now find handholds just by
  staring at a particular spot.  Being closer or better focused
  helps.
- Use only particles instead of a facedir node, so facedir
  isn't a problem when adjacent to multiple walls/ceilings.
- Automatically upgrade "wall" climbing to "overhang" climbing
  when a ceiling is present.
2019-10-22 01:31:09 -04:00
Aaron Suen
c147da4dde Convert from depends.txt to mod.conf 2019-10-05 11:24:16 -04:00
Aaron Suen
08aaacd303 Make sure actual pummel recipes beat scaling. 2019-09-13 22:31:03 -04:00
Aaron Suen
07239de73c Scaling overhaul as a "navigate caves by feel" system.
- Make handhold nodes glow, to visually simulate the player
  character's now "familarity" with them by feel.  We have to
  represent it synesthetically because the game only gives us
  sight and sound to work with.
- Make floors "scalable" so that they glow, even though they
  don't affect maneuverability.

The effect of this is to allow a player who has fallen into a dark
cavern to navigate, slowly, by feel, allowing more extensive
self-rescue possibilities.
2019-09-09 08:14:07 -04:00
Aaron Suen
b67327922b Fix wrong scaling-pummel particles on ceilings. 2019-09-08 13:46:03 -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
a771c2d2fe Don't care about specific player in scaling; any player will do. 2019-08-31 22:17:38 -04:00
Aaron Suen
939f544eaf Code format cleanup. 2019-08-31 08:27:59 -04:00
Aaron Suen
ee3679661f Image optimization. 2019-08-29 20:20:59 -04:00
Aaron Suen
47f5e17560 Scaling handholds should disappear when node under is dug. 2019-08-28 21:22:45 -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
3495311aef Player can now climb overhangs with enough patience. 2019-08-27 07:32:44 -04:00
Aaron Suen
353462eddd Add ability to scale sheer walls.
Pummel on the face of a wall you can't dig with your bare hands
and eventually you will find handholds there, allowing you to
climb.

This will hopefully provide an immersive alternative to /stuck
for getting out of pits, which will also make players have to
carefully extricate themselves from their situations instead of
just using /stuck to bail and then running home to come back
with supplies.
2019-08-26 23:14:16 -04:00