Code polish
This commit is contained in:
@@ -65,6 +65,9 @@ namespace TerraTech {
|
|||||||
float max = 32f;
|
float max = 32f;
|
||||||
|
|
||||||
ModuleWingManager.Setup(Config);
|
ModuleWingManager.Setup(Config);
|
||||||
|
ModuleBoosterManager.Setup(Config);
|
||||||
|
ModuleShieldGeneratorManager.Setup(Config);
|
||||||
|
ModuleWeaponGunManager.Setup(Config);
|
||||||
|
|
||||||
xpMultiplier =
|
xpMultiplier =
|
||||||
Config.Bind("General", "XP Multiplier", 1f,
|
Config.Bind("General", "XP Multiplier", 1f,
|
||||||
|
@@ -20,7 +20,7 @@ namespace TerraTech {
|
|||||||
shieldRadiusMultiplier = config.Bind(
|
shieldRadiusMultiplier = config.Bind(
|
||||||
"Shield", "Shield Radius Multiplier", 1f,
|
"Shield", "Shield Radius Multiplier", 1f,
|
||||||
new ConfigDescription("Shield Radius Multiplier", new AcceptableValueRange<float>(min, max)));
|
new ConfigDescription("Shield Radius Multiplier", new AcceptableValueRange<float>(min, max)));
|
||||||
shieldRadiusMultiplier.SettingChanged += (sender, args) => ModuleShieldGeneratorManager.DoPatch();
|
shieldRadiusMultiplier.SettingChanged += (sender, args) => DoPatch();
|
||||||
|
|
||||||
shieldHeartbeatIntervalMultiplier =
|
shieldHeartbeatIntervalMultiplier =
|
||||||
config.Bind("Shield", "Shield Heartbeat Interval Multiplier", 1f,
|
config.Bind("Shield", "Shield Heartbeat Interval Multiplier", 1f,
|
||||||
@@ -28,31 +28,28 @@ namespace TerraTech {
|
|||||||
new AcceptableValueRange<float>(min, max)));
|
new AcceptableValueRange<float>(min, max)));
|
||||||
shieldHeartbeatIntervalMultiplier.SettingChanged += (sender, args) =>
|
shieldHeartbeatIntervalMultiplier.SettingChanged += (sender, args) =>
|
||||||
|
|
||||||
ModuleShieldGeneratorManager.DoPatch();
|
DoPatch();
|
||||||
shieldPowerUpDelayMultiplier = config.Bind(
|
shieldPowerUpDelayMultiplier = config.Bind(
|
||||||
"Shield", "Shield Power Up Delay Multiplier", 1f,
|
"Shield", "Shield Power Up Delay Multiplier", 1f,
|
||||||
new ConfigDescription("Shield Power Up Delay Multiplier", new AcceptableValueRange<float>(min, max)));
|
new ConfigDescription("Shield Power Up Delay Multiplier", new AcceptableValueRange<float>(min, max)));
|
||||||
shieldPowerUpDelayMultiplier.SettingChanged += (sender, args) => ModuleShieldGeneratorManager.DoPatch();
|
shieldPowerUpDelayMultiplier.SettingChanged += (sender, args) => DoPatch();
|
||||||
|
|
||||||
shieldRadiusMultiplierHealing = config.Bind(
|
shieldRadiusMultiplierHealing = config.Bind(
|
||||||
"Shield", "Shield Radius Multiplier Healing", 1f,
|
"Shield", "Shield Radius Multiplier Healing", 1f,
|
||||||
new ConfigDescription("Shield Radius Multiplier Healing", new AcceptableValueRange<float>(min, max)));
|
new ConfigDescription("Shield Radius Multiplier Healing", new AcceptableValueRange<float>(min, max)));
|
||||||
shieldRadiusMultiplierHealing.SettingChanged += (sender, args) => ModuleShieldGeneratorManager.DoPatch();
|
shieldRadiusMultiplierHealing.SettingChanged += (sender, args) => DoPatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void ConfigureShieldGenerator(MultipliedObject<ModuleShieldGenerator> obj) {
|
private static void ConfigureShieldGenerator(MultipliedObject<ModuleShieldGenerator> obj) {
|
||||||
obj.AddField(new FieldConfiguration<float>("m_HealingHeartbeatInterval",
|
obj.AddField(
|
||||||
ModuleShieldGeneratorManager.shieldHeartbeatIntervalMultiplier));
|
new FieldConfiguration<float>("m_HealingHeartbeatInterval", shieldHeartbeatIntervalMultiplier));
|
||||||
|
|
||||||
obj.AddField(new FieldConfiguration<float>(
|
obj.AddField(new FieldConfiguration<float>("m_Radius", shieldRadiusMultiplier, instance => {
|
||||||
"m_Radius", ModuleShieldGeneratorManager.shieldRadiusMultiplier, instance => {
|
|
||||||
var shield = (ModuleShieldGenerator)instance;
|
var shield = (ModuleShieldGenerator)instance;
|
||||||
return shield.m_Healing ? ModuleShieldGeneratorManager.shieldRadiusMultiplierHealing
|
return shield.m_Healing ? shieldRadiusMultiplierHealing : shieldRadiusMultiplier;
|
||||||
: ModuleShieldGeneratorManager.shieldRadiusMultiplier;
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
obj.AddField(new FieldConfiguration<float>("m_PowerUpDelay",
|
obj.AddField(new FieldConfiguration<float>("m_PowerUpDelay", shieldPowerUpDelayMultiplier));
|
||||||
ModuleShieldGeneratorManager.shieldPowerUpDelayMultiplier));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[HarmonyPrefix]
|
[HarmonyPrefix]
|
||||||
|
@@ -19,30 +19,26 @@ namespace TerraTech {
|
|||||||
aerofoilAngleRangeMultiplier = config.Bind(
|
aerofoilAngleRangeMultiplier = config.Bind(
|
||||||
"Aerofoil", "Aerofoil Angle Range Multiplier", 1f,
|
"Aerofoil", "Aerofoil Angle Range Multiplier", 1f,
|
||||||
new ConfigDescription("Aerofoil Angle Range Multiplier", new AcceptableValueRange<float>(min, max)));
|
new ConfigDescription("Aerofoil Angle Range Multiplier", new AcceptableValueRange<float>(min, max)));
|
||||||
aerofoilAngleRangeMultiplier.SettingChanged += (sender, args) => ModuleWingManager.DoPatch();
|
aerofoilAngleRangeMultiplier.SettingChanged += (sender, args) => DoPatch();
|
||||||
|
|
||||||
aerofoilAngleTurnSpeedMultiplier =
|
aerofoilAngleTurnSpeedMultiplier =
|
||||||
config.Bind("Aerofoil", "Aerofoil Angle Turn Speed Multiplier", 1f,
|
config.Bind("Aerofoil", "Aerofoil Angle Turn Speed Multiplier", 1f,
|
||||||
new ConfigDescription("Aerofoil Angle Turn Speed Multiplier",
|
new ConfigDescription("Aerofoil Angle Turn Speed Multiplier",
|
||||||
new AcceptableValueRange<float>(min, max)));
|
new AcceptableValueRange<float>(min, max)));
|
||||||
aerofoilAngleTurnSpeedMultiplier.SettingChanged += (sender, args) => ModuleWingManager.DoPatch();
|
aerofoilAngleTurnSpeedMultiplier.SettingChanged += (sender, args) => DoPatch();
|
||||||
|
|
||||||
aerofoilLiftStrengthMultiplier = config.Bind(
|
aerofoilLiftStrengthMultiplier = config.Bind(
|
||||||
"Aerofoil", "Aerofoil Lift Strength Multiplier", 1f,
|
"Aerofoil", "Aerofoil Lift Strength Multiplier", 1f,
|
||||||
new ConfigDescription("Aerofoil Lift Strength Multiplier", new AcceptableValueRange<float>(min, max)));
|
new ConfigDescription("Aerofoil Lift Strength Multiplier", new AcceptableValueRange<float>(min, max)));
|
||||||
aerofoilLiftStrengthMultiplier.SettingChanged += (sender, args) => ModuleWingManager.DoPatch();
|
aerofoilLiftStrengthMultiplier.SettingChanged += (sender, args) => DoPatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void ConfigureAerofoil(MultipliedObject<ModuleWing.Aerofoil> obj) {
|
private static void ConfigureAerofoil(MultipliedObject<ModuleWing.Aerofoil> obj) {
|
||||||
obj.AddField(
|
obj.AddField(new FieldConfiguration<float>("flipAngleRangeActual", aerofoilAngleRangeMultiplier));
|
||||||
new FieldConfiguration<float>("flipAngleRangeActual", ModuleWingManager.aerofoilAngleRangeMultiplier));
|
obj.AddField(new FieldConfiguration<float>("flipAngleRangeVisual", aerofoilAngleRangeMultiplier));
|
||||||
obj.AddField(
|
|
||||||
new FieldConfiguration<float>("flipAngleRangeVisual", ModuleWingManager.aerofoilAngleRangeMultiplier));
|
|
||||||
|
|
||||||
obj.AddField(new FieldConfiguration<float>("flipAngleTurnSpeed",
|
obj.AddField(new FieldConfiguration<float>("flipAngleTurnSpeed", aerofoilAngleTurnSpeedMultiplier));
|
||||||
ModuleWingManager.aerofoilAngleTurnSpeedMultiplier));
|
obj.AddField(new FieldConfiguration<float>("liftStrength", aerofoilLiftStrengthMultiplier));
|
||||||
obj.AddField(
|
|
||||||
new FieldConfiguration<float>("liftStrength", ModuleWingManager.aerofoilLiftStrengthMultiplier));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[HarmonyPrefix]
|
[HarmonyPrefix]
|
||||||
|
Reference in New Issue
Block a user