-
Notifications
You must be signed in to change notification settings - Fork 126
Description
What you were trying to do
Disabling a module that overrides the playerSpawnConfig should limit the ship selection screen to the default ships (Imperial Small, Loaded Imperial Large)
What actually happened
The ship selection screen is still locked the the ships defined in the overriding module's playerSpawnConfig, and starting a new game with one of them crashes the game with a NullPointerException error.
How to reproduce
Step 1: Create a module and name it "test" (or any other name, but "test" will be assumed in the next steps)
Step 2: Copy the folder core\assets\ships\imperialBig to test\assets\ships and rename the folder and file names inside it to contain "imperialTest"
Step 3: In test\overrides\core\configs\playerSpawnConfig.json, insert the following code:
{ "Permanently Stuck": { "hull": "test:imperialTest", "items": "99*rep core:advancedArmor-1 core:advancedShield-1 core:fixedGun-1 core:fixedGun-2 99*core:bulletClip", "money": 10000 } }
Step 4: Launch the game
Step 5: Start a new game, then at the ship selection screen, go to Modules, then deactivate "test", then return to the ship selection screen
Step 6: Click on Starting Ship, and observe that the ship does not disappear from the ship selection screen
Step 7: Attempt to start a new game
Game version
Commit 52b23c4
Log details
java.lang.NullPointerException
at org.destinationsol.game.SolGame.createGame(SolGame.java:296)
at org.destinationsol.game.SolGame.startGame(SolGame.java:249)
at org.destinationsol.SolApplication.play(SolApplication.java:356)
at org.destinationsol.ui.nui.screens.mainMenu.LoadingScreen.update(LoadingScreen.java:49)
at org.destinationsol.ui.nui.NUIManager.update(NUIManager.java:275)
at org.destinationsol.SolApplication.update(SolApplication.java:264)
at org.destinationsol.SolApplication.safeUpdate(SolApplication.java:241)
at org.destinationsol.SolApplication.render(SolApplication.java:205)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.update(Lwjgl3Window.java:387)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:193)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.(Lwjgl3Application.java:167)
at org.destinationsol.desktop.SolDesktop.main(SolDesktop.java:138)
Operating System
Windows
Additional Info
Although the core module's playerSpawnConfig is being overridden by an overriding module, if it is placed in assets\configs instead, it is correctly disabled and the effects of other overriding config files are successfully replaced with that of the core module's, which suggests it is intended functionality to reverse the effects of overridden core content.