From c6e2e5b0e44dff4421ee4b84d3d922cc608c10fa Mon Sep 17 00:00:00 2001 From: lhw-1 Date: Fri, 23 Feb 2024 14:18:59 +0800 Subject: [PATCH 1/6] Rename Story Simulator folders to Game Simulator --- .../{storySimulator => gameSimulator}/StorySimulatorRequest.ts | 0 .../{storySimulator => gameSimulator}/StorySimulatorService.ts | 0 .../{storySimulator => gameSimulator}/StorySimulatorTypes.ts | 0 .../{storySimulator => gameSimulator}/assets/ImageAssets.ts | 0 .../background/SSBackgroundManager.ts | 0 .../boundingBoxes/SSBBoxManager.ts | 0 .../boundingBoxes/SSBBoxManagerTypes.ts | 0 .../{storySimulator => gameSimulator}/cursorMode/SSCursorMode.ts | 0 .../cursorMode/SSCursorModeConstants.ts | 0 .../cursorMode/SSCursorModeTypes.ts | 0 .../{storySimulator => gameSimulator}/logger/SSLogConstants.ts | 0 .../{storySimulator => gameSimulator}/logger/SSLogManager.ts | 0 .../logger/SSLogManagerHelper.ts | 0 .../{storySimulator => gameSimulator}/logger/SSLogManagerTypes.ts | 0 .../{storySimulator => gameSimulator}/objects/SSObjectManager.ts | 0 .../objects/SSObjectManagerTypes.ts | 0 .../scenes/ObjectPlacement/ObjectPlacement.ts | 0 .../scenes/ObjectPlacement/ObjectPlacementConstants.ts | 0 .../{storySimulator => gameSimulator}/scenes/mainMenu/MainMenu.ts | 0 .../scenes/mainMenu/MainMenuConstants.ts | 0 .../transform/SSTransformManager.ts | 0 .../transform/SSTransformManagerConstants.ts | 0 .../academy/{storySimulator => gameSimulator}/StorySimulator.tsx | 0 .../subcomponents/StorySimulatorAssetFileUploader.tsx | 0 .../subcomponents/StorySimulatorAssetSelection.tsx | 0 .../subcomponents/StorySimulatorAssetSelectionHelper.tsx | 0 .../subcomponents/StorySimulatorAssetViewer.tsx | 0 .../subcomponents/StorySimulatorChapterEditor.tsx | 0 .../subcomponents/StorySimulatorChapterSim.tsx | 0 .../subcomponents/StorySimulatorCheckpointSim.tsx | 0 .../subcomponents/StorySimulatorCheckpointTxtLoader.tsx | 0 .../subcomponents/storySimulatorGame.ts | 0 32 files changed, 0 insertions(+), 0 deletions(-) rename src/features/{storySimulator => gameSimulator}/StorySimulatorRequest.ts (100%) rename src/features/{storySimulator => gameSimulator}/StorySimulatorService.ts (100%) rename src/features/{storySimulator => gameSimulator}/StorySimulatorTypes.ts (100%) rename src/features/{storySimulator => gameSimulator}/assets/ImageAssets.ts (100%) rename src/features/{storySimulator => gameSimulator}/background/SSBackgroundManager.ts (100%) rename src/features/{storySimulator => gameSimulator}/boundingBoxes/SSBBoxManager.ts (100%) rename src/features/{storySimulator => gameSimulator}/boundingBoxes/SSBBoxManagerTypes.ts (100%) rename src/features/{storySimulator => gameSimulator}/cursorMode/SSCursorMode.ts (100%) rename src/features/{storySimulator => gameSimulator}/cursorMode/SSCursorModeConstants.ts (100%) rename src/features/{storySimulator => gameSimulator}/cursorMode/SSCursorModeTypes.ts (100%) rename src/features/{storySimulator => gameSimulator}/logger/SSLogConstants.ts (100%) rename src/features/{storySimulator => gameSimulator}/logger/SSLogManager.ts (100%) rename src/features/{storySimulator => gameSimulator}/logger/SSLogManagerHelper.ts (100%) rename src/features/{storySimulator => gameSimulator}/logger/SSLogManagerTypes.ts (100%) rename src/features/{storySimulator => gameSimulator}/objects/SSObjectManager.ts (100%) rename src/features/{storySimulator => gameSimulator}/objects/SSObjectManagerTypes.ts (100%) rename src/features/{storySimulator => gameSimulator}/scenes/ObjectPlacement/ObjectPlacement.ts (100%) rename src/features/{storySimulator => gameSimulator}/scenes/ObjectPlacement/ObjectPlacementConstants.ts (100%) rename src/features/{storySimulator => gameSimulator}/scenes/mainMenu/MainMenu.ts (100%) rename src/features/{storySimulator => gameSimulator}/scenes/mainMenu/MainMenuConstants.ts (100%) rename src/features/{storySimulator => gameSimulator}/transform/SSTransformManager.ts (100%) rename src/features/{storySimulator => gameSimulator}/transform/SSTransformManagerConstants.ts (100%) rename src/pages/academy/{storySimulator => gameSimulator}/StorySimulator.tsx (100%) rename src/pages/academy/{storySimulator => gameSimulator}/subcomponents/StorySimulatorAssetFileUploader.tsx (100%) rename src/pages/academy/{storySimulator => gameSimulator}/subcomponents/StorySimulatorAssetSelection.tsx (100%) rename src/pages/academy/{storySimulator => gameSimulator}/subcomponents/StorySimulatorAssetSelectionHelper.tsx (100%) rename src/pages/academy/{storySimulator => gameSimulator}/subcomponents/StorySimulatorAssetViewer.tsx (100%) rename src/pages/academy/{storySimulator => gameSimulator}/subcomponents/StorySimulatorChapterEditor.tsx (100%) rename src/pages/academy/{storySimulator => gameSimulator}/subcomponents/StorySimulatorChapterSim.tsx (100%) rename src/pages/academy/{storySimulator => gameSimulator}/subcomponents/StorySimulatorCheckpointSim.tsx (100%) rename src/pages/academy/{storySimulator => gameSimulator}/subcomponents/StorySimulatorCheckpointTxtLoader.tsx (100%) rename src/pages/academy/{storySimulator => gameSimulator}/subcomponents/storySimulatorGame.ts (100%) diff --git a/src/features/storySimulator/StorySimulatorRequest.ts b/src/features/gameSimulator/StorySimulatorRequest.ts similarity index 100% rename from src/features/storySimulator/StorySimulatorRequest.ts rename to src/features/gameSimulator/StorySimulatorRequest.ts diff --git a/src/features/storySimulator/StorySimulatorService.ts b/src/features/gameSimulator/StorySimulatorService.ts similarity index 100% rename from src/features/storySimulator/StorySimulatorService.ts rename to src/features/gameSimulator/StorySimulatorService.ts diff --git a/src/features/storySimulator/StorySimulatorTypes.ts b/src/features/gameSimulator/StorySimulatorTypes.ts similarity index 100% rename from src/features/storySimulator/StorySimulatorTypes.ts rename to src/features/gameSimulator/StorySimulatorTypes.ts diff --git a/src/features/storySimulator/assets/ImageAssets.ts b/src/features/gameSimulator/assets/ImageAssets.ts similarity index 100% rename from src/features/storySimulator/assets/ImageAssets.ts rename to src/features/gameSimulator/assets/ImageAssets.ts diff --git a/src/features/storySimulator/background/SSBackgroundManager.ts b/src/features/gameSimulator/background/SSBackgroundManager.ts similarity index 100% rename from src/features/storySimulator/background/SSBackgroundManager.ts rename to src/features/gameSimulator/background/SSBackgroundManager.ts diff --git a/src/features/storySimulator/boundingBoxes/SSBBoxManager.ts b/src/features/gameSimulator/boundingBoxes/SSBBoxManager.ts similarity index 100% rename from src/features/storySimulator/boundingBoxes/SSBBoxManager.ts rename to src/features/gameSimulator/boundingBoxes/SSBBoxManager.ts diff --git a/src/features/storySimulator/boundingBoxes/SSBBoxManagerTypes.ts b/src/features/gameSimulator/boundingBoxes/SSBBoxManagerTypes.ts similarity index 100% rename from src/features/storySimulator/boundingBoxes/SSBBoxManagerTypes.ts rename to src/features/gameSimulator/boundingBoxes/SSBBoxManagerTypes.ts diff --git a/src/features/storySimulator/cursorMode/SSCursorMode.ts b/src/features/gameSimulator/cursorMode/SSCursorMode.ts similarity index 100% rename from src/features/storySimulator/cursorMode/SSCursorMode.ts rename to src/features/gameSimulator/cursorMode/SSCursorMode.ts diff --git a/src/features/storySimulator/cursorMode/SSCursorModeConstants.ts b/src/features/gameSimulator/cursorMode/SSCursorModeConstants.ts similarity index 100% rename from src/features/storySimulator/cursorMode/SSCursorModeConstants.ts rename to src/features/gameSimulator/cursorMode/SSCursorModeConstants.ts diff --git a/src/features/storySimulator/cursorMode/SSCursorModeTypes.ts b/src/features/gameSimulator/cursorMode/SSCursorModeTypes.ts similarity index 100% rename from src/features/storySimulator/cursorMode/SSCursorModeTypes.ts rename to src/features/gameSimulator/cursorMode/SSCursorModeTypes.ts diff --git a/src/features/storySimulator/logger/SSLogConstants.ts b/src/features/gameSimulator/logger/SSLogConstants.ts similarity index 100% rename from src/features/storySimulator/logger/SSLogConstants.ts rename to src/features/gameSimulator/logger/SSLogConstants.ts diff --git a/src/features/storySimulator/logger/SSLogManager.ts b/src/features/gameSimulator/logger/SSLogManager.ts similarity index 100% rename from src/features/storySimulator/logger/SSLogManager.ts rename to src/features/gameSimulator/logger/SSLogManager.ts diff --git a/src/features/storySimulator/logger/SSLogManagerHelper.ts b/src/features/gameSimulator/logger/SSLogManagerHelper.ts similarity index 100% rename from src/features/storySimulator/logger/SSLogManagerHelper.ts rename to src/features/gameSimulator/logger/SSLogManagerHelper.ts diff --git a/src/features/storySimulator/logger/SSLogManagerTypes.ts b/src/features/gameSimulator/logger/SSLogManagerTypes.ts similarity index 100% rename from src/features/storySimulator/logger/SSLogManagerTypes.ts rename to src/features/gameSimulator/logger/SSLogManagerTypes.ts diff --git a/src/features/storySimulator/objects/SSObjectManager.ts b/src/features/gameSimulator/objects/SSObjectManager.ts similarity index 100% rename from src/features/storySimulator/objects/SSObjectManager.ts rename to src/features/gameSimulator/objects/SSObjectManager.ts diff --git a/src/features/storySimulator/objects/SSObjectManagerTypes.ts b/src/features/gameSimulator/objects/SSObjectManagerTypes.ts similarity index 100% rename from src/features/storySimulator/objects/SSObjectManagerTypes.ts rename to src/features/gameSimulator/objects/SSObjectManagerTypes.ts diff --git a/src/features/storySimulator/scenes/ObjectPlacement/ObjectPlacement.ts b/src/features/gameSimulator/scenes/ObjectPlacement/ObjectPlacement.ts similarity index 100% rename from src/features/storySimulator/scenes/ObjectPlacement/ObjectPlacement.ts rename to src/features/gameSimulator/scenes/ObjectPlacement/ObjectPlacement.ts diff --git a/src/features/storySimulator/scenes/ObjectPlacement/ObjectPlacementConstants.ts b/src/features/gameSimulator/scenes/ObjectPlacement/ObjectPlacementConstants.ts similarity index 100% rename from src/features/storySimulator/scenes/ObjectPlacement/ObjectPlacementConstants.ts rename to src/features/gameSimulator/scenes/ObjectPlacement/ObjectPlacementConstants.ts diff --git a/src/features/storySimulator/scenes/mainMenu/MainMenu.ts b/src/features/gameSimulator/scenes/mainMenu/MainMenu.ts similarity index 100% rename from src/features/storySimulator/scenes/mainMenu/MainMenu.ts rename to src/features/gameSimulator/scenes/mainMenu/MainMenu.ts diff --git a/src/features/storySimulator/scenes/mainMenu/MainMenuConstants.ts b/src/features/gameSimulator/scenes/mainMenu/MainMenuConstants.ts similarity index 100% rename from src/features/storySimulator/scenes/mainMenu/MainMenuConstants.ts rename to src/features/gameSimulator/scenes/mainMenu/MainMenuConstants.ts diff --git a/src/features/storySimulator/transform/SSTransformManager.ts b/src/features/gameSimulator/transform/SSTransformManager.ts similarity index 100% rename from src/features/storySimulator/transform/SSTransformManager.ts rename to src/features/gameSimulator/transform/SSTransformManager.ts diff --git a/src/features/storySimulator/transform/SSTransformManagerConstants.ts b/src/features/gameSimulator/transform/SSTransformManagerConstants.ts similarity index 100% rename from src/features/storySimulator/transform/SSTransformManagerConstants.ts rename to src/features/gameSimulator/transform/SSTransformManagerConstants.ts diff --git a/src/pages/academy/storySimulator/StorySimulator.tsx b/src/pages/academy/gameSimulator/StorySimulator.tsx similarity index 100% rename from src/pages/academy/storySimulator/StorySimulator.tsx rename to src/pages/academy/gameSimulator/StorySimulator.tsx diff --git a/src/pages/academy/storySimulator/subcomponents/StorySimulatorAssetFileUploader.tsx b/src/pages/academy/gameSimulator/subcomponents/StorySimulatorAssetFileUploader.tsx similarity index 100% rename from src/pages/academy/storySimulator/subcomponents/StorySimulatorAssetFileUploader.tsx rename to src/pages/academy/gameSimulator/subcomponents/StorySimulatorAssetFileUploader.tsx diff --git a/src/pages/academy/storySimulator/subcomponents/StorySimulatorAssetSelection.tsx b/src/pages/academy/gameSimulator/subcomponents/StorySimulatorAssetSelection.tsx similarity index 100% rename from src/pages/academy/storySimulator/subcomponents/StorySimulatorAssetSelection.tsx rename to src/pages/academy/gameSimulator/subcomponents/StorySimulatorAssetSelection.tsx diff --git a/src/pages/academy/storySimulator/subcomponents/StorySimulatorAssetSelectionHelper.tsx b/src/pages/academy/gameSimulator/subcomponents/StorySimulatorAssetSelectionHelper.tsx similarity index 100% rename from src/pages/academy/storySimulator/subcomponents/StorySimulatorAssetSelectionHelper.tsx rename to src/pages/academy/gameSimulator/subcomponents/StorySimulatorAssetSelectionHelper.tsx diff --git a/src/pages/academy/storySimulator/subcomponents/StorySimulatorAssetViewer.tsx b/src/pages/academy/gameSimulator/subcomponents/StorySimulatorAssetViewer.tsx similarity index 100% rename from src/pages/academy/storySimulator/subcomponents/StorySimulatorAssetViewer.tsx rename to src/pages/academy/gameSimulator/subcomponents/StorySimulatorAssetViewer.tsx diff --git a/src/pages/academy/storySimulator/subcomponents/StorySimulatorChapterEditor.tsx b/src/pages/academy/gameSimulator/subcomponents/StorySimulatorChapterEditor.tsx similarity index 100% rename from src/pages/academy/storySimulator/subcomponents/StorySimulatorChapterEditor.tsx rename to src/pages/academy/gameSimulator/subcomponents/StorySimulatorChapterEditor.tsx diff --git a/src/pages/academy/storySimulator/subcomponents/StorySimulatorChapterSim.tsx b/src/pages/academy/gameSimulator/subcomponents/StorySimulatorChapterSim.tsx similarity index 100% rename from src/pages/academy/storySimulator/subcomponents/StorySimulatorChapterSim.tsx rename to src/pages/academy/gameSimulator/subcomponents/StorySimulatorChapterSim.tsx diff --git a/src/pages/academy/storySimulator/subcomponents/StorySimulatorCheckpointSim.tsx b/src/pages/academy/gameSimulator/subcomponents/StorySimulatorCheckpointSim.tsx similarity index 100% rename from src/pages/academy/storySimulator/subcomponents/StorySimulatorCheckpointSim.tsx rename to src/pages/academy/gameSimulator/subcomponents/StorySimulatorCheckpointSim.tsx diff --git a/src/pages/academy/storySimulator/subcomponents/StorySimulatorCheckpointTxtLoader.tsx b/src/pages/academy/gameSimulator/subcomponents/StorySimulatorCheckpointTxtLoader.tsx similarity index 100% rename from src/pages/academy/storySimulator/subcomponents/StorySimulatorCheckpointTxtLoader.tsx rename to src/pages/academy/gameSimulator/subcomponents/StorySimulatorCheckpointTxtLoader.tsx diff --git a/src/pages/academy/storySimulator/subcomponents/storySimulatorGame.ts b/src/pages/academy/gameSimulator/subcomponents/storySimulatorGame.ts similarity index 100% rename from src/pages/academy/storySimulator/subcomponents/storySimulatorGame.ts rename to src/pages/academy/gameSimulator/subcomponents/storySimulatorGame.ts From 569cc4fa8760fd3d941f65e39c07af8f0cafed62 Mon Sep 17 00:00:00 2001 From: lhw-1 Date: Fri, 23 Feb 2024 14:35:30 +0800 Subject: [PATCH 2/6] Rename Story Simulator files to Game Simulator --- .../{StorySimulatorRequest.ts => GameSimulatorRequest.ts} | 0 .../{StorySimulatorService.ts => GameSimulatorService.ts} | 0 .../{StorySimulatorTypes.ts => GameSimulatorTypes.ts} | 0 .../gameSimulator/{StorySimulator.tsx => GameSimulator.tsx} | 0 ...orAssetFileUploader.tsx => GameSimulatorAssetFileUploader.tsx} | 0 ...imulatorAssetSelection.tsx => GameSimulatorAssetSelection.tsx} | 0 ...tSelectionHelper.tsx => GameSimulatorAssetSelectionHelper.tsx} | 0 ...StorySimulatorAssetViewer.tsx => GameSimulatorAssetViewer.tsx} | 0 ...ySimulatorChapterEditor.tsx => GameSimulatorChapterEditor.tsx} | 0 .../{StorySimulatorChapterSim.tsx => GameSimulatorChapterSim.tsx} | 0 ...ySimulatorCheckpointSim.tsx => GameSimulatorCheckpointSim.tsx} | 0 ...eckpointTxtLoader.tsx => GameSimulatorCheckpointTxtLoader.tsx} | 0 .../subcomponents/{storySimulatorGame.ts => GameSimulatorGame.ts} | 0 13 files changed, 0 insertions(+), 0 deletions(-) rename src/features/gameSimulator/{StorySimulatorRequest.ts => GameSimulatorRequest.ts} (100%) rename src/features/gameSimulator/{StorySimulatorService.ts => GameSimulatorService.ts} (100%) rename src/features/gameSimulator/{StorySimulatorTypes.ts => GameSimulatorTypes.ts} (100%) rename src/pages/academy/gameSimulator/{StorySimulator.tsx => GameSimulator.tsx} (100%) rename src/pages/academy/gameSimulator/subcomponents/{StorySimulatorAssetFileUploader.tsx => GameSimulatorAssetFileUploader.tsx} (100%) rename src/pages/academy/gameSimulator/subcomponents/{StorySimulatorAssetSelection.tsx => GameSimulatorAssetSelection.tsx} (100%) rename src/pages/academy/gameSimulator/subcomponents/{StorySimulatorAssetSelectionHelper.tsx => GameSimulatorAssetSelectionHelper.tsx} (100%) rename src/pages/academy/gameSimulator/subcomponents/{StorySimulatorAssetViewer.tsx => GameSimulatorAssetViewer.tsx} (100%) rename src/pages/academy/gameSimulator/subcomponents/{StorySimulatorChapterEditor.tsx => GameSimulatorChapterEditor.tsx} (100%) rename src/pages/academy/gameSimulator/subcomponents/{StorySimulatorChapterSim.tsx => GameSimulatorChapterSim.tsx} (100%) rename src/pages/academy/gameSimulator/subcomponents/{StorySimulatorCheckpointSim.tsx => GameSimulatorCheckpointSim.tsx} (100%) rename src/pages/academy/gameSimulator/subcomponents/{StorySimulatorCheckpointTxtLoader.tsx => GameSimulatorCheckpointTxtLoader.tsx} (100%) rename src/pages/academy/gameSimulator/subcomponents/{storySimulatorGame.ts => GameSimulatorGame.ts} (100%) diff --git a/src/features/gameSimulator/StorySimulatorRequest.ts b/src/features/gameSimulator/GameSimulatorRequest.ts similarity index 100% rename from src/features/gameSimulator/StorySimulatorRequest.ts rename to src/features/gameSimulator/GameSimulatorRequest.ts diff --git a/src/features/gameSimulator/StorySimulatorService.ts b/src/features/gameSimulator/GameSimulatorService.ts similarity index 100% rename from src/features/gameSimulator/StorySimulatorService.ts rename to src/features/gameSimulator/GameSimulatorService.ts diff --git a/src/features/gameSimulator/StorySimulatorTypes.ts b/src/features/gameSimulator/GameSimulatorTypes.ts similarity index 100% rename from src/features/gameSimulator/StorySimulatorTypes.ts rename to src/features/gameSimulator/GameSimulatorTypes.ts diff --git a/src/pages/academy/gameSimulator/StorySimulator.tsx b/src/pages/academy/gameSimulator/GameSimulator.tsx similarity index 100% rename from src/pages/academy/gameSimulator/StorySimulator.tsx rename to src/pages/academy/gameSimulator/GameSimulator.tsx diff --git a/src/pages/academy/gameSimulator/subcomponents/StorySimulatorAssetFileUploader.tsx b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorAssetFileUploader.tsx similarity index 100% rename from src/pages/academy/gameSimulator/subcomponents/StorySimulatorAssetFileUploader.tsx rename to src/pages/academy/gameSimulator/subcomponents/GameSimulatorAssetFileUploader.tsx diff --git a/src/pages/academy/gameSimulator/subcomponents/StorySimulatorAssetSelection.tsx b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorAssetSelection.tsx similarity index 100% rename from src/pages/academy/gameSimulator/subcomponents/StorySimulatorAssetSelection.tsx rename to src/pages/academy/gameSimulator/subcomponents/GameSimulatorAssetSelection.tsx diff --git a/src/pages/academy/gameSimulator/subcomponents/StorySimulatorAssetSelectionHelper.tsx b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorAssetSelectionHelper.tsx similarity index 100% rename from src/pages/academy/gameSimulator/subcomponents/StorySimulatorAssetSelectionHelper.tsx rename to src/pages/academy/gameSimulator/subcomponents/GameSimulatorAssetSelectionHelper.tsx diff --git a/src/pages/academy/gameSimulator/subcomponents/StorySimulatorAssetViewer.tsx b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorAssetViewer.tsx similarity index 100% rename from src/pages/academy/gameSimulator/subcomponents/StorySimulatorAssetViewer.tsx rename to src/pages/academy/gameSimulator/subcomponents/GameSimulatorAssetViewer.tsx diff --git a/src/pages/academy/gameSimulator/subcomponents/StorySimulatorChapterEditor.tsx b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorChapterEditor.tsx similarity index 100% rename from src/pages/academy/gameSimulator/subcomponents/StorySimulatorChapterEditor.tsx rename to src/pages/academy/gameSimulator/subcomponents/GameSimulatorChapterEditor.tsx diff --git a/src/pages/academy/gameSimulator/subcomponents/StorySimulatorChapterSim.tsx b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorChapterSim.tsx similarity index 100% rename from src/pages/academy/gameSimulator/subcomponents/StorySimulatorChapterSim.tsx rename to src/pages/academy/gameSimulator/subcomponents/GameSimulatorChapterSim.tsx diff --git a/src/pages/academy/gameSimulator/subcomponents/StorySimulatorCheckpointSim.tsx b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorCheckpointSim.tsx similarity index 100% rename from src/pages/academy/gameSimulator/subcomponents/StorySimulatorCheckpointSim.tsx rename to src/pages/academy/gameSimulator/subcomponents/GameSimulatorCheckpointSim.tsx diff --git a/src/pages/academy/gameSimulator/subcomponents/StorySimulatorCheckpointTxtLoader.tsx b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorCheckpointTxtLoader.tsx similarity index 100% rename from src/pages/academy/gameSimulator/subcomponents/StorySimulatorCheckpointTxtLoader.tsx rename to src/pages/academy/gameSimulator/subcomponents/GameSimulatorCheckpointTxtLoader.tsx diff --git a/src/pages/academy/gameSimulator/subcomponents/storySimulatorGame.ts b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorGame.ts similarity index 100% rename from src/pages/academy/gameSimulator/subcomponents/storySimulatorGame.ts rename to src/pages/academy/gameSimulator/subcomponents/GameSimulatorGame.ts From d502b6685c00b54e3c0d1ebebfe143f1d6f4ed2e Mon Sep 17 00:00:00 2001 From: lhw-1 Date: Fri, 23 Feb 2024 14:46:00 +0800 Subject: [PATCH 3/6] Rename Story Simulator references to Game Simulator --- .../subcomponents/AcademyNavigationBar.tsx | 2 +- .../__tests__/AcademyNavigationBar.tsx | 8 +-- .../AcademyNavigationBar.tsx.snap | 10 ++-- src/features/game/SourceAcademyGame.ts | 14 ++--- src/features/game/escape/GameEscapeManager.ts | 2 +- src/features/game/save/GameSaveManager.ts | 4 +- .../CheckpointTransition.ts | 2 +- src/features/game/utils/TxtLoaderUtils.ts | 2 +- .../gameSimulator/GameSimulatorService.ts | 4 +- .../gameSimulator/GameSimulatorTypes.ts | 2 +- .../gameSimulator/assets/ImageAssets.ts | 2 +- .../background/SSBackgroundManager.ts | 2 +- .../boundingBoxes/SSBBoxManager.ts | 2 +- .../gameSimulator/objects/SSObjectManager.ts | 2 +- .../scenes/ObjectPlacement/ObjectPlacement.ts | 8 +-- .../gameSimulator/scenes/mainMenu/MainMenu.ts | 20 +++---- src/pages/academy/Academy.tsx | 4 +- .../academy/gameSimulator/GameSimulator.tsx | 54 +++++++++---------- .../GameSimulatorAssetFileUploader.tsx | 4 +- .../GameSimulatorAssetSelection.tsx | 14 ++--- .../GameSimulatorChapterEditor.tsx | 6 +-- .../subcomponents/GameSimulatorChapterSim.tsx | 8 +-- .../GameSimulatorCheckpointSim.tsx | 8 +-- .../subcomponents/GameSimulatorGame.ts | 8 +-- src/styles/_storysimulator.scss | 4 +- src/styles/index.scss | 2 +- 26 files changed, 99 insertions(+), 99 deletions(-) diff --git a/src/commons/navigationBar/subcomponents/AcademyNavigationBar.tsx b/src/commons/navigationBar/subcomponents/AcademyNavigationBar.tsx index 48e0e9162d..9644bd177a 100644 --- a/src/commons/navigationBar/subcomponents/AcademyNavigationBar.tsx +++ b/src/commons/navigationBar/subcomponents/AcademyNavigationBar.tsx @@ -114,7 +114,7 @@ const getStaffNavlinkInfo = ({ hiddenInBreakpoints: ['xs', 'sm', 'md'] }, { - to: `/courses/${courseId}/storysimulator`, + to: `/courses/${courseId}/gamesimulator`, icon: IconNames.CROWN, text: 'Game Simulator', disabled: !isStaffOrAdmin, diff --git a/src/commons/navigationBar/subcomponents/__tests__/AcademyNavigationBar.tsx b/src/commons/navigationBar/subcomponents/__tests__/AcademyNavigationBar.tsx index f4c464f7fc..1256b291a7 100644 --- a/src/commons/navigationBar/subcomponents/__tests__/AcademyNavigationBar.tsx +++ b/src/commons/navigationBar/subcomponents/__tests__/AcademyNavigationBar.tsx @@ -11,7 +11,7 @@ jest.mock('react-redux', () => ({ const useSelectorMock = useSelector as jest.Mock; const assessmentTypes = ['Missions', 'Quests', 'Paths', 'Contests', 'Others']; -const staffRoutes = ['grading', 'groundcontrol', 'sourcereel', 'storysimulator', 'dashboard']; +const staffRoutes = ['grading', 'groundcontrol', 'sourcereel', 'gamesimulator', 'dashboard']; const adminRoutes = ['adminpanel']; const courseId = 0; const createCoursePath = (path: string) => `/courses/${courseId}/${path}`; @@ -43,7 +43,7 @@ const mockProps = { }; const element = ; -test('MissionControl, GroundControl, Sourcereel, StorySimulator, Dashboard, Grading and AdminPanel NavLinks do NOT render for Role.Student', () => { +test('MissionControl, GroundControl, Sourcereel, GameSimulator, Dashboard, Grading and AdminPanel NavLinks do NOT render for Role.Student', () => { useSelectorMock.mockReturnValue({ role: Role.Student, courseId @@ -57,7 +57,7 @@ test('MissionControl, GroundControl, Sourcereel, StorySimulator, Dashboard, Grad validateAdminPaths(tree, false); }); -test('MissionControl, GroundControl, Sourcereel, StorySimulator, Dashboard and Grading NavLinks render for Role.Staff', () => { +test('MissionControl, GroundControl, Sourcereel, GameSimulator, Dashboard and Grading NavLinks render for Role.Staff', () => { useSelectorMock.mockReturnValueOnce({ role: Role.Staff, courseId @@ -71,7 +71,7 @@ test('MissionControl, GroundControl, Sourcereel, StorySimulator, Dashboard and G validateAdminPaths(tree, false); }); -test('MissionControl, GroundControl, Sourcereel, StorySimulator, Dashboard, Grading and AdminPanel NavLinks render for Role.Admin', () => { +test('MissionControl, GroundControl, Sourcereel, GameSimulator, Dashboard, Grading and AdminPanel NavLinks render for Role.Admin', () => { useSelectorMock.mockReturnValueOnce({ role: Role.Admin, courseId diff --git a/src/commons/navigationBar/subcomponents/__tests__/__snapshots__/AcademyNavigationBar.tsx.snap b/src/commons/navigationBar/subcomponents/__tests__/__snapshots__/AcademyNavigationBar.tsx.snap index 7f2e757576..85b0c57c33 100644 --- a/src/commons/navigationBar/subcomponents/__tests__/__snapshots__/AcademyNavigationBar.tsx.snap +++ b/src/commons/navigationBar/subcomponents/__tests__/__snapshots__/AcademyNavigationBar.tsx.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`MissionControl, GroundControl, Sourcereel, StorySimulator, Dashboard and Grading NavLinks render for Role.Staff 1`] = ` +exports[`MissionControl, GroundControl, Sourcereel, GameSimulator, Dashboard and Grading NavLinks render for Role.Staff 1`] = ` @@ -182,7 +182,7 @@ exports[`MissionControl, GroundControl, Sourcereel, StorySimulator, Dashboard an `; -exports[`MissionControl, GroundControl, Sourcereel, StorySimulator, Dashboard, Grading and AdminPanel NavLinks do NOT render for Role.Student 1`] = ` +exports[`MissionControl, GroundControl, Sourcereel, GameSimulator, Dashboard, Grading and AdminPanel NavLinks do NOT render for Role.Student 1`] = ` @@ -346,7 +346,7 @@ exports[`MissionControl, GroundControl, Sourcereel, StorySimulator, Dashboard, G `; -exports[`MissionControl, GroundControl, Sourcereel, StorySimulator, Dashboard, Grading and AdminPanel NavLinks render for Role.Admin 1`] = ` +exports[`MissionControl, GroundControl, Sourcereel, GameSimulator, Dashboard, Grading and AdminPanel NavLinks render for Role.Admin 1`] = ` @@ -528,7 +528,7 @@ exports[`MissionControl, GroundControl, Sourcereel, StorySimulator, Dashboard, G ; saveManager: GameSaveManager; - setStorySimState: (value: React.SetStateAction) => void; + setGameSimState: (value: React.SetStateAction) => void; soundManager: GameSoundManager; ssChapterSimFilenames: string[]; userStateManager: GameUserStateManager; @@ -74,7 +74,7 @@ export default class SourceAcademyGame extends Phaser.Game { roomCode: '', roomPreviewMapping: new Map(), saveManager: new GameSaveManager(), - setStorySimState: Constants.nullFunction, + setGameSimState: Constants.nullFunction, soundManager: new GameSoundManager(), ssChapterSimFilenames: [], userStateManager: new GameUserStateManager() @@ -107,8 +107,8 @@ export default class SourceAcademyGame extends Phaser.Game { this.global.goals = goals; } - public setStorySimStateSetter(setStorySimState: (value: React.SetStateAction) => void) { - this.setStorySimState = setStorySimState; + public setGameSimStateSetter(setGameSimState: (value: React.SetStateAction) => void) { + this.setGameSimState = setGameSimState; } public setRoomPreviewMapping(mapping: Map) { @@ -123,8 +123,8 @@ export default class SourceAcademyGame extends Phaser.Game { this.global.roomCode = await getRoomPreviewCode(); } - public setStorySimState(state: StorySimState) { - this.global.setStorySimState(state); + public setGameSimState(state: GameSimState) { + this.global.setGameSimState(state); } public setCurrentSceneRef(scene: Phaser.Scene) { diff --git a/src/features/game/escape/GameEscapeManager.ts b/src/features/game/escape/GameEscapeManager.ts index 2ce5a18014..ca5ddcece7 100644 --- a/src/features/game/escape/GameEscapeManager.ts +++ b/src/features/game/escape/GameEscapeManager.ts @@ -155,7 +155,7 @@ class GameEscapeManager implements IGameUI { callback: () => { this.cleanUp(); if (SourceAcademyGame.getInstance().isGameType(GameType.Simulator)) { - this.scene.scene.start('StorySimulatorMenu'); + this.scene.scene.start('GameSimulatorMenu'); } else { this.scene.scene.start('MainMenu'); } diff --git a/src/features/game/save/GameSaveManager.ts b/src/features/game/save/GameSaveManager.ts index d957d68455..8932827064 100644 --- a/src/features/game/save/GameSaveManager.ts +++ b/src/features/game/save/GameSaveManager.ts @@ -32,7 +32,7 @@ export default class GameSaveManager { * Updates the save manager with chapter number and checkpoint number * if player has chosen a chapter/checkpoint to play with. * - * Chapter number and checkpoint number can be -1 if inside the Story Simulator, + * Chapter number and checkpoint number can be -1 if inside the Game Simulator, * * @param chapterNum chapter number * @param checkpointNum checkpoint number @@ -56,7 +56,7 @@ export default class GameSaveManager { * informtion from GameManager, GameStateManager, or other in-game managers, * and converts them into JSON format to be saved to backend. * - * Only called when playing the Game (not Story Simulator), because Story Simulator + * Only called when playing the Game (not Game Simulator), because Game Simulator * shouldn't save game state to backend. */ public async saveGame() { diff --git a/src/features/game/scenes/checkpointTransition/CheckpointTransition.ts b/src/features/game/scenes/checkpointTransition/CheckpointTransition.ts index 13d63988f7..fd15749d9c 100644 --- a/src/features/game/scenes/checkpointTransition/CheckpointTransition.ts +++ b/src/features/game/scenes/checkpointTransition/CheckpointTransition.ts @@ -13,7 +13,7 @@ import CheckpointConstants, { transitionTextStyle } from './CheckpointTransition * Internally, we use this scene to fully load the next checkpoint, * before finally loading the next scene. * - * In story simulator, the next checkpoint is loaded based on the + * In Game simulator, the next checkpoint is loaded based on the * chapterSimStack using the callGameManagerForSim function. * * We cannot load these informations at the start of GameManager as diff --git a/src/features/game/utils/TxtLoaderUtils.ts b/src/features/game/utils/TxtLoaderUtils.ts index 0dcb1e55af..5a06de5663 100644 --- a/src/features/game/utils/TxtLoaderUtils.ts +++ b/src/features/game/utils/TxtLoaderUtils.ts @@ -51,7 +51,7 @@ export async function callGameManagerForSim() { const scene = SourceAcademyGame.getInstance().getCurrentSceneRef(); const checkpointFilenames = SourceAcademyGame.getInstance().getSSChapterSimFilenames(); if (!checkpointFilenames.length) { - scene.scene.start('StorySimulatorMenu'); + scene.scene.start('GameSimulatorMenu'); return; } const filename = checkpointFilenames.pop() as string; diff --git a/src/features/gameSimulator/GameSimulatorService.ts b/src/features/gameSimulator/GameSimulatorService.ts index ec6982b585..a8cafb305c 100644 --- a/src/features/gameSimulator/GameSimulatorService.ts +++ b/src/features/gameSimulator/GameSimulatorService.ts @@ -1,7 +1,7 @@ import _ from 'lodash'; -import { sendAdminStoryRequest, sendAssetRequest, sendStoryRequest } from './StorySimulatorRequest'; -import { ChapterDetail } from './StorySimulatorTypes'; +import { sendAdminStoryRequest, sendAssetRequest, sendStoryRequest } from './GameSimulatorRequest'; +import { ChapterDetail } from './GameSimulatorTypes'; /** * List of all folders to fetch S3 assets from diff --git a/src/features/gameSimulator/GameSimulatorTypes.ts b/src/features/gameSimulator/GameSimulatorTypes.ts index 77d18e6bac..13de83e858 100644 --- a/src/features/gameSimulator/GameSimulatorTypes.ts +++ b/src/features/gameSimulator/GameSimulatorTypes.ts @@ -1,4 +1,4 @@ -export enum StorySimState { +export enum GameSimState { Default = 'Default', ObjectPlacement = 'ObjectPlacement', AssetUploader = 'AssetUploader', diff --git a/src/features/gameSimulator/assets/ImageAssets.ts b/src/features/gameSimulator/assets/ImageAssets.ts index 661d67577e..fcadb05256 100644 --- a/src/features/gameSimulator/assets/ImageAssets.ts +++ b/src/features/gameSimulator/assets/ImageAssets.ts @@ -1,7 +1,7 @@ import { AssetMap, AssetType, ImageAsset } from 'src/features/game/assets/AssetsTypes'; const SSImageAssets: AssetMap = { - storySimBg: { + gameSimBg: { type: AssetType.Image, key: 'student-room', path: '/locations/deathCube_ext/shields-down.png' diff --git a/src/features/gameSimulator/background/SSBackgroundManager.ts b/src/features/gameSimulator/background/SSBackgroundManager.ts index d977d6bd49..8210f70ffb 100644 --- a/src/features/gameSimulator/background/SSBackgroundManager.ts +++ b/src/features/gameSimulator/background/SSBackgroundManager.ts @@ -7,7 +7,7 @@ import { loadImage } from '../../game/utils/LoaderUtils'; import ObjectPlacement from '../scenes/ObjectPlacement/ObjectPlacement'; /** - * This manager manages the background for Story Simulator's Object Placement scene + * This manager manages the background for Game Simulator's Object Placement scene * It handles (1) storing of information on the chosen background (2) Rendering background */ export default class SSBackgroundManager { diff --git a/src/features/gameSimulator/boundingBoxes/SSBBoxManager.ts b/src/features/gameSimulator/boundingBoxes/SSBBoxManager.ts index fe14608aa5..7c9ab085dd 100644 --- a/src/features/gameSimulator/boundingBoxes/SSBBoxManager.ts +++ b/src/features/gameSimulator/boundingBoxes/SSBBoxManager.ts @@ -11,7 +11,7 @@ import ObjectPlacement from '../scenes/ObjectPlacement/ObjectPlacement'; import { SSBBoxDetail } from './SSBBoxManagerTypes'; /** - * This manager manages the bounding boxes for Story Simulator's Object Placement scene + * This manager manages the bounding boxes for Game Simulator's Object Placement scene * * It handles: * (1) Storing of information on bounding boxes diff --git a/src/features/gameSimulator/objects/SSObjectManager.ts b/src/features/gameSimulator/objects/SSObjectManager.ts index c279b8b288..f7093f4764 100644 --- a/src/features/gameSimulator/objects/SSObjectManager.ts +++ b/src/features/gameSimulator/objects/SSObjectManager.ts @@ -11,7 +11,7 @@ import ObjectPlacement from '../scenes/ObjectPlacement/ObjectPlacement'; import { SSObjectDetail } from './SSObjectManagerTypes'; /** - * This manager manages the object (image assets) for Story Simulator's Object Placement scene + * This manager manages the object (image assets) for Game Simulator's Object Placement scene * * It handles: * (1) Storing of information on image assets used diff --git a/src/features/gameSimulator/scenes/ObjectPlacement/ObjectPlacement.ts b/src/features/gameSimulator/scenes/ObjectPlacement/ObjectPlacement.ts index 7e92ea860c..bb28a15434 100644 --- a/src/features/gameSimulator/scenes/ObjectPlacement/ObjectPlacement.ts +++ b/src/features/gameSimulator/scenes/ObjectPlacement/ObjectPlacement.ts @@ -14,7 +14,7 @@ import SSCursorMode from '../../cursorMode/SSCursorMode'; import { CursorMode } from '../../cursorMode/SSCursorModeTypes'; import SSLogManager from '../../logger/SSLogManager'; import SSObjectManager from '../../objects/SSObjectManager'; -import { StorySimState } from '../../StorySimulatorTypes'; +import { GameSimState } from '../../GameSimulatorTypes'; import SSTransformManager from '../../transform/SSTransformManager'; import ObjPlacementConstants from './ObjectPlacementConstants'; @@ -95,8 +95,8 @@ export default class ObjectPlacement extends Phaser.Scene { const uiContainer = new Phaser.GameObjects.Container(this, 0, 0); const backButton = new CommonBackButton(this, () => { this.cleanUp(); - SourceAcademyGame.getInstance().setStorySimState(StorySimState.Default); - this.scene.start('StorySimulatorMenu'); + SourceAcademyGame.getInstance().setGameSimState(GameSimState.Default); + this.scene.start('GameSimulatorMenu'); }); this.cursorModes = new SSCursorMode( @@ -117,7 +117,7 @@ export default class ObjectPlacement extends Phaser.Scene { this, screenCenter.x, screenCenter.y, - SSImageAssets.storySimBg.key + SSImageAssets.gameSimBg.key ); backgroundImg.setDisplaySize(screenSize.x, screenSize.y); diff --git a/src/features/gameSimulator/scenes/mainMenu/MainMenu.ts b/src/features/gameSimulator/scenes/mainMenu/MainMenu.ts index 6f4996975b..a82ab84282 100644 --- a/src/features/gameSimulator/scenes/mainMenu/MainMenu.ts +++ b/src/features/gameSimulator/scenes/mainMenu/MainMenu.ts @@ -12,20 +12,20 @@ import { mandatory, toS3Path } from 'src/features/game/utils/GameUtils'; import { calcTableFormatPos } from 'src/features/game/utils/StyleUtils'; import SSImageAssets from '../../assets/ImageAssets'; -import { StorySimState } from '../../StorySimulatorTypes'; +import { GameSimState } from '../../GameSimulatorTypes'; import mainMenuConstants, { mainMenuOptStyle } from './MainMenuConstants'; /** - * Entry point for story simulator. + * Entry point for Game simulator. * - * User can access different story simulator + * User can access different Game simulator * functionalities from here. */ class MainMenu extends Phaser.Scene { private layerManager?: GameLayerManager; constructor() { - super('StorySimulatorMenu'); + super('GameSimulatorMenu'); } public preload() { @@ -47,7 +47,7 @@ class MainMenu extends Phaser.Scene { public async create() { if (SourceAcademyGame.getInstance().getAccountInfo().role === 'student') { - console.log('Students cannot use story sim'); + console.log('Students cannot use Game sim'); return; } this.renderBackground(); @@ -84,7 +84,7 @@ class MainMenu extends Phaser.Scene { { text: 'Object Placement', callback: () => { - SourceAcademyGame.getInstance().setStorySimState(StorySimState.ObjectPlacement); + SourceAcademyGame.getInstance().setGameSimState(GameSimState.ObjectPlacement); this.getLayerManager().clearAllLayers(); this.scene.start('ObjectPlacement'); } @@ -92,19 +92,19 @@ class MainMenu extends Phaser.Scene { { text: 'Checkpoint Simulator', callback: () => { - SourceAcademyGame.getInstance().setStorySimState(StorySimState.CheckpointSim); + SourceAcademyGame.getInstance().setGameSimState(GameSimState.CheckpointSim); } }, { text: 'Asset Uploader', callback: () => { - SourceAcademyGame.getInstance().setStorySimState(StorySimState.AssetUploader); + SourceAcademyGame.getInstance().setGameSimState(GameSimState.AssetUploader); } }, { text: 'Chapter Simulator', callback: () => { - SourceAcademyGame.getInstance().setStorySimState(StorySimState.ChapterSim); + SourceAcademyGame.getInstance().setGameSimState(GameSimState.ChapterSim); } } ]; @@ -149,7 +149,7 @@ class MainMenu extends Phaser.Scene { this, screenCenter.x, screenCenter.y, - SSImageAssets.storySimBg.key + SSImageAssets.gameSimBg.key ); backgroundImg.setDisplaySize(screenSize.x, screenSize.y); const backgroundUnderlay = new Phaser.GameObjects.Image( diff --git a/src/pages/academy/Academy.tsx b/src/pages/academy/Academy.tsx index 1602aa37ae..11d03b4b10 100644 --- a/src/pages/academy/Academy.tsx +++ b/src/pages/academy/Academy.tsx @@ -26,7 +26,7 @@ import Grading from './grading/Grading'; import GroundControl from './groundControl/GroundControlContainer'; import NotiPreference from './notiPreference/NotiPreference'; import Sourcereel from './sourcereel/Sourcereel'; -import StorySimulator from './storySimulator/StorySimulator'; +import GameSimulator from './gameSimulator/GameSimulator'; const Academy: React.FC<{}> = () => { const dispatch = useDispatch(); @@ -42,7 +42,7 @@ const Academy: React.FC<{}> = () => { } key={0} />, } key={1} />, } key={2} />, - } key={3} />, + } key={3} />, } key={4} /> ] : null; diff --git a/src/pages/academy/gameSimulator/GameSimulator.tsx b/src/pages/academy/gameSimulator/GameSimulator.tsx index f3084fbd54..06d97aaada 100644 --- a/src/pages/academy/gameSimulator/GameSimulator.tsx +++ b/src/pages/academy/gameSimulator/GameSimulator.tsx @@ -1,32 +1,32 @@ import React from 'react'; import { useTypedSelector } from 'src/commons/utils/Hooks'; import SourceAcademyGame, { AccountInfo } from 'src/features/game/SourceAcademyGame'; -import { StorySimState } from 'src/features/storySimulator/StorySimulatorTypes'; +import { GameSimState } from 'src/features/gameSimulator/GameSimulatorTypes'; -import StorySimulatorAssetFileUploader from './subcomponents/StorySimulatorAssetFileUploader'; -import StorySimulatorAssetSelection from './subcomponents/StorySimulatorAssetSelection'; -import StorySimulatorChapterSim from './subcomponents/StorySimulatorChapterSim'; -import StorySimulatorCheckpointSim from './subcomponents/StorySimulatorCheckpointSim'; -import { createStorySimulatorGame } from './subcomponents/storySimulatorGame'; +import GameSimulatorAssetFileUploader from './subcomponents/GameSimulatorAssetFileUploader'; +import GameSimulatorAssetSelection from './subcomponents/GameSimulatorAssetSelection'; +import GameSimulatorChapterSim from './subcomponents/GameSimulatorChapterSim'; +import GameSimulatorCheckpointSim from './subcomponents/GameSimulatorCheckpointSim'; +import { createGameSimulatorGame } from './subcomponents/GameSimulatorGame'; /** - * Story simulator main page + * Game simulator main page * * Displays the following elements: - * (1) Story Simulator phaser canvas - * (2) Story Simulator control panel + * (1) Game Simulator phaser canvas + * (2) Game Simulator control panel * - * Story Simulator control panel's content can be altered using - * `setStorySimState` function. This function is passed into story - * simulator phaser game, so that the StorySimulatorMainMenu buttons - * are able to control what is shown on the Story Simulator panel. + * Game Simulator control panel's content can be altered using + * `setGameSimState` function. This function is passed into story + * simulator phaser game, so that the GameSimulatorMainMenu buttons + * are able to control what is shown on the Game Simulator panel. */ -function StorySimulator() { +function GameSimulator() { const session = useTypedSelector(state => state.session); - const [storySimState, setStorySimState] = React.useState(StorySimState.Default); + const [gameSimState, setGameSimState] = React.useState(GameSimState.Default); React.useEffect(() => { - createStorySimulatorGame().setStorySimStateSetter(setStorySimState); + createGameSimulatorGame().setGameSimStateSetter(setGameSimState); }, []); React.useEffect(() => { @@ -39,29 +39,29 @@ function StorySimulator() { }, [session]); return ( -
+
-
- {storySimState === StorySimState.Default &&

Welcome to story simulator!

} - {storySimState === StorySimState.CheckpointSim && } - {storySimState === StorySimState.ObjectPlacement && ( +
+ {gameSimState === GameSimState.Default &&

Welcome to Game simulator!

} + {gameSimState === GameSimState.CheckpointSim && } + {gameSimState === GameSimState.ObjectPlacement && ( <>

Asset Selection

- + )} - {storySimState === StorySimState.AssetUploader && ( + {gameSimState === GameSimState.AssetUploader && ( <>

Asset uploader

- +

Asset Viewer

- + )} - {storySimState === StorySimState.ChapterSim && } + {gameSimState === GameSimState.ChapterSim && }
); } -export default StorySimulator; +export default GameSimulator; diff --git a/src/pages/academy/gameSimulator/subcomponents/GameSimulatorAssetFileUploader.tsx b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorAssetFileUploader.tsx index eccf1b9111..64c48244bf 100644 --- a/src/pages/academy/gameSimulator/subcomponents/GameSimulatorAssetFileUploader.tsx +++ b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorAssetFileUploader.tsx @@ -4,14 +4,14 @@ import React from 'react'; import { s3AssetFolders, uploadAssetsToS3 -} from 'src/features/storySimulator/StorySimulatorService'; +} from 'src/features/gameSimulator/GameSimulatorService'; const specifyFolderText = 'Specify own folder...'; const folderOverwritePlaceholder = "Or specify your own, e.g. 'locations/hallway'"; /** * This is component allows storywriters to upload any assets into to - * specific folders into Story Sim's Asset Uploader + * specific folders into Game Sim's Asset Uploader */ const AssetFileUploader = () => { const [fileList, setFileList] = React.useState(); diff --git a/src/pages/academy/gameSimulator/subcomponents/GameSimulatorAssetSelection.tsx b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorAssetSelection.tsx index a1d8840e3e..7a001ec3d1 100644 --- a/src/pages/academy/gameSimulator/subcomponents/GameSimulatorAssetSelection.tsx +++ b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorAssetSelection.tsx @@ -6,10 +6,10 @@ import { deleteS3File, fetchAssetPaths, s3AssetFolders -} from 'src/features/storySimulator/StorySimulatorService'; +} from 'src/features/gameSimulator/GameSimulatorService'; -import { assetPathsToTree, treeMap } from './StorySimulatorAssetSelectionHelper'; -import StorySimulatorAssetViewer from './StorySimulatorAssetViewer'; +import { assetPathsToTree, treeMap } from './GameSimulatorAssetSelectionHelper'; +import GameSimulatorAssetViewer from './GameSimulatorAssetViewer'; type TreeState = { nodes: TreeNodeInfo[]; @@ -19,9 +19,9 @@ type TreeState = { * This component provides a preview of all the S3 asset files. * * When a image is selected, the filename of the image is stored in session storage, - * so Story Simulator's Object Placement can read the filename and load the image. + * so Game Simulator's Object Placement can read the filename and load the image. */ -const StorySimulatorAssetSelection = () => { +const GameSimulatorAssetSelection = () => { const { value: assetPaths } = useRequest(fetchAssetPaths, []); const [currentAsset, setCurrentAsset] = React.useState(''); @@ -45,7 +45,7 @@ const StorySimulatorAssetSelection = () => { return ( <> - + ); @@ -75,4 +75,4 @@ const deleteFile = (filePath: string) => async () => { alert(confirm ? await deleteS3File(filePath) : 'Whew'); }; -export default StorySimulatorAssetSelection; +export default GameSimulatorAssetSelection; diff --git a/src/pages/academy/gameSimulator/subcomponents/GameSimulatorChapterEditor.tsx b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorChapterEditor.tsx index 63cd157f10..fb53c28a09 100644 --- a/src/pages/academy/gameSimulator/subcomponents/GameSimulatorChapterEditor.tsx +++ b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorChapterEditor.tsx @@ -10,10 +10,10 @@ import { callGameManagerForSim } from 'src/features/game/utils/TxtLoaderUtils'; import { deleteChapterRequest, updateChapterRequest -} from 'src/features/storySimulator/StorySimulatorService'; -import { ChapterDetail } from 'src/features/storySimulator/StorySimulatorTypes'; +} from 'src/features/gameSimulator/GameSimulatorService'; +import { ChapterDetail } from 'src/features/gameSimulator/GameSimulatorTypes'; -import { createChapterIndex, inAYear } from './StorySimulatorChapterSim'; +import { createChapterIndex, inAYear } from './GameSimulatorChapterSim'; type ChapterSimProps = { chapterDetail: ChapterDetail; diff --git a/src/pages/academy/gameSimulator/subcomponents/GameSimulatorChapterSim.tsx b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorChapterSim.tsx index 879f15d478..a744496f95 100644 --- a/src/pages/academy/gameSimulator/subcomponents/GameSimulatorChapterSim.tsx +++ b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorChapterSim.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { useRequest } from 'src/commons/utils/Hooks'; -import { fetchChapters, fetchTextAssets } from 'src/features/storySimulator/StorySimulatorService'; -import { ChapterDetail } from 'src/features/storySimulator/StorySimulatorTypes'; +import { fetchChapters, fetchTextAssets } from 'src/features/gameSimulator/GameSimulatorService'; +import { ChapterDetail } from 'src/features/gameSimulator/GameSimulatorTypes'; -import StorySimulatorChapterEditor from './StorySimulatorChapterEditor'; +import GameSimulatorChapterEditor from './GameSimulatorChapterEditor'; export const inAYear = (date: Date) => { date.setFullYear(date.getFullYear() + 1); @@ -47,7 +47,7 @@ const ChapterSim = React.memo(() => {
- diff --git a/src/pages/academy/gameSimulator/subcomponents/GameSimulatorCheckpointSim.tsx b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorCheckpointSim.tsx index 94bc9403ab..10e53a54ea 100644 --- a/src/pages/academy/gameSimulator/subcomponents/GameSimulatorCheckpointSim.tsx +++ b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorCheckpointSim.tsx @@ -1,11 +1,11 @@ import { Button } from '@blueprintjs/core'; import { useRequest } from 'src/commons/utils/Hooks'; import SourceAcademyGame from 'src/features/game/SourceAcademyGame'; -import MainMenu from 'src/features/storySimulator/scenes/mainMenu/MainMenu'; -import mainMenuConstants from 'src/features/storySimulator/scenes/mainMenu/MainMenuConstants'; -import { fetchTextAssets } from 'src/features/storySimulator/StorySimulatorService'; +import MainMenu from 'src/features/gameSimulator/scenes/mainMenu/MainMenu'; +import mainMenuConstants from 'src/features/gameSimulator/scenes/mainMenu/MainMenuConstants'; +import { fetchTextAssets } from 'src/features/gameSimulator/GameSimulatorService'; -import CheckpointTxtLoader from './StorySimulatorCheckpointTxtLoader'; +import CheckpointTxtLoader from './GameSimulatorCheckpointTxtLoader'; /** * This component helps one simulate a checkpoint by diff --git a/src/pages/academy/gameSimulator/subcomponents/GameSimulatorGame.ts b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorGame.ts index 87cc330e81..0cbf1a5876 100644 --- a/src/pages/academy/gameSimulator/subcomponents/GameSimulatorGame.ts +++ b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorGame.ts @@ -3,8 +3,8 @@ import { screenSize } from 'src/features/game/commons/CommonConstants'; import CheckpointTransition from 'src/features/game/scenes/checkpointTransition/CheckpointTransition'; import GameManager from 'src/features/game/scenes/gameManager/GameManager'; import SourceAcademyGame, { GameType } from 'src/features/game/SourceAcademyGame'; -import MainMenu from 'src/features/storySimulator/scenes/mainMenu/MainMenu'; -import ObjectPlacement from 'src/features/storySimulator/scenes/ObjectPlacement/ObjectPlacement'; +import MainMenu from 'src/features/gameSimulator/scenes/mainMenu/MainMenu'; +import ObjectPlacement from 'src/features/gameSimulator/scenes/ObjectPlacement/ObjectPlacement'; const config = { debug: true, @@ -23,9 +23,9 @@ const config = { } }; -export const createStorySimulatorGame = () => { +export const createGameSimulatorGame = () => { const game = new SourceAcademyGame(config, GameType.Simulator); - game.scene.add('StorySimulatorMenu', MainMenu, true); + game.scene.add('GameSimulatorMenu', MainMenu, true); game.scene.add('ObjectPlacement', ObjectPlacement); game.scene.add('GameManager', GameManager); game.scene.add('CheckpointTransition', CheckpointTransition); diff --git a/src/styles/_storysimulator.scss b/src/styles/_storysimulator.scss index 709e0cf9e3..a0e5968a8a 100644 --- a/src/styles/_storysimulator.scss +++ b/src/styles/_storysimulator.scss @@ -7,7 +7,7 @@ } } -.StorySimulatorWrapper { +.GameSimulatorWrapper { display: flex; flex-direction: row; margin: 30px; @@ -26,7 +26,7 @@ align-items: flex-start; } -.StorySimulatorPanel { +.GameSimulatorPanel { background-color: white; width: 800px; height: 100%; diff --git a/src/styles/index.scss b/src/styles/index.scss index db866d7bee..6e0c675f15 100755 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -31,7 +31,7 @@ @import 'envvisualizer'; @import 'game'; @import 'github'; -@import 'storysimulator'; +@import 'gamesimulator'; @import 'groundcontrol'; @import 'mobileworkspace'; @import 'navigationBar'; From c58d958ef67f383e7220e62a0c53e2f3db85a895 Mon Sep 17 00:00:00 2001 From: lhw-1 Date: Fri, 23 Feb 2024 15:40:15 +0800 Subject: [PATCH 4/6] Rename _storysimulator.scss to _gamesimulator.scss --- .env.example | 68 ------------------- ...torysimulator.scss => _gamesimulator.scss} | 0 2 files changed, 68 deletions(-) delete mode 100644 .env.example rename src/styles/{_storysimulator.scss => _gamesimulator.scss} (100%) diff --git a/.env.example b/.env.example deleted file mode 100644 index 75bf6f14d6..0000000000 --- a/.env.example +++ /dev/null @@ -1,68 +0,0 @@ -REACT_APP_DEPLOYMENT_NAME=Source Academy - -REACT_APP_BACKEND_URL=http://localhost:4000 -REACT_APP_USE_BACKEND=TRUE -REACT_APP_PLAYGROUND_ONLY=FALSE -REACT_APP_ENABLE_GITHUB_ASSESSMENTS=TRUE -REACT_APP_SHOW_RESEARCH_PROMPT=FALSE - -REACT_APP_URL_SHORTENER_SIGNATURE= -REACT_APP_URL_SHORTENER_DOMAIN= - -# default testing authentication provider -# this matches the test provider configured in the example backend configuration -# if you are using the staging or production backend, ask your backend developer -# for the correct auth details -REACT_APP_OAUTH2_PROVIDER1=test_admin -REACT_APP_OAUTH2_PROVIDER1_NAME=Test login as admin -REACT_APP_OAUTH2_PROVIDER1_ENDPOINT=http://localhost:8000/login?provider=test&code=admin_code -REACT_APP_OAUTH2_PROVIDER2=test_staff -REACT_APP_OAUTH2_PROVIDER2_NAME=Test login as staff -REACT_APP_OAUTH2_PROVIDER2_ENDPOINT=http://localhost:8000/login?provider=test&code=staff_code -REACT_APP_OAUTH2_PROVIDER3=test_student -REACT_APP_OAUTH2_PROVIDER3_NAME=Test login as student -REACT_APP_OAUTH2_PROVIDER3_ENDPOINT=http://localhost:8000/login?provider=test&code=student_code - -## LumiNUS example -## the provider ID, must be URL-friendly (must match the backend configuration) -# REACT_APP_OAUTH2_PROVIDER1=luminus -## the name shown on the login screen: "Log in with ..." -# REACT_APP_OAUTH2_PROVIDER1_NAME=LumiNUS -## the OAuth2 endpoint (which must include a client_id, as part of the OAuth2 specification) -## the redirect_url parameter will be computed and added on -# REACT_APP_OAUTH2_PROVIDER1_ENDPOINT= - -## Cognito example -# REACT_APP_OAUTH2_PROVIDER2=cognito -# REACT_APP_OAUTH2_PROVIDER2_NAME=Cognito -# REACT_APP_OAUTH2_PROVIDER2_ENDPOINT= - -REACT_APP_CAS_PROVIDER1= -REACT_APP_CAS_PROVIDER1_NAME= -REACT_APP_CAS_PROVIDER1_ENDPOINT= - -REACT_APP_SAML_PROVIDER1= -REACT_APP_SAML_PROVIDER1_NAME= -REACT_APP_SAML_PROVIDER1_ENDPOINT= - -REACT_APP_MODULE_BACKEND_URL=https://source-academy.github.io/modules -REACT_APP_SHAREDB_BACKEND_URL= -REACT_APP_SICPJS_BACKEND_URL="http://127.0.0.1:8080/" -REACT_APP_STORIES_BACKEND_URL=http://localhost:4321 - -# API keys for Google Drive integration -REACT_APP_GOOGLE_CLIENT_ID= -REACT_APP_GOOGLE_API_KEY= -REACT_APP_GOOGLE_APP_ID= - -# API keys for GitHub integration -REACT_APP_GITHUB_CLIENT_ID= -REACT_APP_GITHUB_OAUTH_PROXY_URL= - -# Keystroke logging -REACT_APP_CADET_LOGGER= -REACT_APP_CADET_LOGGER_INTERVAL=10000 - -# Continuous Assessment (CA) Fulfillment Level -# Used in src/commons/achievement/overview/AchievementMilestone.tsx -REACT_APP_CA_FULFILLMENT_LEVEL=24 diff --git a/src/styles/_storysimulator.scss b/src/styles/_gamesimulator.scss similarity index 100% rename from src/styles/_storysimulator.scss rename to src/styles/_gamesimulator.scss From ace3c3c8ea420e0c3d436ea0e3ba815de136a220 Mon Sep 17 00:00:00 2001 From: lhw-1 Date: Fri, 23 Feb 2024 15:43:36 +0800 Subject: [PATCH 5/6] Revert unnecessary deletion --- .env.example | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000000..75bf6f14d6 --- /dev/null +++ b/.env.example @@ -0,0 +1,68 @@ +REACT_APP_DEPLOYMENT_NAME=Source Academy + +REACT_APP_BACKEND_URL=http://localhost:4000 +REACT_APP_USE_BACKEND=TRUE +REACT_APP_PLAYGROUND_ONLY=FALSE +REACT_APP_ENABLE_GITHUB_ASSESSMENTS=TRUE +REACT_APP_SHOW_RESEARCH_PROMPT=FALSE + +REACT_APP_URL_SHORTENER_SIGNATURE= +REACT_APP_URL_SHORTENER_DOMAIN= + +# default testing authentication provider +# this matches the test provider configured in the example backend configuration +# if you are using the staging or production backend, ask your backend developer +# for the correct auth details +REACT_APP_OAUTH2_PROVIDER1=test_admin +REACT_APP_OAUTH2_PROVIDER1_NAME=Test login as admin +REACT_APP_OAUTH2_PROVIDER1_ENDPOINT=http://localhost:8000/login?provider=test&code=admin_code +REACT_APP_OAUTH2_PROVIDER2=test_staff +REACT_APP_OAUTH2_PROVIDER2_NAME=Test login as staff +REACT_APP_OAUTH2_PROVIDER2_ENDPOINT=http://localhost:8000/login?provider=test&code=staff_code +REACT_APP_OAUTH2_PROVIDER3=test_student +REACT_APP_OAUTH2_PROVIDER3_NAME=Test login as student +REACT_APP_OAUTH2_PROVIDER3_ENDPOINT=http://localhost:8000/login?provider=test&code=student_code + +## LumiNUS example +## the provider ID, must be URL-friendly (must match the backend configuration) +# REACT_APP_OAUTH2_PROVIDER1=luminus +## the name shown on the login screen: "Log in with ..." +# REACT_APP_OAUTH2_PROVIDER1_NAME=LumiNUS +## the OAuth2 endpoint (which must include a client_id, as part of the OAuth2 specification) +## the redirect_url parameter will be computed and added on +# REACT_APP_OAUTH2_PROVIDER1_ENDPOINT= + +## Cognito example +# REACT_APP_OAUTH2_PROVIDER2=cognito +# REACT_APP_OAUTH2_PROVIDER2_NAME=Cognito +# REACT_APP_OAUTH2_PROVIDER2_ENDPOINT= + +REACT_APP_CAS_PROVIDER1= +REACT_APP_CAS_PROVIDER1_NAME= +REACT_APP_CAS_PROVIDER1_ENDPOINT= + +REACT_APP_SAML_PROVIDER1= +REACT_APP_SAML_PROVIDER1_NAME= +REACT_APP_SAML_PROVIDER1_ENDPOINT= + +REACT_APP_MODULE_BACKEND_URL=https://source-academy.github.io/modules +REACT_APP_SHAREDB_BACKEND_URL= +REACT_APP_SICPJS_BACKEND_URL="http://127.0.0.1:8080/" +REACT_APP_STORIES_BACKEND_URL=http://localhost:4321 + +# API keys for Google Drive integration +REACT_APP_GOOGLE_CLIENT_ID= +REACT_APP_GOOGLE_API_KEY= +REACT_APP_GOOGLE_APP_ID= + +# API keys for GitHub integration +REACT_APP_GITHUB_CLIENT_ID= +REACT_APP_GITHUB_OAUTH_PROXY_URL= + +# Keystroke logging +REACT_APP_CADET_LOGGER= +REACT_APP_CADET_LOGGER_INTERVAL=10000 + +# Continuous Assessment (CA) Fulfillment Level +# Used in src/commons/achievement/overview/AchievementMilestone.tsx +REACT_APP_CA_FULFILLMENT_LEVEL=24 From bb1d1bf82bf6d1611a6373f559cc63a0c4f80451 Mon Sep 17 00:00:00 2001 From: lhw-1 Date: Fri, 23 Feb 2024 16:22:53 +0800 Subject: [PATCH 6/6] Fix styles --- .../gameSimulator/scenes/ObjectPlacement/ObjectPlacement.ts | 2 +- src/pages/academy/Academy.tsx | 2 +- .../subcomponents/GameSimulatorAssetFileUploader.tsx | 5 +---- .../subcomponents/GameSimulatorCheckpointSim.tsx | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/features/gameSimulator/scenes/ObjectPlacement/ObjectPlacement.ts b/src/features/gameSimulator/scenes/ObjectPlacement/ObjectPlacement.ts index bb28a15434..5acbfdc3e6 100644 --- a/src/features/gameSimulator/scenes/ObjectPlacement/ObjectPlacement.ts +++ b/src/features/gameSimulator/scenes/ObjectPlacement/ObjectPlacement.ts @@ -12,9 +12,9 @@ import SSBackgroundManager from '../../background/SSBackgroundManager'; import SSBBoxManager from '../../boundingBoxes/SSBBoxManager'; import SSCursorMode from '../../cursorMode/SSCursorMode'; import { CursorMode } from '../../cursorMode/SSCursorModeTypes'; +import { GameSimState } from '../../GameSimulatorTypes'; import SSLogManager from '../../logger/SSLogManager'; import SSObjectManager from '../../objects/SSObjectManager'; -import { GameSimState } from '../../GameSimulatorTypes'; import SSTransformManager from '../../transform/SSTransformManager'; import ObjPlacementConstants from './ObjectPlacementConstants'; diff --git a/src/pages/academy/Academy.tsx b/src/pages/academy/Academy.tsx index 11d03b4b10..b15efdfb80 100644 --- a/src/pages/academy/Academy.tsx +++ b/src/pages/academy/Academy.tsx @@ -22,11 +22,11 @@ import Sourcecast from '../sourcecast/Sourcecast'; import AdminPanel from './adminPanel/AdminPanel'; import Dashboard from './dashboard/Dashboard'; import Game from './game/Game'; +import GameSimulator from './gameSimulator/GameSimulator'; import Grading from './grading/Grading'; import GroundControl from './groundControl/GroundControlContainer'; import NotiPreference from './notiPreference/NotiPreference'; import Sourcereel from './sourcereel/Sourcereel'; -import GameSimulator from './gameSimulator/GameSimulator'; const Academy: React.FC<{}> = () => { const dispatch = useDispatch(); diff --git a/src/pages/academy/gameSimulator/subcomponents/GameSimulatorAssetFileUploader.tsx b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorAssetFileUploader.tsx index 64c48244bf..8368b97d44 100644 --- a/src/pages/academy/gameSimulator/subcomponents/GameSimulatorAssetFileUploader.tsx +++ b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorAssetFileUploader.tsx @@ -1,10 +1,7 @@ import { Button, InputGroup, Menu, MenuItem, Position } from '@blueprintjs/core'; import { Popover2 } from '@blueprintjs/popover2'; import React from 'react'; -import { - s3AssetFolders, - uploadAssetsToS3 -} from 'src/features/gameSimulator/GameSimulatorService'; +import { s3AssetFolders, uploadAssetsToS3 } from 'src/features/gameSimulator/GameSimulatorService'; const specifyFolderText = 'Specify own folder...'; const folderOverwritePlaceholder = "Or specify your own, e.g. 'locations/hallway'"; diff --git a/src/pages/academy/gameSimulator/subcomponents/GameSimulatorCheckpointSim.tsx b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorCheckpointSim.tsx index 10e53a54ea..efd1defef9 100644 --- a/src/pages/academy/gameSimulator/subcomponents/GameSimulatorCheckpointSim.tsx +++ b/src/pages/academy/gameSimulator/subcomponents/GameSimulatorCheckpointSim.tsx @@ -1,9 +1,9 @@ import { Button } from '@blueprintjs/core'; import { useRequest } from 'src/commons/utils/Hooks'; import SourceAcademyGame from 'src/features/game/SourceAcademyGame'; +import { fetchTextAssets } from 'src/features/gameSimulator/GameSimulatorService'; import MainMenu from 'src/features/gameSimulator/scenes/mainMenu/MainMenu'; import mainMenuConstants from 'src/features/gameSimulator/scenes/mainMenu/MainMenuConstants'; -import { fetchTextAssets } from 'src/features/gameSimulator/GameSimulatorService'; import CheckpointTxtLoader from './GameSimulatorCheckpointTxtLoader';