Load Effects.cfg, ModTypes.cfg and CompoundCurves.cfg at world boot
CompoundCurveParser keeps every curve segment (the CompoundCurveType enum holds one value per curve). ModTypeParser keeps each mod type's Behavior, which decides the argument layout of a MODS line. EffectParser loads Effects.cfg into EffectTemplate._effects: header, the four flag keys (case-insensitive, as in the client), SOURCE lines, every MODS line in order, and CONDITION lines. Mod layouts follow the client's ArcMod*_Parse functions; curve names in effects and power actions must exist in CompoundCurves.cfg. Boot order: curves, mod types, power actions, effects. No consumers change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6c820940d3
commit
623f7c4ae6
9 files changed
+584
-3
No files matched your search
@@ -0,0 +1,28 @@
|
||||
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
||||
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
||||
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
||||
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
||||
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
||||
// Magicbane Emulator Project © 2013 - 2026
|
||||
// https://www.magicbane.com
|
||||
|
||||
package engine.parsers.wpak;
|
||||
|
||||
import engine.parsers.objects.wpak.CompoundCurveTemplate;
|
||||
|
||||
// Lookups shared by the wpak parsers that need other cfg files loaded first.
|
||||
|
||||
public class WpakParserUtil {
|
||||
|
||||
// CompoundCurves.cfg must be loaded before any file that names a curve
|
||||
|
||||
public static String curveToken(WpakLine line, int index) {
|
||||
|
||||
String curveName = line.token(index);
|
||||
|
||||
if (!CompoundCurveTemplate._curves.containsKey(curveName))
|
||||
throw line.error("curve " + curveName + " is not in CompoundCurves.cfg");
|
||||
|
||||
return curveName;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user