diff --git a/1.6/1.6/Assemblies/ArachnaeSwarm.dll b/1.6/1.6/Assemblies/ArachnaeSwarm.dll index 9089bf9..9b22b4c 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/ThingDef_Races/ARA_RaceNodeSwarm.xml b/1.6/1.6/Defs/ThingDef_Races/ARA_RaceNodeSwarm.xml index d76af21..d63027a 100644 --- a/1.6/1.6/Defs/ThingDef_Races/ARA_RaceNodeSwarm.xml +++ b/1.6/1.6/Defs/ThingDef_Races/ARA_RaceNodeSwarm.xml @@ -111,44 +111,6 @@ -
  • ArachnaeSwarm/Things/ARA_HiveNode/Addons/ArachnaeNode_Race_Addons_Base true @@ -598,7 +560,7 @@
  • - ARA_Queen_Adult + ArachnaeNode_Myrmecocystus_Adult 0 Pawn_BigInsect_Pain Pawn_BigInsect_Death @@ -670,9 +632,30 @@
  • --> + + + + + + + (1.2,1.2) + (1.05,1.05) + (0.9,0.9) + 1.2 + 1.2 + + + + + + 2.5 + 4 + 10 + + - + ArachnaeNode_Race_Myrmecocystus 阿拉克涅督虫之一,拥有非常广泛的食谱,可以吞下许多未经处理的生物并将其分解为阿拉克涅虫蜜,以滋养虫群。这种督虫除了生产虫蜜外也能执行烹饪和种植工作。\n\n作为督虫,她可以繁育并监管若干阿拉克涅食腐种辅虫,以协助巢穴进行收割和播种工作。 @@ -685,8 +668,7 @@
  • ArachnaeSwarm/Things/ARA_HiveNode/Addons/ArachnaeNode_Race_Myrmecocystus_Addons_Stomach false - - + true
  • @@ -766,12 +748,6 @@ 3 1.5 - -
  • - ArachnaeNode_Myrmecocystus_Adult - 0 -
  • -
    @@ -801,6 +777,7 @@ true + true
  • ArachnaeSwarm/Things/ARA_HiveNode/Addons/ArachnaeNode_Race_Addons_ShieldBody @@ -820,6 +797,7 @@ true false + true
  • @@ -890,12 +868,6 @@ 5 2 - -
  • - ArachnaeNode_Myrmecocystus_Adult - 0 -
  • -
    @@ -911,6 +883,7 @@
  • ArachnaeSwarm/Things/ARA_HiveNode/Addons/ArachnaeNode_Race_Addons_WeaponSmith false + true -0.275 @@ -979,12 +952,6 @@ 0.8 0.75 5 - -
  • - ArachnaeNode_Myrmecocystus_Adult - 0 -
  • -
    @@ -1000,10 +967,12 @@
  • ArachnaeSwarm/Things/ARA_HiveNode/Addons/ArachnaeNode_Race_Addons_Fighter_Claw true + true
  • ArachnaeSwarm/Things/ARA_HiveNode/Addons/ArachnaeNode_Race_Addons_Fighter_Tail false + true -0.275 @@ -1068,12 +1037,6 @@ 0.85 2 5 - -
  • - ArachnaeNode_Myrmecocystus_Adult - 0 -
  • -
    @@ -1124,12 +1087,6 @@ 0.5 0.25 30 - -
  • - ArachnaeNode_Myrmecocystus_Adult - 0 -
  • -
  • @@ -1141,7 +1098,7 @@
  • - + ArachnaeNode_Race_Smokepop 阿拉克涅督虫之一,。\n\n作为督虫,她可以向敌人投射寿命有限但是非常恼人的阿拉克涅酸噬种辅虫,以阻止敌人的远程火力开火。 @@ -1175,9 +1132,6 @@ 4 --> - - true - @@ -1215,12 +1169,6 @@ 2.5 4 10 - -
  • - ArachnaeNode_Myrmecocystus_Adult - 0 -
  • -
    @@ -1236,10 +1184,12 @@
  • ArachnaeSwarm/Things/ARA_HiveNode/Addons/ArachnaeNode_Race_Addons_Fighter_Claw true + true
  • ArachnaeSwarm/Things/ARA_HiveNode/Addons/ArachnaeNode_Race_Addons_Fighter_Tail false + true -0.275 @@ -1322,12 +1272,6 @@ 0.85 2 5 - -
  • - ArachnaeNode_Myrmecocystus_Adult - 0 -
  • -
    \ No newline at end of file diff --git a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo index c6c6c62..1b0ba5b 100644 Binary files a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo and b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo differ diff --git a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json index 3a4bb89..5222678 100644 --- a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json +++ b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json @@ -1,14 +1,10 @@ { "Version": 1, - "WorkspaceRootPath": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\", + "WorkspaceRootPath": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\", "Documents": [ { - "AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|e:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\ara_buildingterrainspawn\\compdelayedterrainspawn.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:ara_buildingterrainspawn\\compdelayedterrainspawn.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|e:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\ara_buildingterrainspawn\\compproperties_delayedterrainspawn.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:ara_buildingterrainspawn\\compproperties_delayedterrainspawn.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + "AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\ara_hivemind\\compabilityeffect_binddrone.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:ara_hivemind\\compabilityeffect_binddrone.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" } ], "DocumentGroupContainers": [ @@ -23,27 +19,14 @@ { "$type": "Document", "DocumentIndex": 0, - "Title": "CompDelayedTerrainSpawn.cs", - "DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\ARA_BuildingTerrainSpawn\\CompDelayedTerrainSpawn.cs", - "RelativeDocumentMoniker": "ARA_BuildingTerrainSpawn\\CompDelayedTerrainSpawn.cs", - "ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\ARA_BuildingTerrainSpawn\\CompDelayedTerrainSpawn.cs", - "RelativeToolTip": "ARA_BuildingTerrainSpawn\\CompDelayedTerrainSpawn.cs", - "ViewState": "AgIAAAAAAAAAAAAAAADwvxcAAAAfAAAAAAAAAA==", + "Title": "CompAbilityEffect_BindDrone.cs", + "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\ARA_HiveMind\\CompAbilityEffect_BindDrone.cs", + "RelativeDocumentMoniker": "ARA_HiveMind\\CompAbilityEffect_BindDrone.cs", + "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\ARA_HiveMind\\CompAbilityEffect_BindDrone.cs", + "RelativeToolTip": "ARA_HiveMind\\CompAbilityEffect_BindDrone.cs", + "ViewState": "AgIAAAMAAAAAAAAAAAAAABEAAABkAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-09-05T11:17:51.595Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 1, - "Title": "CompProperties_DelayedTerrainSpawn.cs", - "DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\ARA_BuildingTerrainSpawn\\CompProperties_DelayedTerrainSpawn.cs", - "RelativeDocumentMoniker": "ARA_BuildingTerrainSpawn\\CompProperties_DelayedTerrainSpawn.cs", - "ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\ARA_BuildingTerrainSpawn\\CompProperties_DelayedTerrainSpawn.cs", - "RelativeToolTip": "ARA_BuildingTerrainSpawn\\CompProperties_DelayedTerrainSpawn.cs", - "ViewState": "AgIAAAAAAAAAAAAAAADwvwAAAAAAAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-09-05T11:17:48.391Z", + "WhenOpened": "2025-09-09T02:52:35.777Z", "EditorCaption": "" }, { diff --git a/Source/ArachnaeSwarm/WULA_AutoMechCarrier/CompAutoMechCarrier.cs b/Source/ArachnaeSwarm/ARA_AutoMechCarrier/CompAutoMechCarrier.cs similarity index 100% rename from Source/ArachnaeSwarm/WULA_AutoMechCarrier/CompAutoMechCarrier.cs rename to Source/ArachnaeSwarm/ARA_AutoMechCarrier/CompAutoMechCarrier.cs diff --git a/Source/ArachnaeSwarm/WULA_AutoMechCarrier/CompProperties_AutoMechCarrier.cs b/Source/ArachnaeSwarm/ARA_AutoMechCarrier/CompProperties_AutoMechCarrier.cs similarity index 100% rename from Source/ArachnaeSwarm/WULA_AutoMechCarrier/CompProperties_AutoMechCarrier.cs rename to Source/ArachnaeSwarm/ARA_AutoMechCarrier/CompProperties_AutoMechCarrier.cs diff --git a/Source/ArachnaeSwarm/WULA_AutoMechCarrier/PawnProductionEntry.cs b/Source/ArachnaeSwarm/ARA_AutoMechCarrier/PawnProductionEntry.cs similarity index 100% rename from Source/ArachnaeSwarm/WULA_AutoMechCarrier/PawnProductionEntry.cs rename to Source/ArachnaeSwarm/ARA_AutoMechCarrier/PawnProductionEntry.cs diff --git a/Source/ArachnaeSwarm/ARA_GiveHediffsInRangeToRace/HediffCompProperties_GiveHediffsInRangeToRace.cs b/Source/ArachnaeSwarm/ARA_GiveHediffsInRangeToRace/HediffCompProperties_GiveHediffsInRangeToRace.cs new file mode 100644 index 0000000..d08f41f --- /dev/null +++ b/Source/ArachnaeSwarm/ARA_GiveHediffsInRangeToRace/HediffCompProperties_GiveHediffsInRangeToRace.cs @@ -0,0 +1,23 @@ +using RimWorld; +using System.Collections.Generic; +using Verse; + +namespace ArachnaeSwarm +{ + public class HediffCompProperties_GiveHediffsInRangeToRace : HediffCompProperties + { + public float range; + public TargetingParameters targetingParameters; + public HediffDef hediff; + public ThingDef mote; + public bool hideMoteWhenNotDrafted; + public float initialSeverity = 1f; + public bool onlyPawnsInSameFaction = true; + public List targetRaces; // 新增:可配置的目标种族列表 + + public HediffCompProperties_GiveHediffsInRangeToRace() + { + compClass = typeof(HediffComp_GiveHediffsInRangeToRace); + } + } +} \ No newline at end of file diff --git a/Source/ArachnaeSwarm/ARA_GiveHediffsInRangeToRace/HediffComp_GiveHediffsInRangeToRace.cs b/Source/ArachnaeSwarm/ARA_GiveHediffsInRangeToRace/HediffComp_GiveHediffsInRangeToRace.cs new file mode 100644 index 0000000..05c1808 --- /dev/null +++ b/Source/ArachnaeSwarm/ARA_GiveHediffsInRangeToRace/HediffComp_GiveHediffsInRangeToRace.cs @@ -0,0 +1,63 @@ +using RimWorld; +using System.Collections.Generic; +using UnityEngine; +using Verse; + +namespace ArachnaeSwarm +{ + public class HediffComp_GiveHediffsInRangeToRace : HediffComp + { + private Mote mote; + + public HediffCompProperties_GiveHediffsInRangeToRace Props => (HediffCompProperties_GiveHediffsInRangeToRace)props; + + public override void CompPostTick(ref float severityAdjustment) + { + if (!parent.pawn.Awake() || parent.pawn.health == null || parent.pawn.health.InPainShock || !parent.pawn.Spawned) + { + return; + } + if (!Props.hideMoteWhenNotDrafted || parent.pawn.Drafted) + { + if (Props.mote != null && (mote == null || mote.Destroyed)) + { + mote = MoteMaker.MakeAttachedOverlay(parent.pawn, Props.mote, Vector3.zero); + } + if (mote != null) + { + mote.Maintain(); + } + } + IReadOnlyList pawns = ((!Props.onlyPawnsInSameFaction || parent.pawn.Faction == null) ? parent.pawn.Map.mapPawns.AllPawnsSpawned : parent.pawn.Map.mapPawns.SpawnedPawnsInFaction(parent.pawn.Faction)); + foreach (Pawn pawn in pawns) + { + // 修改点:检查种族是否在我们的目标列表中,如果列表为空或null则不进行任何操作 + if ((Props.targetRaces.NullOrEmpty() || !Props.targetRaces.Contains(pawn.def)) || pawn.Dead || pawn.health == null || pawn == parent.pawn || !(pawn.Position.DistanceTo(parent.pawn.Position) <= Props.range) || !Props.targetingParameters.CanTarget(pawn)) + { + continue; + } + Hediff hediff = pawn.health.hediffSet.GetFirstHediffOfDef(Props.hediff); + if (hediff == null) + { + hediff = pawn.health.AddHediff(Props.hediff, pawn.health.hediffSet.GetBrain()); + hediff.Severity = Props.initialSeverity; + HediffComp_Link hediffComp_Link = hediff.TryGetComp(); + if (hediffComp_Link != null) + { + hediffComp_Link.drawConnection = true; + hediffComp_Link.other = parent.pawn; + } + } + HediffComp_Disappears hediffComp_Disappears = hediff.TryGetComp(); + if (hediffComp_Disappears == null) + { + Log.Error("HediffComp_GiveHediffsInRangeToRace has a hediff in props which does not have a HediffComp_Disappears"); + } + else + { + hediffComp_Disappears.ticksToDisappear = 5; + } + } + } + } +} \ No newline at end of file diff --git a/Source/ArachnaeSwarm/ArachnaeSwarm.csproj b/Source/ArachnaeSwarm/ArachnaeSwarm.csproj index 1129ebc..7ea45a9 100644 --- a/Source/ArachnaeSwarm/ArachnaeSwarm.csproj +++ b/Source/ArachnaeSwarm/ArachnaeSwarm.csproj @@ -1,6 +1,5 @@  - + Debug @@ -69,6 +68,8 @@ + + @@ -109,9 +110,9 @@ - - - + + + @@ -148,6 +149,9 @@ + + +