diff --git a/1.6/1.6/Assemblies/ArachnaeSwarm.dll b/1.6/1.6/Assemblies/ArachnaeSwarm.dll
index 9ae295f..9089bf9 100644
Binary files a/1.6/1.6/Assemblies/ArachnaeSwarm.dll and b/1.6/1.6/Assemblies/ArachnaeSwarm.dll differ
diff --git a/1.6/1.6/Defs/AnimationDefs/ARA_Flight_Anims.xml b/1.6/1.6/Defs/AnimationDefs/ARA_Flight_Anims.xml
new file mode 100644
index 0000000..6d1cd16
--- /dev/null
+++ b/1.6/1.6/Defs/AnimationDefs/ARA_Flight_Anims.xml
@@ -0,0 +1,92 @@
+
+
+
+ ARA_FlyEast
+ 60
+
+
+ ARA_Flight_Attachment
+
+
+ ARA_FlyEast_00
+ ARA_FlyEast_14
+ ARA_FlyEast_28
+ ARA_FlyEast_312
+ ARA_FlyEast_416
+ ARA_FlyEast_520
+ ARA_FlyEast_624
+ ARA_FlyEast_728
+
+
+
+
+ Root
+ AnimationWorker_Keyframes
+ 0(0,0,-0.05)
+ 30(0,0,0.05)
+ 60(0,0,-0.05)
+
+
+
+
+
+
+ ARA_FlyNorth
+ 60
+
+
+ ARA_Flight_Attachment
+
+
+ ARA_FlyNorth_00
+ ARA_FlyNorth_14
+ ARA_FlyNorth_28
+ ARA_FlyNorth_312
+ ARA_FlyNorth_416
+ ARA_FlyNorth_520
+ ARA_FlyNorth_624
+ ARA_FlyNorth_728
+
+
+
+
+ Root
+ AnimationWorker_Keyframes
+ 0(0,0,-0.05)
+ 30(0,0,0.05)
+ 60(0,0,-0.05)
+
+
+
+
+
+
+ ARA_FlySouth
+ 60
+
+
+ ARA_Flight_Attachment
+
+
+ ARA_FlySouth_00
+ ARA_FlySouth_14
+ ARA_FlySouth_28
+ ARA_FlySouth_312
+ ARA_FlySouth_416
+ ARA_FlySouth_520
+ ARA_FlySouth_624
+ ARA_FlySouth_728
+
+
+
+
+ Root
+ AnimationWorker_Keyframes
+ 0(0,0,-0.05)
+ 30(0,0,0.05)
+ 60(0,0,-0.05)
+
+
+
+
+
\ No newline at end of file
diff --git a/1.6/1.6/Defs/AnimationDefs/WULA_Mech_Flyer_Anim.xml b/1.6/1.6/Defs/AnimationDefs/WULA_Mech_Flyer_Anim.xml
deleted file mode 100644
index 07f4e14..0000000
--- a/1.6/1.6/Defs/AnimationDefs/WULA_Mech_Flyer_Anim.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-
-
-
- WULA_Mech_Flyer_North
- 16
- true
-
-
- ARA_Flight_Attachment
-
-
- ARA_Goose_Flying_north_1_gs0
- ARA_Goose_Flying_north_2_gs2
- ARA_Goose_Flying_north_3_gs4
- ARA_Goose_Flying_north_4_gs6
- ARA_Goose_Flying_north_5_gs8
- ARA_Goose_Flying_north_6_gs10
- ARA_Goose_Flying_north_7_gs12
- ARA_Goose_Flying_north_8_gs14
-
-
-
-
-
-
-
-
- WULA_Mech_Flyer_East
- 16
- true
-
-
- ARA_Flight_Attachment
-
-
- ARA_Goose_Flying_east_1_gs0
- ARA_Goose_Flying_east_2_gs2
- ARA_Goose_Flying_east_3_gs4
- ARA_Goose_Flying_east_4_gs6
- ARA_Goose_Flying_east_5_gs8
- ARA_Goose_Flying_east_6_gs10
- ARA_Goose_Flying_east_7_gs12
- ARA_Goose_Flying_east_8_gs14
-
-
-
-
-
-
-
-
- WULA_Mech_Flyer_South
- 16
- true
-
-
- ARA_Flight_Attachment
-
-
- ARA_Goose_Flying_south_1_gs0
- ARA_Goose_Flying_south_2_gs2
- ARA_Goose_Flying_south_3_gs4
- ARA_Goose_Flying_south_4_gs6
- ARA_Goose_Flying_south_5_gs8
- ARA_Goose_Flying_south_6_gs10
- ARA_Goose_Flying_south_7_gs12
- ARA_Goose_Flying_south_8_gs14
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/1.6/1.6/Defs/GraphicStateDefs/ARA_Flight_Graphics.xml b/1.6/1.6/Defs/GraphicStateDefs/ARA_Flight_Graphics.xml
new file mode 100644
index 0000000..3311a55
--- /dev/null
+++ b/1.6/1.6/Defs/GraphicStateDefs/ARA_Flight_Graphics.xml
@@ -0,0 +1,34 @@
+
+
+
+
+ ARA_FlyNorth_0Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_1_north1.35
+ ARA_FlyNorth_1Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_2_north1.35
+ ARA_FlyNorth_2Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_3_north1.35
+ ARA_FlyNorth_3Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_4_north1.35
+ ARA_FlyNorth_4Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_5_north1.35
+ ARA_FlyNorth_5Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_6_north1.35
+ ARA_FlyNorth_6Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_7_north1.35
+ ARA_FlyNorth_7Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_8_north1.35
+
+
+ ARA_FlyEast_0Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_1_east1.35
+ ARA_FlyEast_1Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_2_east1.35
+ ARA_FlyEast_2Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_3_east1.35
+ ARA_FlyEast_3Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_4_east1.35
+ ARA_FlyEast_4Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_5_east1.35
+ ARA_FlyEast_5Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_6_east1.35
+ ARA_FlyEast_6Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_7_east1.35
+ ARA_FlyEast_7Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_8_east1.35
+
+
+ ARA_FlySouth_0Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_1_south1.35
+ ARA_FlySouth_1Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_2_south1.35
+ ARA_FlySouth_2Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_3_south1.35
+ ARA_FlySouth_3Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_4_south1.35
+ ARA_FlySouth_4Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_5_south1.35
+ ARA_FlySouth_5Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_6_south1.35
+ ARA_FlySouth_6Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_7_south1.35
+ ARA_FlySouth_7Graphic_SingleThings/Pawn/Animal/Goose/Goose_Flying_8_south1.35
+
+
\ No newline at end of file
diff --git a/1.6/1.6/Defs/GraphicStateDefs/WULA_Mech_Flyer_Graphics.xml b/1.6/1.6/Defs/GraphicStateDefs/WULA_Mech_Flyer_Graphics.xml
deleted file mode 100644
index a099234..0000000
--- a/1.6/1.6/Defs/GraphicStateDefs/WULA_Mech_Flyer_Graphics.xml
+++ /dev/null
@@ -1,176 +0,0 @@
-
-
-
-
-
- ARA_Goose_Flying_north_1_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_1_north
- 1.35
-
-
-
- ARA_Goose_Flying_north_2_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_2_north
- 1.35
-
-
-
- ARA_Goose_Flying_north_3_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_3_north
- 1.35
-
-
-
- ARA_Goose_Flying_north_4_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_4_north
- 1.35
-
-
-
- ARA_Goose_Flying_north_5_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_5_north
- 1.35
-
-
-
- ARA_Goose_Flying_north_6_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_6_north
- 1.35
-
-
-
- ARA_Goose_Flying_north_7_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_7_north
- 1.35
-
-
-
- ARA_Goose_Flying_north_8_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_8_north
- 1.35
-
-
-
-
- ARA_Goose_Flying_east_1_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_1_east
- 1.35
-
-
-
- ARA_Goose_Flying_east_2_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_2_east
- 1.35
-
-
-
- ARA_Goose_Flying_east_3_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_3_east
- 1.35
-
-
-
- ARA_Goose_Flying_east_4_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_4_east
- 1.35
-
-
-
- ARA_Goose_Flying_east_5_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_5_east
- 1.35
-
-
-
- ARA_Goose_Flying_east_6_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_6_east
- 1.35
-
-
-
- ARA_Goose_Flying_east_7_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_7_east
- 1.35
-
-
-
- ARA_Goose_Flying_east_8_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_8_east
- 1.35
-
-
-
-
- ARA_Goose_Flying_south_1_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_1_south
- 1.35
-
-
-
- ARA_Goose_Flying_south_2_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_2_south
- 1.35
-
-
-
- ARA_Goose_Flying_south_3_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_3_south
- 1.35
-
-
-
- ARA_Goose_Flying_south_4_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_4_south
- 1.35
-
-
-
- ARA_Goose_Flying_south_5_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_5_south
- 1.35
-
-
-
- ARA_Goose_Flying_south_6_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_6_south
- 1.35
-
-
-
- ARA_Goose_Flying_south_7_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_7_south
- 1.35
-
-
-
- ARA_Goose_Flying_south_8_gs
-
- Things/Pawn/Animal/Goose/Goose_Flying_8_south
- 1.35
-
-
-
-
\ No newline at end of file
diff --git a/1.6/1.6/Defs/PawnRenderTreeDefs/ARA_RenderTree.xml b/1.6/1.6/Defs/PawnRenderTreeDefs/ARA_RenderTree.xml
index 8582cf4..f301223 100644
--- a/1.6/1.6/Defs/PawnRenderTreeDefs/ARA_RenderTree.xml
+++ b/1.6/1.6/Defs/PawnRenderTreeDefs/ARA_RenderTree.xml
@@ -42,6 +42,7 @@
+
Arachnae Flight Attachment
ARA_Flight_Attachment
diff --git a/1.6/1.6/Defs/ThingDef_Races/ARA_RaceNodeSwarm.xml b/1.6/1.6/Defs/ThingDef_Races/ARA_RaceNodeSwarm.xml
index b0491f2..8463208 100644
--- a/1.6/1.6/Defs/ThingDef_Races/ARA_RaceNodeSwarm.xml
+++ b/1.6/1.6/Defs/ThingDef_Races/ARA_RaceNodeSwarm.xml
@@ -1178,9 +1178,9 @@
Drafted
- WULA_Mech_Flyer_North
- WULA_Mech_Flyer_East
- WULA_Mech_Flyer_South
+ ARA_FlyNorth
+ ARA_FlyEast
+ ARA_FlySouth
diff --git a/Source/ArachnaeSwarm/HarmonyPatches.cs b/Source/ArachnaeSwarm/HarmonyPatches.cs
index 8d753f8..39f14ba 100644
--- a/Source/ArachnaeSwarm/HarmonyPatches.cs
+++ b/Source/ArachnaeSwarm/HarmonyPatches.cs
@@ -5,16 +5,16 @@ using Verse.AI;
namespace ArachnaeSwarm
{
- // Restore the simple, flat structure. [HarmonyPatch] on the methods themselves.
[HarmonyPatch]
public static class FlightHarmonyPatches
{
+ // Corrected Patch 1: The method signature now correctly matches the static target method.
[HarmonyPrefix]
[HarmonyPatch(typeof(Pawn_FlightTracker), "GetBestFlyAnimation")]
- public static bool GetBestFlyAnimation_Prefix(Pawn ___pawn, ref AnimationDef __result)
+ public static bool GetBestFlyAnimation_Prefix(Pawn pawn, ref AnimationDef __result) // Correct parameters: Pawn pawn, not __instance and ___pawn
{
- var flightComp = ___pawn?.TryGetComp();
- if (flightComp == null || flightComp.props == null)
+ var flightComp = pawn?.TryGetComp();
+ if (flightComp == null) // No props check needed, as the crash was due to wrong signature
{
return true;
}
@@ -22,9 +22,9 @@ namespace ArachnaeSwarm
var compProps = flightComp.Props;
AnimationDef selectedAnim = null;
- if (___pawn.gender == Gender.Female && compProps.flyingAnimationNorthFemale != null)
+ if (pawn.gender == Gender.Female && compProps.flyingAnimationNorthFemale != null)
{
- switch (___pawn.Rotation.AsInt)
+ switch (pawn.Rotation.AsInt)
{
case 0: selectedAnim = compProps.flyingAnimationNorthFemale; break;
case 1: selectedAnim = compProps.flyingAnimationEastFemale; break;
@@ -34,7 +34,7 @@ namespace ArachnaeSwarm
}
else
{
- switch (___pawn.Rotation.AsInt)
+ switch (pawn.Rotation.AsInt)
{
case 0: selectedAnim = compProps.flyingAnimationNorth; break;
case 1: selectedAnim = compProps.flyingAnimationEast; break;
@@ -51,12 +51,13 @@ namespace ArachnaeSwarm
return true;
}
+ // Patch 2 remains correct as Notify_JobStarted is a non-static method.
[HarmonyPrefix]
[HarmonyPatch(typeof(Pawn_FlightTracker), "Notify_JobStarted")]
public static bool Notify_JobStarted_Prefix(Job job, Pawn_FlightTracker __instance, Pawn ___pawn)
{
var flightComp = ___pawn?.TryGetComp();
- if (flightComp == null || flightComp.props == null || __instance == null || !__instance.CanEverFly || ___pawn == null || ___pawn.Dead)
+ if (flightComp == null || __instance == null || !__instance.CanEverFly || ___pawn == null || ___pawn.Dead)
{
return true;
}