A
/ \ _ Play Now Nemesis on
| | | | _______ _ _ _______ _______ _ _______
| |\ | | | ____| | \ / | | ____| / ____| | | / ____|
/-------/-------------------------------------------------------------------,
O= Home <=XX| About News Pics Adventurers Wizards Download Connect >
\-------\-------------------------------------------------------------------'
| | \ | | |____ | | | | | |____ ___ \ \ | | ___ \ \
| | \_| |_______| |_| |_| |_______| |_______/ |_| |_______/
\ /
V
Documentation Area
Document Path: /doc/room/do_dig
Lfun: do_dig - how to dig with a spade somewhere
Synopsis:
mixed do_dig(string item)
Description:
The do_dig lfun in a room is the support for spades and other
"digging devices" (hopefully).
Via an add_action 'dig' added by a "digging device" do_dig is
called in the environment, the room. All arguments of the 'dig'
command are given to the do_dig() lfun in the environment.
The first "digging device" /lib/obj/spade.c supports different
types of handling the digging according to success or failure,
also according to the messages for the one digging plus others
in the room. Please look there ...
Digging in darkness is prohibited but there is a workaround to
allow it in a clean way - see /d/village/loc/cem/tunnel2.c .
It would be very nice if all those "digging devices" in Nemesis
(e.g. all spades, all showels, etc.) would support this. Please
contact Kiri or Wastl (see "Note:" below) if you have coded a
spade or showel etc. or if you have further ideas to make all
digging compatible.
Return value:
string or status (0 or 1) or object
Please see /lib/obj/spade.c
Examples:
status dug;
reset(arg) {
if (!present("bottle")) dug = 0;
[...]
}
do_dig() {
if (!dug && !present("bottle")) {
dug = 1;
bottle = clone_object("...");
return bottle;
}
}
Note:
Further ideas and plans:
- Making lib/obj/spade generic with the default as spade.
- Inheriting obj/weapon to make it a weapon, too.
Your ideas? Do you have any "digging devices" that could be merged
with /lib/obj/spade.c?
The first ideas of do_dig were developed by Scumbag, a more than
ancient wizard from the era when Nemesis was not Nemesis and not
even in Munich but in the UK (see https://nemesis.de/history/ ).
Later the cemetery and all the stuff there was adopted by Kiri
(see 'whois kiri' or https://nemesis.de/lpc/bin/finger/kiri ) and
he revised everything there together with Wastl (see 'whois wastl'
or https://nemesis.de/lpc/bin/finger/wastl ).
For other possibilities of "searching" see 'man object/search' and
and 'man room/produce'.
See also:
This page was generated in LPC
Imprint / Impressum