mirror of
https://github.com/Melledy/Nebula.git
synced 2026-09-19 17:19:58 +02:00
Fix Menace Arena not saving properly
This commit is contained in:
@@ -132,6 +132,7 @@ public class GameData {
|
||||
|
||||
// ===== Infinity Tower =====
|
||||
@Getter private static DataTable<InfinityTowerLevelDef> InfinityTowerLevelDataTable = new DataTable<>();
|
||||
@Getter private static DataTable<InfinityTowerDifficultyDef> InfinityTowerDifficultyDataTable = new DataTable<>();
|
||||
|
||||
// ===== Vampire Survivor =====
|
||||
@Getter private static DataTable<VampireSurvivorDef> VampireSurvivorDataTable = new DataTable<>();
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package emu.nebula.data.resources;
|
||||
|
||||
import emu.nebula.data.BaseDef;
|
||||
import emu.nebula.data.ResourceType;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@ResourceType(name = "InfinityTowerDifficulty.json")
|
||||
public class InfinityTowerDifficultyDef extends BaseDef {
|
||||
private int Id;
|
||||
private int TowerId;
|
||||
|
||||
@Override
|
||||
public int getId() {
|
||||
return Id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import emu.nebula.data.BaseDef;
|
||||
import emu.nebula.data.GameData;
|
||||
import emu.nebula.data.ResourceType;
|
||||
import emu.nebula.game.inventory.ItemParamMap;
|
||||
import emu.nebula.game.inventory.ItemRewardParam;
|
||||
@@ -25,8 +26,13 @@ public class InfinityTowerLevelDef extends BaseDef {
|
||||
return Id;
|
||||
}
|
||||
|
||||
public int getEnergyConsume() {
|
||||
return 0;
|
||||
public int getTowerId() {
|
||||
var diff = GameData.getInfinityTowerDifficultyDataTable().get(this.DifficultyId);
|
||||
if (diff == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return diff.getTowerId();
|
||||
}
|
||||
|
||||
public ItemParamMap generateRewards() {
|
||||
|
||||
Reference in New Issue
Block a user