Skip to content

Commit 72bbf8b

Browse files
committed
Corrected the reading of Message.Color
1 parent 4460004 commit 72bbf8b

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/Ext/SWType/Body.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,7 @@ void SWTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI)
134134

135135
// messages and their properties
136136
this->Message_FirerColor.Read(exINI, pSection, "Message.FirerColor");
137-
if (pINI->ReadString(pSection, "Message.Color", NONE_STR, Phobos::readBuffer))
138-
{
139-
this->Message_ColorScheme = ColorScheme::FindIndex(Phobos::readBuffer);
140-
if (this->Message_ColorScheme < 0)
141-
Debug::INIParseFailed(pSection, "Message.Color", Phobos::readBuffer, "Expected a valid color scheme name.");
142-
}
137+
this->Message_ColorScheme.Read(exINI, pSection, "Message.Color");
143138

144139
this->UIDescription.Read(exINI, pSection, "UIDescription");
145140
this->CameoPriority.Read(exINI, pSection, "CameoPriority");

src/Ext/SWType/Body.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class SWTypeExt
5252

5353
Valueable<CSFText> Message_CannotFire;
5454
Valueable<CSFText> Message_InsufficientFunds;
55-
Valueable<int> Message_ColorScheme;
55+
ValueableIdx<ColorScheme> Message_ColorScheme;
5656
Valueable<bool> Message_FirerColor;
5757

5858
Valueable<CSFText> UIDescription;

0 commit comments

Comments
 (0)