nd-drink for axil-nd, ported from SIC to libxylem.
git clone https://github.com/tty-pt/nd-drinkDocumentation
axil-nd-drink
nd-drink for axil-nd, ported from SIC to libxylem.
Owns consumables: the consumable_t / consumable_skel_t types in <nd/drink.h> that nd-plant's carrot and tomato (and any future cooking module) build against, the on_consume hook they fire, and the drink display path (on_view_flags, on_add).
Install
make install
Installs:
lib/libnd-drink.so
include/nd/drink.h
There is deliberately no lib/nd-drink.so symlink (see axil-nd-wts for why: mods.load names the installed filename, and the OpenBSD packing list never lists a symlink).
Also packaged across all 9 platforms (deb, apk, rpm, pacman, brew, openbsd, winget + Scoop, android-lib, and ios-lib + SwiftPM XCFramework) from a v* tag.
Build from source
make
Needs libxylem and the engine's game API, <nd/xy.h>, plus <nd/mortal.h> and <nd/core.h> โ from checkouts beside this repo or from installed packages:
git clone https://github.com/tty-pt/nd-drink && cd nd-drink
git clone https://github.com/tty-pt/axil-nd ../axil-nd
git clone https://github.com/tty-pt/nd-mortal ../axil-nd-mortal
git clone https://github.com/tty-pt/nd-core ../axil-nd-core
make
Both the checkout -I flags and the installed-package paths are on the command line at once (see Makefile), and a missing -I is ignored, so the same command works either way. CI names the deps explicitly (axil-nd,libxylem,nd-mortal,nd-core).
What it does
consumable_t(food, drink, quantity, capacity) andconsumable_skel_t
(food, drink) live in <nd/drink.h> because nd-plant reads them.
on_consumeisXY_DECL'd there: fired, but with no implementor anywhere
the dispatch returns 0.
on_addandon_view_flagscover creation and the drink display, and the
old on_icon body is now a core_icon_decorate decorator registered in xy_install (the shop precedent).
In-Game Commands (man-src/)
| Command | Section | Description |
|---|---|---|
fill | 10 | Refill a liquid container from a water source or font |
consume | 10 | Drink or eat a consumable item to restore vitality |
Testing
There is no test.sh here. Behaviour is asserted by the engine's own suite:
cd ../axil-nd
make && ./test.sh
Notes from the port
SIC_DEFโXY_IMPL,mod_installโxy_install,call_f(...)โ
f(...).
- It opens no tables of its own in
xy_installโ the consumable rows live
in the engine's skeleton/drop tables.
- The link line is libxylem alone.
NEEDEDislibxylem.soandlibc.so.6.
License
BSD 2-Clause, carried over from tty-pt/nd-drink. See LICENSE.