开火点偏移
This commit is contained in:
Binary file not shown.
@@ -89,8 +89,8 @@
|
||||
<AbilityDef>
|
||||
<defName>ARA_Spawn_ARA_HiveCorvette_DiveBomb</defName>
|
||||
<label>天巫巡航:天灾轰炸</label>
|
||||
<description>引航种指挥阿拉克涅天巫种兽虫,高速掠过战场,使用其附带阿拉克涅虫酸效果的天灾导弹对目标区域发起打击。\n\n在飞行期间,它会使用血链棘刺炮打击遇到的敌人,由于攻击区间较少,血链棘刺炮只能打击前7个遇到的目标。</description>
|
||||
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_Spawn_ARA_HiveCorvette_Rocket</iconPath>
|
||||
<description>引航种指挥阿拉克涅天巫种兽虫,高速掠过战场,使用其附带阿拉克涅虫酸效果的天灾导弹对目标区域发起打击。\n\n该支援导致的冷却较其他支援长得多,但是威力也是毋庸置疑的。</description>
|
||||
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_Spawn_ARA_HiveCorvette_DiveBomb</iconPath>
|
||||
<cooldownTicksRange>1</cooldownTicksRange>
|
||||
<hotKey>Misc12</hotKey>
|
||||
<casterMustBeCapableOfViolence>false</casterMustBeCapableOfViolence>
|
||||
@@ -109,7 +109,7 @@
|
||||
<comps>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AircraftStrike">
|
||||
<requiredAircraftType>ARA_HiveCorvette_Entity</requiredAircraftType>
|
||||
<aircraftCooldownTicks>5000</aircraftCooldownTicks> <!-- 2小时冷却 -->
|
||||
<aircraftCooldownTicks>48000</aircraftCooldownTicks> <!-- 2小时冷却 -->
|
||||
<aircraftsPerUse>1</aircraftsPerUse>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilitySpawnFlyOver">
|
||||
@@ -137,7 +137,7 @@
|
||||
<strafePreviewColor>(1.0,0.3,0.1,0.2)</strafePreviewColor>
|
||||
|
||||
<!-- 预览配置 -->
|
||||
<showSectorPreview>true</showSectorPreview>
|
||||
<showSectorPreview>false</showSectorPreview>
|
||||
<sectorPreviewColor>(0.3,0.7,1.0,0.3)</sectorPreviewColor>
|
||||
</li>
|
||||
</comps>
|
||||
|
||||
@@ -1883,7 +1883,8 @@
|
||||
<li>ARA_SpawnFlyOverTest</li>
|
||||
<li>ARA_Spawn_ARA_HiveCorvette_Rocket</li>
|
||||
<li>ARA_Spawn_ARA_HiveCorvette_Bombardment</li>
|
||||
<li>ARA_HiveCorvette_Strike</li>
|
||||
<li>ARA_Spawn_ARA_HiveCorvette_Strike</li>
|
||||
<li>ARA_Spawn_ARA_HiveCorvette_DiveBomb</li>
|
||||
</abilityDefs>
|
||||
</li>
|
||||
</comps>
|
||||
|
||||
@@ -519,6 +519,23 @@
|
||||
<li Class="ArachnaeSwarm.CompProperties_GroundStrafing">
|
||||
<projectileDef>Proj_ARA_HiveCorvette</projectileDef>
|
||||
<range>50</range>
|
||||
|
||||
<!-- 横向偏移配置(左右) -->
|
||||
<lateralOffsetDistance>13</lateralOffsetDistance>
|
||||
<lateralInitialOffsetAngle>0</lateralInitialOffsetAngle>
|
||||
<lateralMaxOffsetAngle>0</lateralMaxOffsetAngle>
|
||||
<lateralAngleIncrement>0</lateralAngleIncrement>
|
||||
<lateralOffsetMode>Alternating</lateralOffsetMode>
|
||||
|
||||
<!-- 纵向偏移配置(前后) -->
|
||||
<longitudinalInitialOffset>13</longitudinalInitialOffset>
|
||||
<longitudinalMinOffset>13</longitudinalMinOffset>
|
||||
<longitudinalMaxOffset>13</longitudinalMaxOffset>
|
||||
<longitudinalOffsetMode>Fixed</longitudinalOffsetMode>
|
||||
|
||||
<!-- 视觉效果 -->
|
||||
<spawnOffsetEffect>true</spawnOffsetEffect>
|
||||
<offsetEffectDef>Mote_SparkSimple</offsetEffectDef>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_SectorSurveillance">
|
||||
<projectileDef>Bullet_ARA_HiveCorvette</projectileDef>
|
||||
@@ -527,6 +544,23 @@
|
||||
<shotCount>3</shotCount> <!-- 发射次数 -->
|
||||
<shotInterval>0.3</shotInterval> <!-- 发射间隔 -->
|
||||
<maxProjectiles>24</maxProjectiles><!-- 最大射弹数量限制-->
|
||||
|
||||
<!-- 横向偏移配置(左右) -->
|
||||
<lateralOffsetDistance>13</lateralOffsetDistance>
|
||||
<lateralInitialOffsetAngle>0</lateralInitialOffsetAngle>
|
||||
<lateralMaxOffsetAngle>0</lateralMaxOffsetAngle>
|
||||
<lateralAngleIncrement>0</lateralAngleIncrement>
|
||||
<lateralOffsetMode>Alternating</lateralOffsetMode>
|
||||
|
||||
<!-- 纵向偏移配置(前后) -->
|
||||
<longitudinalInitialOffset>13</longitudinalInitialOffset>
|
||||
<longitudinalMinOffset>13</longitudinalMinOffset>
|
||||
<longitudinalMaxOffset>13</longitudinalMaxOffset>
|
||||
<longitudinalOffsetMode>Fixed</longitudinalOffsetMode>
|
||||
|
||||
<!-- 视觉效果 -->
|
||||
<spawnOffsetEffect>true</spawnOffsetEffect>
|
||||
<offsetEffectDef>Mote_SparkSimple</offsetEffectDef>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
@@ -573,14 +607,23 @@
|
||||
<li Class="ArachnaeSwarm.CompProperties_GroundStrafing">
|
||||
<projectileDef>Projectile_CatastropheMissile</projectileDef>
|
||||
<range>50</range>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_SectorSurveillance">
|
||||
<projectileDef>Bullet_ARA_HiveCorvette</projectileDef>
|
||||
<sectorAngle>30</sectorAngle> <!-- 扇形角度 -->
|
||||
<sectorRange>50</sectorRange> <!-- 射程 -->
|
||||
<shotCount>3</shotCount> <!-- 发射次数 -->
|
||||
<shotInterval>0.3</shotInterval> <!-- 发射间隔 -->
|
||||
<maxProjectiles>24</maxProjectiles><!-- 最大射弹数量限制-->
|
||||
|
||||
<!-- 横向偏移配置(左右) -->
|
||||
<lateralOffsetDistance>13</lateralOffsetDistance>
|
||||
<lateralInitialOffsetAngle>0</lateralInitialOffsetAngle>
|
||||
<lateralMaxOffsetAngle>0</lateralMaxOffsetAngle>
|
||||
<lateralAngleIncrement>0</lateralAngleIncrement>
|
||||
<lateralOffsetMode>Alternating</lateralOffsetMode>
|
||||
|
||||
<!-- 纵向偏移配置(前后) -->
|
||||
<longitudinalInitialOffset>13</longitudinalInitialOffset>
|
||||
<longitudinalMinOffset>13</longitudinalMinOffset>
|
||||
<longitudinalMaxOffset>13</longitudinalMaxOffset>
|
||||
<longitudinalOffsetMode>Fixed</longitudinalOffsetMode>
|
||||
|
||||
<!-- 视觉效果 -->
|
||||
<spawnOffsetEffect>true</spawnOffsetEffect>
|
||||
<offsetEffectDef>Mote_Smoke</offsetEffectDef>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
@@ -627,6 +670,23 @@
|
||||
<li Class="ArachnaeSwarm.CompProperties_GroundStrafing">
|
||||
<projectileDef>Bullet_ARA_RW_Acid_Mortar</projectileDef>
|
||||
<range>15</range>
|
||||
|
||||
<!-- 横向偏移配置(左右) -->
|
||||
<lateralOffsetDistance>11</lateralOffsetDistance>
|
||||
<lateralInitialOffsetAngle>0</lateralInitialOffsetAngle>
|
||||
<lateralMaxOffsetAngle>0</lateralMaxOffsetAngle>
|
||||
<lateralAngleIncrement>0</lateralAngleIncrement>
|
||||
<lateralOffsetMode>Alternating</lateralOffsetMode>
|
||||
|
||||
<!-- 纵向偏移配置(前后) -->
|
||||
<longitudinalInitialOffset>11</longitudinalInitialOffset>
|
||||
<longitudinalMinOffset>3</longitudinalMinOffset>
|
||||
<longitudinalMaxOffset>11</longitudinalMaxOffset>
|
||||
<longitudinalOffsetMode>Progressive</longitudinalOffsetMode>
|
||||
|
||||
<!-- 视觉效果 -->
|
||||
<spawnOffsetEffect>true</spawnOffsetEffect>
|
||||
<offsetEffectDef>Mote_Smoke</offsetEffectDef>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_SectorSurveillance">
|
||||
<projectileDef>Bullet_ARA_HiveCorvette</projectileDef>
|
||||
@@ -635,6 +695,23 @@
|
||||
<shotCount>1</shotCount> <!-- 发射次数 -->
|
||||
<shotInterval>0.5</shotInterval> <!-- 发射间隔 -->
|
||||
<maxProjectiles>-1</maxProjectiles><!-- 最大射弹数量限制-->
|
||||
|
||||
<!-- 横向偏移配置(左右) -->
|
||||
<lateralOffsetDistance>13</lateralOffsetDistance>
|
||||
<lateralInitialOffsetAngle>0</lateralInitialOffsetAngle>
|
||||
<lateralMaxOffsetAngle>0</lateralMaxOffsetAngle>
|
||||
<lateralAngleIncrement>0</lateralAngleIncrement>
|
||||
<lateralOffsetMode>Alternating</lateralOffsetMode>
|
||||
|
||||
<!-- 纵向偏移配置(前后) -->
|
||||
<longitudinalInitialOffset>13</longitudinalInitialOffset>
|
||||
<longitudinalMinOffset>13</longitudinalMinOffset>
|
||||
<longitudinalMaxOffset>13</longitudinalMaxOffset>
|
||||
<longitudinalOffsetMode>Fixed</longitudinalOffsetMode>
|
||||
|
||||
<!-- 视觉效果 -->
|
||||
<spawnOffsetEffect>true</spawnOffsetEffect>
|
||||
<offsetEffectDef>Mote_SparkSimple</offsetEffectDef>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
@@ -685,6 +762,23 @@
|
||||
<shotCount>10</shotCount> <!-- 发射次数 -->
|
||||
<shotInterval>0.5</shotInterval> <!-- 发射间隔 -->
|
||||
<maxProjectiles>-1</maxProjectiles><!-- 最大射弹数量限制-->
|
||||
|
||||
<!-- 横向偏移配置(左右) -->
|
||||
<lateralOffsetDistance>13</lateralOffsetDistance>
|
||||
<lateralInitialOffsetAngle>0</lateralInitialOffsetAngle>
|
||||
<lateralMaxOffsetAngle>0</lateralMaxOffsetAngle>
|
||||
<lateralAngleIncrement>0</lateralAngleIncrement>
|
||||
<lateralOffsetMode>Alternating</lateralOffsetMode>
|
||||
|
||||
<!-- 纵向偏移配置(前后) -->
|
||||
<longitudinalInitialOffset>13</longitudinalInitialOffset>
|
||||
<longitudinalMinOffset>13</longitudinalMinOffset>
|
||||
<longitudinalMaxOffset>13</longitudinalMaxOffset>
|
||||
<longitudinalOffsetMode>Fixed</longitudinalOffsetMode>
|
||||
|
||||
<!-- 视觉效果 -->
|
||||
<spawnOffsetEffect>true</spawnOffsetEffect>
|
||||
<offsetEffectDef>Mote_SparkSimple</offsetEffectDef>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
@@ -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|",
|
||||
|
||||
@@ -9,16 +9,33 @@ namespace ArachnaeSwarm
|
||||
{
|
||||
public CompProperties_GroundStrafing Props => (CompProperties_GroundStrafing)props;
|
||||
|
||||
// 简化的扫射状态 - 只存储需要射击的单元格
|
||||
// 简化的扫射状态
|
||||
private List<IntVec3> confirmedTargetCells = new List<IntVec3>();
|
||||
private HashSet<IntVec3> firedCells = new HashSet<IntVec3>();
|
||||
|
||||
// 横向偏移状态(左右)
|
||||
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<IntVec3> 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 // 正弦波(平滑波动)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<Pawn> GetEnemiesInSector()
|
||||
{
|
||||
List<Pawn> enemies = new List<Pawn>();
|
||||
@@ -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);
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user