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

Commit 22c59e9

Browse files
committed
Merge branch 'development' into FrameMan-Breakdown
2 parents 4897a60 + 9fe8eb7 commit 22c59e9

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

CHANGELOG.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,28 @@ Valid editor names are: `ActorEditor`, `GibEditor`, `SceneEditor`, `AreaEditor`
3232
- Upgraded to new, modern FMOD audio library. ([Issue #72](https://github.com/cortex-command-community/Cortex-Command-Community-Project-Source/issues/72))
3333
Sounds now play in 3D space, so they pan to the left and right, and attenuate automatically based on the player's viewpoint.
3434

35-
- `Sound`s have been renamed to `SoundContainer`s, and are able to handle multiple sounds playing at once. INI definitions have changed accordingly.
35+
- `Sounds` have been renamed to `SoundContainers`, and are able to handle multiple sounds playing at once. INI definitions have changed accordingly.
3636
They must be added using `... = SoundContainer`, and individual sounds for them must be added using `AddSound = ContentFile...`.
3737

3838
- Various lua bindings around audio have been upgraded, changed or fixed, giving modders a lot more control over sounds. See documentation for more details.
3939

4040
- Centered the loading splash screen image when `DisableLoadingScreen` is true.
4141

42-
- `Box:WithinBox` lua bindings have been renamed.
42+
- `Box:WithinBox` lua bindings have been renamed:
4343
`Box:WithinBox` is now `Box:IsWithinBox`.
4444
`Box:WithinBoxX` is now `Box:IsWithinBoxX`.
4545
`Box:WithinBoxY` is now `Box:IsWithinBoxY`.
4646

4747
- Made `AHuman` show both weapon ammo states when 2 one-handed weapons are equipped.
4848

49+
- Added support for multiple lines in item descriptions ([Issue#58](https://github.com/cortex-command-community/Cortex-Command-Community-Project-Source/issues/58)). This is done as follows:
50+
```
51+
Description = MultiLineText
52+
AddLine = First line of text
53+
AddLine = Second line of text
54+
...
55+
```
56+
4957
### Fixed
5058

5159
- Fixed LuaBind being all sorts of messed up. All lua bindings now work properly like they were before updating to the v141 toolset.

Managers/LuaMan.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,7 @@ int LuaMan::Create()
543543
.def(tostring(const_self))
544544
.property("ClassName", &Entity::GetClassName)
545545
.property("PresetName", &Entity::GetPresetName, &Entity::SetPresetName)
546+
.property("Description", &Entity::GetDescription, &Entity::SetDescription)
546547
.def("GetModuleAndPresetName", &Entity::GetModuleAndPresetName)
547548
.property("IsOriginalPreset", &Entity::IsOriginalPreset)
548549
.property("ModuleID", &Entity::GetModuleID)

System/Entity.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,18 @@ namespace RTE {
7575
// Indicate where this was read from
7676
m_DefinedInModule = reader.GetReadModuleID();
7777
} 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+
}
7990
} else if (propName == "RandomWeight") {
8091
reader >> m_RandomWeight;
8192
m_RandomWeight = Limit(m_RandomWeight, 100, 0);

0 commit comments

Comments
 (0)