]> granicus.if.org Git - nethack/commitdiff
yet more obj->spe documentation (lamps, candles)
authorPatR <rankin@nethack.org>
Tue, 19 Jan 2021 23:07:58 +0000 (15:07 -0800)
committerPatR <rankin@nethack.org>
Tue, 19 Jan 2021 23:07:58 +0000 (15:07 -0800)
Another mystery.  Candles and oil lamps have obj->spe set to 1
but that isn't used by begin_burn() and such so I don't know why.

Magic lamp has spe set to 1 to indicate that there is a djinni
inside, but letting the djinni out converts it into an oil lamp.
I don't know if there is any case where it might actually be 0.
(Wishing yields an oil lamp rather than an empty magic lamp so
that isn't it.  Cancellation magic doesn't affect it either.)

include/obj.h

index 841b825d423745deb3ab71e44e47aa5c35facb52..5c969e018a7893088b6a0e9c2e594989215fd5a7 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.7 obj.h   $NHDT-Date: 1610149501 2021/01/08 23:45:01 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.84 $ */
+/* NetHack 3.7 obj.h   $NHDT-Date: 1611097668 2021/01/19 23:07:48 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.85 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Michael Allison, 2006. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -45,6 +45,8 @@ struct obj {
     schar spe; /* quality of weapon, weptool, armor, or some rings (+ or -);
                 * number of charges for wand or charged tool ( >= -1 );
                 * number of candles attached to candelabrum (0..7);
+                * magic lamp (1 iff djinni inside => lamp is lightable);
+                * oil lamp, tallow/wax candle (1 for no apparent reason?);
                 * marks spinach tins (1 iff corpsenm==NON_PM);
                 * marks tin variety (various: homemade, stir fried, &c);
                 * eggs laid by you (1), eggs upgraded with rojal jelly (2);