Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Mammoth/Include/TSEItemDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ enum EDisplayAttributeTypes

attribEnhancement,
attribWeakness,

attribWarning,
attribQuest,
};

enum EAttributeTypes
Expand Down
7 changes: 6 additions & 1 deletion Mammoth/Include/TSUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,12 @@ enum EColorPalette
colorAreaAccelerator = 36, // H:60 S:100 B:80
colorTextQuote = 37, // H:210 S:30 B:100

colorCount = 38,
colorAreaWarning = 38,
colorTextWarning = 39,
colorAreaQuest = 40,
colorTextQuest = 41,

colorCount = 42,
};

enum EFontScale
Expand Down
10 changes: 10 additions & 0 deletions Mammoth/TSE/CDisplayAttributeDefinitions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#define TYPE_POSITIVE CONSTLIT("advantage")
#define TYPE_NEGATIVE CONSTLIT("disadvantage")
#define TYPE_NEUTRAL CONSTLIT("neutral")
#define TYPE_WARNING CONSTLIT("warning")
#define TYPE_QUEST CONSTLIT("quest")

const int DEFAULT_LOCATION_FREQUENCY = 20;
const CDisplayAttributeDefinitions CDisplayAttributeDefinitions::Null;
Expand Down Expand Up @@ -260,6 +262,10 @@ bool CDisplayAttributeDefinitions::InitFromCCItem (ICCItem *pEntry, SDisplayAttr
iType = attribPositive;
else if (strEquals(sType, TYPE_NEGATIVE))
iType = attribNegative;
else if (strEquals(sType, TYPE_WARNING))
iType = attribWarning;
else if(strEquals(sType, TYPE_QUEST))
iType = attribQuest;
else
return false;
}
Expand Down Expand Up @@ -316,6 +322,10 @@ ALERROR CDisplayAttributeDefinitions::InitFromXML (SDesignLoadCtx &Ctx, CXMLElem
pEntry->iType = attribNegative;
else if (strEquals(sType, TYPE_NEUTRAL))
pEntry->iType = attribNeutral;
else if (strEquals(sType, TYPE_WARNING))
pEntry->iType = attribWarning;
else if (strEquals(sType, TYPE_QUEST))
pEntry->iType = attribQuest;
else
{
Ctx.sError = strPatternSubst(CONSTLIT("Invalid label type: %s."), sType);
Expand Down
4 changes: 4 additions & 0 deletions Mammoth/TSE/CItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1241,6 +1241,10 @@ bool CItem::GetDisplayAttributes (TArray<SDisplayAttribute> *retList, ICCItem *p
retList->Insert(SDisplayAttribute(attribNeutral, strPatternSubst(CONSTLIT("level %d?"), GetApparentLevel())));
}

// Quest item attribute will always show
if (m_pItemType->HasLiteralAttribute(CONSTLIT("QuestItem")))
retList->Insert(SDisplayAttribute(attribQuest, CONSTLIT("mission")));

// Add various engine-based attributes (these are shown even if the item
// type is unknown).

Expand Down
10 changes: 10 additions & 0 deletions Mammoth/TSUI/CItemPainter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,16 @@ void CItemPainter::FormatDisplayAttributes (const CVisualPalette &VI, TArray<SDi
rgbTextColor = bNeedTextColor ? VI.GetColor(colorTextDisadvantage) : rgbTextColor;
break;

case attribWarning:
rgbBackColor = bNeedBackColor ? VI.GetColor(colorAreaWarning) : rgbBackColor;
rgbTextColor = bNeedTextColor ? VI.GetColor(colorTextWarning) : rgbTextColor;
break;

case attribQuest:
rgbBackColor = bNeedBackColor ? VI.GetColor(colorAreaQuest) : rgbBackColor;
rgbTextColor = bNeedTextColor ? VI.GetColor(colorTextQuest) : rgbTextColor;
break;

default:
rgbBackColor = bNeedBackColor ? RGB_MODIFIER_NORMAL_BACKGROUND : rgbBackColor;
rgbTextColor = bNeedTextColor ? RGB_MODIFIER_NORMAL_TEXT : rgbTextColor;
Expand Down
10 changes: 7 additions & 3 deletions Mammoth/TSUI/CVisualPalette.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,21 @@ static SColorInitTable COLOR_TABLE[] =
{ CONSTDEF("TextDockText"), CG32bitPixel(0xAF, 0xB7, 0xBF) }, // H:210 S:8 B:75
{ CONSTDEF("TextDockTitle"), CG32bitPixel(0xE7, 0xF3, 0xFF) }, // H:210 S:9 B:100
{ CONSTDEF("TextDockTextWarning"), CG32bitPixel(0xFF, 0x33, 0x33) }, // H:0 S:80 B:100
{ CONSTDEF("AreaAdvantage"), CG32bitPixel(0x00, 0x53, 0xA6) },
{ CONSTDEF("AreaDisadvantage"), CG32bitPixel(0xA6, 0x21, 0x21) },
{ CONSTDEF("AreaAdvantage"), CG32bitPixel(0x00, 0x53, 0xA6) }, // H:210 S:100 B:65
{ CONSTDEF("AreaDisadvantage"), CG32bitPixel(0xA6, 0x21, 0x21) }, // H:0 S:80 B:65

{ CONSTDEF("AreaShields"), CG32bitPixel(0x45, 0x73, 0x17) },
{ CONSTDEF("TextAdvantage"), CG32bitPixel(0xCC, 0xE5, 0xFF) }, // H:210 S:20 B:100
{ CONSTDEF("TextDisadvantage"), CG32bitPixel(0xFF, 0xCC, 0xCC) },
{ CONSTDEF("TextDisadvantage"), CG32bitPixel(0xFF, 0xCC, 0xCC) }, // H:0 S:20 B:100
{ CONSTDEF("TextShields"), CG32bitPixel(0xE5, 0xFF, 0xCC) }, // H:90 S:20 B:100
{ CONSTDEF("TextAccelerator"), CG32bitPixel(0xFF, 0xFF, 0x00) }, // H:60 S:100 B:100

{ CONSTDEF("AreaAccelerator"), CG32bitPixel(0xE5, 0xE5, 0x17) }, // H:60 S:90 B:90
{ CONSTDEF("TextQuoteColor"), CG32bitPixel(0xB2, 0xD9, 0xFF) }, // H:210 S:30 B:100
{ CONSTDEF("AreaWarning"), CG32bitPixel(0xE5, 0xE5, 0x5C) }, // Copy of WarningMsg for now
{ CONSTDEF("TextWarning"), CG32bitPixel(0x26, 0x2D, 0x33) }, // Copy of WarningMsg for now
{ CONSTDEF("AreaQuest"), CG32bitPixel(0xA6, 0x21, 0xA6) }, // H:300 S:80 B:65
{ CONSTDEF("TextQuest"), CG32bitPixel(0xFF, 0xCC, 0xFF) }, // H:300 S:20 B:100
};

struct SFontInitTable
Expand Down
2 changes: 1 addition & 1 deletion Transcendence/TransCore/RPGComponents.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@

<Type UNID="&unidComponentReminder;">
<AttributeDesc>
<ItemAttribute label="Component" labelType="advantage" criteria="*">
<ItemAttribute label="component" labelType="quest" criteria="*">
<OnShow>
(block (
(theType (itmGetType gItem))
Expand Down