迁移证esc

This commit is contained in:
wfz
2026-05-02 18:07:11 +08:00
parent 990b31a12a
commit 9fd572c8c4
51 changed files with 3659 additions and 1820 deletions

View File

@@ -33,9 +33,6 @@ public class TemplateManager {
return instance;
}
/**
* 加载所有模板
*/
private void loadAll() {
loadZombies();
loadWeapons();
@@ -82,6 +79,7 @@ public class TemplateManager {
WeaponTemplate t = new WeaponTemplate(
node.get("id").asText(),
node.get("name").asText(),
node.has("category") ? node.get("category").asText() : "firearm",
node.get("damage").asInt(),
node.get("fireRate").asLong(),
node.get("pelletCount").asInt(),
@@ -91,7 +89,15 @@ public class TemplateManager {
node.get("maxAmmo").asInt(),
node.get("chargeable").asBoolean(),
node.get("explosive").asBoolean(),
(float) node.get("explosionRadius").asDouble()
(float) node.get("explosionRadius").asDouble(),
node.has("fireZoneRadius") ? (float) node.get("fireZoneRadius").asDouble() : 0,
node.has("fireZoneDamage") ? (float) node.get("fireZoneDamage").asDouble() : 0,
node.has("fireZoneDuration") ? (float) node.get("fireZoneDuration").asDouble() : 0,
node.has("turretHealth") ? (float) node.get("turretHealth").asDouble() : 0,
node.has("turretRange") ? (float) node.get("turretRange").asDouble() : 0,
node.has("turretFireRate") ? node.get("turretFireRate").asLong() : 0,
node.has("turretDamage") ? node.get("turretDamage").asInt() : 0,
node.has("turretBulletSpeed") ? (float) node.get("turretBulletSpeed").asDouble() : 0
);
weaponTemplates.put(t.getId(), t);
}
@@ -137,9 +143,6 @@ public class TemplateManager {
return playerTemplate;
}
/**
* 获取武器列表的索引位置
*/
public int getWeaponIndex(String id) {
int idx = 0;
for (String key : weaponTemplates.keySet()) {
@@ -149,9 +152,6 @@ public class TemplateManager {
return 0;
}
/**
* 根据索引获取武器ID
*/
public String getWeaponId(int index) {
int idx = 0;
for (String key : weaponTemplates.keySet()) {