Commit a30f16b0 authored by AnimeGitB's avatar AnimeGitB
Browse files

Clean up excels

parent 65915b76
...@@ -10,12 +10,8 @@ import lombok.experimental.FieldDefaults; ...@@ -10,12 +10,8 @@ import lombok.experimental.FieldDefaults;
@Getter @Getter
@FieldDefaults(level = AccessLevel.PRIVATE) @FieldDefaults(level = AccessLevel.PRIVATE)
public class MusicGameBasicData extends GameResource { public class MusicGameBasicData extends GameResource {
@Getter(onMethod = @__(@Override))
int id; int id;
int musicID; int musicID;
int musicLevel; int musicLevel;
@Override
public int getId() {
return this.id;
}
} }
...@@ -2,9 +2,12 @@ package emu.grasscutter.data.excels; ...@@ -2,9 +2,12 @@ package emu.grasscutter.data.excels;
import emu.grasscutter.data.GameResource; import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType; import emu.grasscutter.data.ResourceType;
import lombok.Getter;
@ResourceType(name = "NpcExcelConfigData.json") @ResourceType(name = "NpcExcelConfigData.json")
@Getter
public class NpcData extends GameResource { public class NpcData extends GameResource {
@Getter(onMethod = @__(@Override))
private int id; private int id;
private String jsonName; private String jsonName;
...@@ -19,54 +22,4 @@ public class NpcData extends GameResource { ...@@ -19,54 +22,4 @@ public class NpcData extends GameResource {
private long nameTextMapHash; private long nameTextMapHash;
private int campID; private int campID;
@Override
public int getId() {
return this.id;
}
public String getJsonName() {
return jsonName;
}
public String getAlias() {
return alias;
}
public String getScriptDataPath() {
return scriptDataPath;
}
public String getLuaDataPath() {
return luaDataPath;
}
public boolean isIsInteractive() {
return isInteractive;
}
public boolean isHasMove() {
return hasMove;
}
public String getDyePart() {
return dyePart;
}
public String getBillboardIcon() {
return billboardIcon;
}
public long getNameTextMapHash() {
return nameTextMapHash;
}
public int getCampID() {
return campID;
}
@Override
public void onLoad() {
}
} }
...@@ -3,15 +3,14 @@ package emu.grasscutter.data.excels; ...@@ -3,15 +3,14 @@ package emu.grasscutter.data.excels;
import emu.grasscutter.data.GameData; import emu.grasscutter.data.GameData;
import emu.grasscutter.data.GameResource; import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType; import emu.grasscutter.data.ResourceType;
import lombok.AccessLevel;
import lombok.Getter; import lombok.Getter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Objects;
@ResourceType(name = "OpenStateConfigData.json", loadPriority = ResourceType.LoadPriority.HIGHEST) @ResourceType(name = "OpenStateConfigData.json", loadPriority = ResourceType.LoadPriority.HIGHEST)
public class OpenStateData extends GameResource { public class OpenStateData extends GameResource {
@Getter(onMethod = @__(@Override))
private int id; private int id;
@Getter private boolean defaultState; @Getter private boolean defaultState;
@Getter private boolean allowClientOpen; @Getter private boolean allowClientOpen;
...@@ -32,11 +31,6 @@ public class OpenStateData extends GameResource { ...@@ -32,11 +31,6 @@ public class OpenStateData extends GameResource {
OPEN_STATE_COND_PARENT_QUEST; OPEN_STATE_COND_PARENT_QUEST;
} }
@Override
public int getId() {
return this.id;
}
@Override @Override
public void onLoad() { public void onLoad() {
// Add this open state to the global list. // Add this open state to the global list.
......
...@@ -11,18 +11,13 @@ import java.util.List; ...@@ -11,18 +11,13 @@ import java.util.List;
@ResourceType(name = "PersonalLineExcelConfigData.json") @ResourceType(name = "PersonalLineExcelConfigData.json")
@Getter @Getter
@Setter @Setter // TODO: remove setters next API break
@FieldDefaults(level = AccessLevel.PRIVATE) @FieldDefaults(level = AccessLevel.PRIVATE)
public class PersonalLineData extends GameResource { public class PersonalLineData extends GameResource {
@Getter(onMethod = @__(@Override))
int id; int id;
int avatarID; int avatarID;
List<Integer> preQuestId; List<Integer> preQuestId;
int startQuestId; int startQuestId;
int chapterId; int chapterId;
@Override
public int getId() {
return this.id;
}
} }
package emu.grasscutter.data.excels; package emu.grasscutter.data.excels;
import com.google.gson.annotations.SerializedName;
import emu.grasscutter.data.GameResource; import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType; import emu.grasscutter.data.ResourceType;
import emu.grasscutter.game.props.FightProperty; import emu.grasscutter.game.props.FightProperty;
import lombok.Getter;
@ResourceType(name = "ReliquaryAffixExcelConfigData.json") @ResourceType(name = "ReliquaryAffixExcelConfigData.json")
@Getter
public class ReliquaryAffixData extends GameResource { public class ReliquaryAffixData extends GameResource {
@Getter(onMethod = @__(@Override))
private int id; private int id;
private int depotId; private int depotId;
private int groupId; private int groupId;
private FightProperty propType; @SerializedName("propType")
private FightProperty fightProp;
private float propValue; private float propValue;
private int weight; private int weight;
private int upgradeWeight; private int upgradeWeight;
@Override
public int getId() {
return id;
}
public int getDepotId() {
return depotId;
}
public int getGroupId() {
return groupId;
}
public float getPropValue() {
return propValue;
}
public int getWeight() {
return weight;
}
public int getUpgradeWeight() {
return upgradeWeight;
}
public FightProperty getFightProp() {
return propType;
}
} }
...@@ -7,36 +7,19 @@ import emu.grasscutter.data.ResourceType; ...@@ -7,36 +7,19 @@ import emu.grasscutter.data.ResourceType;
import emu.grasscutter.game.props.FightProperty; import emu.grasscutter.game.props.FightProperty;
import it.unimi.dsi.fastutil.ints.Int2FloatMap; import it.unimi.dsi.fastutil.ints.Int2FloatMap;
import it.unimi.dsi.fastutil.ints.Int2FloatOpenHashMap; import it.unimi.dsi.fastutil.ints.Int2FloatOpenHashMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import lombok.Getter;
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
@ResourceType(name = "ReliquaryLevelExcelConfigData.json") @ResourceType(name = "ReliquaryLevelExcelConfigData.json")
public class ReliquaryLevelData extends GameResource { public class ReliquaryLevelData extends GameResource {
@Getter(onMethod = @__(@Override))
private int id; private int id;
private Int2FloatMap propMap; private Int2FloatMap propMap;
private int rank; @Getter private int rank;
private int level; @Getter private int level;
private int exp; @Getter private int exp;
private List<RelicLevelProperty> addProps; private List<RelicLevelProperty> addProps;
@Override
public int getId() {
return this.id;
}
public int getRank() {
return rank;
}
public int getLevel() {
return level;
}
public int getExp() {
return exp;
}
public float getPropValue(FightProperty prop) { public float getPropValue(FightProperty prop) {
return getPropValue(prop.getId()); return getPropValue(prop.getId());
} }
...@@ -54,16 +37,9 @@ public class ReliquaryLevelData extends GameResource { ...@@ -54,16 +37,9 @@ public class ReliquaryLevelData extends GameResource {
} }
} }
@Getter
public class RelicLevelProperty { public class RelicLevelProperty {
private String propType; private String propType;
private float value; private float value;
public String getPropType() {
return propType;
}
public float getValue() {
return value;
}
} }
} }
package emu.grasscutter.data.excels; package emu.grasscutter.data.excels;
import com.google.gson.annotations.SerializedName;
import emu.grasscutter.data.GameResource; import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType; import emu.grasscutter.data.ResourceType;
import emu.grasscutter.game.props.FightProperty; import emu.grasscutter.game.props.FightProperty;
import lombok.Getter;
@ResourceType(name = "ReliquaryMainPropExcelConfigData.json") @ResourceType(name = "ReliquaryMainPropExcelConfigData.json")
@Getter
public class ReliquaryMainPropData extends GameResource { public class ReliquaryMainPropData extends GameResource {
@Getter(onMethod = @__(@Override))
private int id; private int id;
private int propDepotId; private int propDepotId;
private FightProperty propType; @SerializedName("propType")
private FightProperty fightProp;
private int weight; private int weight;
@Override
public int getId() {
return id;
}
public int getPropDepotId() {
return propDepotId;
}
public int getWeight() {
return weight;
}
public FightProperty getFightProp() {
return propType;
}
} }
package emu.grasscutter.data.excels; package emu.grasscutter.data.excels;
import java.util.Arrays; import java.util.Arrays;
import java.util.List;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.data.GameData;
import emu.grasscutter.data.GameResource; import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType; import emu.grasscutter.data.ResourceType;
import emu.grasscutter.game.props.SceneType; import lombok.Getter;
import emu.grasscutter.data.ResourceType.LoadPriority; import emu.grasscutter.data.ResourceType.LoadPriority;
import emu.grasscutter.data.common.ItemParamData; import emu.grasscutter.data.common.ItemParamData;
import emu.grasscutter.data.common.ItemParamStringData; import emu.grasscutter.data.common.ItemParamStringData;
@ResourceType(name = "RewardPreviewExcelConfigData.json", loadPriority = LoadPriority.HIGH) @ResourceType(name = "RewardPreviewExcelConfigData.json", loadPriority = LoadPriority.HIGH)
public class RewardPreviewData extends GameResource { public class RewardPreviewData extends GameResource {
@Getter(onMethod = @__(@Override))
private int id; private int id;
private ItemParamStringData[] previewItems; private ItemParamStringData[] previewItems;
private ItemParamData[] previewItemsArray; private ItemParamData[] previewItemsArray;
@Override
public int getId() {
return this.id;
}
public ItemParamData[] getPreviewItems() { public ItemParamData[] getPreviewItems() {
return previewItemsArray; return previewItemsArray;
} }
......
package emu.grasscutter.data.excels; package emu.grasscutter.data.excels;
import emu.grasscutter.data.GameData; import com.google.gson.annotations.SerializedName;
import emu.grasscutter.data.GameResource; import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType; import emu.grasscutter.data.ResourceType;
import emu.grasscutter.game.props.SceneType; import emu.grasscutter.game.props.SceneType;
import lombok.Getter;
@ResourceType(name = "SceneExcelConfigData.json") @ResourceType(name = "SceneExcelConfigData.json")
@Getter
public class SceneData extends GameResource { public class SceneData extends GameResource {
@Getter(onMethod = @__(@Override))
private int id; private int id;
private SceneType type; @SerializedName("type")
private SceneType sceneType;
private String scriptData; private String scriptData;
@Override
public int getId() {
return this.id;
}
public SceneType getSceneType() {
return type;
}
public String getScriptData() {
return scriptData;
}
@Override
public void onLoad() {
}
} }
...@@ -2,10 +2,11 @@ package emu.grasscutter.data.excels; ...@@ -2,10 +2,11 @@ package emu.grasscutter.data.excels;
import emu.grasscutter.data.GameResource; import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType; import emu.grasscutter.data.ResourceType;
import lombok.Getter;
@ResourceType(name = "TowerFloorExcelConfigData.json") @ResourceType(name = "TowerFloorExcelConfigData.json")
@Getter
public class TowerFloorData extends GameResource { public class TowerFloorData extends GameResource {
private int floorId; private int floorId;
private int floorIndex; private int floorIndex;
private int levelGroupId; private int levelGroupId;
...@@ -17,33 +18,4 @@ public class TowerFloorData extends GameResource { ...@@ -17,33 +18,4 @@ public class TowerFloorData extends GameResource {
public int getId() { public int getId() {
return this.floorId; return this.floorId;
} }
@Override
public void onLoad() {
super.onLoad();
}
public int getFloorId() {
return floorId;
}
public int getFloorIndex() {
return floorIndex;
}
public int getLevelGroupId() {
return levelGroupId;
}
public int getOverrideMonsterLevel() {
return overrideMonsterLevel;
}
public int getTeamNum() {
return teamNum;
}
public int getFloorLevelConfigId() {
return floorLevelConfigId;
}
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment