72 Commits

Author SHA1 Message Date
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
da7eae09cd Disable the now-long-useless /kill command. 2019-08-27 07:33:38 -04:00
Aaron Suen
35cac87a78 The /stuck command is now obsoleted (probably) by cliff scaling. 2019-08-26 23:17:47 -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
5f277cfad1 Switch to hard-coded list names.
It seems that inv:get_lists() returns a list of userdata, instead
of names, at least in 5.0+, and can't necessarily be relied upon
for this purpose.
2019-04-10 08:33:34 -04:00
Aaron Suen
db5cbd3de4 Avoid lighting bugs, players messing w/ inventory via CSM. 2019-04-09 21:06:55 -04:00
Aaron Suen
31fbfd8d33 Hear other players get hurt, reorg player health mod. 2019-04-06 21:23:14 -04:00
Aaron Suen
b7372fd05d Eliminate all non-main inventory lists. 2019-04-06 20:49:27 -04:00
Aaron Suen
42f5784c64 Prevent flying via /stuck. 2019-04-02 08:26:24 -04:00
Aaron Suen
c83e3288d7 stepheight obsoleted by auto-jumping...?
Well, we'll have to see if that works out...
2019-03-29 23:53:27 -04:00
Aaron Suen
47b4ae9bc6 Promote inventory pickup changes to a first-class feature mod.
Use interception where possible to modify destintion for items
directly instead of relying on post-hoc inventory rearrangement.

This should resolve the glitches where items appear in the wrong
place in inventory for a flash before being moved.
2019-03-27 22:10:45 -04:00
Aaron Suen
06194e0bf6 Player choice for real items only, not "virtual" (injury) items. 2019-03-24 19:19:43 -04:00
Aaron Suen
170605dd6b EXPERIMENTAL direct player inventory pickup control.
Players can specify the exact slot they want picked up items to go
into.  Items will try to fit into the currently selected slot first
before filling additional slots according to normal rules.

This is experimental and may lead to lost or duplicate items!!

Hopefully this should end up being a lot more intuitive and
immersive than the old sneak-dig hack that only worked for certain
objects.  It's consistent across all functionality that causes
items to be added to player invetory (including /give).

Unfortunately it adds yet another globalstep function, and a
fairly complex one at that...
2019-03-24 18:24:54 -04:00
Aaron Suen
d00321476e Clean up player damage sound a bit. 2019-03-14 20:22:28 -04:00
Aaron Suen
d4f3e830b4 Created player hurt sound. 2019-03-14 01:04:38 -04:00
Aaron Suen
1f6239f101 Fixed injury showing in wield view, clean up stubs. 2019-03-12 21:27:29 -04:00
Aaron Suen
ff57c0aaba Replace suicide command with stuck command.
It does something similar, though it doesn't send you back to
spawn, just "phase shifts" nearby.
2019-03-11 23:00:42 -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
cbb7f823c3 Fix node dig prediction, allow limited zoom. 2019-03-07 10:08:22 -05:00
Aaron Suen
b012fd2356 Change item "desperate" placement logic.
Avoid above-grade placement, but randomly allow it, allowing
items that are "stuck" in a pile of leaves to gradually
random-walk their way out into a stable position.
2019-03-06 22:07:18 -05:00
Aaron Suen
3b08a8ee9a Documentation updates, new player guide interface.
Also restructured the player_inv/player_setup thing AGAIN.
Now setup is all rules and inv is all interface.
2019-03-05 19:20:38 -05:00
Aaron Suen
7f123aea91 Goodbye, last GUI!
- Inventory screen is now no longer game-interactive, and serves
  as purely an "about" screen.
- Move the HUD components out of inv mod and into hud mod.
- Separate player setup mod for static physical limitations like
  step height, inv size, etc.
2019-03-03 16:53:12 -05:00