diff --git a/Assemblies/0JecsTools.dll b/Assemblies/0JecsTools.dll
index 62862bbb..daf4ba22 100644
Binary files a/Assemblies/0JecsTools.dll and b/Assemblies/0JecsTools.dll differ
diff --git a/Assemblies/AbilityUser.dll b/Assemblies/AbilityUser.dll
index e94a01da..ef4487b4 100644
Binary files a/Assemblies/AbilityUser.dll and b/Assemblies/AbilityUser.dll differ
diff --git a/Assemblies/AbilityUserAI.dll b/Assemblies/AbilityUserAI.dll
index 81a33b92..238f11cc 100644
Binary files a/Assemblies/AbilityUserAI.dll and b/Assemblies/AbilityUserAI.dll differ
diff --git a/Assemblies/CompActivatableEffect.dll b/Assemblies/CompActivatableEffect.dll
index d5d49827..e78926a8 100644
Binary files a/Assemblies/CompActivatableEffect.dll and b/Assemblies/CompActivatableEffect.dll differ
diff --git a/Assemblies/CompAnimated.dll b/Assemblies/CompAnimated.dll
index f5e51bcd..3411e845 100644
Binary files a/Assemblies/CompAnimated.dll and b/Assemblies/CompAnimated.dll differ
diff --git a/Assemblies/CompDeflector.dll b/Assemblies/CompDeflector.dll
index d90d5e84..02a51a2a 100644
Binary files a/Assemblies/CompDeflector.dll and b/Assemblies/CompDeflector.dll differ
diff --git a/Assemblies/CompDelayedSpawner.dll b/Assemblies/CompDelayedSpawner.dll
index 1b1b1eda..0bd1de82 100644
Binary files a/Assemblies/CompDelayedSpawner.dll and b/Assemblies/CompDelayedSpawner.dll differ
diff --git a/Assemblies/CompExtraSounds.dll b/Assemblies/CompExtraSounds.dll
index 6ce8e0bd..ecb6294f 100644
Binary files a/Assemblies/CompExtraSounds.dll and b/Assemblies/CompExtraSounds.dll differ
diff --git a/Assemblies/CompInstalledPart.dll b/Assemblies/CompInstalledPart.dll
index 4f25f971..b1b52f7a 100644
Binary files a/Assemblies/CompInstalledPart.dll and b/Assemblies/CompInstalledPart.dll differ
diff --git a/Assemblies/CompLumbering.dll b/Assemblies/CompLumbering.dll
index ee423272..7f9bb759 100644
Binary files a/Assemblies/CompLumbering.dll and b/Assemblies/CompLumbering.dll differ
diff --git a/Assemblies/CompOverlays.dll b/Assemblies/CompOverlays.dll
index 715c87cb..17643fbf 100644
Binary files a/Assemblies/CompOverlays.dll and b/Assemblies/CompOverlays.dll differ
diff --git a/Assemblies/CompOversizedWeapon.dll b/Assemblies/CompOversizedWeapon.dll
index fa2ebec1..259e35c5 100644
Binary files a/Assemblies/CompOversizedWeapon.dll and b/Assemblies/CompOversizedWeapon.dll differ
diff --git a/Assemblies/CompSlotLoadable.dll b/Assemblies/CompSlotLoadable.dll
index 8c1090ad..410bd530 100644
Binary files a/Assemblies/CompSlotLoadable.dll and b/Assemblies/CompSlotLoadable.dll differ
diff --git a/Assemblies/CompToggleDef.dll b/Assemblies/CompToggleDef.dll
index 1c6f53e2..ac7bd16c 100644
Binary files a/Assemblies/CompToggleDef.dll and b/Assemblies/CompToggleDef.dll differ
diff --git a/Assemblies/CompVehicle.dll b/Assemblies/CompVehicle.dll
index a262c22e..1d73ee31 100644
Binary files a/Assemblies/CompVehicle.dll and b/Assemblies/CompVehicle.dll differ
diff --git a/Source/.idea/.idea.JecsTools/.idea/contentModel.xml b/Source/.idea/.idea.JecsTools/.idea/contentModel.xml
index 2c03aa11..4a347207 100644
--- a/Source/.idea/.idea.JecsTools/.idea/contentModel.xml
+++ b/Source/.idea/.idea.JecsTools/.idea/contentModel.xml
@@ -1,9 +1,8 @@
-
-
-
+
+
@@ -249,6 +248,7 @@
+
@@ -335,5 +335,7 @@
+
+
\ No newline at end of file
diff --git a/Source/.idea/.idea.JecsTools/.idea/workspace.xml b/Source/.idea/.idea.JecsTools/.idea/workspace.xml
index df4819f6..12c2777a 100644
--- a/Source/.idea/.idea.JecsTools/.idea/workspace.xml
+++ b/Source/.idea/.idea.JecsTools/.idea/workspace.xml
@@ -11,480 +11,416 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
-
+
+
-
-
-
-
+
+
+
+
+
+
diff --git a/Source/AllModdingComponents/CompVehicle/HarmonyCompVehicle.cs b/Source/AllModdingComponents/CompVehicle/HarmonyCompVehicle.cs
index add962a5..6445aea3 100644
--- a/Source/AllModdingComponents/CompVehicle/HarmonyCompVehicle.cs
+++ b/Source/AllModdingComponents/CompVehicle/HarmonyCompVehicle.cs
@@ -90,9 +90,9 @@ static HarmonyCompVehicle()
///
//harmony.Patch(AccessTools.)
- harmony.Patch(AccessTools.Method(typeof(PawnUtility), "IsTravelingInTransportPodWorldObject"), null,
- new HarmonyMethod(typeof(HarmonyCompVehicle),
- nameof(PreventAssigningRandomFaction)));
+// harmony.Patch(AccessTools.Method(typeof(PawnUtility), "IsTravelingInTransportPodWorldObject"), null,
+// new HarmonyMethod(typeof(HarmonyCompVehicle),
+// nameof(PreventAssigningRandomFaction)));
harmony.Patch(AccessTools.Method(typeof(SocialCardUtility), "Recache"), new HarmonyMethod(
typeof(HarmonyCompVehicle),
nameof(SocialTabNullHandling)), null);
@@ -703,12 +703,6 @@ public static IEnumerable FightActionTranspiler(IEnumerable(pawn);
- }
//S Bug fixes social tab issue with vehicles
diff --git a/Source/AllModdingComponents/JecsTools/ApparelExtension.cs b/Source/AllModdingComponents/JecsTools/ApparelExtension.cs
new file mode 100644
index 00000000..ac9f285e
--- /dev/null
+++ b/Source/AllModdingComponents/JecsTools/ApparelExtension.cs
@@ -0,0 +1,10 @@
+using System.Collections.Generic;
+using Verse;
+
+namespace JecsTools
+{
+ public class ApparelExtension : DefModExtension
+ {
+ public List coverage = new List();
+ }
+}
\ No newline at end of file
diff --git a/Source/AllModdingComponents/JecsTools/HarmonyPatches.cs b/Source/AllModdingComponents/JecsTools/HarmonyPatches.cs
index 0c464474..f438b49a 100644
--- a/Source/AllModdingComponents/JecsTools/HarmonyPatches.cs
+++ b/Source/AllModdingComponents/JecsTools/HarmonyPatches.cs
@@ -33,19 +33,54 @@ static HarmonyPatches()
new HarmonyMethod(typeof(HarmonyPatches), nameof(Post_GetPostArmorDamage)));
harmony.Patch(AccessTools.Method(typeof(PawnGenerator), "GeneratePawnInternal"), null,
new HarmonyMethod(typeof(HarmonyPatches), nameof(Post_GeneratePawnInternal)));
+ harmony.Patch(AccessTools.Method(typeof(ApparelUtility), "CanWearTogether"), null,
+ new HarmonyMethod(typeof(HarmonyPatches), nameof(Post_CanWearTogether)));
-
-/* harmony.Patch(
- AccessTools.Method(typeof(DamageWorker_AddInjury), "FinalizeAndAddInjury",
- new[]
- {
- typeof(Pawn), typeof(Hediff_Injury), typeof(DamageInfo),
- AccessTools.TypeByName("DamageResult").MakeByRefType()
- }),
- new HarmonyMethod(typeof(HarmonyPatches),
- nameof(ApplyProperDamage)), null);*/
}
+ ///
+ /// Using the new ApparelExtension, we can have a string based apparel check.
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static void Post_CanWearTogether(ThingDef A, ThingDef B, BodyDef body, ref bool __result)
+ {
+ var aHasExt = A.HasModExtension();
+ var bHasExt = B.HasModExtension();
+ if (aHasExt && bHasExt)
+ {
+ var aExt = A.GetModExtension();
+ var bExt = B.GetModExtension();
+ var check = new Dictionary();
+ for (int i = 0; i < aExt.coverage.Count; i++)
+ {
+ if (!check.ContainsKey(aExt.coverage[i]))
+ check.Add(aExt.coverage[i].ToLowerInvariant(), 1);
+ else
+ {
+ Log.Warning("JecsTools :: ApparelExtension :: Warning:: " + A.label + " has multiple of the same tags.");
+ return;
+ }
+ }
+ for (int j = 0; j < bExt.coverage.Count; j++)
+ {
+ if (!check.ContainsKey(bExt.coverage[j]))
+ check.Add(bExt.coverage[j].ToLowerInvariant(), 1);
+ else
+ {
+ __result = false;
+ break;
+ }
+ }
+ }
+ else if ((aHasExt && !bHasExt) || (!aHasExt && bHasExt))
+ {
+ __result = true;
+ }
+ }
+
public static void Post_GeneratePawnInternal(PawnGenerationRequest request, ref Pawn __result)
{
var hediffGiverSet = __result?.def?.race?.hediffGiverSets?.FirstOrDefault(
diff --git a/Source/AllModdingComponents/JecsTools/HediffExpandedDef.cs b/Source/AllModdingComponents/JecsTools/HediffExpandedDef.cs
index 4291054e..7ce4eb13 100644
--- a/Source/AllModdingComponents/JecsTools/HediffExpandedDef.cs
+++ b/Source/AllModdingComponents/JecsTools/HediffExpandedDef.cs
@@ -16,12 +16,12 @@ public class HediffExpandedDef : HediffDef
//public string description;
///
- /// Text that appears before the list of modifiers.
+ /// Text key that appears before the list of modifiers.
///
public string preListText;
///
- /// Text that appears after the list of modifiers.
+ /// Text key that appears after the list of modifiers.
///
public string postListText;
diff --git a/Source/AllModdingComponents/JecsTools/HediffWithComps_Expanded.cs b/Source/AllModdingComponents/JecsTools/HediffWithComps_Expanded.cs
index b307daab..cad78b3c 100644
--- a/Source/AllModdingComponents/JecsTools/HediffWithComps_Expanded.cs
+++ b/Source/AllModdingComponents/JecsTools/HediffWithComps_Expanded.cs
@@ -18,9 +18,9 @@ public override string TipStringExtra
{
s.AppendLine(def.description);
}
- if (!string.IsNullOrEmpty(Def.preListText)) s.AppendLine(Def.preListText);
+ if (!string.IsNullOrEmpty(Def.preListText)) s.AppendLine(Def.preListText.Translate());
s.AppendLine(base.TipStringExtra);
- if (!string.IsNullOrEmpty(Def.postListText)) s.AppendLine(Def.postListText);
+ if (!string.IsNullOrEmpty(Def.postListText)) s.AppendLine(Def.postListText.Translate());
return s.ToString();
}
}
diff --git a/Source/AllModdingComponents/JecsTools/JecsTools.csproj b/Source/AllModdingComponents/JecsTools/JecsTools.csproj
index f6b5496d..ac03d1e7 100644
--- a/Source/AllModdingComponents/JecsTools/JecsTools.csproj
+++ b/Source/AllModdingComponents/JecsTools/JecsTools.csproj
@@ -55,6 +55,7 @@
+