From 35cc37deb68a2a037bc6f50fe7829a00fd87eb5c Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Wed, 3 Apr 2024 23:47:27 -0400 Subject: [PATCH] Only allow importing data locally --- src/ui/menu-ui-handler.ts | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/ui/menu-ui-handler.ts b/src/ui/menu-ui-handler.ts index 362901ff2..26103f51e 100644 --- a/src/ui/menu-ui-handler.ts +++ b/src/ui/menu-ui-handler.ts @@ -114,11 +114,13 @@ export default class MenuUiHandler extends MessageUiHandler { }); }; - manageDataOptions.push({ - label: 'Import Session', - handler: () => confirmSlot('Select a slot to import to.', () => true, slotId => this.scene.gameData.importData(GameDataType.SESSION, slotId)), - keepOpen: true - }); + if (Utils.isLocal) { + manageDataOptions.push({ + label: 'Import Session', + handler: () => confirmSlot('Select a slot to import to.', () => true, slotId => this.scene.gameData.importData(GameDataType.SESSION, slotId)), + keepOpen: true + }); + } manageDataOptions.push({ label: 'Export Session', handler: () => { @@ -138,11 +140,13 @@ export default class MenuUiHandler extends MessageUiHandler { }, keepOpen: true }); - manageDataOptions.push({ - label: 'Import Data', - handler: () => this.scene.gameData.importData(GameDataType.SYSTEM), - keepOpen: true - }); + if (Utils.isLocal) { + manageDataOptions.push({ + label: 'Import Data', + handler: () => this.scene.gameData.importData(GameDataType.SYSTEM), + keepOpen: true + }); + } manageDataOptions.push( { label: 'Export Data',