diff --git a/1.6/1.6/Assemblies/ArachnaeSwarm.dll b/1.6/1.6/Assemblies/ArachnaeSwarm.dll
index 7120700..4b840a2 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/JobDefs/ARA_Duties.xml b/1.6/1.6/Defs/JobDefs/ARA_Duties.xml
new file mode 100644
index 0000000..fcd27dd
--- /dev/null
+++ b/1.6/1.6/Defs/JobDefs/ARA_Duties.xml
@@ -0,0 +1,61 @@
+
+
+
+ ARA_DefendAndExpandHive
+
+
+
+ true
+ 30
+ false
+
+
+ 2.5
+
+
+
+ ARA_InteractiveEggSac
+
+
+
+
+
+
+ ARA_InteractiveEggSac
+
+ true
+
+
+ 0.7
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SatisfyingNeeds
+
+
+
+
+
+
+
+
+
+
+ Deadly
+
+
+
+
+ ]]>
+
\ No newline at end of file
diff --git a/1.6/1.6/Defs/JobDefs/ARA_Jobs.xml b/1.6/1.6/Defs/JobDefs/ARA_Jobs.xml
index d75811e..ef62e91 100644
--- a/1.6/1.6/Defs/JobDefs/ARA_Jobs.xml
+++ b/1.6/1.6/Defs/JobDefs/ARA_Jobs.xml
@@ -4,7 +4,7 @@
ARA_IncubateJob
ArachnaeSwarm.JobDriver_Incubate
- incubating TargetA.
+ 为 TargetA 注入信息素.
\ No newline at end of file
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 18ec00d..a0dbb15 100644
--- a/1.6/1.6/Defs/ThingDef_Races/ARA_RaceNodeSwarm.xml
+++ b/1.6/1.6/Defs/ThingDef_Races/ARA_RaceNodeSwarm.xml
@@ -376,7 +376,7 @@
- Humanlike
+ ARA_Humanlike
Humanlike
diff --git a/1.6/1.6/Defs/ThingDef_Races/ARA_RaceQueen.xml b/1.6/1.6/Defs/ThingDef_Races/ARA_RaceQueen.xml
index b52c233..5547478 100644
--- a/1.6/1.6/Defs/ThingDef_Races/ARA_RaceQueen.xml
+++ b/1.6/1.6/Defs/ThingDef_Races/ARA_RaceQueen.xml
@@ -599,7 +599,7 @@
ArachnaeQueen_Body
Normal
- Humanlike
+ ARA_Humanlike
Humanlike
diff --git a/1.6/1.6/Defs/Thing_building/ARA_InteractiveEggSac.xml b/1.6/1.6/Defs/Thing_building/ARA_InteractiveEggSac.xml
index b23676d..6629684 100644
--- a/1.6/1.6/Defs/Thing_building/ARA_InteractiveEggSac.xml
+++ b/1.6/1.6/Defs/Thing_building/ARA_InteractiveEggSac.xml
@@ -3,8 +3,8 @@
ARA_InteractiveEggSac
- 一个脆弱、易燃、黏滑的囊状物,,是阿拉克涅女皇种所诞之卵,内含哺育一只新督虫所需的营养和遗传物质——可以通过阿拉克涅女皇种的交互完成激活进程。
- ArachnaeSwarm.Building_Incubator
+ 一个脆弱、易燃、黏滑的囊状物,是阿拉克涅女皇种所诞之卵,内含哺育一只新督虫所需的营养和遗传物质——可以通过阿拉克涅女皇种的交互完成激活进程。
+ Building
Building
(1,1)
MinifiedThing
@@ -53,9 +53,31 @@
ARA_ArachnaeQueen
- 300
+
+
+ Megascarab
+ 3000
+
+
+ Spelopede
+ 3000
+
+
+ Megaspider
+ 3000
+
+
+ ArachnaeNode_Race_Myrmecocystus
+ 300
+
+
true
+
+ 60000
+ 60000
+ 10
+
CocoonDestroyed
diff --git a/1.6/1.6/Defs/ThinkTreeDefs/ARA_ThinkTrees.xml b/1.6/1.6/Defs/ThinkTreeDefs/ARA_ThinkTrees.xml
new file mode 100644
index 0000000..7a49c85
--- /dev/null
+++ b/1.6/1.6/Defs/ThinkTreeDefs/ARA_ThinkTrees.xml
@@ -0,0 +1,501 @@
+
+
+
+ ARA_Humanlike
+
+
+
+
+
+
+
+
+
+ SatisfyingNeeds
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ SatisfyingNeeds
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Downed
+
+
+ BurningResponse
+
+
+ MentalStateCritical
+
+
+
+
+ Abilities_Escape
+
+
+
+
+
+
+
+ MentalStateNonCritical
+
+
+
+
+ RopedPawn
+
+
+
+
+ Humanlike_PostMentalState
+
+
+
+
+
+
+
+
+
+ DraftedOrder
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ HighPriority
+
+
+ LordDuty
+
+
+
+
+
+
+ Humanlike_PostDuty
+
+
+
+
+ 2.5
+
+
+
+ ARA_InteractiveEggSac
+
+
+
+
+
+
+ ARA_InteractiveEggSac
+
+ true
+
+
+
+
+
+ true
+
+
+
+ true
+
+
+
+ Idle
+
+
+ Deadly
+
+
+
+
+
+
+ Escaping
+
+
+
+
+
+
+
+
+
+
+
+ Misc
+
+
+ Walk
+
+
+
+
+
+
+
+ RestingForMedicalReasons
+
+
+
+
+
+
+ ChangingApparel
+
+
+
+
+
+
+ SatisfyingNeeds
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ Escaping
+
+
+
+
+
+
+
+
+ Idle
+
+
+ Deadly
+
+
+
+
+
+
+
+ Idle
+
+
+ Deadly
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+
+
+ SatisfyingNeeds
+
+
+ true
+
+
+
+
+
+
+
+
+ Misc
+
+
+
+
+
+
+
+ MediumPriority
+
+
+ LordDuty
+
+
+
+
+
+
+ true
+
+
+
+
+ ChangingApparel
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TakeForInventoryStock
+
+
+ true
+
+
+
+
+
+
+ UnloadingOwnInventory
+
+
+
+
+
+
+
+ Food
+ 0.6
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+ Humanlike_PreMain
+
+
+
+
+
+
+ MainColonistBehaviorCore
+ true
+
+
+
+
+
+ WildMan
+
+
+ MainWildManBehaviorCore
+ true
+
+
+
+
+
+
+ Humanlike_PostMain
+
+
+
+
+
+
+ Idle
+
+
+
+ Joy
+ 0.9
+ true
+
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+ WildMan
+
+
+ Idle
+
+
+
+ Deadly
+ 120~240
+
+
+
+
+
+
+
+
+
+
+
+
+ RestingForMedicalReasons
+
+
+
+
+
+
+ Misc
+
+
+ Walk
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ Misc
+
+
+ Walk
+
+
+
+
+
+
+
+
+ Idle
+
+
+ Deadly
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/ArachnaeSwarm/Alert_UnlinkedHiveMindDrone.cs b/Source/ArachnaeSwarm/Alert_UnlinkedHiveMindDrone.cs
deleted file mode 100644
index e69de29..0000000
diff --git a/Source/ArachnaeSwarm/ArachnaeSwarm.csproj b/Source/ArachnaeSwarm/ArachnaeSwarm.csproj
index 701e5e6..51db4f4 100644
--- a/Source/ArachnaeSwarm/ArachnaeSwarm.csproj
+++ b/Source/ArachnaeSwarm/ArachnaeSwarm.csproj
@@ -83,7 +83,7 @@
-
+
diff --git a/Source/ArachnaeSwarm/CompProperties_SpawnPawnFromList.cs b/Source/ArachnaeSwarm/CompProperties_SpawnPawnFromList.cs
index c69bf18..5d43d43 100644
--- a/Source/ArachnaeSwarm/CompProperties_SpawnPawnFromList.cs
+++ b/Source/ArachnaeSwarm/CompProperties_SpawnPawnFromList.cs
@@ -9,7 +9,7 @@ namespace ArachnaeSwarm
{
public List pawnKinds;
public List whitelist;
- public int delay = 0;
+ public List pawnKindDelays;
public bool destroyOnSpawn = false;
public IntRange spawnCount = new IntRange(1, 1);
public Type lordJob;
@@ -32,4 +32,10 @@ namespace ArachnaeSwarm
}
}
}
+}
+
+public class PawnKindDelay
+{
+ public PawnKindDef pawnKind;
+ public int delay;
}
\ No newline at end of file
diff --git a/Source/ArachnaeSwarm/CompSpawnPawnFromList.cs b/Source/ArachnaeSwarm/CompSpawnPawnFromList.cs
index ce05723..a06aee7 100644
--- a/Source/ArachnaeSwarm/CompSpawnPawnFromList.cs
+++ b/Source/ArachnaeSwarm/CompSpawnPawnFromList.cs
@@ -1,4 +1,5 @@
using System.Collections.Generic;
+using System.Linq;
using Verse;
using RimWorld;
using Verse.AI;
@@ -45,7 +46,8 @@ namespace ArachnaeSwarm
public void StartIncubation()
{
spawningPawnKind = selectedPawnKind;
- spawnUntilTick = Find.TickManager.TicksGame + Props.delay;
+ int delay = Props.pawnKindDelays?.FirstOrDefault(pkd => pkd.pawnKind == selectedPawnKind)?.delay ?? 0;
+ spawnUntilTick = Find.TickManager.TicksGame + delay;
}
public override void CompTick()
diff --git a/Source/ArachnaeSwarm/JobGiver_MaintainBuildings.cs b/Source/ArachnaeSwarm/JobGiver_MaintainBuildings.cs
new file mode 100644
index 0000000..2f8f979
--- /dev/null
+++ b/Source/ArachnaeSwarm/JobGiver_MaintainBuildings.cs
@@ -0,0 +1,56 @@
+using System.Collections.Generic;
+using Verse;
+using RimWorld;
+using Verse.AI;
+using Verse.AI.Group;
+
+namespace ArachnaeSwarm
+{
+ public class JobGiver_MaintainBuildings : JobGiver_AIFightEnemies
+ {
+ private bool onlyIfDamagingState;
+
+ // 新增属性,用于存储可维护的ThingDef列表
+ public List maintainableThingDefs;
+
+ private static readonly float CellsInScanRadius = GenRadial.NumCellsInRadius(7.9f);
+
+ public override ThinkNode DeepCopy(bool resolve = true)
+ {
+ JobGiver_MaintainBuildings obj = (JobGiver_MaintainBuildings)base.DeepCopy(resolve);
+ obj.onlyIfDamagingState = onlyIfDamagingState;
+ obj.maintainableThingDefs = maintainableThingDefs; // 复制列表
+ return obj;
+ }
+
+ protected override Job TryGiveJob(Pawn pawn)
+ {
+ Room room = pawn.GetRoom();
+ for (int i = 0; (float)i < CellsInScanRadius; i++)
+ {
+ IntVec3 intVec = pawn.Position + GenRadial.RadialPattern[i];
+ if (!intVec.InBounds(pawn.Map) || intVec.GetRoom(pawn.Map) != room)
+ {
+ continue;
+ }
+
+ // 遍历可维护的ThingDef列表
+ foreach (ThingDef thingDef in maintainableThingDefs)
+ {
+ // 查找指定ThingDef的建筑
+ Thing targetThing = (Thing)pawn.Map.thingGrid.ThingAt(intVec, thingDef);
+
+ if (targetThing != null && pawn.CanReserve(targetThing))
+ {
+ CompMaintainable compMaintainable = targetThing.TryGetComp();
+ if (compMaintainable != null && compMaintainable.CurStage != 0 && (!onlyIfDamagingState || compMaintainable.CurStage == MaintainableStage.Damaging))
+ {
+ return JobMaker.MakeJob(JobDefOf.Maintain, targetThing);
+ }
+ }
+ }
+ }
+ return null;
+ }
+ }
+}
\ No newline at end of file