candelabrum vs candles bit
Move declaration to start of block so that C99 isn't required.
This commit is contained in:
+7
-12
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 apply.c $NHDT-Date: 1574648938 2019/11/25 02:28:58 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.301 $ */
|
/* NetHack 3.6 apply.c $NHDT-Date: 1578187332 2020/01/05 01:22:12 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.310 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -1138,21 +1138,16 @@ register struct obj *obj;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (obj->spe <= 0) {
|
if (obj->spe <= 0) {
|
||||||
|
struct obj *otmp;
|
||||||
|
|
||||||
pline("This %s has no %s.", xname(obj), s);
|
pline("This %s has no %s.", xname(obj), s);
|
||||||
|
|
||||||
/* only output tip if candles are in inventory */
|
/* only output tip if candles are in inventory */
|
||||||
boolean has_candles = FALSE;
|
for (otmp = g.invent; otmp; otmp = otmp->nobj)
|
||||||
struct obj *otmp = g.invent;
|
if (Is_candle(otmp))
|
||||||
while (!has_candles && otmp) {
|
break;
|
||||||
has_candles = Is_candle(otmp);
|
if (otmp)
|
||||||
otmp = otmp->nobj;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (has_candles) {
|
|
||||||
pline("To attach candles, apply them instead of the %s.",
|
pline("To attach candles, apply them instead of the %s.",
|
||||||
xname(obj));
|
xname(obj));
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Underwater) {
|
if (Underwater) {
|
||||||
|
|||||||
Reference in New Issue
Block a user