restrict where the engraving symbol shows up
rooms and corridor locations that have been seen don't hide stairs
This commit is contained in:
@@ -39,4 +39,10 @@ struct engr {
|
|||||||
#define engraving_to_defsym(ep) \
|
#define engraving_to_defsym(ep) \
|
||||||
(levl[(ep)->engr_x][(ep)->engr_y].typ == CORR ? S_engrcorr : S_engroom)
|
(levl[(ep)->engr_x][(ep)->engr_y].typ == CORR ? S_engrcorr : S_engroom)
|
||||||
|
|
||||||
|
#define spot_shows_engravings(x,y) \
|
||||||
|
(levl[(x)][(y)].typ == CORR \
|
||||||
|
|| levl[(x)][(y)].typ == SCORR \
|
||||||
|
|| levl[(x)][(y)].typ == ICE \
|
||||||
|
|| levl[(x)][(y)].typ == ROOM )
|
||||||
|
|
||||||
#endif /* ENGRAVE_H */
|
#endif /* ENGRAVE_H */
|
||||||
|
|||||||
+8
-4
@@ -416,12 +416,14 @@ unmap_object(register coordxy x, register coordxy y)
|
|||||||
|
|
||||||
if ((trap = t_at(x, y)) != 0 && trap->tseen && !covers_traps(x, y)) {
|
if ((trap = t_at(x, y)) != 0 && trap->tseen && !covers_traps(x, y)) {
|
||||||
map_trap(trap, 0);
|
map_trap(trap, 0);
|
||||||
} else if ((ep = engr_at(x, y)) != 0 && !covers_traps(x, y)) {
|
|
||||||
map_engraving(ep, 0);
|
|
||||||
} else if (levl[x][y].seenv) {
|
} else if (levl[x][y].seenv) {
|
||||||
struct rm *lev = &levl[x][y];
|
struct rm *lev = &levl[x][y];
|
||||||
|
|
||||||
map_background(x, y, 0);
|
if (spot_shows_engravings(x, y)
|
||||||
|
&& (ep = engr_at(x, y)) != 0 && !covers_traps(x, y))
|
||||||
|
map_engraving(ep, 0);
|
||||||
|
else
|
||||||
|
map_background(x, y, 0);
|
||||||
|
|
||||||
/* turn remembered dark room squares dark */
|
/* turn remembered dark room squares dark */
|
||||||
if (!lev->waslit && lev->glyph == cmap_to_glyph(S_room)
|
if (!lev->waslit && lev->glyph == cmap_to_glyph(S_room)
|
||||||
@@ -450,7 +452,9 @@ unmap_object(register coordxy x, register coordxy y)
|
|||||||
map_object(obj, show); \
|
map_object(obj, show); \
|
||||||
else if ((trap = t_at(x, y)) && trap->tseen && !covers_traps(x, y)) \
|
else if ((trap = t_at(x, y)) && trap->tseen && !covers_traps(x, y)) \
|
||||||
map_trap(trap, show); \
|
map_trap(trap, show); \
|
||||||
else if ((ep = engr_at(x, y)) && !covers_traps(x, y)) \
|
else if (spot_shows_engravings(x, y) \
|
||||||
|
&& (ep = engr_at(x, y)) != 0 \
|
||||||
|
&& !covers_traps(x, y)) \
|
||||||
map_engraving(ep, show); \
|
map_engraving(ep, show); \
|
||||||
else \
|
else \
|
||||||
map_background(x, y, show); \
|
map_background(x, y, show); \
|
||||||
|
|||||||
+12
-4
@@ -317,8 +317,13 @@ void
|
|||||||
read_engr_at(coordxy x, coordxy y)
|
read_engr_at(coordxy x, coordxy y)
|
||||||
{
|
{
|
||||||
struct engr *ep = engr_at(x, y);
|
struct engr *ep = engr_at(x, y);
|
||||||
|
const char *eloc = surface(x, y);
|
||||||
int sensed = 0;
|
int sensed = 0;
|
||||||
|
|
||||||
|
if (!spot_shows_engravings(x, y)) {
|
||||||
|
if (On_stairs(x, y))
|
||||||
|
eloc = "stairs";
|
||||||
|
}
|
||||||
/* Sensing an engraving does not require sight,
|
/* Sensing an engraving does not require sight,
|
||||||
* nor does it necessarily imply comprehension (literacy).
|
* nor does it necessarily imply comprehension (literacy).
|
||||||
*/
|
*/
|
||||||
@@ -335,21 +340,20 @@ read_engr_at(coordxy x, coordxy y)
|
|||||||
case HEADSTONE:
|
case HEADSTONE:
|
||||||
if (!Blind || can_reach_floor(TRUE)) {
|
if (!Blind || can_reach_floor(TRUE)) {
|
||||||
sensed = 1;
|
sensed = 1;
|
||||||
pline("%s is engraved here on the %s.", Something,
|
pline("%s is engraved here on the %s.", Something, eloc);
|
||||||
surface(x, y));
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BURN:
|
case BURN:
|
||||||
if (!Blind || can_reach_floor(TRUE)) {
|
if (!Blind || can_reach_floor(TRUE)) {
|
||||||
sensed = 1;
|
sensed = 1;
|
||||||
pline("Some text has been %s into the %s here.",
|
pline("Some text has been %s into the %s here.",
|
||||||
is_ice(x, y) ? "melted" : "burned", surface(x, y));
|
is_ice(x, y) ? "melted" : "burned", eloc);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MARK:
|
case MARK:
|
||||||
if (!Blind) {
|
if (!Blind) {
|
||||||
sensed = 1;
|
sensed = 1;
|
||||||
pline("There's some graffiti on the %s here.", surface(x, y));
|
pline("There's some graffiti on the %s here.", eloc);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ENGR_BLOOD:
|
case ENGR_BLOOD:
|
||||||
@@ -1052,6 +1056,10 @@ doengrave(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
eloc = surface(u.ux, u.uy);
|
eloc = surface(u.ux, u.uy);
|
||||||
|
if (!spot_shows_engravings(u.ux, u.uy)) {
|
||||||
|
if (On_stairs(u.ux, u.uy))
|
||||||
|
eloc = "stairs";
|
||||||
|
}
|
||||||
adding = (oep && !eow);
|
adding = (oep && !eow);
|
||||||
switch (type) {
|
switch (type) {
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user