Follows the ship matched to the selected radar contact (true position and velocity) and extrapolates the last contact when no ship is loaded, so notching or the radar speed gate no longer removes the pipper. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVREx3uo7nz1FEhzveWTUh
54 lines
3.2 KiB
Java
54 lines
3.2 KiB
Java
package dev.lumareth.improvedAerodynamics.client.pipper;
|
|
|
|
import net.minecraftforge.common.ForgeConfigSpec;
|
|
|
|
/** Client side settings of the gun pipper. Lives in improved_aerodynamics-client.toml. */
|
|
public final class PipperConfig {
|
|
public static final ForgeConfigSpec SPEC;
|
|
|
|
public static final ForgeConfigSpec.BooleanValue ENABLED;
|
|
public static final ForgeConfigSpec.BooleanValue SHOW_IMPACT;
|
|
public static final ForgeConfigSpec.BooleanValue SHOW_LEAD;
|
|
public static final ForgeConfigSpec.BooleanValue INHERIT_SHIP_VELOCITY;
|
|
public static final ForgeConfigSpec.BooleanValue VISUAL_TRACK;
|
|
public static final ForgeConfigSpec.DoubleValue COAST_SECONDS;
|
|
public static final ForgeConfigSpec.DoubleValue MUZZLE_SPEED_OVERRIDE;
|
|
public static final ForgeConfigSpec.DoubleValue GRAVITY;
|
|
public static final ForgeConfigSpec.DoubleValue DRAG;
|
|
public static final ForgeConfigSpec.DoubleValue MARKER_SIZE;
|
|
|
|
static {
|
|
ForgeConfigSpec.Builder builder = new ForgeConfigSpec.Builder();
|
|
builder.comment("Gun pipper for Warium light autocannons, drawn while seated in a Warium seat").push("pipper");
|
|
ENABLED = builder.comment("Master switch")
|
|
.define("enabled", true);
|
|
SHOW_IMPACT = builder.comment("Show where the shells of the gun come down on the ground (orange ring)")
|
|
.define("showImpact", true);
|
|
SHOW_LEAD = builder.comment("Show the lead pipper for the radar target you selected (green ring)")
|
|
.define("showLead", true);
|
|
VISUAL_TRACK = builder.comment("Follow the selected target's ship itself once the radar has shown it, so the lead pipper keeps working when",
|
|
"the radar loses it (notching, speed gate, ground clutter). Only while the ship is loaded, which is within render distance",
|
|
"(cyan ring)")
|
|
.define("visualTrack", true);
|
|
COAST_SECONDS = builder.comment("Seconds a lost radar contact is extrapolated from its last position and velocity when its ship is not loaded",
|
|
"(yellow ring), 0 turns it off")
|
|
.defineInRange("coastSeconds", 8.0, 0.0, 60.0);
|
|
INHERIT_SHIP_VELOCITY = builder.comment("Add the speed of your aircraft to the shells. Warium does not do this itself, only turn it",
|
|
"on if a test shows your shells keep the speed of the jet (fire level at full speed, then hovering)")
|
|
.define("inheritShipVelocity", false);
|
|
MUZZLE_SPEED_OVERRIDE = builder.comment("Muzzle speed in blocks per tick, 0 works it out from the barrel length like Warium does")
|
|
.defineInRange("muzzleSpeedOverride", 0.0, 0.0, 100.0);
|
|
GRAVITY = builder.comment("Gravity of the shells in blocks per tick squared")
|
|
.defineInRange("gravity", 0.05, 0.0, 1.0);
|
|
DRAG = builder.comment("Speed the shells keep each tick, 0.99 is a vanilla arrow")
|
|
.defineInRange("drag", 0.99, 0.5, 1.0);
|
|
MARKER_SIZE = builder.comment("Radius of the markers on screen")
|
|
.defineInRange("markerSize", 0.03, 0.005, 0.2);
|
|
builder.pop();
|
|
SPEC = builder.build();
|
|
}
|
|
|
|
private PipperConfig() {
|
|
}
|
|
}
|