Read Open States from Excels (#1557)

* Make sure we never access PlayerOpenStateManager::map directly.

* Read OpenStates from excels.

* Add defaultState

* Replace hardcoded open states with the ones read from excels.

* Don't send change notify when unlocking on login.

* Add open state blacklist for default unlocks.

* Add a way to temporarily set open states for dev

* Remove old OpenState.java

* Fix UnlockAllCommand

* Change condType to an enum.
This commit is contained in:
GanyusLeftHorn
2022-07-24 09:12:07 +02:00
committed by GitHub
parent 89717f3c15
commit d0edd39465
10 changed files with 260 additions and 154 deletions

View File

@@ -435,8 +435,8 @@ public class Player {
this.updateWorldLevel();
this.updateProfile();
// Handle OpenState unlocks from level-up.
this.getOpenStateManager().unlockLevelDependentStates();
// Handle open state unlocks from level-up.
this.getOpenStateManager().tryUnlockOpenStates();
return true;
}
@@ -1342,9 +1342,6 @@ public class Player {
this.forgingManager.sendForgeDataNotify();
this.resinManager.onPlayerLogin();
this.cookingManager.sendCookDataNofity();
// Unlock in case this is an existing user that reached a level before we implemented unlocking.
this.getOpenStateManager().unlockLevelDependentStates();
this.getOpenStateManager().onPlayerLogin();
getTodayMoonCard(); // The timer works at 0:0, some users log in after that, use this method to check if they have received a reward today or not. If not, send the reward.