Skip to content

Commit

Permalink
Merge pull request #30 from adri1wcrow/master
Browse files Browse the repository at this point in the history
fix the trackarmor name bug for the wheels vehicles.
  • Loading branch information
adri1wcrow authored Mar 9, 2019
2 parents 2e37117 + b314365 commit e07c6e4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 8 additions & 4 deletions TankInspector/Modeling/Tank/Chassis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ internal class Chassis : DamageableModule, IHasArmor, IChassis
public Armor Armor { get; private set; }

[Stat("ChassisArmorFullName", DataAnalysis.ComparisonMode.HigherBetter)]
public double TrackArmor => this.Armor.ArmorGroups["leftTrack"].Value;
public double TrackArmor {get; private set; }

private double _maxClimbAngle;
private double _maxClimbAngle;
public double MaxClimbAngle => _maxClimbAngle;

private double _maxLoad;
Expand Down Expand Up @@ -53,12 +53,11 @@ internal class Chassis : DamageableModule, IHasArmor, IChassis
public SpeedLimits SpeedLimits { get; internal set; }



public Chassis(Database database)
: base(database)
{
this.Wheels = new WheelInfo();
}
}

protected override bool DeserializeSection(string name, XmlReader reader)
{
Expand All @@ -67,6 +66,11 @@ protected override bool DeserializeSection(string name, XmlReader reader)
case "armor":
this.Armor = new Armor(((Tank)this.Owner).Nation.Database);
this.Armor.Deserialize(reader);
foreach (var item in this.Armor.ArmorGroups.Keys)
{
this.TrackArmor = this.Armor.ArmorGroups[item].Value;
break;
}
return true;

case "maxClimbAngle":
Expand Down
2 changes: 2 additions & 0 deletions TankInspector/TankInspector.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@
<Compile Include="Modeling\Tank\BadRoadsKingSkill.cs" />
<Compile Include="Modeling\Tank\BomberScript.cs" />
<Compile Include="Modeling\Tank\BrotherhoodSkill.cs" />
<Compile Include="Modeling\Tank\DefaultScript.cs" />
<Compile Include="Modeling\Tank\FactorBattleBoosterScript.cs" />
<Compile Include="Modeling\Tank\FactorPerLevelBattleBoosterScript.cs" />
<Compile Include="Modeling\Tank\FactorSkillBattleBoosterScript.cs" />
Expand Down Expand Up @@ -233,6 +234,7 @@
<Compile Include="Modeling\Tank\RammingMasterSkill.cs" />
<Compile Include="Modeling\Tank\RancorousBattleBoosterScript.cs" />
<Compile Include="Modeling\Tank\RancorousSkill.cs" />
<Compile Include="Modeling\Tank\ReconScript.cs" />
<Compile Include="Modeling\Tank\RetransmitterSkill.cs" />
<Compile Include="Modeling\Tank\SixthSenseBattleBoosterScript.cs" />
<Compile Include="Modeling\Tank\SmoothTurretSkill.cs" />
Expand Down

0 comments on commit e07c6e4

Please sign in to comment.