This repository was archived by the owner on Jan 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -543,6 +543,7 @@ int LuaMan::Create()
543
543
.def (tostring (const_self))
544
544
.property (" ClassName" , &Entity::GetClassName)
545
545
.property (" PresetName" , &Entity::GetPresetName, &Entity::SetPresetName)
546
+ .property (" Description" , &Entity::GetDescription, &Entity::SetDescription)
546
547
.def (" GetModuleAndPresetName" , &Entity::GetModuleAndPresetName)
547
548
.property (" IsOriginalPreset" , &Entity::IsOriginalPreset)
548
549
.property (" ModuleID" , &Entity::GetModuleID)
Original file line number Diff line number Diff line change @@ -75,7 +75,18 @@ namespace RTE {
75
75
// Indicate where this was read from
76
76
m_DefinedInModule = reader.GetReadModuleID ();
77
77
} else if (propName == " Description" ) {
78
- reader >> m_PresetDescription;
78
+ std::string descriptionValue = reader.ReadPropValue ();
79
+ if (descriptionValue == " MultiLineText" ) {
80
+ m_PresetDescription.clear ();
81
+ while (reader.NextProperty () && reader.ReadPropName () == " AddLine" ) {
82
+ m_PresetDescription += reader.ReadPropValue () + " \n\n " ;
83
+ }
84
+ if (!m_PresetDescription.empty ()) {
85
+ m_PresetDescription.resize (m_PresetDescription.size () - 2 );
86
+ }
87
+ } else {
88
+ m_PresetDescription = descriptionValue;
89
+ }
79
90
} else if (propName == " RandomWeight" ) {
80
91
reader >> m_RandomWeight;
81
92
m_RandomWeight = Limit (m_RandomWeight, 100 , 0 );
You can’t perform that action at this time.
0 commit comments