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

@@ -109,10 +109,13 @@ public class GameData {
@Getter private static final Int2ObjectMap<PersonalLineData> personalLineDataMap = new Int2ObjectOpenHashMap<>();
@Getter private static final Int2ObjectMap<ChapterData> chapterDataMap = new Int2ObjectOpenHashMap<>();
@Getter private static final Int2ObjectMap<OpenStateData> openStateDataMap = new Int2ObjectOpenHashMap<>();
// Cache
private static Map<Integer, List<Integer>> fetters = new HashMap<>();
private static Map<Integer, List<ShopGoodsData>> shopGoods = new HashMap<>();
private static final IntList scenePointIdList = new IntArrayList();
@Getter private static final List<OpenStateData> openStateList = new ArrayList<>();
public static Int2ObjectMap<?> getMapByResourceDef(Class<?> resourceDefinition) {
Int2ObjectMap<?> map = null;