Implement material crafting

This commit is contained in:
Melledy
2025-10-30 19:33:07 -07:00
parent 489b88ea4a
commit 00b77e80e1
5 changed files with 95 additions and 3 deletions
+2 -1
View File
@@ -31,7 +31,8 @@ public class GameData {
@Getter private static DataTable<DiscPromoteLimitDef> DiscPromoteLimitDataTable = new DataTable<>();
@Getter private static DataTable<ItemDef> ItemDataTable = new DataTable<>();
@Getter private static DataTable<ProductionDef> ProductionDataTable = new DataTable<>();
@Getter private static DataTable<MallMonthlyCardDef> MallMonthlyCardDataTable = new DataTable<>();
@Getter private static DataTable<MallPackageDef> MallPackageDataTable = new DataTable<>();
@Getter private static DataTable<MallShopDef> MallShopDataTable = new DataTable<>();
@@ -3,13 +3,12 @@ package emu.nebula.data.resources;
import emu.nebula.GameConstants;
import emu.nebula.data.BaseDef;
import emu.nebula.data.ResourceType;
import emu.nebula.data.ResourceType.LoadPriority;
import emu.nebula.game.inventory.ItemParamMap;
import lombok.Getter;
@Getter
@ResourceType(name = "CharacterSkillUpgrade.json", loadPriority = LoadPriority.LOW)
@ResourceType(name = "CharacterSkillUpgrade.json")
public class CharacterSkillUpgradeDef extends BaseDef {
private int Group;
private int AdvanceNum;
@@ -0,0 +1,34 @@
package emu.nebula.data.resources;
import emu.nebula.data.BaseDef;
import emu.nebula.data.ResourceType;
import emu.nebula.game.inventory.ItemParamMap;
import lombok.Getter;
@Getter
@ResourceType(name = "Production.json")
public class ProductionDef extends BaseDef {
private int Id;
private int UnlockWorldLevel;
private int ProductionId;
private int ProductionPerBatch;
private int RawMaterialId1;
private int RawMaterialCount1;
private transient ItemParamMap materials;
@Override
public int getId() {
return Id;
}
@Override
public void onLoad() {
this.materials = new ItemParamMap();
if (this.RawMaterialId1 > 0) {
this.materials.add(this.RawMaterialId1, this.RawMaterialCount1);
}
}
}