Skip to content

Commit

Permalink
Added: Make taped up windows block scent better.
Browse files Browse the repository at this point in the history
  • Loading branch information
OzoneH3 committed Mar 22, 2013
1 parent b8e9127 commit 213fb65
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 5 additions & 2 deletions game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1606,8 +1606,11 @@ void game::update_scent()
for (int x = u.posx - SCENT_RADIUS; x <= u.posx + SCENT_RADIUS; x++) {
for (int y = u.posy - SCENT_RADIUS; y <= u.posy + SCENT_RADIUS; y++)
if(m.move_cost(x, y) == 0)
//Greatly reduce scent for bashable barriers
grscent[x][y] = newscent[x][y] / 4;
//Greatly reduce scent for bashable barriers, even more for ductaped barriers
if (m.has_flag(reduce_scent, x, y))
grscent[x][y] = newscent[x][y] / 12;
else
grscent[x][y] = newscent[x][y] / 4;
else
grscent[x][y] = newscent[x][y];
}
Expand Down
7 changes: 4 additions & 3 deletions mapdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ enum t_flag {
collapses, // Tiles that have a roof over them (which can collapse)
flammable2, // Burn to ash rather than rubble.
deconstruct, // Can be deconstructed
reduce_scent, // Reduces the scent even more, only works if object is bashable as well
num_t_flags // MUST be last
};

Expand Down Expand Up @@ -324,12 +325,12 @@ const ter_t terlist[num_terrain_types] = { // MUST match enum ter_id above!
mfb(transparent)|mfb(bashable)|mfb(flammable)|mfb(noitem)|
mfb(supports_roof)|mfb(deconstruct)}, // Plain Ol' window
{"taped window", '"', c_dkgray, 0, tr_null,
mfb(bashable)|mfb(flammable)|mfb(noitem)| mfb(supports_roof)}, // Regular window
mfb(bashable)|mfb(flammable)|mfb(noitem)| mfb(supports_roof)| mfb(reduce_scent)}, // Regular window
{"window", '"', c_ltcyan, 0, tr_null,
mfb(transparent)|mfb(bashable)|mfb(flammable)|mfb(noitem)|
mfb(supports_roof)|mfb(deconstruct)}, //has curtains
{"taped window", '"', c_dkgray, 0, tr_null,
mfb(bashable)|mfb(flammable)|mfb(noitem)| mfb(supports_roof)}, // Curtain window
mfb(bashable)|mfb(flammable)|mfb(noitem)| mfb(supports_roof)| mfb(reduce_scent)}, // Curtain window
{"open window", '\'', c_ltcyan, 4, tr_null,
mfb(transparent)|mfb(flammable)|mfb(noitem)| mfb(supports_roof)},
{"closed curtains", '"', c_dkgray, 0, tr_null,
Expand All @@ -338,7 +339,7 @@ const ter_t terlist[num_terrain_types] = { // MUST match enum ter_id above!
mfb(transparent)|mfb(bashable)|mfb(flammable)|mfb(alarmed)|mfb(noitem)|
mfb(supports_roof)},
{"taped window", '"', c_dkgray, 0, tr_null,
mfb(bashable)|mfb(flammable)|mfb(noitem)| mfb(supports_roof)|mfb(alarmed)}, //Alarmed, duh.
mfb(bashable)|mfb(flammable)|mfb(noitem)| mfb(supports_roof)|mfb(alarmed)| mfb(reduce_scent)}, //Alarmed, duh.
{"empty window", '0', c_yellow, 8, tr_null,
mfb(transparent)|mfb(flammable)|mfb(supports_roof)},
{"window frame", '0', c_ltcyan, 8, tr_null,
Expand Down

0 comments on commit 213fb65

Please sign in to comment.