Fix exception after new payload file was saved

When a new payload file would be saved, the subsequent flight would always throw an exception (until Retribution would be restarted) because the payload_cache wasn't updated until now.
This commit is contained in:
Raffson 2023-09-09 12:03:47 +02:00
parent 09749bc088
commit 0cb3702eb9
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99
2 changed files with 2 additions and 1 deletions

View File

@ -123,6 +123,7 @@ class QLoadoutEditor(QGroupBox):
f.write("local unitPayloads = ")
f.write(lua.dumps(payloads, indent=1))
f.write("\nreturn unitPayloads")
self.flight.unit_type.dcs_unit_type.add_to_payload_cache(payload_file)
self.saved.emit(payload_name)
QMessageBox.information(
QWidget(),

View File

@ -32,7 +32,7 @@ pluggy==1.2.0
pre-commit==3.3.3
pydantic==2.0.3
pydantic-settings==2.0.2
-e git+https://github.com/dcs-retribution/pydcs@b764ed61a800d95bb0db1fdb3687b393be45106d#egg=pydcs
-e git+https://github.com/dcs-retribution/pydcs@b2617f0fbeacd2e3b6066383ea9fd15a155eacb2#egg=pydcs
pyinstaller==5.13.0
pyinstaller-hooks-contrib==2023.5
pyparsing==3.1.0