OpenStateData.java 8.74 KB
Newer Older
1
package emu.grasscutter.data.excels;
Melledy's avatar
Melledy committed
2

3
4
5
6
7
import emu.grasscutter.data.GameData;
import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType;
import lombok.AccessLevel;
import lombok.Getter;
Melledy's avatar
Melledy committed
8

9
10
11
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
Melledy's avatar
Melledy committed
12

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@ResourceType(name = "OpenStateConfigData.json", loadPriority = ResourceType.LoadPriority.HIGHEST)
public class OpenStateData extends GameResource {
    private int id;
    @Getter private boolean defaultState;
    @Getter private boolean allowClientOpen;
    @Getter private int systemOpenUiId;
    @Getter private List<OpenStateCond> cond;

    public static class OpenStateCond {
        @Getter private OpenStateCondType condType;
        @Getter private int param;
        @Getter private int param2;
    }

    public static enum OpenStateCondType {
        OPEN_STATE_COND_PLAYER_LEVEL,
        OPEN_STATE_COND_QUEST,
        OPEN_STATE_OFFERING_LEVEL,
        OPEN_STATE_CITY_REPUTATION_LEVEL,
        OPEN_STATE_COND_PARENT_QUEST;
    }

    @Override
    public int getId() {
        return this.id;
    }

    @Override
    public void onLoad() {
        // Add this open state to the global list.
        GameData.getOpenStateList().add(this);

        // Clean up cond.
        List<OpenStateCond> cleanedConds = new ArrayList<>();
        for (var c : this.cond) {
            if (c.getCondType() != null) {
                cleanedConds.add(c);
            }
        }

        this.cond = cleanedConds;
    }
}

