Skip to content

Commit

Permalink
fix the trackarmor name bug for the wheels vehicles.
Browse files Browse the repository at this point in the history
  • Loading branch information
adri1wcrow committed Mar 9, 2019
1 parent 4d062c5 commit b314365
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

1 comment on commit b314365

@WOTExpress
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

M8, please contact me, this is very important!
[email protected]

Please sign in to comment.