diff --git a/1.6/1.6/Assemblies/ArachnaeSwarm.dll b/1.6/1.6/Assemblies/ArachnaeSwarm.dll index 73e47af..4534f6e 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/Ability_Flyover.xml b/1.6/1.6/Defs/AbilityDefs/Ability_Flyover.xml index ca04527..7450d11 100644 --- a/1.6/1.6/Defs/AbilityDefs/Ability_Flyover.xml +++ b/1.6/1.6/Defs/AbilityDefs/Ability_Flyover.xml @@ -89,8 +89,8 @@ ARA_Spawn_ARA_HiveCorvette_DiveBomb - 引航种指挥阿拉克涅天巫种兽虫,高速掠过战场,使用其附带阿拉克涅虫酸效果的天灾导弹对目标区域发起打击。\n\n在飞行期间,它会使用血链棘刺炮打击遇到的敌人,由于攻击区间较少,血链棘刺炮只能打击前7个遇到的目标。 - ArachnaeSwarm/UI/Abilities/ARA_Spawn_ARA_HiveCorvette_Rocket + 引航种指挥阿拉克涅天巫种兽虫,高速掠过战场,使用其附带阿拉克涅虫酸效果的天灾导弹对目标区域发起打击。\n\n该支援导致的冷却较其他支援长得多,但是威力也是毋庸置疑的。 + ArachnaeSwarm/UI/Abilities/ARA_Spawn_ARA_HiveCorvette_DiveBomb 1 Misc12 false @@ -109,7 +109,7 @@
  • ARA_HiveCorvette_Entity - 5000 + 48000 1
  • @@ -137,7 +137,7 @@ (1.0,0.3,0.1,0.2) - true + false (0.3,0.7,1.0,0.3)
  • diff --git a/1.6/1.6/Defs/EvolutionDefs/ARA_Evolution.xml b/1.6/1.6/Defs/EvolutionDefs/ARA_Evolution.xml index d2d2283..dd906cc 100644 --- a/1.6/1.6/Defs/EvolutionDefs/ARA_Evolution.xml +++ b/1.6/1.6/Defs/EvolutionDefs/ARA_Evolution.xml @@ -1883,7 +1883,8 @@
  • ARA_SpawnFlyOverTest
  • ARA_Spawn_ARA_HiveCorvette_Rocket
  • ARA_Spawn_ARA_HiveCorvette_Bombardment
  • -
  • ARA_HiveCorvette_Strike
  • +
  • ARA_Spawn_ARA_HiveCorvette_Strike
  • +
  • ARA_Spawn_ARA_HiveCorvette_DiveBomb
  • diff --git a/1.6/1.6/Defs/Thing_Misc/ARA_Flyover_Item.xml b/1.6/1.6/Defs/Thing_Misc/ARA_Flyover_Item.xml index ea54727..1dd2d27 100644 --- a/1.6/1.6/Defs/Thing_Misc/ARA_Flyover_Item.xml +++ b/1.6/1.6/Defs/Thing_Misc/ARA_Flyover_Item.xml @@ -519,6 +519,23 @@
  • Proj_ARA_HiveCorvette 50 + + + 13 + 0 + 0 + 0 + Alternating + + + 13 + 13 + 13 + Fixed + + + true + Mote_SparkSimple
  • Bullet_ARA_HiveCorvette @@ -527,6 +544,23 @@ 3 0.3 24 + + + 13 + 0 + 0 + 0 + Alternating + + + 13 + 13 + 13 + Fixed + + + true + Mote_SparkSimple
  • @@ -573,14 +607,23 @@
  • Projectile_CatastropheMissile 50 -
  • -
  • - Bullet_ARA_HiveCorvette - 30 - 50 - 3 - 0.3 - 24 + + + 13 + 0 + 0 + 0 + Alternating + + + 13 + 13 + 13 + Fixed + + + true + Mote_Smoke
  • @@ -627,6 +670,23 @@
  • Bullet_ARA_RW_Acid_Mortar 15 + + + 11 + 0 + 0 + 0 + Alternating + + + 11 + 3 + 11 + Progressive + + + true + Mote_Smoke
  • Bullet_ARA_HiveCorvette @@ -635,6 +695,23 @@ 1 0.5 -1 + + + 13 + 0 + 0 + 0 + Alternating + + + 13 + 13 + 13 + Fixed + + + true + Mote_SparkSimple
  • @@ -685,6 +762,23 @@ 10 0.5 -1 + + + 13 + 0 + 0 + 0 + Alternating + + + 13 + 13 + 13 + Fixed + + + true + Mote_SparkSimple diff --git a/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_Spawn_ARA_HiveCorvette_DiveBomb.png b/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_Spawn_ARA_HiveCorvette_DiveBomb.png new file mode 100644 index 0000000..10e8221 Binary files /dev/null and b/Content/Textures/ArachnaeSwarm/UI/Abilities/ARA_Spawn_ARA_HiveCorvette_DiveBomb.png differ diff --git a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo index e005884..a7cc9a3 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 514468d..c61a67b 100644 --- a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json +++ b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json @@ -1,41 +1,49 @@ { "Version": 1, - "WorkspaceRootPath": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\", + "WorkspaceRootPath": "E:\\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\\flyover\\thingclassflyover.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\\flyover\\ara_groundstrafing\\compgroundstrafing.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:flyover\\ara_groundstrafing\\compgroundstrafing.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\\flyover\\ara_sectorsurveillance\\compsectorsurveillance.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:flyover\\ara_sectorsurveillance\\compsectorsurveillance.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\\flyover\\thingclassflyover.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:flyover\\thingclassflyover.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\\flyover\\ara_aircrafthangar\\compabilityeffect_aircraftstrike.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\\flyover\\ara_aircrafthangar\\compabilityeffect_aircraftstrike.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:flyover\\ara_aircrafthangar\\compabilityeffect_aircraftstrike.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_givehediffwithskillduration\\compabilityeffect_givehediffwithskillduration.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\\abilities\\ara_givehediffwithskillduration\\compabilityeffect_givehediffwithskillduration.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_givehediffwithskillduration\\compabilityeffect_givehediffwithskillduration.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_showtemperaturerange\\compabilityeffect_abilityshowtemperaturerange.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\\abilities\\ara_showtemperaturerange\\compabilityeffect_abilityshowtemperaturerange.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_showtemperaturerange\\compabilityeffect_abilityshowtemperaturerange.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_showspawnablepawnslist\\compabilityeffect_abilityshowspawnablepawns.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\\abilities\\ara_showspawnablepawnslist\\compabilityeffect_abilityshowspawnablepawns.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_showspawnablepawnslist\\compabilityeffect_abilityshowspawnablepawns.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\\flyover\\ara_spawnflyover\\compabilityeffect_spawnflyover.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\\flyover\\ara_spawnflyover\\compabilityeffect_spawnflyover.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:flyover\\ara_spawnflyover\\compabilityeffect_spawnflyover.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\\flyover\\ara_aircrafthangar\\compaircrafthangar.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\\flyover\\ara_aircrafthangar\\compaircrafthangar.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:flyover\\ara_aircrafthangar\\compaircrafthangar.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\\flyover\\ara_aircrafthangar\\worldcomponent_aircraftmanager.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\\flyover\\ara_aircrafthangar\\worldcomponent_aircraftmanager.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:flyover\\ara_aircrafthangar\\worldcomponent_aircraftmanager.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\\flyover\\ara_flyoverescort\\compproperties_flyoverescort.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\\flyover\\ara_flyoverescort\\compproperties_flyoverescort.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:flyover\\ara_flyoverescort\\compproperties_flyoverescort.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" } ], @@ -46,7 +54,7 @@ "DocumentGroups": [ { "DockedWidth": 200, - "SelectedChildIndex": 4, + "SelectedChildIndex": 2, "Children": [ { "$type": "Bookmark", @@ -54,11 +62,37 @@ }, { "$type": "Document", - "DocumentIndex": 2, + "DocumentIndex": 1, + "Title": "CompSectorSurveillance.cs", + "DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_SectorSurveillance\\CompSectorSurveillance.cs", + "RelativeDocumentMoniker": "Flyover\\ARA_SectorSurveillance\\CompSectorSurveillance.cs", + "ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_SectorSurveillance\\CompSectorSurveillance.cs", + "RelativeToolTip": "Flyover\\ARA_SectorSurveillance\\CompSectorSurveillance.cs", + "ViewState": "AgIAAPACAAAAAAAAAAAAABEDAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-10-30T13:52:54.896Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "CompGroundStrafing.cs", + "DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_GroundStrafing\\CompGroundStrafing.cs", + "RelativeDocumentMoniker": "Flyover\\ARA_GroundStrafing\\CompGroundStrafing.cs", + "ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_GroundStrafing\\CompGroundStrafing.cs", + "RelativeToolTip": "Flyover\\ARA_GroundStrafing\\CompGroundStrafing.cs", + "ViewState": "AgIAAGwBAAAAAAAAAAArwJABAAAEAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-10-30T13:00:11.18Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 4, "Title": "CompAbilityEffect_GiveHediffWithSkillDuration.cs", - "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_GiveHediffWithSkillDuration\\CompAbilityEffect_GiveHediffWithSkillDuration.cs", + "DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_GiveHediffWithSkillDuration\\CompAbilityEffect_GiveHediffWithSkillDuration.cs", "RelativeDocumentMoniker": "Abilities\\ARA_GiveHediffWithSkillDuration\\CompAbilityEffect_GiveHediffWithSkillDuration.cs", - "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_GiveHediffWithSkillDuration\\CompAbilityEffect_GiveHediffWithSkillDuration.cs", + "ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_GiveHediffWithSkillDuration\\CompAbilityEffect_GiveHediffWithSkillDuration.cs", "RelativeToolTip": "Abilities\\ARA_GiveHediffWithSkillDuration\\CompAbilityEffect_GiveHediffWithSkillDuration.cs", "ViewState": "AgIAAEsAAAAAAAAAAAAWwGAAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", @@ -66,11 +100,11 @@ }, { "$type": "Document", - "DocumentIndex": 3, + "DocumentIndex": 5, "Title": "CompAbilityEffect_AbilityShowTemperatureRange.cs", - "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_ShowTemperatureRange\\CompAbilityEffect_AbilityShowTemperatureRange.cs", + "DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_ShowTemperatureRange\\CompAbilityEffect_AbilityShowTemperatureRange.cs", "RelativeDocumentMoniker": "Abilities\\ARA_ShowTemperatureRange\\CompAbilityEffect_AbilityShowTemperatureRange.cs", - "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_ShowTemperatureRange\\CompAbilityEffect_AbilityShowTemperatureRange.cs", + "ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_ShowTemperatureRange\\CompAbilityEffect_AbilityShowTemperatureRange.cs", "RelativeToolTip": "Abilities\\ARA_ShowTemperatureRange\\CompAbilityEffect_AbilityShowTemperatureRange.cs", "ViewState": "AgIAAAAAAAAAAAAAAAAAABcAAAArAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", @@ -78,11 +112,11 @@ }, { "$type": "Document", - "DocumentIndex": 1, + "DocumentIndex": 3, "Title": "CompAbilityEffect_AircraftStrike.cs", - "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_AircraftHangar\\CompAbilityEffect_AircraftStrike.cs", + "DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_AircraftHangar\\CompAbilityEffect_AircraftStrike.cs", "RelativeDocumentMoniker": "Flyover\\ARA_AircraftHangar\\CompAbilityEffect_AircraftStrike.cs", - "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_AircraftHangar\\CompAbilityEffect_AircraftStrike.cs", + "ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_AircraftHangar\\CompAbilityEffect_AircraftStrike.cs", "RelativeToolTip": "Flyover\\ARA_AircraftHangar\\CompAbilityEffect_AircraftStrike.cs", "ViewState": "AgIAAHYAAAAAAAAAAAAtwJcAAAArAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", @@ -90,24 +124,24 @@ }, { "$type": "Document", - "DocumentIndex": 0, + "DocumentIndex": 2, "Title": "ThingclassFlyOver.cs", - "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ThingclassFlyOver.cs", + "DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ThingclassFlyOver.cs", "RelativeDocumentMoniker": "Flyover\\ThingclassFlyOver.cs", - "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ThingclassFlyOver.cs", + "ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ThingclassFlyOver.cs", "RelativeToolTip": "Flyover\\ThingclassFlyOver.cs", - "ViewState": "AgIAAJUCAAAAAAAAAAAawKMCAAAFAAAAAAAAAA==", + "ViewState": "AgIAAIkCAAAAAAAAAAAawI8CAAANAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2025-10-29T14:17:06.867Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 4, + "DocumentIndex": 6, "Title": "CompAbilityEffect_AbilityShowSpawnablePawns.cs", - "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_ShowSpawnablePawnsList\\CompAbilityEffect_AbilityShowSpawnablePawns.cs", + "DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_ShowSpawnablePawnsList\\CompAbilityEffect_AbilityShowSpawnablePawns.cs", "RelativeDocumentMoniker": "Abilities\\ARA_ShowSpawnablePawnsList\\CompAbilityEffect_AbilityShowSpawnablePawns.cs", - "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_ShowSpawnablePawnsList\\CompAbilityEffect_AbilityShowSpawnablePawns.cs", + "ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_ShowSpawnablePawnsList\\CompAbilityEffect_AbilityShowSpawnablePawns.cs", "RelativeToolTip": "Abilities\\ARA_ShowSpawnablePawnsList\\CompAbilityEffect_AbilityShowSpawnablePawns.cs", "ViewState": "AgIAABYAAAAAAAAAAAAuwBYAAAArAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", @@ -115,11 +149,11 @@ }, { "$type": "Document", - "DocumentIndex": 6, + "DocumentIndex": 8, "Title": "CompAircraftHangar.cs", - "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_AircraftHangar\\CompAircraftHangar.cs", + "DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_AircraftHangar\\CompAircraftHangar.cs", "RelativeDocumentMoniker": "Flyover\\ARA_AircraftHangar\\CompAircraftHangar.cs", - "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_AircraftHangar\\CompAircraftHangar.cs", + "ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_AircraftHangar\\CompAircraftHangar.cs", "RelativeToolTip": "Flyover\\ARA_AircraftHangar\\CompAircraftHangar.cs", "ViewState": "AgIAABcAAAAAAAAAAAAQwCQAAAAnAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", @@ -127,11 +161,11 @@ }, { "$type": "Document", - "DocumentIndex": 5, + "DocumentIndex": 7, "Title": "CompAbilityEffect_SpawnFlyOver.cs", - "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_SpawnFlyOver\\CompAbilityEffect_SpawnFlyOver.cs", + "DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_SpawnFlyOver\\CompAbilityEffect_SpawnFlyOver.cs", "RelativeDocumentMoniker": "Flyover\\ARA_SpawnFlyOver\\CompAbilityEffect_SpawnFlyOver.cs", - "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_SpawnFlyOver\\CompAbilityEffect_SpawnFlyOver.cs", + "ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_SpawnFlyOver\\CompAbilityEffect_SpawnFlyOver.cs", "RelativeToolTip": "Flyover\\ARA_SpawnFlyOver\\CompAbilityEffect_SpawnFlyOver.cs", "ViewState": "AgIAAFMDAAAAAAAAAAAawG8DAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", @@ -139,11 +173,11 @@ }, { "$type": "Document", - "DocumentIndex": 7, + "DocumentIndex": 9, "Title": "WorldComponent_AircraftManager.cs", - "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_AircraftHangar\\WorldComponent_AircraftManager.cs", + "DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_AircraftHangar\\WorldComponent_AircraftManager.cs", "RelativeDocumentMoniker": "Flyover\\ARA_AircraftHangar\\WorldComponent_AircraftManager.cs", - "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_AircraftHangar\\WorldComponent_AircraftManager.cs", + "ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_AircraftHangar\\WorldComponent_AircraftManager.cs", "RelativeToolTip": "Flyover\\ARA_AircraftHangar\\WorldComponent_AircraftManager.cs", "ViewState": "AgIAAJUAAAAAAAAAAAAowK4AAAAUAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", @@ -151,11 +185,11 @@ }, { "$type": "Document", - "DocumentIndex": 8, + "DocumentIndex": 10, "Title": "CompProperties_FlyOverEscort.cs", - "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_FlyOverEscort\\CompProperties_FlyOverEscort.cs", + "DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_FlyOverEscort\\CompProperties_FlyOverEscort.cs", "RelativeDocumentMoniker": "Flyover\\ARA_FlyOverEscort\\CompProperties_FlyOverEscort.cs", - "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_FlyOverEscort\\CompProperties_FlyOverEscort.cs", + "ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Flyover\\ARA_FlyOverEscort\\CompProperties_FlyOverEscort.cs", "RelativeToolTip": "Flyover\\ARA_FlyOverEscort\\CompProperties_FlyOverEscort.cs", "ViewState": "AgIAAAAAAAAAAAAAAAAAABAAAAAvAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", diff --git a/Source/ArachnaeSwarm/Flyover/ARA_GroundStrafing/CompGroundStrafing.cs b/Source/ArachnaeSwarm/Flyover/ARA_GroundStrafing/CompGroundStrafing.cs index 9de3592..7f1ca22 100644 --- a/Source/ArachnaeSwarm/Flyover/ARA_GroundStrafing/CompGroundStrafing.cs +++ b/Source/ArachnaeSwarm/Flyover/ARA_GroundStrafing/CompGroundStrafing.cs @@ -9,16 +9,33 @@ namespace ArachnaeSwarm { public CompProperties_GroundStrafing Props => (CompProperties_GroundStrafing)props; - // 简化的扫射状态 - 只存储需要射击的单元格 + // 简化的扫射状态 private List confirmedTargetCells = new List(); private HashSet firedCells = new HashSet(); + // 横向偏移状态(左右) + private float currentLateralOffsetAngle = 0f; + private int shotsFired = 0; + private Vector3 lastProjectileDirection = Vector3.zero; + + // 新增:纵向偏移状态(前后) + private float currentLongitudinalOffset = 0f; // 当前纵向偏移距离 + private bool isForwardPhase = true; // 是否处于向前偏移阶段 + public override void PostSpawnSetup(bool respawningAfterLoad) { base.PostSpawnSetup(respawningAfterLoad); - // 简化的初始化日志 - Log.Message($"GroundStrafing: Initialized with {confirmedTargetCells.Count} confirmed targets, Range: {Props.range}"); + // 初始化偏移 + if (!respawningAfterLoad) + { + currentLateralOffsetAngle = Props.lateralInitialOffsetAngle; + currentLongitudinalOffset = Props.longitudinalInitialOffset; + } + + Log.Message($"GroundStrafing: Initialized with {confirmedTargetCells.Count} targets, " + + $"Lateral Offset: {currentLateralOffsetAngle:F1}°, " + + $"Longitudinal Offset: {currentLongitudinalOffset:F1}"); } public override void CompTick() @@ -30,13 +47,13 @@ namespace ArachnaeSwarm return; } - // 检查可攻击的目标单元格 CheckAndFireAtTargets(); - // 每120 ticks输出一次状态,避免日志过多 + // 定期状态输出 if (Find.TickManager.TicksGame % 120 == 0 && confirmedTargetCells.Count > 0) { - Log.Message($"GroundStrafing: {firedCells.Count}/{confirmedTargetCells.Count + firedCells.Count} targets fired"); + Log.Message($"GroundStrafing: {firedCells.Count}/{confirmedTargetCells.Count + firedCells.Count} targets fired, " + + $"Lateral: {currentLateralOffsetAngle:F1}°, Longitudinal: {currentLongitudinalOffset:F1}"); } } @@ -44,40 +61,169 @@ namespace ArachnaeSwarm { Vector3 currentPos = parent.DrawPos; - // 检查所有确认的目标单元格 for (int i = confirmedTargetCells.Count - 1; i >= 0; i--) { IntVec3 targetCell = confirmedTargetCells[i]; - // 跳过已发射过的单元格 if (firedCells.Contains(targetCell)) { confirmedTargetCells.RemoveAt(i); continue; } - // 关键修复:使用水平距离计算,忽略高度差 float horizontalDistance = GetHorizontalDistance(currentPos, targetCell); if (horizontalDistance <= Props.range) { - // 立即发射(不再检查概率,因为已经在预处理阶段决定) if (LaunchProjectileAt(targetCell)) { - // 发射成功,标记该单元格 firedCells.Add(targetCell); confirmedTargetCells.RemoveAt(i); - // 调试:输出第一次射击的信息 + // 更新所有偏移参数 + UpdateOffsets(); + if (firedCells.Count == 1) { - Log.Message($"First strafing shot at {targetCell}, Horizontal distance: {horizontalDistance:F1}"); + Log.Message($"First strafing shot at {targetCell}, " + + $"Lateral offset: {currentLateralOffsetAngle:F1}°, " + + $"Longitudinal offset: {currentLongitudinalOffset:F1}"); } } } } } - // 新增:计算水平距离(忽略高度) + // 新增:更新所有偏移参数 + private void UpdateOffsets() + { + shotsFired++; + + // 更新横向偏移 + UpdateLateralOffset(); + + // 更新纵向偏移 + UpdateLongitudinalOffset(); + } + + // 横向偏移逻辑(左右) + private void UpdateLateralOffset() + { + switch (Props.lateralOffsetMode) + { + case OffsetMode.Alternating: + currentLateralOffsetAngle = (shotsFired % 2 == 0) ? Props.lateralOffsetDistance : -Props.lateralOffsetDistance; + break; + + case OffsetMode.Progressive: + currentLateralOffsetAngle += Props.lateralAngleIncrement; + if (Mathf.Abs(currentLateralOffsetAngle) > Props.lateralMaxOffsetAngle) + { + currentLateralOffsetAngle = Props.lateralInitialOffsetAngle; + } + break; + + case OffsetMode.Random: + currentLateralOffsetAngle = Random.Range(-Props.lateralMaxOffsetAngle, Props.lateralMaxOffsetAngle); + break; + + case OffsetMode.Fixed: + default: + break; + } + + if (Props.lateralMaxOffsetAngle > 0) + { + currentLateralOffsetAngle = Mathf.Clamp(currentLateralOffsetAngle, -Props.lateralMaxOffsetAngle, Props.lateralMaxOffsetAngle); + } + } + + // 新增:纵向偏移逻辑(前后) + private void UpdateLongitudinalOffset() + { + switch (Props.longitudinalOffsetMode) + { + case LongitudinalOffsetMode.Alternating: + // 交替模式:前后交替 + currentLongitudinalOffset = (shotsFired % 2 == 0) ? Props.longitudinalAlternationAmplitude : -Props.longitudinalAlternationAmplitude; + break; + + case LongitudinalOffsetMode.Progressive: + // 渐进模式:逐渐向前然后向后 + if (isForwardPhase) + { + currentLongitudinalOffset += Props.longitudinalProgressionStep; + if (currentLongitudinalOffset >= Props.longitudinalMaxOffset) + { + isForwardPhase = false; + } + } + else + { + currentLongitudinalOffset -= Props.longitudinalProgressionStep; + if (currentLongitudinalOffset <= Props.longitudinalMinOffset) + { + isForwardPhase = true; + } + } + break; + + case LongitudinalOffsetMode.Random: + // 随机模式 + currentLongitudinalOffset = Random.Range(Props.longitudinalMinOffset, Props.longitudinalMaxOffset); + break; + + case LongitudinalOffsetMode.Sinusoidal: + // 正弦波模式:平滑的前后波动 + float time = shotsFired * Props.longitudinalOscillationSpeed; + currentLongitudinalOffset = Mathf.Sin(time) * Props.longitudinalOscillationAmplitude; + break; + + case LongitudinalOffsetMode.Fixed: + default: + // 固定模式:保持不变 + break; + } + + // 应用限制 + currentLongitudinalOffset = Mathf.Clamp(currentLongitudinalOffset, Props.longitudinalMinOffset, Props.longitudinalMaxOffset); + } + + // 修改:计算包含横向和纵向偏移的发射位置 + private Vector3 CalculateOffsetPosition(Vector3 basePosition, Vector3 directionToTarget) + { + Vector3 finalPosition = basePosition; + + // 应用横向偏移(左右) + if (Mathf.Abs(currentLateralOffsetAngle) > 0.01f) + { + Vector3 flyDirection = GetFlyOverDirection(); + Vector3 perpendicular = Vector3.Cross(flyDirection, Vector3.up).normalized; + float lateralOffsetDistance = Props.lateralOffsetDistance; + Vector3 lateralOffset = perpendicular * lateralOffsetDistance * Mathf.Sin(currentLateralOffsetAngle * Mathf.Deg2Rad); + finalPosition += lateralOffset; + } + + // 应用纵向偏移(前后) + if (Mathf.Abs(currentLongitudinalOffset) > 0.01f) + { + Vector3 flyDirection = GetFlyOverDirection(); + Vector3 longitudinalOffset = flyDirection * currentLongitudinalOffset; + finalPosition += longitudinalOffset; + } + + return finalPosition; + } + + private Vector3 GetFlyOverDirection() + { + FlyOver flyOver = parent as FlyOver; + if (flyOver != null) + { + return flyOver.MovementDirection; + } + return Vector3.forward; + } + private float GetHorizontalDistance(Vector3 fromPos, IntVec3 toCell) { Vector2 fromPos2D = new Vector2(fromPos.x, fromPos.z); @@ -85,16 +231,6 @@ namespace ArachnaeSwarm return Vector2.Distance(fromPos2D, toPos2D); } - // 新增:调试方法,输出距离信息 - private void DebugDistanceInfo(Vector3 currentPos, IntVec3 targetCell) - { - float horizontalDistance = GetHorizontalDistance(currentPos, targetCell); - float fullDistance = Vector3.Distance(currentPos, targetCell.ToVector3()); - - Log.Message($"Distance Debug - Horizontal: {horizontalDistance:F1}, Full: {fullDistance:F1}, " + - $"Range: {Props.range}, Position: {currentPos}, Target: {targetCell}"); - } - private bool LaunchProjectileAt(IntVec3 targetCell) { if (Props.projectileDef == null) @@ -105,31 +241,39 @@ namespace ArachnaeSwarm try { - // 使用 DrawPos 而不是 Position 来生成抛射体 Vector3 spawnPos = parent.DrawPos; - IntVec3 spawnCell = spawnPos.ToIntVec3(); + Vector3 targetPos = targetCell.ToVector3(); + Vector3 directionToTarget = (targetPos - spawnPos).normalized; - // 创建抛射体 - 使用当前实际位置 + // 计算偏移后的发射位置 + Vector3 offsetSpawnPos = CalculateOffsetPosition(spawnPos, directionToTarget); + + IntVec3 spawnCell = offsetSpawnPos.ToIntVec3(); + + // 创建抛射体 Projectile projectile = (Projectile)GenSpawn.Spawn(Props.projectileDef, spawnCell, parent.Map); if (projectile != null) { - // 获取发射者 Thing launcher = GetLauncher(); - Vector3 launchPos = parent.DrawPos; - - LocalTargetInfo target = new LocalTargetInfo(targetCell); + lastProjectileDirection = directionToTarget; // 发射抛射体 projectile.Launch( launcher, - launchPos, - target, - target, + offsetSpawnPos, + new LocalTargetInfo(targetCell), + new LocalTargetInfo(targetCell), ProjectileHitFlags.IntendedTarget, false ); + // 播放偏移特效 + if (Props.spawnOffsetEffect) + { + CreateOffsetEffect(offsetSpawnPos, directionToTarget); + } + return true; } } @@ -141,9 +285,22 @@ namespace ArachnaeSwarm return false; } + // 偏移特效 + private void CreateOffsetEffect(Vector3 spawnPos, Vector3 direction) + { + if (Props.offsetEffectDef != null) + { + MoteMaker.MakeStaticMote( + spawnPos, + parent.Map, + Props.offsetEffectDef, + 1f + ); + } + } + private Thing GetLauncher() { - // 如果 FlyOver 有施法者引用,使用施法者,否则使用 FlyOver 自身 FlyOver flyOver = parent as FlyOver; if (flyOver != null && flyOver.caster != null) { @@ -152,17 +309,21 @@ namespace ArachnaeSwarm return parent; } - // 设置确认的目标单元格(由技能调用,已经过预处理) public void SetConfirmedTargets(List targets) { confirmedTargetCells.Clear(); firedCells.Clear(); + shotsFired = 0; + currentLateralOffsetAngle = Props.lateralInitialOffsetAngle; + currentLongitudinalOffset = Props.longitudinalInitialOffset; + isForwardPhase = true; + confirmedTargetCells.AddRange(targets); - // 只输出关键信息 - Log.Message($"GroundStrafing: Set {confirmedTargetCells.Count} confirmed targets"); + Log.Message($"GroundStrafing: Set {confirmedTargetCells.Count} targets, " + + $"Lateral Mode: {Props.lateralOffsetMode}, " + + $"Longitudinal Mode: {Props.longitudinalOffsetMode}"); - // 调试:输出一些目标单元格的位置信息 if (confirmedTargetCells.Count > 0) { Log.Message($"First target: {confirmedTargetCells[0]}, Last target: {confirmedTargetCells[confirmedTargetCells.Count - 1]}"); @@ -175,6 +336,19 @@ namespace ArachnaeSwarm Scribe_Collections.Look(ref confirmedTargetCells, "confirmedTargetCells", LookMode.Value); Scribe_Collections.Look(ref firedCells, "firedCells", LookMode.Value); + Scribe_Values.Look(ref currentLateralOffsetAngle, "currentLateralOffsetAngle", Props.lateralInitialOffsetAngle); + Scribe_Values.Look(ref currentLongitudinalOffset, "currentLongitudinalOffset", Props.longitudinalInitialOffset); + Scribe_Values.Look(ref shotsFired, "shotsFired", 0); + Scribe_Values.Look(ref isForwardPhase, "isForwardPhase", true); + } + + // 修改:调试方法 + public void DebugOffsetStatus() + { + Log.Message($"GroundStrafing Offset Status:"); + Log.Message($" Lateral - Angle: {currentLateralOffsetAngle:F1}°, Mode: {Props.lateralOffsetMode}"); + Log.Message($" Longitudinal - Offset: {currentLongitudinalOffset:F1}, Mode: {Props.longitudinalOffsetMode}"); + Log.Message($" Shots Fired: {shotsFired}, Forward Phase: {isForwardPhase}"); } } @@ -183,9 +357,55 @@ namespace ArachnaeSwarm public ThingDef projectileDef; // 抛射体定义 public float range = 15f; // 射程 + // 横向偏移配置(左右) + public float lateralOffsetDistance = 2f; + public float lateralInitialOffsetAngle = 0f; + public float lateralMaxOffsetAngle = 45f; + public float lateralAngleIncrement = 5f; + public OffsetMode lateralOffsetMode = OffsetMode.Alternating; + + // 纵向偏移配置(前后) + public float longitudinalInitialOffset = 0f; // 初始纵向偏移 + public float longitudinalMinOffset = -2f; // 最小纵向偏移 + public float longitudinalMaxOffset = 2f; // 最大纵向偏移 + public LongitudinalOffsetMode longitudinalOffsetMode = LongitudinalOffsetMode.Alternating; // 纵向偏移模式 + + // 正弦波模式参数 + public float longitudinalOscillationSpeed = 0.5f; // 振荡速度 + public float longitudinalOscillationAmplitude = 1f; // 振荡幅度 + + // 交替模式参数 + public float longitudinalAlternationAmplitude = 1f; // 交替幅度 + + // 渐进模式参数 + public float longitudinalProgressionStep = 0.1f; // 渐进步长 + + // 视觉效果 + public bool spawnOffsetEffect = false; + public ThingDef offsetEffectDef; + public CompProperties_GroundStrafing() { compClass = typeof(CompGroundStrafing); } } + + // 横向偏移模式枚举 + public enum OffsetMode + { + Fixed, + Alternating, + Progressive, + Random + } + + // 新增:纵向偏移模式枚举 + public enum LongitudinalOffsetMode + { + Fixed, // 固定 + Alternating, // 交替(前后交替) + Progressive, // 渐进(逐渐变化) + Random, // 随机 + Sinusoidal // 正弦波(平滑波动) + } } diff --git a/Source/ArachnaeSwarm/Flyover/ARA_SectorSurveillance/CompSectorSurveillance.cs b/Source/ArachnaeSwarm/Flyover/ARA_SectorSurveillance/CompSectorSurveillance.cs index cc7846b..18e3663 100644 --- a/Source/ArachnaeSwarm/Flyover/ARA_SectorSurveillance/CompSectorSurveillance.cs +++ b/Source/ArachnaeSwarm/Flyover/ARA_SectorSurveillance/CompSectorSurveillance.cs @@ -27,10 +27,16 @@ namespace ArachnaeSwarm private Faction cachedFaction = null; private bool factionInitialized = false; - // 新增:射弹数量跟踪 + // 射弹数量跟踪 private int remainingProjectiles = -1; // -1 表示无限 private bool ammoExhausted = false; + // 新增:横纵轴偏移状态 + private float currentLateralOffsetAngle = 0f; // 当前横向偏移角度 + private float currentLongitudinalOffset = 0f; // 当前纵向偏移距离 + private bool isForwardPhase = true; // 是否处于向前偏移阶段 + private int shotsFired = 0; // 总发射次数(用于偏移计算) + public override void PostSpawnSetup(bool respawningAfterLoad) { base.PostSpawnSetup(respawningAfterLoad); @@ -40,12 +46,17 @@ namespace ArachnaeSwarm { remainingProjectiles = Props.maxProjectiles; ammoExhausted = false; + + // 初始化偏移 + currentLateralOffsetAngle = Props.lateralInitialOffsetAngle; + currentLongitudinalOffset = Props.longitudinalInitialOffset; } Log.Message($"SectorSurveillance: Initialized - Angle: {Props.sectorAngle}°, Range: {Props.sectorRange}, Shots: {Props.shotCount}, Interval: {Props.shotInterval}s"); Log.Message($"SectorSurveillance: ProjectileDef = {Props.projectileDef?.defName ?? "NULL"}"); Log.Message($"SectorSurveillance: Parent = {parent?.def?.defName ?? "NULL"} at {parent?.Position.ToString() ?? "NULL"}"); Log.Message($"SectorSurveillance: Max Projectiles = {Props.maxProjectiles}, Remaining = {remainingProjectiles}"); + Log.Message($"SectorSurveillance: Lateral Mode: {Props.lateralOffsetMode}, Longitudinal Mode: {Props.longitudinalOffsetMode}"); InitializeFactionCache(); } @@ -108,6 +119,7 @@ namespace ArachnaeSwarm { Faction currentFaction = GetEffectiveFaction(); Log.Message($"SectorSurveillance Status: Frames={totalFramesProcessed}, TargetsFound={totalTargetsFound}, ShotsFired={totalShotsFired}, ActiveTargets={activeTargets.Count}, Cooldowns={shotCooldowns.Count}, Faction={currentFaction?.Name ?? "NULL"}, RemainingProjectiles={remainingProjectiles}, AmmoExhausted={ammoExhausted}"); + Log.Message($"SectorSurveillance Offsets: Lateral={currentLateralOffsetAngle:F1}°, Longitudinal={currentLongitudinalOffset:F1}, TotalShots={shotsFired}"); } UpdateShotCooldowns(); @@ -230,7 +242,7 @@ namespace ArachnaeSwarm continue; } - // 新增:检查剩余射弹数量 + // 检查剩余射弹数量 if (remainingProjectiles == 0) { Log.Message($"SectorSurveillance: Ammo exhausted, cannot fire at {enemy.Label}"); @@ -245,7 +257,7 @@ namespace ArachnaeSwarm remainingShots--; activeTargets[enemy] = remainingShots; - // 新增:减少剩余射弹数量(如果不是无限) + // 减少剩余射弹数量(如果不是无限) if (remainingProjectiles > 0) { remainingProjectiles--; @@ -259,6 +271,9 @@ namespace ArachnaeSwarm } } + // 新增:更新偏移状态 + UpdateOffsets(); + int cooldownTicks = Mathf.RoundToInt(Props.shotInterval * 60f); shotCooldowns[enemy] = cooldownTicks; @@ -295,6 +310,137 @@ namespace ArachnaeSwarm } } + // 新增:更新所有偏移参数 + private void UpdateOffsets() + { + shotsFired++; + + // 更新横向偏移 + UpdateLateralOffset(); + + // 更新纵向偏移 + UpdateLongitudinalOffset(); + } + + // 横向偏移逻辑(左右) + private void UpdateLateralOffset() + { + switch (Props.lateralOffsetMode) + { + case OffsetMode.Alternating: + currentLateralOffsetAngle = (shotsFired % 2 == 0) ? Props.lateralOffsetDistance : -Props.lateralOffsetDistance; + break; + + case OffsetMode.Progressive: + currentLateralOffsetAngle += Props.lateralAngleIncrement; + if (Mathf.Abs(currentLateralOffsetAngle) > Props.lateralMaxOffsetAngle) + { + currentLateralOffsetAngle = Props.lateralInitialOffsetAngle; + } + break; + + case OffsetMode.Random: + currentLateralOffsetAngle = Random.Range(-Props.lateralMaxOffsetAngle, Props.lateralMaxOffsetAngle); + break; + + case OffsetMode.Fixed: + default: + break; + } + + if (Props.lateralMaxOffsetAngle > 0) + { + currentLateralOffsetAngle = Mathf.Clamp(currentLateralOffsetAngle, -Props.lateralMaxOffsetAngle, Props.lateralMaxOffsetAngle); + } + } + + // 新增:纵向偏移逻辑(前后) + private void UpdateLongitudinalOffset() + { + switch (Props.longitudinalOffsetMode) + { + case LongitudinalOffsetMode.Alternating: + // 交替模式:前后交替 + currentLongitudinalOffset = (shotsFired % 2 == 0) ? Props.longitudinalAlternationAmplitude : -Props.longitudinalAlternationAmplitude; + break; + + case LongitudinalOffsetMode.Progressive: + // 渐进模式:逐渐向前然后向后 + if (isForwardPhase) + { + currentLongitudinalOffset += Props.longitudinalProgressionStep; + if (currentLongitudinalOffset >= Props.longitudinalMaxOffset) + { + isForwardPhase = false; + } + } + else + { + currentLongitudinalOffset -= Props.longitudinalProgressionStep; + if (currentLongitudinalOffset <= Props.longitudinalMinOffset) + { + isForwardPhase = true; + } + } + break; + + case LongitudinalOffsetMode.Random: + // 随机模式 + currentLongitudinalOffset = Random.Range(Props.longitudinalMinOffset, Props.longitudinalMaxOffset); + break; + + case LongitudinalOffsetMode.Sinusoidal: + // 正弦波模式:平滑的前后波动 + float time = shotsFired * Props.longitudinalOscillationSpeed; + currentLongitudinalOffset = Mathf.Sin(time) * Props.longitudinalOscillationAmplitude; + break; + + case LongitudinalOffsetMode.Fixed: + default: + // 固定模式:保持不变 + break; + } + + // 应用限制 + currentLongitudinalOffset = Mathf.Clamp(currentLongitudinalOffset, Props.longitudinalMinOffset, Props.longitudinalMaxOffset); + } + + // 新增:计算包含横向和纵向偏移的发射位置 + private Vector3 CalculateOffsetPosition(Vector3 basePosition, Vector3 directionToTarget) + { + Vector3 finalPosition = basePosition; + + // 应用横向偏移(左右) + if (Mathf.Abs(currentLateralOffsetAngle) > 0.01f) + { + Vector3 flyDirection = GetFlyOverDirection(); + Vector3 perpendicular = Vector3.Cross(flyDirection, Vector3.up).normalized; + float lateralOffsetDistance = Props.lateralOffsetDistance; + Vector3 lateralOffset = perpendicular * lateralOffsetDistance * Mathf.Sin(currentLateralOffsetAngle * Mathf.Deg2Rad); + finalPosition += lateralOffset; + } + + // 应用纵向偏移(前后) + if (Mathf.Abs(currentLongitudinalOffset) > 0.01f) + { + Vector3 flyDirection = GetFlyOverDirection(); + Vector3 longitudinalOffset = flyDirection * currentLongitudinalOffset; + finalPosition += longitudinalOffset; + } + + return finalPosition; + } + + private Vector3 GetFlyOverDirection() + { + FlyOver flyOver = parent as FlyOver; + if (flyOver != null) + { + return flyOver.MovementDirection; + } + return Vector3.forward; + } + private List GetEnemiesInSector() { List enemies = new List(); @@ -420,9 +566,15 @@ namespace ArachnaeSwarm try { Vector3 spawnPos = parent.DrawPos; - IntVec3 spawnCell = spawnPos.ToIntVec3(); + Vector3 targetPos = target.Position.ToVector3(); + Vector3 directionToTarget = (targetPos - spawnPos).normalized; - Log.Message($"SectorSurveillance: Spawn position - World: {spawnPos}, Cell: {spawnCell}"); + // 计算偏移后的发射位置 + Vector3 offsetSpawnPos = CalculateOffsetPosition(spawnPos, directionToTarget); + + IntVec3 spawnCell = offsetSpawnPos.ToIntVec3(); + + Log.Message($"SectorSurveillance: Spawn position - World: {offsetSpawnPos}, Cell: {spawnCell}, Lateral Offset: {currentLateralOffsetAngle:F1}°, Longitudinal Offset: {currentLongitudinalOffset:F1}"); if (parent.Map == null) { @@ -444,7 +596,7 @@ namespace ArachnaeSwarm Log.Message($"SectorSurveillance: Projectile spawned successfully: {projectile}"); Thing launcher = GetLauncher(); - Vector3 launchPos = parent.DrawPos; + Vector3 launchPos = offsetSpawnPos; LocalTargetInfo targetInfo = new LocalTargetInfo(target); @@ -459,6 +611,12 @@ namespace ArachnaeSwarm false ); + // 播放偏移特效 + if (Props.spawnOffsetEffect) + { + CreateOffsetEffect(offsetSpawnPos, directionToTarget); + } + Log.Message($"SectorSurveillance: Projectile launched successfully"); return true; } @@ -476,6 +634,20 @@ namespace ArachnaeSwarm } } + // 偏移特效 + private void CreateOffsetEffect(Vector3 spawnPos, Vector3 direction) + { + if (Props.offsetEffectDef != null) + { + MoteMaker.MakeStaticMote( + spawnPos, + parent.Map, + Props.offsetEffectDef, + 1f + ); + } + } + private Thing GetLauncher() { FlyOver flyOver = parent as FlyOver; @@ -489,13 +661,13 @@ namespace ArachnaeSwarm return parent; } - // 新增:获取剩余射弹数量的方法(用于UI显示等) + // 获取剩余射弹数量的方法(用于UI显示等) public int GetRemainingProjectiles() { return remainingProjectiles; } - // 新增:检查是否还有弹药 + // 检查是否还有弹药 public bool HasAmmo() { return !ammoExhausted; @@ -515,9 +687,15 @@ namespace ArachnaeSwarm Scribe_References.Look(ref cachedFaction, "cachedFaction"); Scribe_Values.Look(ref factionInitialized, "factionInitialized", false); - // 新增:保存和加载射弹数量状态 + // 保存和加载射弹数量状态 Scribe_Values.Look(ref remainingProjectiles, "remainingProjectiles", -1); Scribe_Values.Look(ref ammoExhausted, "ammoExhausted", false); + + // 新增:保存和加载偏移状态 + Scribe_Values.Look(ref currentLateralOffsetAngle, "currentLateralOffsetAngle", Props.lateralInitialOffsetAngle); + Scribe_Values.Look(ref currentLongitudinalOffset, "currentLongitudinalOffset", Props.longitudinalInitialOffset); + Scribe_Values.Look(ref shotsFired, "shotsFired", 0); + Scribe_Values.Look(ref isForwardPhase, "isForwardPhase", true); } public override string CompInspectStringExtra() @@ -538,11 +716,26 @@ namespace ArachnaeSwarm } } + // 新增:显示偏移状态 + string offsetString = $"Offsets: Lateral {currentLateralOffsetAngle:F1}°, Longitudinal {currentLongitudinalOffset:F1}"; + + string result = ammoString + "\n" + offsetString; + if (!string.IsNullOrEmpty(baseString)) { - return baseString + "\n" + ammoString; + result = baseString + "\n" + result; } - return ammoString; + + return result; + } + + // 新增:调试方法 + public void DebugOffsetStatus() + { + Log.Message($"SectorSurveillance Offset Status:"); + Log.Message($" Lateral - Angle: {currentLateralOffsetAngle:F1}°, Mode: {Props.lateralOffsetMode}"); + Log.Message($" Longitudinal - Offset: {currentLongitudinalOffset:F1}, Mode: {Props.longitudinalOffsetMode}"); + Log.Message($" Shots Fired: {shotsFired}, Forward Phase: {isForwardPhase}"); } } @@ -554,9 +747,36 @@ namespace ArachnaeSwarm public int shotCount = 3; public float shotInterval = 0.3f; - // 新增:最大射弹数量限制 + // 最大射弹数量限制 public int maxProjectiles = -1; // -1 表示无限开火 + // 新增:横纵轴偏移配置 + public float lateralOffsetDistance = 2f; + public float lateralInitialOffsetAngle = 0f; + public float lateralMaxOffsetAngle = 45f; + public float lateralAngleIncrement = 5f; + public OffsetMode lateralOffsetMode = OffsetMode.Alternating; + + // 纵向偏移配置(前后) + public float longitudinalInitialOffset = 0f; // 初始纵向偏移 + public float longitudinalMinOffset = -2f; // 最小纵向偏移 + public float longitudinalMaxOffset = 2f; // 最大纵向偏移 + public LongitudinalOffsetMode longitudinalOffsetMode = LongitudinalOffsetMode.Alternating; // 纵向偏移模式 + + // 正弦波模式参数 + public float longitudinalOscillationSpeed = 0.5f; // 振荡速度 + public float longitudinalOscillationAmplitude = 1f; // 振荡幅度 + + // 交替模式参数 + public float longitudinalAlternationAmplitude = 1f; // 交替幅度 + + // 渐进模式参数 + public float longitudinalProgressionStep = 0.1f; // 渐进步长 + + // 视觉效果 + public bool spawnOffsetEffect = false; + public ThingDef offsetEffectDef; + public CompProperties_SectorSurveillance() { compClass = typeof(CompSectorSurveillance); diff --git a/非公开资源/Content/Textures/UI/Abilities/ARA_Spawn_ARA_HiveCorvette_Rocket.sai2 b/非公开资源/Content/Textures/UI/Abilities/ARA_Spawn_ARA_HiveCorvette_Rocket.sai2 new file mode 100644 index 0000000..2aedbdd Binary files /dev/null and b/非公开资源/Content/Textures/UI/Abilities/ARA_Spawn_ARA_HiveCorvette_Rocket.sai2 differ