/* Open state names for documentation:
github-actions's avatar
github-actions committed
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
    OPEN_STATE_NONE (0),
    OPEN_STATE_PAIMON (1),
    OPEN_STATE_PAIMON_NAVIGATION (2),
    OPEN_STATE_AVATAR_PROMOTE (3),
    OPEN_STATE_AVATAR_TALENT (4),
    OPEN_STATE_WEAPON_PROMOTE (5),
    OPEN_STATE_WEAPON_AWAKEN (6),
    OPEN_STATE_QUEST_REMIND (7),
    OPEN_STATE_GAME_GUIDE (8),
    OPEN_STATE_COOK (9),
    OPEN_STATE_WEAPON_UPGRADE (10),
    OPEN_STATE_RELIQUARY_UPGRADE (11),
    OPEN_STATE_RELIQUARY_PROMOTE (12),
    OPEN_STATE_WEAPON_PROMOTE_GUIDE (13),
    OPEN_STATE_WEAPON_CHANGE_GUIDE (14),
    OPEN_STATE_PLAYER_LVUP_GUIDE (15),
    OPEN_STATE_FRESHMAN_GUIDE (16),
    OPEN_STATE_SKIP_FRESHMAN_GUIDE (17),
    OPEN_STATE_GUIDE_MOVE_CAMERA (18),
    OPEN_STATE_GUIDE_SCALE_CAMERA (19),
    OPEN_STATE_GUIDE_KEYBOARD (20),
    OPEN_STATE_GUIDE_MOVE (21),
    OPEN_STATE_GUIDE_JUMP (22),
    OPEN_STATE_GUIDE_SPRINT (23),
    OPEN_STATE_GUIDE_MAP (24),
    OPEN_STATE_GUIDE_ATTACK (25),
    OPEN_STATE_GUIDE_FLY (26),
    OPEN_STATE_GUIDE_TALENT (27),
    OPEN_STATE_GUIDE_RELIC (28),
    OPEN_STATE_GUIDE_RELIC_PROM (29),
88
    OPEN_STATE_COMBINE (30),
github-actions's avatar
github-actions committed
89
90
91
92
93
94
    OPEN_STATE_GACHA (31),
    OPEN_STATE_GUIDE_GACHA (32),
    OPEN_STATE_GUIDE_TEAM (33),
    OPEN_STATE_GUIDE_PROUD (34),
    OPEN_STATE_GUIDE_AVATAR_PROMOTE (35),
    OPEN_STATE_GUIDE_ADVENTURE_CARD (36),
95
    OPEN_STATE_FORGE (37),
github-actions's avatar
github-actions committed
96
    OPEN_STATE_GUIDE_BAG (38),
97
    OPEN_STATE_EXPEDITION (39),
github-actions's avatar
github-actions committed
98
99
100
101
102
103
104
105
    OPEN_STATE_GUIDE_ADVENTURE_DAILYTASK (40),
    OPEN_STATE_GUIDE_ADVENTURE_DUNGEON (41),
    OPEN_STATE_TOWER (42),
    OPEN_STATE_WORLD_STAMINA (43),
    OPEN_STATE_TOWER_FIRST_ENTER (44),
    OPEN_STATE_RESIN (45),
    OPEN_STATE_LIMIT_REGION_FRESHMEAT (47),
    OPEN_STATE_LIMIT_REGION_GLOBAL (48),
106
    OPEN_STATE_MULTIPLAYER (49),
github-actions's avatar
github-actions committed
107
108
109
    OPEN_STATE_GUIDE_MOUSEPC (50),
    OPEN_STATE_GUIDE_MULTIPLAYER (51),
    OPEN_STATE_GUIDE_DUNGEONREWARD (52),
110
    OPEN_STATE_GUIDE_BLOSSOM (53),
github-actions's avatar
github-actions committed
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
    OPEN_STATE_AVATAR_FASHION (54),
    OPEN_STATE_PHOTOGRAPH (55),
    OPEN_STATE_GUIDE_KSLQUEST (56),
    OPEN_STATE_PERSONAL_LINE (57, 26),
    OPEN_STATE_GUIDE_PERSONAL_LINE (58),
    OPEN_STATE_GUIDE_APPEARANCE (59),
    OPEN_STATE_GUIDE_PROCESS (60),
    OPEN_STATE_GUIDE_PERSONAL_LINE_KEY (61),
    OPEN_STATE_GUIDE_WIDGET (62),
    OPEN_STATE_GUIDE_ACTIVITY_SKILL_ASTER (63),
    OPEN_STATE_GUIDE_COLDCLIMATE (64),
    OPEN_STATE_DERIVATIVE_MALL (65),
    OPEN_STATE_GUIDE_EXITMULTIPLAYER (66),
    OPEN_STATE_GUIDE_THEATREMACHANICUS_BUILD (67),
    OPEN_STATE_GUIDE_THEATREMACHANICUS_REBUILD (68),
    OPEN_STATE_GUIDE_THEATREMACHANICUS_CARD (69),
    OPEN_STATE_GUIDE_THEATREMACHANICUS_MONSTER (70),
    OPEN_STATE_GUIDE_THEATREMACHANICUS_MISSION_CHECK (71),
    OPEN_STATE_GUIDE_THEATREMACHANICUS_BUILD_SELECT (72),
    OPEN_STATE_GUIDE_THEATREMACHANICUS_CHALLENGE_START (73),
    OPEN_STATE_GUIDE_CONVERT (74),
    OPEN_STATE_GUIDE_THEATREMACHANICUS_MULTIPLAYER (75),
    OPEN_STATE_GUIDE_COOP_TASK (76),
    OPEN_STATE_GUIDE_HOMEWORLD_ADEPTIABODE (77),
    OPEN_STATE_GUIDE_HOMEWORLD_DEPLOY (78),
    OPEN_STATE_GUIDE_CHANNELLERSLAB_EQUIP (79),
    OPEN_STATE_GUIDE_CHANNELLERSLAB_MP_SOLUTION (80),
    OPEN_STATE_GUIDE_CHANNELLERSLAB_POWER (81),
    OPEN_STATE_GUIDE_HIDEANDSEEK_SKILL (82),
    OPEN_STATE_GUIDE_HOMEWORLD_MAPLIST (83),
    OPEN_STATE_GUIDE_RELICRESOLVE (84),
    OPEN_STATE_GUIDE_GGUIDE (85),
    OPEN_STATE_GUIDE_GGUIDE_HINT (86),
    OPEN_STATE_GUIDE_CHANNELLERSLAB_EQUIP_V2 (87),
    OPEN_STATE_GUIDE_CHANNELLERSLAB_MP_SOLUTION_V2 (88),
    OPEN_STATE_GUIDE_CHANNELLERSLAB_POWER_V2 (89),
147
    OPEN_STATE_GUIDE_QUICK_TEAMMEMBERCHANGE (90),
github-actions's avatar
github-actions committed
148
149
150
151
    OPEN_STATE_GGUIDE_FIRSTSHOW (91),
    OPEN_STATE_GGUIDE_MAINPAGE_ENTRY_DISAPPEAR (92),
    OPEN_STATE_CITY_REPUATION_MENGDE (800),
    OPEN_STATE_CITY_REPUATION_LIYUE (801),
152
    OPEN_STATE_CITY_REPUATION_UI_HINT (802),
github-actions's avatar
github-actions committed
153
154
    OPEN_STATE_CITY_REPUATION_INAZUMA (803),
    OPEN_STATE_SHOP_TYPE_MALL (900),
155
156
157
    OPEN_STATE_SHOP_TYPE_RECOMMANDED (901),
    OPEN_STATE_SHOP_TYPE_GENESISCRYSTAL (902),
    OPEN_STATE_SHOP_TYPE_GIFTPACKAGE (903),
github-actions's avatar
github-actions committed
158
159
160
    OPEN_STATE_SHOP_TYPE_PAIMON (1001),
    OPEN_STATE_SHOP_TYPE_CITY (1002),
    OPEN_STATE_SHOP_TYPE_BLACKSMITH (1003),
161
162
163
    OPEN_STATE_SHOP_TYPE_GROCERY (1004),
    OPEN_STATE_SHOP_TYPE_FOOD (1005),
    OPEN_STATE_SHOP_TYPE_SEA_LAMP (1006),
github-actions's avatar
github-actions committed
164
    OPEN_STATE_SHOP_TYPE_VIRTUAL_SHOP (1007),
165
    OPEN_STATE_SHOP_TYPE_LIYUE_GROCERY (1008),
github-actions's avatar
github-actions committed
166
    OPEN_STATE_SHOP_TYPE_LIYUE_SOUVENIR (1009),
167
    OPEN_STATE_SHOP_TYPE_LIYUE_RESTAURANT (1010),
github-actions's avatar
github-actions committed
168
169
170
171
172
173
    OPEN_STATE_SHOP_TYPE_INAZUMA_SOUVENIR (1011),
    OPEN_STATE_SHOP_TYPE_NPC_TOMOKI (1012),
    OPEN_STATE_SHOP_TYPE_INAZUMA_SOUVENIR_BLACK_BAR (1013),
    OPEN_ADVENTURE_MANUAL (1100),
    OPEN_ADVENTURE_MANUAL_CITY_MENGDE (1101),
    OPEN_ADVENTURE_MANUAL_CITY_LIYUE (1102),
174
    OPEN_ADVENTURE_MANUAL_MONSTER (1103),
github-actions's avatar
github-actions committed
175
176
177
178
    OPEN_ADVENTURE_MANUAL_BOSS_DUNGEON (1104),
    OPEN_STATE_ACTIVITY_SEALAMP (1200),
    OPEN_STATE_ACTIVITY_SEALAMP_TAB2 (1201),
    OPEN_STATE_ACTIVITY_SEALAMP_TAB3 (1202),
179
180
    OPEN_STATE_BATTLE_PASS (1300),
    OPEN_STATE_BATTLE_PASS_ENTRY (1301),
github-actions's avatar
github-actions committed
181
182
183
184
185
186
187
188
    OPEN_STATE_ACTIVITY_CRUCIBLE (1400),
    OPEN_STATE_ACTIVITY_NEWBEEBOUNS_OPEN (1401),
    OPEN_STATE_ACTIVITY_NEWBEEBOUNS_CLOSE (1402),
    OPEN_STATE_ACTIVITY_ENTRY_OPEN (1403),
    OPEN_STATE_MENGDE_INFUSEDCRYSTAL (1404),
    OPEN_STATE_LIYUE_INFUSEDCRYSTAL (1405),
    OPEN_STATE_SNOW_MOUNTAIN_ELDER_TREE (1406),
    OPEN_STATE_MIRACLE_RING (1407),
189
    OPEN_STATE_COOP_LINE (1408),
github-actions's avatar
github-actions committed
190
191
192
193
194
    OPEN_STATE_INAZUMA_INFUSEDCRYSTAL (1409),
    OPEN_STATE_FISH (1410),
    OPEN_STATE_GUIDE_SUMO_TEAM_SKILL (1411),
    OPEN_STATE_GUIDE_FISH_RECIPE (1412),
    OPEN_STATE_HOME (1500),
195
    OPEN_STATE_ACTIVITY_HOMEWORLD (1501),
github-actions's avatar
github-actions committed
196
197
198
199
    OPEN_STATE_ADEPTIABODE (1502),
    OPEN_STATE_HOME_AVATAR (1503),
    OPEN_STATE_HOME_EDIT (1504),
    OPEN_STATE_HOME_EDIT_TIPS (1505),
200
201
    OPEN_STATE_RELIQUARY_DECOMPOSE (1600),
    OPEN_STATE_ACTIVITY_H5 (1700),
github-actions's avatar
github-actions committed
202
203
204
205
206
207
    OPEN_STATE_ORAIONOKAMI (2000),
    OPEN_STATE_GUIDE_CHESS_MISSION_CHECK (2001),
    OPEN_STATE_GUIDE_CHESS_BUILD (2002),
    OPEN_STATE_GUIDE_CHESS_WIND_TOWER_CIRCLE (2003),
    OPEN_STATE_GUIDE_CHESS_CARD_SELECT (2004),
    OPEN_STATE_INAZUMA_MAINQUEST_FINISHED (2005),
208
209
    OPEN_STATE_PAIMON_LVINFO (2100),
    OPEN_STATE_TELEPORT_HUD (2101),
github-actions's avatar
github-actions committed
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
    OPEN_STATE_GUIDE_MAP_UNLOCK (2102),
    OPEN_STATE_GUIDE_PAIMON_LVINFO (2103),
    OPEN_STATE_GUIDE_AMBORTRANSPORT (2104),
    OPEN_STATE_GUIDE_FLY_SECOND (2105),
    OPEN_STATE_GUIDE_KAEYA_CLUE (2106),
    OPEN_STATE_CAPTURE_CODEX (2107),
    OPEN_STATE_ACTIVITY_FISH_OPEN (2200),
    OPEN_STATE_ACTIVITY_FISH_CLOSE (2201),
    OPEN_STATE_GUIDE_ROGUE_MAP (2205),
    OPEN_STATE_GUIDE_ROGUE_RUNE (2206),
    OPEN_STATE_GUIDE_BARTENDER_FORMULA (2210),
    OPEN_STATE_GUIDE_BARTENDER_MIX (2211),
    OPEN_STATE_GUIDE_BARTENDER_CUP (2212),
    OPEN_STATE_GUIDE_MAIL_FAVORITES (2400),
    OPEN_STATE_GUIDE_POTION_CONFIGURE (2401),
    OPEN_STATE_GUIDE_LANV2_FIREWORK (2402),
    OPEN_STATE_LOADINGTIPS_ENKANOMIYA (2403),
227
    OPEN_STATE_MICHIAE_CASKET (2500),
github-actions's avatar
github-actions committed
228
229
230
231
232
233
234
235
236
237
    OPEN_STATE_MAIL_COLLECT_UNLOCK_RED_POINT (2501),
    OPEN_STATE_LUMEN_STONE (2600),
    OPEN_STATE_GUIDE_CRYSTALLINK_BUFF (2601),
    OPEN_STATE_GUIDE_MUSIC_GAME_V3 (2700),
    OPEN_STATE_GUIDE_MUSIC_GAME_V3_REAL_TIME_EDIT (2701),
    OPEN_STATE_GUIDE_MUSIC_GAME_V3_TIMELINE_EDIT (2702),
    OPEN_STATE_GUIDE_MUSIC_GAME_V3_SETTING (2703),
    OPEN_STATE_GUIDE_ROBOTGACHA (2704),
    OPEN_STATE_GUIDE_FRAGILE_RESIN (2800),
    OPEN_ADVENTURE_MANUAL_EDUCATION (2801);
238
 */