mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-17 09:25:06 +01:00
Refactor out InsectCaptureManager
This commit is contained in:
@@ -2,6 +2,7 @@ package emu.grasscutter.data.common;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
// Used in excels
|
||||
public class ItemParamData {
|
||||
@SerializedName(value="id", alternate={"itemId"})
|
||||
private int id;
|
||||
@@ -10,6 +11,7 @@ public class ItemParamData {
|
||||
private int count;
|
||||
|
||||
public ItemParamData() {}
|
||||
|
||||
public ItemParamData(int id, int count) {
|
||||
this.id = id;
|
||||
this.count = count;
|
||||
|
||||
@@ -4,37 +4,32 @@ import java.util.List;
|
||||
|
||||
import emu.grasscutter.data.GameResource;
|
||||
import emu.grasscutter.data.ResourceType;
|
||||
import emu.grasscutter.data.common.ItemParamData;
|
||||
|
||||
@ResourceType(name = "EnvAnimalGatherExcelConfigData.json", loadPriority = ResourceType.LoadPriority.LOW)
|
||||
public class EnvAnimalGatherConfigData extends GameResource {
|
||||
private int animalId;
|
||||
private String entityType;
|
||||
private List<GatherItem> gatherItemId;
|
||||
private List<ItemParamData> gatherItemId;
|
||||
private String excludeWeathers;
|
||||
private int aliveTime;
|
||||
private int escapeTime;
|
||||
private int escapeRadius;
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
return animalId;
|
||||
}
|
||||
|
||||
public int getAnimalId(){
|
||||
return animalId;
|
||||
}
|
||||
|
||||
public String getEntityType(){
|
||||
return entityType;
|
||||
}
|
||||
public GatherItem gatherItem(){
|
||||
return gatherItemId.get(0);
|
||||
}
|
||||
public static class GatherItem{
|
||||
private int id;
|
||||
private int count;
|
||||
public int getId(){
|
||||
return id;
|
||||
}
|
||||
public int getCount(){
|
||||
return count;
|
||||
}
|
||||
|
||||
public ItemParamData getGatherItem() {
|
||||
return gatherItemId.size() > 0 ? gatherItemId.get(0) : null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user