mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-27 02:43:15 +00: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 weight;
|
||||
private int gadgetId;
|
||||
private String icon;
|
||||
|
||||
private int[] destroyReturnMaterial;
|
||||
private int[] destroyReturnMaterialCount;
|
||||
|
@ -20,6 +20,8 @@ import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public interface Dumpers {
|
||||
// See `src/handbook/data/README.md` for attributions.
|
||||
|
||||
/**
|
||||
* Fetches the description of a command.
|
||||
*
|
||||
@ -141,7 +143,8 @@ public interface Dumpers {
|
||||
var dump = new HashMap<Integer, ItemData>();
|
||||
GameData.getItemDataMap().forEach((id, item) -> dump.put(id, new ItemData(
|
||||
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 {
|
||||
@ -185,12 +188,14 @@ public interface Dumpers {
|
||||
public String name;
|
||||
public Quality quality;
|
||||
public ItemType type;
|
||||
public String icon;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.name + ","
|
||||
+ this.quality + ","
|
||||
+ this.type;
|
||||
+ this.type + ","
|
||||
+ this.icon;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user