Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 5bab8c0

Browse files
committed
Added ability for datamodules to have multiline text descriptions
1 parent 48883d8 commit 5bab8c0

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

System/DataModule.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,18 @@ namespace RTE {
9696
} else if (propName == "Author") {
9797
reader >> m_Author;
9898
} else if (propName == "Description") {
99-
reader >> m_Description;
99+
std::string descriptionValue = reader.ReadPropValue();
100+
if (descriptionValue == "MultiLineText") {
101+
m_Description.clear();
102+
while (reader.NextProperty() && reader.ReadPropName() == "AddLine") {
103+
m_Description += reader.ReadPropValue() + "\n\n";
104+
}
105+
if (!m_Description.empty()) {
106+
m_Description.resize(m_Description.size() - 2);
107+
}
108+
} else {
109+
m_Description = descriptionValue;
110+
}
100111
} else if (propName == "IsFaction") {
101112
reader >> m_IsFaction;
102113
} else if (propName == "Version") {

0 commit comments

Comments
 (0)