diff --git a/1.6/1.6/Assemblies/ArachnaeSwarm.dll b/1.6/1.6/Assemblies/ArachnaeSwarm.dll index 00fff85..8e093eb 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/AbilityDefs/ARA_Abilities.xml b/1.6/1.6/Defs/AbilityDefs/ARA_Abilities.xml index 9e4c6d6..061fe6b 100644 --- a/1.6/1.6/Defs/AbilityDefs/ARA_Abilities.xml +++ b/1.6/1.6/Defs/AbilityDefs/ARA_Abilities.xml @@ -545,7 +545,7 @@ ARA_Ability_Smokepop - 浓雾种将其腹部的大量释放阿拉克涅信息素烟雾,形成一大片足以遮蔽虫族身形的烟雾,并防止敌方使用火焰武器点燃虫族集群。这些信息素会吸引附近的阿拉克涅辅虫破土而出支援虫群,沾染信息素的目标越多(无论敌我),前来支援的虫族就越多。 + 浓雾种使用其腹部释放大量阿拉克涅信息素烟雾,形成一大片可以遮蔽虫族身形和阻燃的烟雾。这些信息素会吸引附近的阿拉克涅辅虫破土而出支援虫群,沾染信息素的目标越多(无论敌我),前来支援的虫族就越多。 ArachnaeSwarm/UI/Abilities/ARA_Ability_Smokepop 6000 false @@ -593,7 +593,7 @@ ARA_Ability_TrackingCharge - 阿拉克涅盾头种对目标发起蓄势冲撞,对路径上的一切造成伤害。在冲击中途经的距离越远,伤害越高。 + 对目标发起蓄势冲撞,对路径上的一切造成伤害。在冲击中途经的距离越远,伤害越高。 ArachnaeSwarm/UI/Abilities/ARA_Ability_TrackingCharge 6000 2 @@ -646,4 +646,71 @@ 0 + + + ARA_PsychicBrainburn + + 以强大的纯净灵能直接冲击目标,烧毁目标的中枢神经系统——这会直接杀死目标。 + UI/Abilities/Slaughter + 18000 + false + 300 + true + false + false + true + true + 0.5 + Mote_HoraxSmallSpellWarmup + HoraxianAbilityCasting + AnomalyAbilityWarmup + true + + Verb_CastAbility + 6 + 18 + + true + false + false + + + +
  • + + Skip_Entry + + + false +
  • +
    +
    + + ARA_NeuroSwarm_jump + + 增强用于使身体悬浮的力量快速进入较高的高度,然后飞到一处新的地点。 + UI/Abilities/Longjump + 5000 + false + false + 1 + true + + Verb_CastAbilityJump + + false + false + 0 + 50 + true + Longjump_Jump + Longjump_Land + + true + false + false + + + CastJump + \ No newline at end of file diff --git a/1.6/1.6/Defs/AbilityDefs/AbilityDef_PsychicBrainburn.xml b/1.6/1.6/Defs/AbilityDefs/AbilityDef_PsychicBrainburn.xml deleted file mode 100644 index 534d5b9..0000000 --- a/1.6/1.6/Defs/AbilityDefs/AbilityDef_PsychicBrainburn.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - ARA_PsychicBrainburn - - 通过一次强力的心灵冲击,直接摧毁目标生物的意识核心,使其永久失去知觉。 - UI/Abilities/Slaughter - 5000 - false - 300 - true - false - false - true - true - 0.5 - Mote_HoraxSmallSpellWarmup - HoraxianAbilityCasting - AnomalyAbilityWarmup - true - - Verb_CastAbility - 1.5 - 25 - - true - false - false - - - -
  • - - Skip_Entry - - - false -
  • -
    -
    - -
    \ No newline at end of file diff --git a/1.6/1.6/Defs/AbilityDefs/Ability_Morph.xml b/1.6/1.6/Defs/AbilityDefs/Ability_Morph.xml index 9b8c845..810f79c 100644 --- a/1.6/1.6/Defs/AbilityDefs/Ability_Morph.xml +++ b/1.6/1.6/Defs/AbilityDefs/Ability_Morph.xml @@ -6,7 +6,7 @@ ARA_Ability_Morph 将自己转换为一个坚固的静态建筑形态,或从建筑形态恢复。 - UI/Commands/EggSpew + UI/Commands/EggSpew 6000 Misc12 false @@ -98,7 +98,6 @@ 虫蜜 没有营养 -
  • ARA_NutrientNetworkTower
  • diff --git a/1.6/1.6/Defs/AnimationDefs/ARA_Flight_Anims.xml b/1.6/1.6/Defs/AnimationDefs/ARA_Flight_Anims.xml index 4534e76..a6b34cc 100644 --- a/1.6/1.6/Defs/AnimationDefs/ARA_Flight_Anims.xml +++ b/1.6/1.6/Defs/AnimationDefs/ARA_Flight_Anims.xml @@ -1,5 +1,6 @@ + ARA_FlyEast 60 @@ -30,7 +31,6 @@ - ARA_FlyNorth 60 @@ -61,7 +61,6 @@ - ARA_FlySouth 60 @@ -92,4 +91,75 @@ + + + + ARA_Psi_FlyEast + 60 + + +
  • + Root + AnimationWorker_Keyframes +
  • 0(0,0,-0.05)
  • +
  • 30(0,0,0.05)
  • +
  • 60(0,0,-0.05)
  • + + +
    +
    + + ARA_Psi_FlyNorth + 60 + + +
  • + Root + AnimationWorker_Keyframes +
  • 0(0,0,-0.05)
  • +
  • 30(0,0,0.05)
  • +
  • 60(0,0,-0.05)
  • + + +
    +
    + + ARA_Psi_FlySouth + 60 + + +
  • + 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/HediffDefs/ARA_Hediffs_Damage.xml b/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Damage.xml index ec778b7..e5f6963 100644 --- a/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Damage.xml +++ b/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Damage.xml @@ -196,6 +196,4 @@
  • - - \ No newline at end of file diff --git a/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_HiveMind.xml b/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_HiveMind.xml index 4fde175..590e78f 100644 --- a/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_HiveMind.xml +++ b/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_HiveMind.xml @@ -85,6 +85,26 @@ false false +
  • + 6 + ARA_CreepyCrawly_Hediff + + + +
  • Colonist
  • + + + + + false + false + false + false + true + + false + true +
  • @@ -98,29 +118,116 @@ - ARA_CreepyCrawly_Hediff - - 受不了了,快把这些虫子从我身边支开! - HediffWithComps - (0.52, 1, 0.95) + ARA_TemperatureRegulation + + 阿拉克涅虫族是冷血动物,这代表着她们对外界的温度变化更加敏感——在适宜温度下她们将变得敏捷而致命,在不适温度下她们将难以行动。\n\n此类阿拉克涅虫族可以接受在16~26°C的温度下活动,温度接近21°C时会获得额外的意识加成。 + Hediff_High + (0.6, 0.8, 0.9) + 1.0 + -0.01 + 0.5 -
  • - 30 - false +
  • + 16 + 26 + 0.01 + -0.01
  • -
  • -
  • + 6 + ARA_CreepyCrawly_Hediff + Mote_ARA_CreepyCrawly_HediffLinkLine + + + + + + + false + false + false + true + true + + false + true
  • + +
  • + 0 + + +
  • + Consciousness + -0.5 +
  • + + +
  • + 0.4 + +
  • +
  • + 0.8 + + +
  • + Consciousness + 0.25 +
  • + + +
    + + + ARA_CreepyCrawly_Hediff + + 快把这些虫子从我身边支开! + (0.52, 1, 0.95) + HediffWithComps + false + other + 1 + 1
  • 0 false
  • - false + +
  • + false +
  • +
  • +
  • +
    + + Mote_ARA_CreepyCrawly_HediffLinkLine + MoteDualAttached + MoteLow + + 0.1 + 0.1 + 999999 + True + True + True + + + MoteGlow + Things/Mote/WorkCommandLinkLine + (0,0,0,0) + + ARA_RaceBaseSwarmProduceSwitchHediff @@ -131,4 +238,41 @@ (0.6, 0.6, 0.6) false + + + ARA_Psi_Conductor + + 一只阿拉克涅织域种将这个殖民者的所有灵能抽出来,转化为可以 + + WULA_Addons_Antenna_Shotgun + WULA_Addons_Antenna_Shotgun_Turret + Install_WULA_Addons_Antenna_Shotgun + + WULA_Addons_Antenna_Shield + + + true + + +
  • + + -2 + -1 + + +
  • + Consciousness + -0.1 +
  • + + +
    + +
  • + WULA_Addons_Antenna_Shotgun_Turret + 0 + true +
  • +
    +
    \ No newline at end of file diff --git a/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Temperature.xml b/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Temperature.xml deleted file mode 100644 index bc174eb..0000000 --- a/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Temperature.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - ARA_TemperatureRegulation - - 阿拉克涅虫族是冷血动物,这代表着她们对外界的温度变化更加敏感——在适宜温度下她们将变得敏捷而致命,在不适温度下她们将难以行动。\n\n此类阿拉克涅虫族可以接受在16~26°C的温度下活动,温度接近21°C时会获得额外的意识加成。 - Hediff_High - (0.6, 0.8, 0.9) - 1.0 - -0.01 - 0.5 - -
  • - 16 - 26 - 0.01 - -0.01 -
  • -
    - -
  • - 0 - - -
  • - Consciousness - -0.5 -
  • - - -
  • - 0.4 - -
  • -
  • - 0.8 - - -
  • - Consciousness - 0.25 -
  • - - -
    -
    -
    \ No newline at end of file diff --git a/1.6/1.6/Defs/PawnKindDef/ARA_PawnKinds.xml b/1.6/1.6/Defs/PawnKindDef/ARA_PawnKinds.xml index 1eb6bbb..5a863ca 100644 --- a/1.6/1.6/Defs/PawnKindDef/ARA_PawnKinds.xml +++ b/1.6/1.6/Defs/PawnKindDef/ARA_PawnKinds.xml @@ -70,7 +70,7 @@ true 99~99 99~99 - 0 + 0.01 0 false @@ -285,7 +285,9 @@ +
  • ARA_PsychicBrainburn
  • ARA_Ability_Morph
  • +
  • ARA_NeuroSwarm_jump
  • @@ -300,7 +302,7 @@ true 75 0 - 0 + 0.01 0
  • diff --git a/1.6/1.6/Defs/ThingDef_Races/ARA_RaceBaseSwarm.xml b/1.6/1.6/Defs/ThingDef_Races/ARA_RaceBaseSwarm.xml index 6d5575c..0e1b8da 100644 --- a/1.6/1.6/Defs/ThingDef_Races/ARA_RaceBaseSwarm.xml +++ b/1.6/1.6/Defs/ThingDef_Races/ARA_RaceBaseSwarm.xml @@ -34,7 +34,6 @@ 0.5 1 Megaspider - 0.1 Advanced + 寿命 + 这种特殊的阿拉克涅辅虫从出生起就走在死亡的道路上了——它们的寿命就是如此短暂。 + true +
  • + ArachnaeBase_Race_Acid @@ -61,14 +68,6 @@ 6 - -
  • - 4400 - 寿命 - 这种特殊的阿拉克涅辅虫从出生起就走在死亡的道路上了——它们的寿命就是如此短暂。 - true -
  • -
  • @@ -109,14 +108,6 @@ 9999 0 - -
  • - 4400 - 寿命 - 这种特殊的阿拉克涅辅虫从出生起就走在死亡的道路上了——它们的寿命就是如此短暂。 - true -
  • -
  • @@ -130,11 +121,10 @@
  • - ArachnaeBase_Race_Acidling - - 阿拉克涅辅虫之一,智力低下,一般被作为自杀式无人机打出,靠近敌人后就会引爆酸囊产生危险的酸性雾气。 + + 阿拉克涅辅虫之一,智力低下,一般以自杀式袭击的方式伤害敌军,靠近敌人后就会引爆酸囊产生危险的酸性雾气。 HunterDroneConstant 0.5 @@ -155,12 +145,6 @@ 6 -
  • - 4400 - 寿命 - 这种特殊的阿拉克涅辅虫从出生起就走在死亡的道路上了——它们的寿命就是如此短暂。 - true -
  • 3.9 ARA_AcidBurn @@ -185,6 +169,7 @@
  • + ARA_AcidCut @@ -202,7 +187,6 @@ Maneuver_Slash_MeleeMiss Maneuver_Slash_MeleeDodge - ARA_Bite 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 7835b0d..6d14f88 100644 --- a/1.6/1.6/Defs/ThingDef_Races/ARA_RaceNodeSwarm.xml +++ b/1.6/1.6/Defs/ThingDef_Races/ARA_RaceNodeSwarm.xml @@ -536,7 +536,6 @@ 1.5 ARA_Carapace - 300 Human @@ -631,13 +630,6 @@ 1.0 false -
  • - ARA_CreepyCrawly_Hediff - 6 - false - true - true -
  • Drafted - - + ARA_Psi_FlyNorth + ARA_Psi_FlyEast + ARA_Psi_FlySouth +
  • +
  • + +
  • ARA_HiveMindDrone
  • + + 1.0 + false 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 00c3dd9..a8d4374 100644 --- a/1.6/1.6/Defs/ThingDef_Races/ARA_RaceQueen.xml +++ b/1.6/1.6/Defs/ThingDef_Races/ARA_RaceQueen.xml @@ -16,7 +16,7 @@ HumanlikeConstant Humanlike true - 80 + 300 Filth_Blood Filth_BloodSmear Leather_Human @@ -705,13 +705,6 @@ 1.0 false -
  • - ARA_CreepyCrawly_Hediff - 6 - false - true - true -
  • \ No newline at end of file diff --git a/Content/Textures/ArachnaeSwarm/Things/ARA_NeuroSwarm/Bodies/Naked_Thin_south.png b/Content/Textures/ArachnaeSwarm/Things/ARA_NeuroSwarm/Bodies/Naked_Thin_south.png index 99cb16c..3d12fd1 100644 Binary files a/Content/Textures/ArachnaeSwarm/Things/ARA_NeuroSwarm/Bodies/Naked_Thin_south.png and b/Content/Textures/ArachnaeSwarm/Things/ARA_NeuroSwarm/Bodies/Naked_Thin_south.png differ diff --git a/Content/Textures/ArachnaeSwarm/Things/ARA_NeuroSwarm/Bodies/Naked_Thin_west.png b/Content/Textures/ArachnaeSwarm/Things/ARA_NeuroSwarm/Bodies/Naked_Thin_west.png index 99cb16c..3d12fd1 100644 Binary files a/Content/Textures/ArachnaeSwarm/Things/ARA_NeuroSwarm/Bodies/Naked_Thin_west.png and b/Content/Textures/ArachnaeSwarm/Things/ARA_NeuroSwarm/Bodies/Naked_Thin_west.png differ diff --git a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo index bd7d5a1..07a36f6 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 b62a8b3..7b7cc17 100644 --- a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json +++ b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json @@ -3,16 +3,8 @@ "WorkspaceRootPath": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\", "Documents": [ { - "AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\abilities\\ara_abilityswitch\\compabilityeffect_giveswitchhediff.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_abilityswitch\\compabilityeffect_giveswitchhediff.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\\abilities\\ara_abilityswitch\\compabilityeffect_removeswitchhediff.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_abilityswitch\\compabilityeffect_removeswitchhediff.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\\abilities\\ara_abilityswitch\\weaponswitch.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_abilityswitch\\weaponswitch.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\\hediffs\\ara_hediffcomp_topturret\\hediffcomp_topturret.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:hediffs\\ara_hediffcomp_topturret\\hediffcomp_topturret.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" } ], "DocumentGroupContainers": [ @@ -22,50 +14,24 @@ "DocumentGroups": [ { "DockedWidth": 200, - "SelectedChildIndex": 3, + "SelectedChildIndex": 0, "Children": [ - { - "$type": "Bookmark", - "Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}" - }, - { - "$type": "Document", - "DocumentIndex": 2, - "Title": "WeaponSwitch.cs", - "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_AbilitySwitch\\WeaponSwitch.cs", - "RelativeDocumentMoniker": "Abilities\\ARA_AbilitySwitch\\WeaponSwitch.cs", - "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_AbilitySwitch\\WeaponSwitch.cs", - "RelativeToolTip": "Abilities\\ARA_AbilitySwitch\\WeaponSwitch.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAA4AAAAhAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-09-19T06:39:20.978Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 1, - "Title": "CompAbilityEffect_RemoveSwitchHediff.cs", - "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_AbilitySwitch\\CompAbilityEffect_RemoveSwitchHediff.cs", - "RelativeDocumentMoniker": "Abilities\\ARA_AbilitySwitch\\CompAbilityEffect_RemoveSwitchHediff.cs", - "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_AbilitySwitch\\CompAbilityEffect_RemoveSwitchHediff.cs", - "RelativeToolTip": "Abilities\\ARA_AbilitySwitch\\CompAbilityEffect_RemoveSwitchHediff.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAMAAAAXAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-09-19T06:39:18.492Z", - "EditorCaption": "" - }, { "$type": "Document", "DocumentIndex": 0, - "Title": "CompAbilityEffect_GiveSwitchHediff.cs", - "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_AbilitySwitch\\CompAbilityEffect_GiveSwitchHediff.cs", - "RelativeDocumentMoniker": "Abilities\\ARA_AbilitySwitch\\CompAbilityEffect_GiveSwitchHediff.cs", - "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_AbilitySwitch\\CompAbilityEffect_GiveSwitchHediff.cs", - "RelativeToolTip": "Abilities\\ARA_AbilitySwitch\\CompAbilityEffect_GiveSwitchHediff.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAMAAAAXAAAAAAAAAA==", + "Title": "HediffComp_TopTurret.cs", + "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Hediffs\\ARA_HediffComp_TopTurret\\HediffComp_TopTurret.cs", + "RelativeDocumentMoniker": "Hediffs\\ARA_HediffComp_TopTurret\\HediffComp_TopTurret.cs", + "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Hediffs\\ARA_HediffComp_TopTurret\\HediffComp_TopTurret.cs", + "RelativeToolTip": "Hediffs\\ARA_HediffComp_TopTurret\\HediffComp_TopTurret.cs", + "ViewState": "AgIAAIUAAAAAAAAAAAAswAoAAAAFAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-09-19T06:39:09.674Z", + "WhenOpened": "2025-09-20T03:55:47.292Z", "EditorCaption": "" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}" } ] } diff --git a/Source/ArachnaeSwarm/ArachnaeSwarm.csproj b/Source/ArachnaeSwarm/ArachnaeSwarm.csproj index 9441646..0e61035 100644 --- a/Source/ArachnaeSwarm/ArachnaeSwarm.csproj +++ b/Source/ArachnaeSwarm/ArachnaeSwarm.csproj @@ -133,6 +133,7 @@ + diff --git a/Source/ArachnaeSwarm/Hediffs/ARA_HediffComp_TopTurret/HediffComp_TopTurret.cs b/Source/ArachnaeSwarm/Hediffs/ARA_HediffComp_TopTurret/HediffComp_TopTurret.cs new file mode 100644 index 0000000..5d6217e --- /dev/null +++ b/Source/ArachnaeSwarm/Hediffs/ARA_HediffComp_TopTurret/HediffComp_TopTurret.cs @@ -0,0 +1,268 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using Verse; +using Verse.AI; +using RimWorld; + +namespace ArachnaeSwarm +{ + public class HediffCompProperties_TopTurret : HediffCompProperties + { + public HediffCompProperties_TopTurret() + { + this.compClass = typeof(HediffComp_TopTurret); + } + + public ThingDef turretDef; + + public float angleOffset; + + public bool autoAttack = true; + } + + [StaticConstructorOnStartup] + public class HediffComp_TopTurret : HediffComp, IAttackTargetSearcher + { + public Thing Thing + { + get + { + return this.Pawn; + } + } + + private HediffCompProperties_TopTurret Props + { + get + { + return (HediffCompProperties_TopTurret)this.props; + } + } + + public Verb CurrentEffectiveVerb + { + get + { + return this.AttackVerb; + } + } + + public LocalTargetInfo LastAttackedTarget + { + get + { + return this.lastAttackedTarget; + } + } + + public int LastAttackTargetTick + { + get + { + return this.lastAttackTargetTick; + } + } + + public CompEquippable GunCompEq + { + get + { + return this.gun.TryGetComp(); + } + } + + public Verb AttackVerb + { + get + { + return this.GunCompEq.PrimaryVerb; + } + } + + private bool WarmingUp + { + get + { + return this.burstWarmupTicksLeft > 0; + } + } + + private bool CanShoot + { + get + { + Pawn pawn; + if ((pawn = (this.Pawn)) != null) + { + if (!pawn.Spawned || pawn.Downed || pawn.Dead || !pawn.Awake()) + { + return false; + } + if (pawn.stances.stunner.Stunned) + { + return false; + } + if (this.TurretDestroyed) + { + return false; + } + if (pawn.IsColonyMechPlayerControlled && !this.fireAtWill) + { + return false; + } + } + CompCanBeDormant compCanBeDormant = this.Pawn.TryGetComp(); + return compCanBeDormant == null || compCanBeDormant.Awake; + } + } + + public bool TurretDestroyed + { + get + { + Pawn pawn; + return (pawn = (this.Pawn)) != null && this.AttackVerb.verbProps.linkedBodyPartsGroup != null && this.AttackVerb.verbProps.ensureLinkedBodyPartsGroupAlwaysUsable && PawnCapacityUtility.CalculateNaturalPartsAverageEfficiency(pawn.health.hediffSet, this.AttackVerb.verbProps.linkedBodyPartsGroup) <= 0f; + } + } + + private Material TurretMat + { + get + { + if (this.turretMat == null) + { + this.turretMat = MaterialPool.MatFrom(this.Props.turretDef.graphicData.texPath); + } + return this.turretMat; + } + } + + public bool AutoAttack + { + get + { + return this.Props.autoAttack; + } + } + + public override void CompPostMake() + { + base.CompPostMake(); + this.MakeGun(); + } + + private void MakeGun() + { + this.gun = ThingMaker.MakeThing(this.Props.turretDef, null); + this.UpdateGunVerbs(); + } + + private void UpdateGunVerbs() + { + List allVerbs = this.gun.TryGetComp().AllVerbs; + for (int i = 0; i < allVerbs.Count; i++) + { + Verb verb = allVerbs[i]; + verb.caster = this.Pawn; + verb.castCompleteCallback = delegate () + { + this.burstCooldownTicksLeft = this.AttackVerb.verbProps.defaultCooldownTime.SecondsToTicks(); + }; + } + } + public override void CompPostTick(ref float severityAdjustment) + { + base.CompPostTick(ref severityAdjustment); + if (!this.CanShoot) + { + return; + } + if (this.currentTarget.IsValid) + { + this.curRotation = (this.currentTarget.Cell.ToVector3Shifted() - this.Pawn.DrawPos).AngleFlat() + this.Props.angleOffset; + } + this.AttackVerb.VerbTick(); + if (this.AttackVerb.state != VerbState.Bursting) + { + if (this.WarmingUp) + { + this.burstWarmupTicksLeft--; + if (this.burstWarmupTicksLeft == 0) + { + this.AttackVerb.TryStartCastOn(this.currentTarget, false, true, false, true); + this.lastAttackTargetTick = Find.TickManager.TicksGame; + this.lastAttackedTarget = this.currentTarget; + return; + } + } + else + { + if (this.burstCooldownTicksLeft > 0) + { + this.burstCooldownTicksLeft--; + } + if (this.burstCooldownTicksLeft <= 0 && this.Pawn.IsHashIntervalTick(10)) + { + this.currentTarget = (Thing)AttackTargetFinder.BestShootTargetFromCurrentPosition(this, TargetScanFlags.NeedThreat | TargetScanFlags.NeedAutoTargetable, null, 0f, 9999f); + if (this.currentTarget.IsValid) + { + this.burstWarmupTicksLeft = 1; + return; + } + this.ResetCurrentTarget(); + } + } + } + } + + private void ResetCurrentTarget() + { + this.currentTarget = LocalTargetInfo.Invalid; + this.burstWarmupTicksLeft = 0; + } + + public override void CompExposeData() + { + base.CompExposeData(); + Scribe_Values.Look(ref this.burstCooldownTicksLeft, "burstCooldownTicksLeft", 0, false); + Scribe_Values.Look(ref this.burstWarmupTicksLeft, "burstWarmupTicksLeft", 0, false); + Scribe_TargetInfo.Look(ref this.currentTarget, "currentTarget"); + Scribe_Deep.Look(ref this.gun, "gun", Array.Empty()); + Scribe_Values.Look(ref this.fireAtWill, "fireAtWill", true, false); + if (Scribe.mode == LoadSaveMode.PostLoadInit) + { + if (this.gun == null) + { + Log.Error("CompTurrentGun had null gun after loading. Recreating."); + this.MakeGun(); + return; + } + this.UpdateGunVerbs(); + } + } + + private const int StartShootIntervalTicks = 10; + + private static readonly CachedTexture ToggleTurretIcon = new CachedTexture("UI/Gizmos/ToggleTurret"); + + public Thing gun; + + protected int burstCooldownTicksLeft; + + protected int burstWarmupTicksLeft; + + protected LocalTargetInfo currentTarget = LocalTargetInfo.Invalid; + + private bool fireAtWill = true; + + private LocalTargetInfo lastAttackedTarget = LocalTargetInfo.Invalid; + + private int lastAttackTargetTick; + + private float curRotation; + + [Unsaved(false)] + public Material turretMat; + } +} \ No newline at end of file diff --git a/Source/ArachnaeSwarm/Pawn_Comps/ARA_GiveHediffsInRangeToRace/HediffComp_GiveHediffsInRangeToRace.cs b/Source/ArachnaeSwarm/Pawn_Comps/ARA_GiveHediffsInRangeToRace/HediffComp_GiveHediffsInRangeToRace.cs index 05c1808..1164cdb 100644 --- a/Source/ArachnaeSwarm/Pawn_Comps/ARA_GiveHediffsInRangeToRace/HediffComp_GiveHediffsInRangeToRace.cs +++ b/Source/ArachnaeSwarm/Pawn_Comps/ARA_GiveHediffsInRangeToRace/HediffComp_GiveHediffsInRangeToRace.cs @@ -31,11 +31,22 @@ namespace ArachnaeSwarm 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)) + // 检查种族是否在我们的目标列表中,如果列表为空或null则不进行任何操作 + if ( pawn.Dead || pawn.health == null || pawn == parent.pawn || !(pawn.Position.DistanceTo(parent.pawn.Position) <= Props.range) || !Props.targetingParameters.CanTarget(pawn)) { continue; } + else + { + // 如果列表是空的或null,则默认对所有的pawn进行操作 + if (Props.targetRaces.NullOrEmpty()) + { + } + else if (!Props.targetRaces.Contains(pawn.def)) + { + continue; + } + } Hediff hediff = pawn.health.hediffSet.GetFirstHediffOfDef(Props.hediff); if (hediff == null) { diff --git a/非公开资源/Content/1.png b/非公开资源/Content/1.png new file mode 100644 index 0000000..14069cc Binary files /dev/null and b/非公开资源/Content/1.png differ diff --git a/非公开资源/Content/Textures/Things/ARA_NeuroSwarm/Bodies/Naked_Thin_east.sai2 b/非公开资源/Content/Textures/Things/ARA_NeuroSwarm/Bodies/Naked_Thin_east.sai2 index e7d86ca..5b0b0e5 100644 Binary files a/非公开资源/Content/Textures/Things/ARA_NeuroSwarm/Bodies/Naked_Thin_east.sai2 and b/非公开资源/Content/Textures/Things/ARA_NeuroSwarm/Bodies/Naked_Thin_east.sai2 differ