Add props to handbook

This commit is contained in:
Melledy
2023-10-24 12:53:27 -07:00
parent 15f6a47897
commit 2f5f969ef9
2 changed files with 13 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ import lombok.Getter;
@ResourceType(name = {"MazeProp.json"})
public class PropExcel extends GameResource {
private int ID;
private long PropName;
private String JsonPath;
private PropType PropType;

View File

@@ -39,7 +39,7 @@ public class Handbook {
LocalDateTime now = LocalDateTime.now();
// Header
writer.println("# Star Rail " + GameConstants.VERSION + " Handbook");
writer.println("# Lunar Core " + GameConstants.VERSION + " Handbook");
writer.println("# Created " + dtf.format(now));
// Dump commands
@@ -74,6 +74,17 @@ public class Handbook {
writer.print(" : ");
writer.println(textMap.getOrDefault(excel.getItemName(), "null"));
}
// Dump props
writer.println(System.lineSeparator());
writer.println("# Props (Spawnable)");
list = GameData.getPropExcelMap().keySet().intStream().sorted().boxed().toList();
for (int id : list) {
PropExcel excel = GameData.getPropExcelMap().get(id);
writer.print(excel.getId());
writer.print(" : ");
writer.println(textMap.getOrDefault(excel.getPropName(), "null"));
}
// Dump npc monsters
writer.println(System.lineSeparator());