mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-27 17:05:35 +08:00
Add icons to item data
This commit is contained in:
parent
a27f7e0373
commit
2a5abc1dcb
@ -38,6 +38,7 @@ public class ItemData extends GameResource {
|
|||||||
private int rank;
|
private int rank;
|
||||||
private int weight;
|
private int weight;
|
||||||
private int gadgetId;
|
private int gadgetId;
|
||||||
|
private String icon;
|
||||||
|
|
||||||
private int[] destroyReturnMaterial;
|
private int[] destroyReturnMaterial;
|
||||||
private int[] destroyReturnMaterialCount;
|
private int[] destroyReturnMaterialCount;
|
||||||
|
@ -20,6 +20,8 @@ import java.util.Map;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public interface Dumpers {
|
public interface Dumpers {
|
||||||
|
// See `src/handbook/data/README.md` for attributions.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetches the description of a command.
|
* Fetches the description of a command.
|
||||||
*
|
*
|
||||||
@ -141,7 +143,8 @@ public interface Dumpers {
|
|||||||
var dump = new HashMap<Integer, ItemData>();
|
var dump = new HashMap<Integer, ItemData>();
|
||||||
GameData.getItemDataMap().forEach((id, item) -> dump.put(id, new ItemData(
|
GameData.getItemDataMap().forEach((id, item) -> dump.put(id, new ItemData(
|
||||||
Language.getTextMapKey(item.getNameTextMapHash()).get(locale),
|
Language.getTextMapKey(item.getNameTextMapHash()).get(locale),
|
||||||
Quality.from(item.getRankLevel()), item.getItemType()
|
Quality.from(item.getRankLevel()), item.getItemType(),
|
||||||
|
item.getIcon().length() > 0 ? item.getIcon().substring(3) : ""
|
||||||
)));
|
)));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -185,12 +188,14 @@ public interface Dumpers {
|
|||||||
public String name;
|
public String name;
|
||||||
public Quality quality;
|
public Quality quality;
|
||||||
public ItemType type;
|
public ItemType type;
|
||||||
|
public String icon;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return this.name + ","
|
return this.name + ","
|
||||||
+ this.quality + ","
|
+ this.quality + ","
|
||||||
+ this.type;
|
+ this.type + ","
|
||||||
|
+ this.icon;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user