Skip to content

Commit

Permalink
cleanup of deprectated KSP Fields, adding gaurd mode set Solves PapaJ…
Browse files Browse the repository at this point in the history
  • Loading branch information
gomker committed Jul 27, 2017
1 parent dec271c commit 1e83bc5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 deletions.
13 changes: 6 additions & 7 deletions BDArmory/Control/ModuleWingCommander.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ public class ModuleWingCommander : PartModule
List<BDModulePilotAI> wingmen;
[KSPField(isPersistant = true)] public string savedWingmen = string.Empty;

[KSPField(guiActive = false, guiActiveEditor = true, guiName = "")] public string guiTitle = "WingCommander:";
//[KSPField(guiActive = false, guiActiveEditor = false, guiName = "")]
public string guiTitle = "WingCommander:";

[KSPField(isPersistant = true, guiActive = false, guiActiveEditor = true, guiName = "Spread"),
UI_FloatRange(minValue = 20f, maxValue = 200f, stepIncrement = 1, scene = UI_Scene.Editor)] public float spread
= 50;
//[KSPField(isPersistant = false, guiActive = false, guiActiveEditor = true, guiName = "Spread"), UI_FloatRange(minValue = 20f, maxValue = 200f, stepIncrement = 1, scene = UI_Scene.Editor)]
public float spread = 50;

[KSPField(isPersistant = true, guiActive = false, guiActiveEditor = true, guiName = "Lag"),
UI_FloatRange(minValue = 0f, maxValue = 100f, stepIncrement = 1, scene = UI_Scene.Editor)] public float lag =
10;
//[KSPField(isPersistant = false, guiActive = false, guiActiveEditor = true, guiName = "Lag"), UI_FloatRange(minValue = 0f, maxValue = 100f, stepIncrement = 1, scene = UI_Scene.Editor)]
public float lag = 10;

[KSPField(isPersistant = true)] public bool commandSelf;

Expand Down
22 changes: 12 additions & 10 deletions BDArmory/MissileFire.cs
Original file line number Diff line number Diff line change
Expand Up @@ -386,17 +386,15 @@ public ModuleWeapon currentGun

[KSPField(isPersistant = true, guiActive = false, guiActiveEditor = false, guiName = "Visual Range"),
UI_FloatRange(minValue = 100f, maxValue = 5000, stepIncrement = 100f, scene = UI_Scene.All)] public float
guardRange = 5000;
guardRange = 10000;

[KSPField(isPersistant = true, guiActive = false, guiActiveEditor = false, guiName = "Guns Range"),
UI_FloatRange(minValue = 0f, maxValue = 10000f, stepIncrement = 10f, scene = UI_Scene.All)] public float
gunRange = 2000f;

[KSPField(isPersistant = true, guiActive = false, guiActiveEditor = false, guiName = "Missiles/Target"),
UI_FloatRange(minValue = 1f, maxValue = 6f, stepIncrement = 1f, scene = UI_Scene.All)] public float
maxMissilesOnTarget = 1;

gunRange = 2500f;

[KSPField(isPersistant = true, guiActive = false, guiActiveEditor = false, guiName = "Missiles/Target"), UI_FloatRange(minValue = 1f, maxValue = 6f, stepIncrement = 1f, scene = UI_Scene.All)]
public float maxMissilesOnTarget = 1;

public void ToggleGuardMode()
{
guardMode = !guardMode;
Expand All @@ -422,11 +420,15 @@ public void AGToggleGuardMode(KSPActionParam param)
}


[KSPField(isPersistant = true)] public bool guardMode;
//[KSPField(isPersistant = true)] public bool guardMode;

[KSPField(isPersistant = true, guiActive = false, guiActiveEditor = false, guiName = "Gaurd Mode: "),
UI_Toggle(disabledText = "OFF", enabledText = "ON")]
public bool guardMode;


[KSPField(isPersistant = true, guiActive = false, guiActiveEditor = false, guiName = "Target Type: "),
UI_Toggle(disabledText = "Vessels", enabledText = "Missiles")] public bool targetMissiles = false;
//[KSPField(isPersistant = false, guiActive = false, guiActiveEditor = false, guiName = "Target Type: "), UI_Toggle(disabledText = "Vessels", enabledText = "Missiles")]
public bool targetMissiles = false;

[KSPAction("Toggle Target Type")]
public void AGToggleTargetType(KSPActionParam param)
Expand Down
2 changes: 1 addition & 1 deletion BDArmory/Parts/MissileBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public string GetMissileType()
[KSPField(isPersistant = true, guiActive = true, guiActiveEditor = true, guiName = "Detonation distance override"), UI_FloatRange(minValue = 0f, maxValue = 500f, stepIncrement = 10f, scene = UI_Scene.Editor, affectSymCounterparts = UI_Scene.All)]
public float DetonationDistance = -1;

[KSPField(isPersistant = true, guiActive = false, guiActiveEditor = false, guiName = "SLW Offset"), UI_FloatRange(minValue = -1000f, maxValue = 0f, stepIncrement = 100f, affectSymCounterparts = UI_Scene.All)]
//[KSPField(isPersistant = true, guiActive = false, guiActiveEditor = false, guiName = "SLW Offset"), UI_FloatRange(minValue = -1000f, maxValue = 0f, stepIncrement = 100f, affectSymCounterparts = UI_Scene.All)]
public float SLWOffset = 0;

public float getSWLWOffset
Expand Down

0 comments on commit 1e83bc5

Please sign in to comment.