From 8c71ec18163f4b62cc4ac39d0a2ddfa223bd4107 Mon Sep 17 00:00:00 2001 From: flend Date: Sun, 1 Dec 2019 09:34:46 +0000 Subject: [PATCH] Showing monster inventories on the monster status listing --- CHANGELOG.md | 2 ++ src/brogue/IO.c | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0692b4d6..d84221e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ unreleased ========== +- + The sidebar now displays whether a monster is carrying an item - Fixed incorrect percentage health change info in sidebar - diff --git a/src/brogue/IO.c b/src/brogue/IO.c index ea3f3c00..72178cfd 100644 --- a/src/brogue/IO.c +++ b/src/brogue/IO.c @@ -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); @@ -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