forked from MagicBane/Server
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>
32 lines
1.4 KiB
Java
32 lines
1.4 KiB
Java
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
|
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
|
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
|
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
|
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
|
// Magicbane Emulator Project © 2013 - 2026
|
|
// https://www.magicbane.com
|
|
|
|
package engine.parsers.objects.wpak;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
|
|
// One row of CompoundCurves.cfg: <name> then segments of <DownperRange> <SimpleCurveName> <params>.
|
|
// Most curves are one SlopedLine segment; DefaultCurveUp/Down have two, which the
|
|
// CompoundCurveType enum (one value per curve) can't hold.
|
|
|
|
public class CompoundCurveTemplate {
|
|
|
|
public static HashMap<String, CompoundCurveTemplate> _curves = new HashMap<>();
|
|
|
|
public String name;
|
|
public final ArrayList<Segment> segments = new ArrayList<>();
|
|
|
|
public static class Segment {
|
|
|
|
public int down_per_range;
|
|
public String simple_curve;
|
|
public float[] params;
|
|
}
|
|
}
|