Skip to content

Commit

Permalink
Merge pull request #14 from flend/feature/show_monster_inventories
Browse files Browse the repository at this point in the history
Showing monster inventories on the monster status listing
  • Loading branch information
tmewett committed Dec 1, 2019
2 parents 436e75e + 8c71ec1 commit 2d94471
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
unreleased
==========

-
The sidebar now displays whether a monster is carrying an item
-
Fixed incorrect percentage health change info in sidebar
-
Expand Down
7 changes: 4 additions & 3 deletions src/brogue/IO.c
Original file line number Diff line number Diff line change
Expand Up @@ -4184,6 +4184,9 @@ short printMonsterInfo(creature *monst, short y, boolean dim, boolean highlight)
applyColorAugment(&monstBackColor, &black, 100);
}
plotCharWithColor(monstChar, 0, y, &monstForeColor, &monstBackColor);
if(monst->carriedItem) {
plotCharWithColor(monst->carriedItem->displayChar, 1, y, &itemColor, &black);
}
monsterName(monstName, monst, false);
upperCase(monstName);

Expand All @@ -4206,9 +4209,7 @@ short printMonsterInfo(creature *monst, short y, boolean dim, boolean highlight)
}

sprintf(buf, ": %s", monstName);

printString(" ", 1, y, &white, &black, 0);
printString(buf, 1, y++, (dim ? &gray : &white), &black, 0);
printString(buf, monst->carriedItem?2:1, y++, (dim ? &gray : &white), &black, 0);
}

// mutation, if any
Expand Down

0 comments on commit 2d94471

Please sign in to comment.