Added "Give All Items" quickplay feature

This commit is contained in:
Aruki 2019-04-07 11:43:32 -07:00
parent 42d079ff49
commit da30cac887
5 changed files with 31 additions and 1 deletions

Binary file not shown.

View File

@ -44,6 +44,9 @@ CQuickplayPropertyEditor::CQuickplayPropertyEditor(SQuickplayParameters& Paramet
connect(mpUI->SpawnAtCameraLocationCheckBox, SIGNAL(toggled(bool)),
this, SLOT(OnSpawnAtCameraLocationToggled(bool)));
connect(mpUI->GiveAllItemsCheckBox, SIGNAL(toggled(bool)),
this, SLOT(OnGiveAllItemsToggled(bool)));
}
CQuickplayPropertyEditor::~CQuickplayPropertyEditor()
@ -96,3 +99,17 @@ void CQuickplayPropertyEditor::OnSpawnAtCameraLocationToggled(bool Enabled)
NDolphinIntegration::SaveQuickplayParameters(mParameters);
}
void CQuickplayPropertyEditor::OnGiveAllItemsToggled(bool Enabled)
{
if (Enabled)
{
mParameters.Features.SetFlag(EQuickplayFeature::GiveAllItems);
}
else
{
mParameters.Features.ClearFlag(EQuickplayFeature::GiveAllItems);
}
NDolphinIntegration::SaveQuickplayParameters(mParameters);
}

View File

@ -27,6 +27,7 @@ public slots:
void OnDolphinPathChanged(const QString& kNewPath);
void OnBootToAreaToggled(bool Enabled);
void OnSpawnAtCameraLocationToggled(bool Enabled);
void OnGiveAllItemsToggled(bool Enabled);
};
#endif // CQUICKPLAYPROPERTYEDITOR_H

View File

@ -7,12 +7,15 @@
<x>0</x>
<y>0</y>
<width>345</width>
<height>94</height>
<height>99</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<property name="title">
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
@ -51,6 +54,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="GiveAllItemsCheckBox">
<property name="text">
<string>Give All Items</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>

View File

@ -30,6 +30,8 @@ enum class EQuickplayFeature
JumpToArea = 0x00000001,
/** Spawn the player in the location specified by SpawnTransform */
SetSpawnPosition = 0x00000002,
/** Give the player all items on spawn */
GiveAllItems = 0x00000004,
/** Flags enabled by default */
DefaultFeatures = JumpToArea | SetSpawnPosition