2
@@ -188,7 +188,35 @@
|
|||||||
</li>
|
</li>
|
||||||
</comps>
|
</comps>
|
||||||
</AbilityDef>
|
</AbilityDef>
|
||||||
|
<AbilityDef>
|
||||||
|
<defName>WULA_ClearFlightPath</defName>
|
||||||
|
<label>航道净空</label>
|
||||||
|
<description>使近地轨道上的舰队离开,以使得其他乌拉帝国舰队可以入场</description>
|
||||||
|
<iconPath>Wula/UI/Abilities/WULA_CallConstructionShip</iconPath>
|
||||||
|
<cooldownTicksRange>1</cooldownTicksRange>
|
||||||
|
<hotKey>Misc12</hotKey>
|
||||||
|
<casterMustBeCapableOfViolence>false</casterMustBeCapableOfViolence>
|
||||||
|
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
|
||||||
|
<disableGizmoWhileUndrafted>false</disableGizmoWhileUndrafted>
|
||||||
|
<verbProperties>
|
||||||
|
<verbClass>Verb_CastAbility</verbClass>
|
||||||
|
<drawAimPie>true</drawAimPie>
|
||||||
|
<requireLineOfSight>false</requireLineOfSight>
|
||||||
|
<nonInterruptingSelfCast>true</nonInterruptingSelfCast>
|
||||||
|
<warmupTime>2</warmupTime>
|
||||||
|
<range>-1</range>
|
||||||
|
<targetable>false</targetable>
|
||||||
|
<targetParams>
|
||||||
|
<canTargetLocations>false</canTargetLocations>
|
||||||
|
<canTargetSelf>true</canTargetSelf>
|
||||||
|
</targetParams>
|
||||||
|
</verbProperties>
|
||||||
|
|
||||||
|
<comps>
|
||||||
|
<li Class="WulaFallenEmpire.CompProperties_DestroyFlyOverByFacilities" />
|
||||||
|
</comps>
|
||||||
|
</AbilityDef>
|
||||||
|
|
||||||
<!-- 飞行器 -->
|
<!-- 飞行器 -->
|
||||||
<AbilityDef>
|
<AbilityDef>
|
||||||
<defName>WULA_Spawn_Fighter_Drone_Laser</defName>
|
<defName>WULA_Spawn_Fighter_Drone_Laser</defName>
|
||||||
|
|||||||
@@ -337,4 +337,21 @@
|
|||||||
</li>
|
</li>
|
||||||
</children>
|
</children>
|
||||||
</EffecterDef>
|
</EffecterDef>
|
||||||
|
|
||||||
|
<DamageDef ParentName="Bullet">
|
||||||
|
<defName>Damage_WULA_RW_Unlimit_Penetrating_Beam_Cannon</defName>
|
||||||
|
<label>贯杀炮切割束</label>
|
||||||
|
<buildingDamageFactorPassable>0</buildingDamageFactorPassable>
|
||||||
|
<soundExplosion>Explosion_Vaporize</soundExplosion>
|
||||||
|
</DamageDef>
|
||||||
|
|
||||||
|
|
||||||
|
<DamageDef ParentName="Bomb">
|
||||||
|
<defName>WULA_GiantBomb</defName>
|
||||||
|
<label>大型爆炸</label>
|
||||||
|
<defaultDamage>150</defaultDamage>
|
||||||
|
<defaultStoppingPower>2.0</defaultStoppingPower>
|
||||||
|
<defaultArmorPenetration>1.30</defaultArmorPenetration>
|
||||||
|
<explosionCenterEffecter>GiantExplosion</explosionCenterEffecter>
|
||||||
|
</DamageDef>
|
||||||
</Defs>
|
</Defs>
|
||||||
@@ -102,7 +102,9 @@
|
|||||||
<abilityDefs>
|
<abilityDefs>
|
||||||
<li>WULA_CallMotherShip</li>
|
<li>WULA_CallMotherShip</li>
|
||||||
<li>WULA_CallBattleShip</li>
|
<li>WULA_CallBattleShip</li>
|
||||||
|
<li>WULA_CallAircraftCarrier</li>
|
||||||
<li>WULA_CallConstructionShip</li>
|
<li>WULA_CallConstructionShip</li>
|
||||||
|
<li>WULA_ClearFlightPath</li>
|
||||||
</abilityDefs>
|
</abilityDefs>
|
||||||
</li>
|
</li>
|
||||||
</comps>
|
</comps>
|
||||||
|
|||||||
@@ -1,10 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<Defs>
|
<Defs>
|
||||||
<IncidentDef ParentName="GiveQuestBase">
|
<IncidentDef>
|
||||||
<defName>WULA_GiveQuest_Intro_Spy</defName>
|
<defName>WULA_GiveQuest_Intro_Spy</defName>
|
||||||
|
<category>GiveQuest</category>
|
||||||
<label>SPY</label>
|
<label>SPY</label>
|
||||||
<questScriptDef>WULA_Intro_Spy</questScriptDef> <!-- 通向具体的questScrip -->
|
<targetTags>
|
||||||
<baseChance>0</baseChance> <!-- given by a special storyteller comp -->
|
<li>Map_PlayerHome</li>
|
||||||
|
</targetTags>
|
||||||
|
<questScriptDef>WULA_Intro_Spy</questScriptDef>
|
||||||
|
<workerClass>IncidentWorker_GiveQuest</workerClass>
|
||||||
|
<baseChance>0</baseChance>
|
||||||
|
<requireColonistsPresent>True</requireColonistsPresent>
|
||||||
</IncidentDef>
|
</IncidentDef>
|
||||||
|
|
||||||
<QuestScriptDef>
|
<QuestScriptDef>
|
||||||
|
|||||||
@@ -181,15 +181,17 @@
|
|||||||
<numIncidentsRange>1</numIncidentsRange>
|
<numIncidentsRange>1</numIncidentsRange>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li Class="WulaFallenEmpire.StorytellerComp_SingleOnceFixed_FactionFilter">
|
<!-- Odyssey grav engine quest -->
|
||||||
<incident>WULA_GiveQuest_Intro_Spy</incident>
|
<li Class="StorytellerCompProperties_ImportantQuest">
|
||||||
<fireAfterDaysPassed>6</fireAfterDaysPassed>
|
<fireAfterDaysPassed>1</fireAfterDaysPassed>
|
||||||
<excludedFactionTypes>
|
<questIncident MayRequire="Ludeon.RimWorld.Odyssey">WULA_GiveQuest_Intro_Spy</questIncident>
|
||||||
<li>WULA_Awakened_Synth</li>
|
<questDef MayRequire="Ludeon.RimWorld.Odyssey">WULA_Intro_Spy</questDef>
|
||||||
</excludedFactionTypes>
|
<allowedTargetTags>
|
||||||
<!-- <allowedFactionTypes>
|
<li>Map_PlayerHome</li>
|
||||||
<li>WULA_Awakened_Synth</li>
|
</allowedTargetTags>
|
||||||
</allowedFactionTypes> -->
|
<enableIfAnyModActive>
|
||||||
|
<li>Ludeon.RimWorld.Odyssey</li>
|
||||||
|
</enableIfAnyModActive>
|
||||||
</li>
|
</li>
|
||||||
</comps>
|
</comps>
|
||||||
</StorytellerDef>
|
</StorytellerDef>
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
<canTargetLocations>true</canTargetLocations>
|
<canTargetLocations>true</canTargetLocations>
|
||||||
</targetParams>
|
</targetParams>
|
||||||
<pathWidth>2</pathWidth>
|
<pathWidth>2</pathWidth>
|
||||||
<damageDef>BombSuper</damageDef>
|
<damageDef>Damage_WULA_RW_Unlimit_Penetrating_Beam_Cannon</damageDef>
|
||||||
<damageAmount>450</damageAmount>
|
<damageAmount>450</damageAmount>
|
||||||
<armorPenetration>2</armorPenetration>
|
<armorPenetration>2</armorPenetration>
|
||||||
<beamDefName>WULA_ExcaliburBeam</beamDefName>
|
<beamDefName>WULA_ExcaliburBeam</beamDefName>
|
||||||
@@ -224,7 +224,7 @@
|
|||||||
<defaultCooldownTime>16</defaultCooldownTime>
|
<defaultCooldownTime>16</defaultCooldownTime>
|
||||||
<isMortar>true</isMortar>
|
<isMortar>true</isMortar>
|
||||||
<requireLineOfSight>false</requireLineOfSight>
|
<requireLineOfSight>false</requireLineOfSight>
|
||||||
<minRange>4</minRange>
|
<minRange>12</minRange>
|
||||||
<range>120</range>
|
<range>120</range>
|
||||||
<burstShotCount>3</burstShotCount>
|
<burstShotCount>3</burstShotCount>
|
||||||
<ticksBetweenBurstShots>12</ticksBetweenBurstShots>
|
<ticksBetweenBurstShots>12</ticksBetweenBurstShots>
|
||||||
@@ -247,7 +247,7 @@
|
|||||||
</graphicData>
|
</graphicData>
|
||||||
<thingClass>WulaFallenEmpire.Projectile_ExplosiveWithTrail</thingClass>
|
<thingClass>WulaFallenEmpire.Projectile_ExplosiveWithTrail</thingClass>
|
||||||
<projectile>
|
<projectile>
|
||||||
<damageDef>Bomb</damageDef>
|
<damageDef>WULA_GiantBomb</damageDef>
|
||||||
<damageAmountBase>45</damageAmountBase>
|
<damageAmountBase>45</damageAmountBase>
|
||||||
<speed>60</speed>
|
<speed>60</speed>
|
||||||
<explosionRadius>6</explosionRadius>
|
<explosionRadius>6</explosionRadius>
|
||||||
@@ -373,27 +373,55 @@
|
|||||||
<li>
|
<li>
|
||||||
<verbClass>Verb_Shoot</verbClass>
|
<verbClass>Verb_Shoot</verbClass>
|
||||||
<hasStandardCommand>true</hasStandardCommand>
|
<hasStandardCommand>true</hasStandardCommand>
|
||||||
<defaultProjectile>Bullet_WULA_WM_Panzer_Turret</defaultProjectile>
|
<defaultProjectile>Bullet_Wula_AI_Heavy_Panzer_Turret_Weapon</defaultProjectile>
|
||||||
<warmupTime>0</warmupTime>
|
<warmupTime>0</warmupTime>
|
||||||
<defaultCooldownTime>4</defaultCooldownTime>
|
|
||||||
<minRange>5.9</minRange>
|
<minRange>5.9</minRange>
|
||||||
<range>60</range>
|
<range>60</range>
|
||||||
|
<defaultCooldownTime>3</defaultCooldownTime>
|
||||||
|
<burstShotCount>6</burstShotCount>
|
||||||
|
<ticksBetweenBurstShots>6</ticksBetweenBurstShots>
|
||||||
<requireLineOfSight>true</requireLineOfSight>
|
<requireLineOfSight>true</requireLineOfSight>
|
||||||
<burstShotCount>1</burstShotCount>
|
|
||||||
<forcedMissRadius>0.1</forcedMissRadius>
|
<forcedMissRadius>0.1</forcedMissRadius>
|
||||||
<soundCast>WULA_MW_Mass_Drivers_Shootingsound</soundCast>
|
<soundCast>Shot_ChargeRifle</soundCast>
|
||||||
<soundCastTail>GunTail_Heavy</soundCastTail>
|
<soundCastTail>GunTail_Heavy</soundCastTail>
|
||||||
<muzzleFlashScale>18</muzzleFlashScale>
|
<muzzleFlashScale>18</muzzleFlashScale>
|
||||||
</li>
|
</li>
|
||||||
</verbs>
|
</verbs>
|
||||||
</ThingDef>
|
</ThingDef>
|
||||||
|
<ThingDef ParentName="BaseBullet">
|
||||||
|
<defName>Bullet_Wula_AI_Heavy_Panzer_Turret_Weapon</defName>
|
||||||
|
<label>青金石自动炮炮弹</label>
|
||||||
|
<graphicData>
|
||||||
|
<texPath>Wula/Projectile/WULA_Bullet_ChargeLanceShot_Red</texPath>
|
||||||
|
<graphicClass>Graphic_Single</graphicClass>
|
||||||
|
<shaderType>MoteGlow</shaderType>
|
||||||
|
<drawSize>2.5</drawSize>
|
||||||
|
</graphicData>
|
||||||
|
<thingClass>WulaFallenEmpire.Projectile_ExplosiveWithTrail</thingClass>
|
||||||
|
<projectile>
|
||||||
|
<damageDef>Bullet</damageDef>
|
||||||
|
<damageAmountBase>12</damageAmountBase>
|
||||||
|
<speed>90</speed>
|
||||||
|
<explosionRadius>2.1</explosionRadius>
|
||||||
|
<arcHeightFactor>0</arcHeightFactor>
|
||||||
|
<soundExplode>Explosion_Rocket</soundExplode>
|
||||||
|
<armorPenetrationBase>1.5</armorPenetrationBase>
|
||||||
|
<screenShakeFactor>0.1</screenShakeFactor>
|
||||||
|
</projectile>
|
||||||
|
<modExtensions>
|
||||||
|
<li Class="WulaFallenEmpire.TrackingBulletDef">
|
||||||
|
<tailFleckDef>WULA_GunTail_Lighting</tailFleckDef>
|
||||||
|
<fleckMakeFleckTickMax>1</fleckMakeFleckTickMax>
|
||||||
|
</li>
|
||||||
|
</modExtensions>
|
||||||
|
</ThingDef>
|
||||||
<ThingDef ParentName="WULA_ExperienceCore_Weapon_Ranged">
|
<ThingDef ParentName="WULA_ExperienceCore_Weapon_Ranged">
|
||||||
<defName>Wula_AI_Heavy_Panzer_Missile_Weapon</defName>
|
<defName>Wula_AI_Heavy_Panzer_Main_Weapon</defName>
|
||||||
<label>WLl-2"月长石"</label>
|
<label>SDm-2"月长石"</label>
|
||||||
<description>HAp-6"战车"在侧面挂载的导弹系统,需要瞄准较长的时间,但是可以一次性发射大量的导弹。</description>
|
<description>HAp-6"战车"车体正面的突击炮,射程很短并且只能在静止状态开火,但是威力巨大,专门用于对付坚固的工事和成片的人群。</description>
|
||||||
<tickerType>Normal</tickerType>
|
<tickerType>Normal</tickerType>
|
||||||
<techLevel>Spacer</techLevel>
|
<techLevel>Spacer</techLevel>
|
||||||
<uiIconPath>Wula/Projectile/WULA_Loitering_Munition</uiIconPath>
|
<uiIconPath>Wula/Projectile/WULA_Shrapnel</uiIconPath>
|
||||||
<graphicData>
|
<graphicData>
|
||||||
<texPath>Wula/Weapon/WULA_Weapon_Empty</texPath>
|
<texPath>Wula/Weapon/WULA_Weapon_Empty</texPath>
|
||||||
<graphicClass>Graphic_Single</graphicClass>
|
<graphicClass>Graphic_Single</graphicClass>
|
||||||
@@ -415,18 +443,15 @@
|
|||||||
<li>
|
<li>
|
||||||
<verbClass>Verb_Shoot</verbClass>
|
<verbClass>Verb_Shoot</verbClass>
|
||||||
<hasStandardCommand>true</hasStandardCommand>
|
<hasStandardCommand>true</hasStandardCommand>
|
||||||
<!-- <defaultProjectile>Bullet_AssaultRifle</defaultProjectile> -->
|
<defaultProjectile>Bullet_Wula_AI_Heavy_Panzer_Main_Weapon</defaultProjectile>
|
||||||
<defaultProjectile>Bullet_WULA_RW_Base_Loitering_Munition</defaultProjectile>
|
<warmupTime>2</warmupTime>
|
||||||
<warmupTime>5</warmupTime>
|
<range>21</range>
|
||||||
<range>40</range>
|
<burstShotCount>1</burstShotCount>
|
||||||
<burstShotCount>6</burstShotCount>
|
<forcedMissRadius>1</forcedMissRadius>
|
||||||
<ticksBetweenBurstShots>16</ticksBetweenBurstShots>
|
|
||||||
<soundCast>RocketswarmLauncher_Fire</soundCast>
|
<soundCast>RocketswarmLauncher_Fire</soundCast>
|
||||||
<soundCastTail>GunTail_Heavy</soundCastTail>
|
<soundCastTail>GunTail_Heavy</soundCastTail>
|
||||||
<targetParams>
|
<targetParams>
|
||||||
<canTargetPawns>true</canTargetPawns>
|
|
||||||
<canTargetLocations>true</canTargetLocations>
|
<canTargetLocations>true</canTargetLocations>
|
||||||
<canTargetBuildings>true</canTargetBuildings>
|
|
||||||
</targetParams>
|
</targetParams>
|
||||||
</li>
|
</li>
|
||||||
</verbs>
|
</verbs>
|
||||||
@@ -438,4 +463,33 @@
|
|||||||
<li>Wula_AI_Heavy_Panzer_Weapon</li>
|
<li>Wula_AI_Heavy_Panzer_Weapon</li>
|
||||||
</weaponTags>
|
</weaponTags>
|
||||||
</ThingDef>
|
</ThingDef>
|
||||||
|
<ThingDef ParentName="BaseBullet">
|
||||||
|
<defName>Bullet_Wula_AI_Heavy_Panzer_Main_Weapon</defName>
|
||||||
|
<label>月长石炮弹</label>
|
||||||
|
<graphicData>
|
||||||
|
<texPath>Wula/Projectile/WULA_Shrapnel</texPath>
|
||||||
|
<graphicClass>Graphic_Single</graphicClass>
|
||||||
|
<drawSize>(2,2)</drawSize>
|
||||||
|
</graphicData>
|
||||||
|
<thingClass>WulaFallenEmpire.Projectile_ExplosiveWithTrail</thingClass>
|
||||||
|
<projectile>
|
||||||
|
<damageDef>WULA_GiantBomb</damageDef>
|
||||||
|
<damageAmountBase>65</damageAmountBase>
|
||||||
|
<speed>25</speed>
|
||||||
|
<explosionRadius>6</explosionRadius>
|
||||||
|
<armorPenetrationBase>1.5</armorPenetrationBase>
|
||||||
|
<flyOverhead>true</flyOverhead>
|
||||||
|
<soundHitThickRoof>Artillery_HitThickRoof</soundHitThickRoof>
|
||||||
|
<soundExplode>MortarBomb_Explode</soundExplode>
|
||||||
|
<soundImpactAnticipate>MortarRound_PreImpact</soundImpactAnticipate>
|
||||||
|
<soundAmbient>MortarRound_Ambient</soundAmbient>
|
||||||
|
<stoppingPower>10</stoppingPower>
|
||||||
|
</projectile>
|
||||||
|
<modExtensions>
|
||||||
|
<li Class="WulaFallenEmpire.TrackingBulletDef">
|
||||||
|
<tailFleckDef>WULA_Smoke_Tail</tailFleckDef>
|
||||||
|
<fleckMakeFleckTickMax>1</fleckMakeFleckTickMax>
|
||||||
|
</li>
|
||||||
|
</modExtensions>
|
||||||
|
</ThingDef>
|
||||||
</Defs>
|
</Defs>
|
||||||
@@ -1053,8 +1053,8 @@
|
|||||||
</li>
|
</li>
|
||||||
<li Class="CompProperties_Shield">
|
<li Class="CompProperties_Shield">
|
||||||
<startingTicksToReset>36000</startingTicksToReset><!-- 10 mins -->
|
<startingTicksToReset>36000</startingTicksToReset><!-- 10 mins -->
|
||||||
<minDrawSize>4.2</minDrawSize>
|
<minDrawSize>5.2</minDrawSize>
|
||||||
<maxDrawSize>4.4</maxDrawSize>
|
<maxDrawSize>5.4</maxDrawSize>
|
||||||
<energyLossPerDamage>0.02</energyLossPerDamage>
|
<energyLossPerDamage>0.02</energyLossPerDamage>
|
||||||
<energyOnReset>4.0</energyOnReset>
|
<energyOnReset>4.0</energyOnReset>
|
||||||
<blocksRangedWeapons>false</blocksRangedWeapons>
|
<blocksRangedWeapons>false</blocksRangedWeapons>
|
||||||
|
|||||||
@@ -20,14 +20,6 @@
|
|||||||
<AircraftLaunched>已获得 {0} {1}</AircraftLaunched>
|
<AircraftLaunched>已获得 {0} {1}</AircraftLaunched>
|
||||||
<HangarDamaged>机库已损坏</HangarDamaged>
|
<HangarDamaged>机库已损坏</HangarDamaged>
|
||||||
|
|
||||||
<!-- Aircraft Strike Messages -->
|
|
||||||
<AircraftManagerNotFound>战机管理器未找到!</AircraftManagerNotFound>
|
|
||||||
<AircraftStrikeInitiated>空中打击已启动:{0}</AircraftStrikeInitiated>
|
|
||||||
<AircraftStrikeSuccess>空中打击:成功使用 {0} 只 {1}</AircraftStrikeSuccess>
|
|
||||||
<NoAvailableAircraft>没有可用的战机:{0}</NoAvailableAircraft>
|
|
||||||
<AircraftStrikeFailed>空中打击:{1} 没有可用的 {0}</AircraftStrikeFailed>
|
|
||||||
<NoAircraftForStrike>没有可用的 {0}</NoAircraftForStrike>
|
|
||||||
|
|
||||||
<!-- Mouse Overlay Text -->
|
<!-- Mouse Overlay Text -->
|
||||||
<AvailableAircraft>{0}:{1}</AvailableAircraft>
|
<AvailableAircraft>{0}:{1}</AvailableAircraft>
|
||||||
<CooldownAircraft>冷却中:{0}</CooldownAircraft>
|
<CooldownAircraft>冷却中:{0}</CooldownAircraft>
|
||||||
@@ -70,4 +62,28 @@
|
|||||||
<AircraftCooldownEnded>{0} 准备好再次进行打击</AircraftCooldownEnded>
|
<AircraftCooldownEnded>{0} 准备好再次进行打击</AircraftCooldownEnded>
|
||||||
<NoAircraftStatus>没有可用的战机</NoAircraftStatus>
|
<NoAircraftStatus>没有可用的战机</NoAircraftStatus>
|
||||||
<AircraftStatusLine>{0}:{1}/{2}(冷却中:{3})</AircraftStatusLine>
|
<AircraftStatusLine>{0}:{1}/{2}(冷却中:{3})</AircraftStatusLine>
|
||||||
|
|
||||||
|
<WULA_DestroyFlyOver>已净空航道,航道上的舰队正在回到高空轨道</WULA_DestroyFlyOver>
|
||||||
|
|
||||||
|
<!-- Aircraft Strike Ability -->
|
||||||
|
<WULA_AircraftManagerNotFound>战机管理器未找到</WULA_AircraftManagerNotFound>
|
||||||
|
<WULA_AircraftStrikeInitiated>{0}空袭已启动</WULA_AircraftStrikeInitiated>
|
||||||
|
<WULA_AircraftStrikeSuccess>使用了{0}架{1}执行空袭</WULA_AircraftStrikeSuccess>
|
||||||
|
<WULA_NoAvailableAircraft>没有可用的{0}</WULA_NoAvailableAircraft>
|
||||||
|
<WULA_AircraftStrikeFailed>无法为派系{1}使用{0}</WULA_AircraftStrikeFailed>
|
||||||
|
<WULA_UnknownFaction>未知派系</WULA_UnknownFaction>
|
||||||
|
<WULA_AircraftSystemNotReady>战机系统未就绪</WULA_AircraftSystemNotReady>
|
||||||
|
<WULA_NoAvailableAircraftType>没有可用的{0}</WULA_NoAvailableAircraftType>
|
||||||
|
<WULA_AircraftInsufficient>{0}数量不足 ({1}/{2})</WULA_AircraftInsufficient>
|
||||||
|
<WULA_AircraftOnCooldown>{0}正在冷却中</WULA_AircraftOnCooldown>
|
||||||
|
<WULA_AvailableAircraft>可用战机: {0}</WULA_AvailableAircraft>
|
||||||
|
<WULA_CooldownAircraft>冷却中: {0}</WULA_CooldownAircraft>
|
||||||
|
<WULA_CostPerUse>每次消耗: {0}</WULA_CostPerUse>
|
||||||
|
<WULA_NoAircraftForStrike>没有可用的战机执行空袭</WULA_NoAircraftForStrike>
|
||||||
|
<WULA_AircraftStatus>战机状态:</WULA_AircraftStatus>
|
||||||
|
<WULA_TotalAircraft>• 总数: {0}</WULA_TotalAircraft>
|
||||||
|
<WULA_ReadyAircraft>• 可用: {0}</WULA_ReadyAircraft>
|
||||||
|
<WULA_CooldownAircraftCount>• 冷却中: {0}</WULA_CooldownAircraftCount>
|
||||||
|
<WULA_AircraftRequirement>需要 {0} x{1}</WULA_AircraftRequirement>
|
||||||
|
<WULA_CooldownTime>冷却时间: {0} 小时</WULA_CooldownTime>
|
||||||
</LanguageData>
|
</LanguageData>
|
||||||
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 133 KiB |
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 108 KiB |
@@ -197,28 +197,6 @@ namespace WulaFallenEmpire
|
|||||||
return Mathf.Clamp01(currentFadeInTime / fadeInDuration);
|
return Mathf.Clamp01(currentFadeInTime / fadeInDuration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改后的淡出透明度属性
|
|
||||||
public float FadeOutAlpha
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (!useFadeOut || !fadeOutStarted) return 1f;
|
|
||||||
if (fadeOutCompleted) return 0f;
|
|
||||||
return Mathf.Clamp01(1f - (currentFadeOutTime / fadeOutDuration));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改后的总体透明度属性
|
|
||||||
public float OverallAlpha
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (!useFadeEffects) return 1f;
|
|
||||||
return FadeInAlpha * FadeOutAlpha;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增:计算剩余飞行时间(秒)
|
// 新增:计算剩余飞行时间(秒)
|
||||||
public float RemainingFlightTime
|
public float RemainingFlightTime
|
||||||
{
|
{
|
||||||
@@ -228,6 +206,151 @@ namespace WulaFallenEmpire
|
|||||||
return remainingProgress / (flightSpeed * 0.001f) * (1f / 60f);
|
return remainingProgress / (flightSpeed * 0.001f) * (1f / 60f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 修改后的紧急销毁方法 - 急速加速版本
|
||||||
|
public void EmergencyDestroy()
|
||||||
|
{
|
||||||
|
if (Destroyed || hasCompleted) return;
|
||||||
|
// 计算剩余进度
|
||||||
|
float remainingProgress = 1f - currentProgress;
|
||||||
|
|
||||||
|
// 计算需要的速度:确保在1秒内完成剩余进度
|
||||||
|
// 每帧增加 flightSpeed * 0.001,1秒60帧,所以需要:remainingProgress = flightSpeed * 0.001 * 60
|
||||||
|
// 因此:flightSpeed = remainingProgress / (0.001 * 60) = remainingProgress / 0.06
|
||||||
|
float requiredSpeed = remainingProgress / 0.06f;
|
||||||
|
|
||||||
|
// 设置新的飞行速度,确保至少是当前速度的2倍
|
||||||
|
flightSpeed = Mathf.Max(requiredSpeed, flightSpeed * 2f);
|
||||||
|
|
||||||
|
// 标记为紧急销毁状态
|
||||||
|
hasCompleted = false; // 确保可以继续飞行
|
||||||
|
|
||||||
|
Log.Message($"FlyOver emergency destroy: accelerating to complete in 1 second. " +
|
||||||
|
$"Current progress: {currentProgress:F2}, Required speed: {requiredSpeed:F2}, " +
|
||||||
|
$"Actual speed: {flightSpeed:F2}");
|
||||||
|
}
|
||||||
|
// 修改后的淡出透明度属性 - 紧急销毁时强制启用淡出
|
||||||
|
public float FadeOutAlpha
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
// 如果已经开始了淡出(包括紧急销毁),就应用淡出效果
|
||||||
|
if (!fadeOutStarted) return 1f;
|
||||||
|
if (fadeOutCompleted) return 0f;
|
||||||
|
return Mathf.Clamp01(1f - (currentFadeOutTime / fadeOutDuration));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 修改后的总体透明度属性 - 紧急销毁时强制计算淡出
|
||||||
|
public float OverallAlpha
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (!useFadeEffects && !fadeOutStarted) return 1f;
|
||||||
|
return FadeInAlpha * FadeOutAlpha;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 修改后的 Tick 方法,优化紧急销毁逻辑
|
||||||
|
protected override void Tick()
|
||||||
|
{
|
||||||
|
base.Tick();
|
||||||
|
if (!hasStarted || hasCompleted)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// 更新进场动画
|
||||||
|
if (useApproachAnimation && !approachCompleted)
|
||||||
|
{
|
||||||
|
currentApproachTime += 1f / 60f;
|
||||||
|
if (currentApproachTime >= approachDuration)
|
||||||
|
{
|
||||||
|
approachCompleted = true;
|
||||||
|
currentApproachTime = approachDuration;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新淡入效果(仅在启用时)
|
||||||
|
if (useFadeIn && !fadeInCompleted)
|
||||||
|
{
|
||||||
|
currentFadeInTime += 1f / 60f;
|
||||||
|
if (currentFadeInTime >= fadeInDuration)
|
||||||
|
{
|
||||||
|
fadeInCompleted = true;
|
||||||
|
currentFadeInTime = fadeInDuration;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新飞行进度
|
||||||
|
currentProgress += flightSpeed * 0.001f;
|
||||||
|
|
||||||
|
// 检查是否应该开始淡出(仅在启用时且未紧急销毁)
|
||||||
|
if (useFadeOut && !fadeOutStarted && currentProgress >= fadeOutStartProgress)
|
||||||
|
{
|
||||||
|
StartFadeOut();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新淡出效果(仅在启用时)
|
||||||
|
if (useFadeOut && fadeOutStarted && !fadeOutCompleted)
|
||||||
|
{
|
||||||
|
currentFadeOutTime += 1f / 60f;
|
||||||
|
if (currentFadeOutTime >= fadeOutDuration)
|
||||||
|
{
|
||||||
|
fadeOutCompleted = true;
|
||||||
|
currentFadeOutTime = fadeOutDuration;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新当前位置
|
||||||
|
UpdatePosition();
|
||||||
|
|
||||||
|
// 维持飞行音效
|
||||||
|
UpdateFlightSound();
|
||||||
|
|
||||||
|
// 检查是否到达终点
|
||||||
|
if (currentProgress >= 1f)
|
||||||
|
{
|
||||||
|
CompleteFlyOver();
|
||||||
|
return; // 立即返回,避免后续处理
|
||||||
|
}
|
||||||
|
|
||||||
|
// 生成飞行轨迹特效
|
||||||
|
CreateFlightEffects();
|
||||||
|
}
|
||||||
|
// 修改后的 CompleteFlyOver 方法,添加紧急销毁处理
|
||||||
|
private void CompleteFlyOver()
|
||||||
|
{
|
||||||
|
if (hasCompleted) return;
|
||||||
|
hasCompleted = true;
|
||||||
|
currentProgress = 1f;
|
||||||
|
|
||||||
|
// 生成内容物(如果需要)
|
||||||
|
if (spawnContentsOnImpact && innerContainer.Any)
|
||||||
|
{
|
||||||
|
SpawnContents();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 播放完成音效
|
||||||
|
if (def.skyfaller?.impactSound != null)
|
||||||
|
{
|
||||||
|
def.skyfaller.impactSound.PlayOneShot(
|
||||||
|
SoundInfo.InMap(new TargetInfo(endPosition, base.Map)));
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.Message($"FlyOver completed at {endPosition}");
|
||||||
|
|
||||||
|
// 立即销毁
|
||||||
|
Destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改后的 UpdatePosition 方法,添加安全检查
|
||||||
|
private void UpdatePosition()
|
||||||
|
{
|
||||||
|
if (hasCompleted) return;
|
||||||
|
|
||||||
|
Vector3 currentWorldPos = Vector3.Lerp(startPosition.ToVector3(), endPosition.ToVector3(), currentProgress);
|
||||||
|
IntVec3 newPos = currentWorldPos.ToIntVec3();
|
||||||
|
if (newPos != base.Position && newPos.InBounds(base.Map))
|
||||||
|
{
|
||||||
|
base.Position = newPos;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 新增:计算基于剩余距离的淡出持续时间
|
// 新增:计算基于剩余距离的淡出持续时间
|
||||||
private float CalculateDynamicFadeOutDuration()
|
private float CalculateDynamicFadeOutDuration()
|
||||||
@@ -337,63 +460,6 @@ namespace WulaFallenEmpire
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected override void Tick()
|
|
||||||
{
|
|
||||||
base.Tick();
|
|
||||||
if (!hasStarted || hasCompleted)
|
|
||||||
return;
|
|
||||||
// 更新进场动画
|
|
||||||
if (useApproachAnimation && !approachCompleted)
|
|
||||||
{
|
|
||||||
currentApproachTime += 1f / 60f;
|
|
||||||
if (currentApproachTime >= approachDuration)
|
|
||||||
{
|
|
||||||
approachCompleted = true;
|
|
||||||
currentApproachTime = approachDuration;
|
|
||||||
Log.Message("FlyOver approach animation completed");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 更新淡入效果(仅在启用时)
|
|
||||||
if (useFadeIn && !fadeInCompleted)
|
|
||||||
{
|
|
||||||
currentFadeInTime += 1f / 60f;
|
|
||||||
if (currentFadeInTime >= fadeInDuration)
|
|
||||||
{
|
|
||||||
fadeInCompleted = true;
|
|
||||||
currentFadeInTime = fadeInDuration;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 更新飞行进度
|
|
||||||
currentProgress += flightSpeed * 0.001f;
|
|
||||||
// 检查是否应该开始淡出(仅在启用时)
|
|
||||||
if (useFadeOut && !fadeOutStarted && currentProgress >= fadeOutStartProgress)
|
|
||||||
{
|
|
||||||
StartFadeOut();
|
|
||||||
}
|
|
||||||
// 更新淡出效果(仅在启用时)
|
|
||||||
if (useFadeOut && fadeOutStarted && !fadeOutCompleted)
|
|
||||||
{
|
|
||||||
currentFadeOutTime += 1f / 60f;
|
|
||||||
if (currentFadeOutTime >= fadeOutDuration)
|
|
||||||
{
|
|
||||||
fadeOutCompleted = true;
|
|
||||||
currentFadeOutTime = fadeOutDuration;
|
|
||||||
Log.Message("FlyOver fade out completed");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 更新当前位置
|
|
||||||
UpdatePosition();
|
|
||||||
// 维持飞行音效(在淡出时逐渐降低音量)
|
|
||||||
UpdateFlightSound();
|
|
||||||
// 检查是否到达终点
|
|
||||||
if (currentProgress >= 1f)
|
|
||||||
{
|
|
||||||
CompleteFlyOver();
|
|
||||||
}
|
|
||||||
// 生成飞行轨迹特效(在淡出时减少特效)
|
|
||||||
CreateFlightEffects();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增:开始淡出效果
|
// 新增:开始淡出效果
|
||||||
private void StartFadeOut()
|
private void StartFadeOut()
|
||||||
{
|
{
|
||||||
@@ -405,69 +471,21 @@ namespace WulaFallenEmpire
|
|||||||
Log.Message($"FlyOver started fade out at progress {currentProgress:F2}, duration: {fadeOutDuration:F2}s, remaining time: {RemainingFlightTime:F2}s");
|
Log.Message($"FlyOver started fade out at progress {currentProgress:F2}, duration: {fadeOutDuration:F2}s, remaining time: {RemainingFlightTime:F2}s");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdatePosition()
|
// 修改后的 UpdateFlightSound 方法,添加紧急销毁时的音效处理
|
||||||
{
|
|
||||||
Vector3 currentWorldPos = Vector3.Lerp(startPosition.ToVector3(), endPosition.ToVector3(), currentProgress);
|
|
||||||
IntVec3 newPos = currentWorldPos.ToIntVec3();
|
|
||||||
|
|
||||||
if (newPos != base.Position && newPos.InBounds(base.Map))
|
|
||||||
{
|
|
||||||
base.Position = newPos;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改后的音效更新方法
|
|
||||||
private void UpdateFlightSound()
|
private void UpdateFlightSound()
|
||||||
{
|
{
|
||||||
if (flightSoundPlaying != null)
|
if (flightSoundPlaying != null)
|
||||||
{
|
{
|
||||||
if (useFadeOut && fadeOutStarted)
|
// 紧急销毁时提高音效音量或频率
|
||||||
|
if (flightSoundPlaying != null && flightSoundPlaying.externalParams != null)
|
||||||
{
|
{
|
||||||
// 淡出时逐渐降低音效音量
|
// 可以根据需要调整紧急销毁时的音效参数
|
||||||
flightSoundPlaying.externalParams["VolumeFactor"] = FadeOutAlpha;
|
flightSoundPlaying.externalParams["VolumeFactor"] = 1f; // 保持最大音量
|
||||||
}
|
}
|
||||||
flightSoundPlaying?.Maintain();
|
flightSoundPlaying?.Maintain();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CompleteFlyOver()
|
|
||||||
{
|
|
||||||
hasCompleted = true;
|
|
||||||
currentProgress = 1f;
|
|
||||||
|
|
||||||
// 生成内容物(如果需要)
|
|
||||||
if (spawnContentsOnImpact && innerContainer.Any)
|
|
||||||
{
|
|
||||||
SpawnContents();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 播放完成音效
|
|
||||||
if (def.skyfaller?.impactSound != null)
|
|
||||||
{
|
|
||||||
def.skyfaller.impactSound.PlayOneShot(
|
|
||||||
SoundInfo.InMap(new TargetInfo(endPosition, base.Map)));
|
|
||||||
}
|
|
||||||
|
|
||||||
Log.Message($"FlyOver completed at {endPosition}");
|
|
||||||
|
|
||||||
// 销毁自身
|
|
||||||
Destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改后的紧急销毁方法
|
|
||||||
public void EmergencyDestroy()
|
|
||||||
{
|
|
||||||
if (useFadeOut && !fadeOutStarted)
|
|
||||||
{
|
|
||||||
// 如果还没有开始淡出,使用默认淡出时间
|
|
||||||
fadeOutStarted = true;
|
|
||||||
fadeOutDuration = defaultFadeOutDuration;
|
|
||||||
Log.Message($"FlyOver emergency destroy with default fade out: {defaultFadeOutDuration}s");
|
|
||||||
}
|
|
||||||
// 设置标记,下一帧会处理淡出
|
|
||||||
hasCompleted = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SpawnContents()
|
private void SpawnContents()
|
||||||
{
|
{
|
||||||
foreach (Thing thing in innerContainer)
|
foreach (Thing thing in innerContainer)
|
||||||
@@ -480,19 +498,21 @@ namespace WulaFallenEmpire
|
|||||||
innerContainer.Clear();
|
innerContainer.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改后的特效生成方法
|
// 修改后的 CreateFlightEffects 方法,添加紧急销毁时的特效增强
|
||||||
private void CreateFlightEffects()
|
private void CreateFlightEffects()
|
||||||
{
|
{
|
||||||
// 在飞行轨迹上生成粒子效果
|
// 在飞行轨迹上生成粒子效果
|
||||||
if (Rand.MTBEventOccurs(0.5f, 1f, 1f) && def.skyfaller?.motesPerCell > 0 && !fadeOutCompleted)
|
if (Rand.MTBEventOccurs(0.5f, 1f, 1f) && def.skyfaller?.motesPerCell > 0)
|
||||||
{
|
{
|
||||||
Vector3 effectPos = DrawPos;
|
Vector3 effectPos = DrawPos;
|
||||||
effectPos.y = AltitudeLayer.MoteOverhead.AltitudeFor();
|
effectPos.y = AltitudeLayer.MoteOverhead.AltitudeFor();
|
||||||
// 淡出时减少粒子效果强度
|
|
||||||
float effectIntensity = (useFadeOut && fadeOutStarted) ? FadeOutAlpha : 1f;
|
// 紧急销毁时增强粒子效果
|
||||||
|
float effectIntensity = 1f;
|
||||||
FleckMaker.ThrowSmoke(effectPos, base.Map, 1f * effectIntensity);
|
FleckMaker.ThrowSmoke(effectPos, base.Map, 1f * effectIntensity);
|
||||||
// 可选:根据速度生成更多效果
|
|
||||||
if (flightSpeed > 2f && !(useFadeOut && fadeOutStarted))
|
// 紧急销毁时生成更多效果
|
||||||
|
if (flightSpeed > 2f)
|
||||||
{
|
{
|
||||||
FleckMaker.ThrowAirPuffUp(effectPos, base.Map);
|
FleckMaker.ThrowAirPuffUp(effectPos, base.Map);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace WulaFallenEmpire
|
|||||||
|
|
||||||
if (aircraftManager == null)
|
if (aircraftManager == null)
|
||||||
{
|
{
|
||||||
Log.Error("AircraftManagerNotFound".Translate());
|
Log.Error("WULA_AircraftManagerNotFound".Translate());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,13 +39,13 @@ namespace WulaFallenEmpire
|
|||||||
if (aircraftManager.TryUseAircraft(Props.requiredAircraftType, Props.aircraftsPerUse, parent.pawn.Faction, Props.aircraftCooldownTicks))
|
if (aircraftManager.TryUseAircraft(Props.requiredAircraftType, Props.aircraftsPerUse, parent.pawn.Faction, Props.aircraftCooldownTicks))
|
||||||
{
|
{
|
||||||
// 成功消耗战机,发送消息
|
// 成功消耗战机,发送消息
|
||||||
Messages.Message("AircraftStrikeInitiated".Translate(Props.requiredAircraftType.LabelCap), MessageTypeDefOf.PositiveEvent);
|
Messages.Message("WULA_AircraftStrikeInitiated".Translate(Props.requiredAircraftType.LabelCap), MessageTypeDefOf.PositiveEvent);
|
||||||
Log.Message("AircraftStrikeSuccess".Translate(Props.aircraftsPerUse, Props.requiredAircraftType.LabelCap));
|
Log.Message("WULA_AircraftStrikeSuccess".Translate(Props.aircraftsPerUse, Props.requiredAircraftType.LabelCap));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Messages.Message("NoAvailableAircraft".Translate(Props.requiredAircraftType.LabelCap), MessageTypeDefOf.NegativeEvent);
|
Messages.Message("WULA_NoAvailableAircraft".Translate(Props.requiredAircraftType.LabelCap), MessageTypeDefOf.NegativeEvent);
|
||||||
Log.Warning("AircraftStrikeFailed".Translate(Props.requiredAircraftType.LabelCap, parent.pawn.Faction?.Name ?? "UnknownFaction".Translate()));
|
Log.Warning("WULA_AircraftStrikeFailed".Translate(Props.requiredAircraftType.LabelCap, parent.pawn.Faction?.Name ?? "WULA_UnknownFaction".Translate()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,6 +59,44 @@ namespace WulaFallenEmpire
|
|||||||
aircraftManager.HasAvailableAircraft(Props.requiredAircraftType, Props.aircraftsPerUse, parent.pawn.Faction);
|
aircraftManager.HasAvailableAircraft(Props.requiredAircraftType, Props.aircraftsPerUse, parent.pawn.Faction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 关键修改:重写 GizmoDisabled 方法,在不满足条件时禁用按钮
|
||||||
|
public override bool GizmoDisabled(out string reason)
|
||||||
|
{
|
||||||
|
// 先检查基础条件
|
||||||
|
if (base.GizmoDisabled(out reason))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
// 检查战机可用性
|
||||||
|
WorldComponent_AircraftManager aircraftManager = Find.World.GetComponent<WorldComponent_AircraftManager>();
|
||||||
|
if (aircraftManager == null)
|
||||||
|
{
|
||||||
|
reason = "WULA_AircraftSystemNotReady".Translate();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!aircraftManager.HasAvailableAircraft(Props.requiredAircraftType, Props.aircraftsPerUse, parent.pawn.Faction))
|
||||||
|
{
|
||||||
|
int available = aircraftManager.GetAvailableAircraftCount(Props.requiredAircraftType, parent.pawn.Faction);
|
||||||
|
int total = aircraftManager.GetTotalAircraftCount(Props.requiredAircraftType, parent.pawn.Faction);
|
||||||
|
|
||||||
|
if (available == 0 && total == 0)
|
||||||
|
{
|
||||||
|
reason = "WULA_NoAvailableAircraftType".Translate(Props.requiredAircraftType.LabelCap);
|
||||||
|
}
|
||||||
|
else if (available < Props.aircraftsPerUse)
|
||||||
|
{
|
||||||
|
reason = "WULA_AircraftInsufficient".Translate(Props.requiredAircraftType.LabelCap, available, Props.aircraftsPerUse);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
reason = "WULA_AircraftOnCooldown".Translate(Props.requiredAircraftType.LabelCap);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public override string ExtraLabelMouseAttachment(LocalTargetInfo target)
|
public override string ExtraLabelMouseAttachment(LocalTargetInfo target)
|
||||||
{
|
{
|
||||||
WorldComponent_AircraftManager aircraftManager = Find.World.GetComponent<WorldComponent_AircraftManager>();
|
WorldComponent_AircraftManager aircraftManager = Find.World.GetComponent<WorldComponent_AircraftManager>();
|
||||||
@@ -73,9 +111,9 @@ namespace WulaFallenEmpire
|
|||||||
string cooldownSymbols = GetAircraftSymbols(onCooldown, "◇");
|
string cooldownSymbols = GetAircraftSymbols(onCooldown, "◇");
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.AppendLine("AvailableAircraft".Translate(Props.requiredAircraftType.LabelCap, availableSymbols));
|
sb.AppendLine("WULA_AvailableAircraft".Translate(availableSymbols));
|
||||||
sb.AppendLine("CooldownAircraft".Translate(cooldownSymbols));
|
sb.AppendLine("WULA_CooldownAircraft".Translate(cooldownSymbols));
|
||||||
sb.Append("CostPerUse".Translate(Props.aircraftsPerUse));
|
sb.Append("WULA_CostPerUse".Translate(Props.aircraftsPerUse));
|
||||||
|
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
@@ -86,18 +124,16 @@ namespace WulaFallenEmpire
|
|||||||
// 生成飞机符号表示
|
// 生成飞机符号表示
|
||||||
private string GetAircraftSymbols(int count, string symbol)
|
private string GetAircraftSymbols(int count, string symbol)
|
||||||
{
|
{
|
||||||
if (count <= 0) return "—"; // 无飞机时显示破折号
|
if (count <= 0) return "—";
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
int displayCount = count;
|
int displayCount = count;
|
||||||
|
|
||||||
// 如果数量过多,用数字+符号表示
|
|
||||||
if (count > 10)
|
if (count > 10)
|
||||||
{
|
{
|
||||||
return $"{count}{symbol}";
|
return $"{count}{symbol}";
|
||||||
}
|
}
|
||||||
|
|
||||||
// 直接显示符号
|
|
||||||
for (int i = 0; i < displayCount; i++)
|
for (int i = 0; i < displayCount; i++)
|
||||||
{
|
{
|
||||||
sb.Append(symbol);
|
sb.Append(symbol);
|
||||||
@@ -117,7 +153,7 @@ namespace WulaFallenEmpire
|
|||||||
{
|
{
|
||||||
if (throwMessages)
|
if (throwMessages)
|
||||||
{
|
{
|
||||||
Messages.Message("NoAircraftForStrike".Translate(Props.requiredAircraftType.LabelCap), MessageTypeDefOf.RejectInput);
|
Messages.Message("WULA_NoAircraftForStrike".Translate(), MessageTypeDefOf.RejectInput);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -140,11 +176,12 @@ namespace WulaFallenEmpire
|
|||||||
float cooldownHours = TicksToHours(Props.aircraftCooldownTicks);
|
float cooldownHours = TicksToHours(Props.aircraftCooldownTicks);
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.AppendLine("AircraftStatusTooltip".Translate());
|
sb.AppendLine("WULA_AircraftStatus".Translate());
|
||||||
sb.AppendLine("• " + "TotalAircraft".Translate(total));
|
sb.AppendLine("WULA_TotalAircraft".Translate(total));
|
||||||
sb.AppendLine("• " + "ReadyAircraft".Translate(available));
|
sb.AppendLine("WULA_ReadyAircraft".Translate(available));
|
||||||
sb.AppendLine("• " + "CooldownAircraft".Translate(onCooldown));
|
sb.AppendLine("WULA_CooldownAircraftCount".Translate(onCooldown));
|
||||||
sb.AppendLine("AircraftAbilityDescription".Translate(Props.requiredAircraftType.LabelCap, Props.aircraftsPerUse, cooldownHours.ToString("F1")));
|
sb.AppendLine("WULA_AircraftRequirement".Translate(Props.requiredAircraftType.LabelCap, Props.aircraftsPerUse));
|
||||||
|
sb.AppendLine("WULA_CooldownTime".Translate(cooldownHours.ToString("F1")));
|
||||||
|
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
@@ -155,7 +192,6 @@ namespace WulaFallenEmpire
|
|||||||
// 将 tick 转换为小时
|
// 将 tick 转换为小时
|
||||||
private float TicksToHours(int ticks)
|
private float TicksToHours(int ticks)
|
||||||
{
|
{
|
||||||
// RimWorld 中 1 小时 = 2500 tick
|
|
||||||
return ticks / 2500f;
|
return ticks / 2500f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using RimWorld;
|
||||||
|
using Verse;
|
||||||
|
|
||||||
|
namespace WulaFallenEmpire
|
||||||
|
{
|
||||||
|
// CompProperties 定义
|
||||||
|
public class CompProperties_DestroyFlyOverByFacilities : CompProperties_AbilityEffect
|
||||||
|
{
|
||||||
|
public CompProperties_DestroyFlyOverByFacilities()
|
||||||
|
{
|
||||||
|
compClass = typeof(CompAbilityEffect_DestroyFlyOverByFacilities);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comp 实现
|
||||||
|
public class CompAbilityEffect_DestroyFlyOverByFacilities : CompAbilityEffect
|
||||||
|
{
|
||||||
|
public new CompProperties_DestroyFlyOverByFacilities Props => (CompProperties_DestroyFlyOverByFacilities)props;
|
||||||
|
|
||||||
|
public override void Apply(LocalTargetInfo target, LocalTargetInfo dest)
|
||||||
|
{
|
||||||
|
base.Apply(target, dest);
|
||||||
|
|
||||||
|
if (parent.pawn?.Map == null) return;
|
||||||
|
|
||||||
|
// 销毁所有 FlyOver 物体
|
||||||
|
DestroyAllFlyOvers();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 销毁所有 FlyOver
|
||||||
|
private void DestroyAllFlyOvers()
|
||||||
|
{
|
||||||
|
List<Thing> flyOvers = new List<Thing>();
|
||||||
|
|
||||||
|
// 获取地图上所有的 FlyOver
|
||||||
|
foreach (Thing thing in parent.pawn.Map.listerThings.AllThings)
|
||||||
|
{
|
||||||
|
if (thing is FlyOver flyOver)
|
||||||
|
{
|
||||||
|
flyOvers.Add(flyOver);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 销毁找到的 FlyOver
|
||||||
|
foreach (FlyOver flyOver in flyOvers)
|
||||||
|
{
|
||||||
|
flyOver.EmergencyDestroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (flyOvers.Count > 0)
|
||||||
|
{
|
||||||
|
Messages.Message($"WULA_DestroyFlyOver".Translate(), parent.pawn, MessageTypeDefOf.PositiveEvent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -127,6 +127,7 @@
|
|||||||
<Compile Include="Flyover\WULA_AircraftHangar\CompAircraftHangar.cs" />
|
<Compile Include="Flyover\WULA_AircraftHangar\CompAircraftHangar.cs" />
|
||||||
<Compile Include="Flyover\WULA_AircraftHangar\WorldComponent_AircraftManager.cs" />
|
<Compile Include="Flyover\WULA_AircraftHangar\WorldComponent_AircraftManager.cs" />
|
||||||
<Compile Include="Flyover\WULA_BlockedByFlyOverFacility\CompAbilityEffect_BlockedByFlyOverFacility.cs" />
|
<Compile Include="Flyover\WULA_BlockedByFlyOverFacility\CompAbilityEffect_BlockedByFlyOverFacility.cs" />
|
||||||
|
<Compile Include="Flyover\WULA_DestroyFlyOverByFacilities\CompProperties_DestroyFlyOverByFacilities.cs" />
|
||||||
<Compile Include="Flyover\WULA_FlyOverDropPod\CompProperties_FlyOverDropPod.cs" />
|
<Compile Include="Flyover\WULA_FlyOverDropPod\CompProperties_FlyOverDropPod.cs" />
|
||||||
<Compile Include="Flyover\WULA_FlyOverEscort\CompFlyOverEscort.cs" />
|
<Compile Include="Flyover\WULA_FlyOverEscort\CompFlyOverEscort.cs" />
|
||||||
<Compile Include="Flyover\WULA_FlyOverEscort\CompProperties_FlyOverEscort.cs" />
|
<Compile Include="Flyover\WULA_FlyOverEscort\CompProperties_FlyOverEscort.cs" />
|
||||||
|
|||||||