Keep Powers.cfg file order and the client's power key defaults
PowerParser fills a LinkedHashMap so boot-assigned power IDs follow the file order (the same order as static_power_powerbase IDs 1..1465). PowerTemplate defaults follow ArcPower_ctor 0x56CD40: MAXLEVEL 9999, CANCASTWHILEFLYING, SHOULDCHECKPATH and CANTARGETADMIN TRUE. No reader yet; every power sets MaxLevel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
025a451770
commit
3cf966d0eb
2 files changed
+8
-5
No files matched your search
@@ -51,8 +51,10 @@ public class PowerTemplate {
|
||||
|
||||
// Keys
|
||||
|
||||
// Key defaults follow the client ctor ArcPower_ctor 0x56CD40
|
||||
|
||||
public final ArrayList<ActionEntry> actions = new ArrayList<>();
|
||||
public int maxlevel;
|
||||
public int maxlevel = 9999;
|
||||
public float hatevalue;
|
||||
public String hatevalue_curve;
|
||||
public String grantoverridevar;
|
||||
@@ -71,10 +73,10 @@ public class PowerTemplate {
|
||||
public int loopanimid;
|
||||
public boolean bladetrails;
|
||||
public boolean cancastwhilemoving;
|
||||
public boolean cancastwhileflying;
|
||||
public boolean shouldcheckpath;
|
||||
public boolean cancastwhileflying = true;
|
||||
public boolean shouldcheckpath = true;
|
||||
public boolean isadminpower;
|
||||
public boolean cantargetadmin;
|
||||
public boolean cantargetadmin = true;
|
||||
public boolean isprojectile;
|
||||
public boolean sticky;
|
||||
public int maxnummobtargets;
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
// Loads Powers.cfg (client loader 0x56E410). CompoundCurves.cfg must be loaded first.
|
||||
|
||||
@@ -30,7 +31,7 @@ public class PowerParser {
|
||||
|
||||
public static HashMap<String, PowerTemplate> parsePowersFile() {
|
||||
|
||||
HashMap<String, PowerTemplate> powers = new HashMap<>();
|
||||
HashMap<String, PowerTemplate> powers = new LinkedHashMap<>();
|
||||
WpakBlock root;
|
||||
PowerTemplate power;
|
||||
int blockCount = 0;
|
||||
|
||||
Reference in new issue
Block a user