Skip to content

Commit

Permalink
Adjusted calculations for overland vehicle travel
Browse files Browse the repository at this point in the history
  • Loading branch information
jecrell committed Jul 7, 2017
1 parent 1363449 commit 4d46ef6
Show file tree
Hide file tree
Showing 9 changed files with 564 additions and 155 deletions.
Binary file modified Assemblies/CompVehicle.dll
Binary file not shown.
3 changes: 2 additions & 1 deletion Languages/English/Keyed/CompVehicle.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<LanguageData>
<MessageCaravanRunOutOfFuel>{0} has run out of fuel ({1}). {0} will now move at a quarter of normal speed.</MessageCaravanRunOutOfFuel>

<CompVehicle_LowFuel>Low Fuel</CompVehicle_LowFuel>
<MessageCaravanRunOutOfFuel>{0} has run out of fuel ({1}). {0} will now move at a quarter of normal speed.</MessageCaravanRunOutOfFuel>
<MessagePawnLeftVehicle>{0} has left the vehicle ({1}) due to {2} needs.</MessagePawnLeftVehicle>
<DaysWorthOfFuelInfo>Carrying {0} days worth of fuel</DaysWorthOfFuelInfo>
<InfiniteDaysWorthOfFuelInfo>Will never run out of fuel</InfiniteDaysWorthOfFuelInfo>
Expand Down
Binary file modified Source/.vs/JecsTools/v15/.suo
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class CompProperties_Vehicle : CompProperties
public string labelDamaged = "Damaged"; // Label replacer for when the vehicle is damaged.
public string labelInoperable = "Inoperable"; // Label replacer for when the vehicle is inoperable / "downed".
public string labelBroken = "Broken"; // Label replacer for when the vehicle is broken / "dead".
public List<VehicleRole> roles = new List<VehicleRole>(); // Defines roles of passengers.
public List<VehicleRole> roles = new List<VehicleRole>(); // Defines roles of passengers.

//---------- Additions made by Swenzi ------------

Expand Down
2 changes: 2 additions & 0 deletions Source/AllModdingComponents/CompVehicle/CompVehicle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ public void ResolveITab()
}
}



public List<Pawn> AllOccupants
{
get
Expand Down
1 change: 1 addition & 0 deletions Source/AllModdingComponents/CompVehicle/CompVehicle.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
<Compile Include="HandlingTypeFlags.cs" />
<Compile Include="HarmonyCompVehicle.cs" />
<Compile Include="ITab_Passengers.cs" />
<Compile Include="ITab_Passengers2.cs" />
<Compile Include="JobDriver_LoadPassenger.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Recipe_RepairVehicle.cs" />
Expand Down
363 changes: 216 additions & 147 deletions Source/AllModdingComponents/CompVehicle/HarmonyCompVehicle.cs

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions Source/AllModdingComponents/CompVehicle/ITab_Passengers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace CompVehicle
{
public class ITab_Passengers : ITab
public class ITab_Passengers2 : ITab
{
private const float RowHeight = 50f;

Expand Down Expand Up @@ -65,17 +65,17 @@ private List<PawnCapacityDef> CapacitiesToDisplay
{
get
{
ITab_Passengers.capacitiesToDisplay.Clear();
ITab_Passengers2.capacitiesToDisplay.Clear();
List<PawnCapacityDef> allDefsListForReading = DefDatabase<PawnCapacityDef>.AllDefsListForReading;
for (int i = 0; i < allDefsListForReading.Count; i++)
{
if (allDefsListForReading[i].showOnCaravanHealthTab)
{
ITab_Passengers.capacitiesToDisplay.Add(allDefsListForReading[i]);
ITab_Passengers2.capacitiesToDisplay.Add(allDefsListForReading[i]);
}
}
ITab_Passengers.capacitiesToDisplay.SortBy((PawnCapacityDef x) => x.listOrder);
return ITab_Passengers.capacitiesToDisplay;
ITab_Passengers2.capacitiesToDisplay.SortBy((PawnCapacityDef x) => x.listOrder);
return ITab_Passengers2.capacitiesToDisplay;
}
}

Expand All @@ -91,7 +91,9 @@ private float SpecificHealthTabWidth
}
}

public ITab_Passengers() => this.labelKey = "Contents";
public ITab_Passengers2() {
this.labelKey = "Contents";
}

protected override void FillTab()
{
Expand Down
Loading

0 comments on commit 4d46ef6

Please sign in to comment.