Created
February 14, 2018 15:24
-
-
Save tobylane/18b2c04ef9653cc34293282be2022dc1 to your computer and use it in GitHub Desktop.
Close all dialogs not in demo when opening a full game savefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if old.demo and not TheApp.using_demo_files then | |
print("Using savegame from demo on full game") | |
-- Enable advisor to help with research | |
elseif old.demo and not TheApp.using_demo_files then | |
print("Using savegame from full game on demo") | |
-- Close dialogs not in demo | |
if old.window.open then | |
for _, v in pairs({ "dialogBankManager", "dialogBankStats", "dialogTownMap", | |
"dialogDrugCasebook", "dialogResearch","dialogStatus", "dialogCharts", "dialogPolicy" }) do | |
if old.window.v.open then | |
new.window.v:close() | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment