This commit is contained in:
2025-11-11 17:31:52 +08:00
parent 4a48d5093d
commit 40b0cdbb05
13 changed files with 376 additions and 811 deletions

View File

@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<!-- 悬浮飞行 -->
<AnimationDef>
<defName>WULA_Hover_FlyEast</defName>
<durationTicks>60</durationTicks>
<keyframeParts>
<!-- <li>
<key>ARA_Flight_Attachment</key>
<value>
<keyframes>
<li><graphicState>ARA_FlyEast_0</graphicState><tick>6</tick></li>
<li><graphicState>ARA_FlyEast_1</graphicState><tick>12</tick></li>
</keyframes>
</value>
</li> -->
<li>
<key>Root</key>
<value><workerType>AnimationWorker_Keyframes</workerType><keyframes>
<li><tick>0</tick><offset>(0,0,-0.05)</offset></li>
<li><tick>30</tick><offset>(0,0,0.05)</offset></li>
<li><tick>60</tick><offset>(0,0,-0.05)</offset></li>
</keyframes></value>
</li>
</keyframeParts>
</AnimationDef>
<AnimationDef>
<defName>WULA_Hover_FlyNorth</defName>
<durationTicks>60</durationTicks>
<keyframeParts>
<!-- <li>
<key>ARA_Flight_Attachment</key>
<value>
<keyframes>
<li><graphicState>ARA_FlyNorth_0</graphicState><tick>6</tick></li>
<li><graphicState>ARA_FlyNorth_1</graphicState><tick>12</tick></li>
</keyframes>
</value>
</li> -->
<li>
<key>Root</key>
<value><workerType>AnimationWorker_Keyframes</workerType><keyframes>
<li><tick>0</tick><offset>(0,0,-0.05)</offset></li>
<li><tick>30</tick><offset>(0,0,0.05)</offset></li>
<li><tick>60</tick><offset>(0,0,-0.05)</offset></li>
</keyframes></value>
</li>
</keyframeParts>
</AnimationDef>
<AnimationDef>
<defName>WULA_Hover_FlySouth</defName>
<durationTicks>60</durationTicks>
<keyframeParts>
<!-- <li>
<key>ARA_Flight_Attachment</key>
<value>
<keyframes>
<li><graphicState>ARA_FlySouth_0</graphicState><tick>6</tick></li>
<li><graphicState>ARA_FlySouth_1</graphicState><tick>12</tick></li>
</keyframes>
</value>
</li> -->
<li>
<key>Root</key>
<value><workerType>AnimationWorker_Keyframes</workerType><keyframes>
<li><tick>0</tick><offset>(0,0,-0.05)</offset></li>
<li><tick>30</tick><offset>(0,0,0.05)</offset></li>
<li><tick>60</tick><offset>(0,0,-0.05)</offset></li>
</keyframes></value>
</li>
</keyframeParts>
</AnimationDef>
</Defs>

View File

@@ -239,6 +239,49 @@
</weaponTags>
</PawnKindDef>
<PawnKindDef Name="Wula_Mech_Mobile_Factory_PawnKind" ParentName="HeavyMechanoidKind">
<defName>Wula_Mech_Mobile_Factory</defName> <!-- 修改了defName以避免冲突 -->
<label>MFm-87"天秤"</label>
<race>Wula_Mech_Mobile_Factory</race>
<combatPower>1000</combatPower>
<allowInMechClusters>false</allowInMechClusters>
<defaultFactionType>PlayerColony</defaultFactionType>
<canMeleeAttack>false</canMeleeAttack>
<isGoodBreacher>true</isGoodBreacher>
<flyingAnimationFramePathPrefix>Wula/Things/Wula_Mech_Mobile_Factory/Flying/Wula_Mech_Mobile_Factory_Flying_</flyingAnimationFramePathPrefix>
<flyingAnimationDrawSize>1</flyingAnimationDrawSize>
<flyingAnimationFrameCount>1</flyingAnimationFrameCount>
<flyingAnimationTicksPerFrame>2</flyingAnimationTicksPerFrame>
<flyingAnimationInheritColors>false</flyingAnimationInheritColors>
<lifeStages>
<li>
<bodyGraphicData>
<texPath>Wula/Things/Wula_Mech_Mobile_Factory/Bodies/Naked_Thin</texPath>
<maskPath>Wula/Things/WULA_Cat/AllegianceOverlays/None</maskPath>
<shaderType>CutoutWithOverlay</shaderType>
<graphicClass>Graphic_Multi</graphicClass>
<drawSize>6</drawSize>
<shadowData>
<volume>(1.4, 1.8, 1.4)</volume>
</shadowData>
</bodyGraphicData>
</li>
</lifeStages>
<weaponMoney>99999~99999</weaponMoney>
<controlGroupPortraitZoom>0.7</controlGroupPortraitZoom>
<weaponTags>
<li>Wula_Mech_Mobile_Factory_Main_Weapon</li>
</weaponTags>
<abilities>
<li>WULA_GiveSwitchHediff</li> <!-- 添加“停止生产”技能 -->
<li>WULA_RemoveSwitchHediff</li> <!-- 保留“恢复生产”技能 -->
</abilities>
</PawnKindDef>
<!-- 乌拉族反常网络 -->
<PawnKindDef Name="Wula_Broken_Personality_Pawn_Base" Abstract="True">
<race>WulaSpecies</race>

View File

@@ -58,7 +58,7 @@
<ThingDef Name="Wula_CR_Mobile_Factory_Turret" ParentName="BaseWeaponTurret">
<defName>Wula_CR_Mobile_Factory_Turret</defName>
<label>CRt-91"铱锇"</label>
<description>由乌拉帝国的MFm-87"天秤"陆行舰所配备的炮塔之一,能够喷射穿透装甲的热熔束,处理靠近陆行舰的威胁。</description>
<description>由乌拉帝国的陆行舰所配备的炮塔之一,能够喷射穿透装甲的热熔束,处理靠近陆行舰的威胁。</description>
<tradeability>None</tradeability>
<destroyOnDrop>true</destroyOnDrop>
<graphicData>
@@ -130,7 +130,7 @@
<ThingDef ParentName="Wula_CR_Mobile_Factory_Turret">
<defName>Wula_CR_Mobile_Factory_Turret_MKII</defName>
<label>CRt-92"铱锇MK2"</label>
<description>由乌拉帝国的MFm-87"天秤"陆行舰所配备的炮塔之一,此改进版比起其原型可以将热熔束喷到更远的地方,但是无法处理过近的目标。</description>
<description>由乌拉帝国的陆行舰所配备的炮塔之一,此改进版比起其原型可以将热熔束喷到更远的地方,但是无法处理过近的目标。</description>
<verbs Inherit="False">
<li>
<verbClass>Verb_ArcSprayIncinerator</verbClass>
@@ -244,7 +244,7 @@
<ThingDef ParentName="BaseWeaponTurret">
<defName>Wula_MR_Mobile_Factory_Turret</defName>
<label>CRt-60"陨磷"</label>
<description>由乌拉帝国的MFm-87"天秤"陆行舰所配备的炮塔之一,可以射出连续短促的穿透性激光,贯穿路径上的敌军。</description>
<description>由乌拉帝国的陆行舰所配备的炮塔之一,是一种射速较快的自动炮,可以压制杀伤成片敌军。</description>
<tradeability>None</tradeability>
<destroyOnDrop>true</destroyOnDrop>
<graphicData>
@@ -255,61 +255,64 @@
<uiIconScale>2</uiIconScale>
<statBases>
<Mass>2.6</Mass>
<AccuracyTouch>1</AccuracyTouch>
<AccuracyShort>1</AccuracyShort>
<AccuracyMedium>1</AccuracyMedium>
<AccuracyLong>1</AccuracyLong>
<AccuracyTouch>0.5</AccuracyTouch>
<AccuracyShort>0.5</AccuracyShort>
<AccuracyMedium>0.5</AccuracyMedium>
<AccuracyLong>0.4</AccuracyLong>
</statBases>
<verbs>
<li>
<verbClass>Verb_Shoot</verbClass>
<verbClass>WulaFallenEmpire.Verb_ShootWithOffset</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<defaultProjectile>Bullet_Wula_MR_Mobile_Factory_Turret</defaultProjectile>
<range>36</range>
<minRange>8</minRange>
<defaultCooldownTime>1.5</defaultCooldownTime>
<burstShotCount>3</burstShotCount>
<ticksBetweenBurstShots>12</ticksBetweenBurstShots>
<soundCast>Shot_BeamRepeater</soundCast>
<warmupTime>0</warmupTime>
<range>32</range>
<defaultCooldownTime>3</defaultCooldownTime>
<forcedMissRadius>0.1</forcedMissRadius>
<burstShotCount>6</burstShotCount>
<ticksBetweenBurstShots>6</ticksBetweenBurstShots>
<soundCast>Shot_ChargeRifle</soundCast>
<soundCastTail>GunTail_Medium</soundCastTail>
<muzzleFlashScale>7</muzzleFlashScale>
<aimingChargeMote>Mote_BeamRepeater_Charge</aimingChargeMote>
<aimingChargeMoteOffset>1.07</aimingChargeMoteOffset>
<muzzleFlashScale>9</muzzleFlashScale>
<targetParams>
<canTargetPawns>true</canTargetPawns>
<canTargetLocations>true</canTargetLocations>
<canTargetBuildings>true</canTargetBuildings>
</targetParams>
</li>
</verbs>
</ThingDef>
<ThingDef ParentName="BaseBullet">
<defName>Bullet_Wula_MR_Mobile_Factory_Turret</defName>
<label>陨磷穿透光束</label>
<thingClass>WulaFallenEmpire.Projectile_WulaLineAttack</thingClass>
<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>1.2</explosionRadius>
<arcHeightFactor>0.4</arcHeightFactor>
<soundExplode>Explosion_Rocket</soundExplode>
<armorPenetrationBase>0.75</armorPenetrationBase>
<screenShakeFactor>0.1</screenShakeFactor>
</projectile>
<modExtensions>
<li Class="WulaFallenEmpire.Wula_PathPierce_Extension">
<maxHits>-1</maxHits> <!-- 无限穿透 -->
<damageFalloff>0</damageFalloff> <!-- 无伤害衰减 -->
<preventFriendlyFire>true</preventFriendlyFire> <!-- 是否阻止友方火力 -->
<tailFleckDef>WULA_GunTail_Plasma</tailFleckDef>
<li Class="WulaFallenEmpire.TrackingBulletDef">
<tailFleckDef>WULA_GunTail_Lighting</tailFleckDef>
<fleckMakeFleckTickMax>1</fleckMakeFleckTickMax>
</li>
</modExtensions>
<tickerType>Normal</tickerType>
<neverMultiSelect>True</neverMultiSelect>
<graphicData>
<texPath>Things/Projectile/ChargeLanceShot</texPath>
<graphicClass>Graphic_Single</graphicClass>
<shaderType>TransparentPostLight</shaderType>
<drawSize>(3,1)</drawSize>
</graphicData>
<projectile>
<damageDef>BeamBypassShields</damageDef>
<damageAmountBase>5</damageAmountBase>
<speed>130</speed>
<armorPenetrationBase>0.9</armorPenetrationBase>
<stoppingPower>1</stoppingPower>
</projectile>
</ThingDef>
<ThingDef ParentName="BaseWeaponTurret">
<defName>Wula_LR_Mobile_Factory_Turret</defName>
<label>CRt-26"晶丛"</label>
<description>由乌拉帝国的MFm-87"天秤"陆行舰所配备的炮塔之一,能够在远距离上发射等离子射弹覆盖敌军。</description>
<description>由乌拉帝国的陆行舰所配备的炮塔之一,射程远威力大,可以在远距离上夷平试图抵抗的敌军。</description>
<tradeability>None</tradeability>
<destroyOnDrop>true</destroyOnDrop>
<graphicData>
@@ -330,16 +333,16 @@
<verbClass>Verb_Shoot</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<defaultProjectile>Bullet_Wula_LR_Mobile_Factory_Turret</defaultProjectile>
<range>180</range>
<minRange>15</minRange>
<burstShotCount>12</burstShotCount>
<ticksBetweenBurstShots>15</ticksBetweenBurstShots>
<soundCast>ChargeLance_Fire</soundCast>
<soundCastTail>GunTail_Medium</soundCastTail>
<muzzleFlashScale>7</muzzleFlashScale>
<forcedMissRadius>1</forcedMissRadius>
<warmupTime>0</warmupTime>
<defaultCooldownTime>9</defaultCooldownTime>
<isMortar>true</isMortar>
<requireLineOfSight>false</requireLineOfSight>
<defaultCooldownTime>8</defaultCooldownTime>
<minRange>4</minRange>
<range>120</range>
<burstShotCount>1</burstShotCount>
<soundCast>Mortar_LaunchA</soundCast>
<muzzleFlashScale>12</muzzleFlashScale>
<forcedMissRadius>6</forcedMissRadius>
<targetParams>
<canTargetLocations>true</canTargetLocations>
</targetParams>
@@ -348,49 +351,30 @@
</ThingDef>
<ThingDef ParentName="BaseBullet">
<defName>Bullet_Wula_LR_Mobile_Factory_Turret</defName>
<label>晶丛等离子体爆</label>
<label>晶丛</label>
<graphicData>
<texPath>Wula/Projectile/WULA_Bullet_Plasma</texPath>
<texPath>Wula/Projectile/WULA_Shrapnel</texPath>
<graphicClass>Graphic_Single</graphicClass>
<shaderType>MoteGlow</shaderType>
<!-- <color>(61,199,157,202)</color> -->
<drawSize>(3,4)</drawSize>
<drawSize>(2,3)</drawSize>
</graphicData>
<thingClass>WulaFallenEmpire.Projectile_ExplosiveWithTrail</thingClass>
<!-- <thingClass>WulaFallenEmpire.Projectile_ExplosiveTrackingBullet</thingClass> -->
<projectile>
<speed>25</speed>
<damageDef>Damage_WULA_Plasma_Explosive</damageDef>
<damageAmountBase>40</damageAmountBase>
<armorPenetrationBase>0.7</armorPenetrationBase>
<stoppingPower>2.0</stoppingPower>
<explosionRadius>2.5</explosionRadius>
<soundExplode>Explosion_EMP</soundExplode>
<armorPenetrationBase>0.75</armorPenetrationBase>
<screenShakeFactor>0.5</screenShakeFactor>
<damageDef>Bomb</damageDef>
<damageAmountBase>45</damageAmountBase>
<speed>60</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.ExplosiveTrackingBulletDef">
<explosionRadius>2.5</explosionRadius>
<damageDef>Damage_WULA_Plasma_Explosive</damageDef>
</li> -->
<!-- <li Class="WulaFallenEmpire.TrackingBulletDef">
<homingSpeed>0</homingSpeed>
<initRotateAngle>0</initRotateAngle>
<destroyTicksAfterLosingTrack>
<min>60</min>
<max>120</max>
</destroyTicksAfterLosingTrack>
<tailFleckDef>WULA_GunTail_Plasma</tailFleckDef>
<impactThreshold>1</impactThreshold>
</li> -->
<li Class="WulaFallenEmpire.TrackingBulletDef">
<tailFleckDef>WULA_GunTail_Plasma</tailFleckDef>
<fleckMakeFleckTickMax>3</fleckMakeFleckTickMax>
</li>
<li Class="WulaFallenEmpire.ShotgunExtension">
<pelletCount>3</pelletCount>
<tailFleckDef>WULA_Smoke_Tail</tailFleckDef>
<fleckMakeFleckTickMax>1</fleckMakeFleckTickMax>
</li>
</modExtensions>
</ThingDef>

View File

@@ -1899,9 +1899,6 @@
<weaponTags>
<li>Wula_Ranged_Weapon_T2</li>
</weaponTags>
<thingSetMakerTags>
<li>RewardStandardQualitySuper</li>
</thingSetMakerTags>
<comps>
<li Class="CompProperties_EquippableAbilityReloadable">
<abilityDef>WULA_RW_Base_Loitering_Munition_Ability</abilityDef>

View File

@@ -977,8 +977,11 @@
<description>乌拉帝国的大型战争机械,简直就是一座移动堡垒——它不仅装甲厚实、火炮林立,还能在战场上生产大量的辅助战争机械以形成坚实的弹性阵线,生来就是为了粉碎坚固的堡垒和顽强的抵抗。</description>
<statBases>
<BandwidthCost>1</BandwidthCost>
<MoveSpeed>1.5</MoveSpeed>
<MoveSpeed>1</MoveSpeed>
<EnergyShieldEnergyMax>5</EnergyShieldEnergyMax>
<MaxFlightTime>9999</MaxFlightTime>
<FlightCooldown>0</FlightCooldown>
</statBases>
<race>
<body>Mech_Warqueen</body>
@@ -993,6 +996,8 @@
</li>
</lifeStageAges>
<baseHealthScale>25</baseHealthScale>
<flightStartChanceOnJobStart>1</flightStartChanceOnJobStart>
<!-- <thinkTreeConstant>WarUrchinConstant</thinkTreeConstant> -->
</race>
<tools>
@@ -1231,6 +1236,17 @@
<energyOnReset>4.0</energyOnReset>
<blocksRangedWeapons>false</blocksRangedWeapons>
</li>
<!-- 飞行组件 -->
<li Class="WulaFallenEmpire.CompProperties_PawnFlight">
<!-- 飞行触发条件:仅在征召时飞行 -->
<flightCondition>Drafted</flightCondition>
<!-- 链接到我们刚刚创建的 AnimationDef -->
<flyingAnimationNorth>WULA_Hover_FlyNorth</flyingAnimationNorth>
<flyingAnimationEast>WULA_Hover_FlyEast</flyingAnimationEast>
<flyingAnimationSouth>WULA_Hover_FlySouth</flyingAnimationSouth>
</li>
</comps>
</ThingDef>

View File

@@ -174,728 +174,4 @@
<PawnKindDef ParentName="WULA_Mech_Flyer_Melta_PawnKind">
<defName>WULA_Mech_Flyer_Melta_Slow</defName>
</PawnKindDef>
<PawnKindDef Name="Wula_Mech_Mobile_Factory_PawnKind" ParentName="HeavyMechanoidKind">
<defName>Wula_Mech_Mobile_Factory</defName> <!-- 修改了defName以避免冲突 -->
<label>MFm-87"天秤"</label>
<race>Wula_Mech_Mobile_Factory</race>
<combatPower>1000</combatPower>
<allowInMechClusters>false</allowInMechClusters>
<defaultFactionType>PlayerColony</defaultFactionType>
<canMeleeAttack>false</canMeleeAttack>
<isGoodBreacher>true</isGoodBreacher>
<lifeStages>
<li>
<bodyGraphicData>
<texPath>Wula/Things/Wula_Mech_Mobile_Factory/Bodies/Naked_Thin</texPath>
<maskPath>Wula/Things/WULA_Cat/AllegianceOverlays/None</maskPath>
<shaderType>CutoutWithOverlay</shaderType>
<graphicClass>Graphic_Multi</graphicClass>
<drawSize>6</drawSize>
<shadowData>
<volume>(1.4, 1.8, 1.4)</volume>
</shadowData>
</bodyGraphicData>
</li>
</lifeStages>
<weaponMoney>99999~99999</weaponMoney>
<controlGroupPortraitZoom>0.7</controlGroupPortraitZoom>
<weaponTags>
<li>Wula_Mech_Mobile_Factory_Main_Weapon</li>
</weaponTags>
<abilities>
<li>WULA_GiveSwitchHediff</li> <!-- 添加“停止生产”技能 -->
<li>WULA_RemoveSwitchHediff</li> <!-- 保留“恢复生产”技能 -->
</abilities>
</PawnKindDef>
<ThingDef ParentName="Wula_Mech_Mobile_Factory">
<defName>Wula_Mech_Mobile_Factory_CR</defName> <!-- 修改了defName以避免冲突 -->
<label>MFm-21"炽焰"</label>
<description>乌拉帝国图书馆的陆行战舰——火力强大装甲厚重比起其通用型MFm-87"天秤",以两具高压热熔喷火器替换了两具等离子炮,以追求在中近距离释放恐怖火力。除此之外,其也拥有生产"红火蚁"的能力——一种携带热熔喷火器的CRm-51"兵蚁"机械体的变种。</description>
<statBases>
<EnergyShieldEnergyMax>10</EnergyShieldEnergyMax>
</statBases>
<comps Inherit="False">
<!--加上这个组件的机械体会直接跳过原版指挥范围判定-->
<li Class="WulaFallenEmpire.CompProperties_GlobalMechCommand" />
<li Class="CompProperties_CanBeDormant" />
<li Class="CompProperties_WakeUpDormant">
<wakeUpOnDamage>true</wakeUpOnDamage>
<wakeUpCheckRadius>30</wakeUpCheckRadius>
<wakeUpSound>MechanoidsWakeUp</wakeUpSound>
</li>
<li MayRequire="Ludeon.RimWorld.Biotech" Class="CompProperties_OverseerSubject">
<needsOverseerEffect>MechUncontrolled</needsOverseerEffect>
<delayUntilFeralCheck>60000</delayUntilFeralCheck>
<feralMtbDays>10</feralMtbDays>
<feralCascadeRadialDistance>25</feralCascadeRadialDistance>
</li>
<li MayRequire="Ludeon.RimWorld.Biotech" Class="CompProperties_MechRepairable" />
<li Class="CompProperties_TurretGun">
<turretDef>Wula_CR_Mobile_Factory_Turret</turretDef>
<!-- <angleOffset>-90</angleOffset> -->
<renderNodeProperties>
<li>
<nodeClass>PawnRenderNode_TurretGun</nodeClass>
<workerClass>PawnRenderNodeWorker_TurretGun</workerClass>
<parentTagDef>Body</parentTagDef>
<overrideMeshSize>(1, 1)</overrideMeshSize>
<baseLayer>20</baseLayer>
<pawnType>Any</pawnType>
<drawData>
<dataNorth>
<rotationOffset>-90</rotationOffset>
<offset>(-1, 0, -1.45)</offset>
<flip>true</flip>
<layer>-5</layer>
</dataNorth>
<dataEast>
<rotationOffset>90</rotationOffset>
<layer>-5</layer>
<offset>(2.15, 0, -1)</offset>
</dataEast>
<dataSouth>
<rotationOffset>-90</rotationOffset>
<offset>(1, 0, -1.45)</offset>
</dataSouth>
<dataWest>
<rotationOffset>90</rotationOffset>
<offset>(-2.15, 0, -1)</offset>
</dataWest>
</drawData>
</li>
</renderNodeProperties>
</li>
<li Class="CompProperties_TurretGun">
<turretDef>Wula_CR_Mobile_Factory_Turret</turretDef>
<!-- <angleOffset>-90</angleOffset> -->
<renderNodeProperties>
<li>
<nodeClass>PawnRenderNode_TurretGun</nodeClass>
<workerClass>PawnRenderNodeWorker_TurretGun</workerClass>
<parentTagDef>Body</parentTagDef>
<overrideMeshSize>(1, 1)</overrideMeshSize>
<baseLayer>20</baseLayer>
<pawnType>Any</pawnType>
<drawData>
<dataNorth>
<rotationOffset>-90</rotationOffset>
<offset>(1, 0, -1.45)</offset>
<layer>-5</layer>
</dataNorth>
<dataEast>
<rotationOffset>-90</rotationOffset>
<offset>(2.15, 0, -1)</offset>
</dataEast>
<dataSouth>
<rotationOffset>-90</rotationOffset>
<offset>(-1, 0, -1.45)</offset>
</dataSouth>
<dataWest>
<rotationOffset>90</rotationOffset>
<offset>(-2.15, 0, -1)</offset>
<layer>-5</layer>
</dataWest>
</drawData>
</li>
</renderNodeProperties>
</li>
<li Class="CompProperties_TurretGun">
<turretDef>Wula_CR_Mobile_Factory_Turret_MKII</turretDef>
<!-- <angleOffset>-90</angleOffset> -->
<renderNodeProperties>
<li>
<nodeClass>PawnRenderNode_TurretGun</nodeClass>
<workerClass>PawnRenderNodeWorker_TurretGun</workerClass>
<parentTagDef>Body</parentTagDef>
<overrideMeshSize>(1, 1)</overrideMeshSize>
<baseLayer>20</baseLayer>
<pawnType>Any</pawnType>
<drawData>
<dataNorth>
<rotationOffset>-90</rotationOffset>
<offset>(-1.3, 0, -0.45)</offset>
<flip>true</flip>
<layer>-5</layer>
</dataNorth>
<dataEast>
<rotationOffset>90</rotationOffset>
<layer>-5</layer>
<offset>(1.4, 0, -0.35)</offset>
</dataEast>
<dataSouth>
<rotationOffset>-90</rotationOffset>
<offset>(1.3, 0, -0.45)</offset>
</dataSouth>
<dataWest>
<rotationOffset>90</rotationOffset>
<offset>(-1.4, 0, -0.35)</offset>
</dataWest>
</drawData>
</li>
</renderNodeProperties>
</li>
<li Class="CompProperties_TurretGun">
<turretDef>Wula_CR_Mobile_Factory_Turret_MKII</turretDef>
<!-- <angleOffset>-90</angleOffset> -->
<renderNodeProperties>
<li>
<nodeClass>PawnRenderNode_TurretGun</nodeClass>
<workerClass>PawnRenderNodeWorker_TurretGun</workerClass>
<parentTagDef>Body</parentTagDef>
<overrideMeshSize>(1, 1)</overrideMeshSize>
<baseLayer>20</baseLayer>
<pawnType>Any</pawnType>
<drawData>
<dataNorth>
<rotationOffset>-90</rotationOffset>
<offset>(1.3, 0, -0.45)</offset>
<flip>true</flip>
<layer>-5</layer>
</dataNorth>
<dataEast>
<rotationOffset>-90</rotationOffset>
<offset>(1.4, 0, -0.35)</offset>
</dataEast>
<dataSouth>
<rotationOffset>-90</rotationOffset>
<offset>(-1.3, 0, -0.45)</offset>
</dataSouth>
<dataWest>
<rotationOffset>90</rotationOffset>
<layer>-5</layer>
<offset>(-1.4, 0, -0.35)</offset>
</dataWest>
</drawData>
</li>
</renderNodeProperties>
</li>
<li Class="CompProperties_TurretGun">
<turretDef>Wula_MR_Mobile_Factory_Turret</turretDef>
<!-- <angleOffset>-90</angleOffset> -->
<renderNodeProperties>
<li>
<nodeClass>PawnRenderNode_TurretGun</nodeClass>
<workerClass>PawnRenderNodeWorker_TurretGun</workerClass>
<parentTagDef>Body</parentTagDef>
<overrideMeshSize>(1, 1)</overrideMeshSize>
<baseLayer>20</baseLayer>
<pawnType>Any</pawnType>
<drawData>
<dataNorth>
<rotationOffset>-90</rotationOffset>
<offset>(1.25, 0, 0.45)</offset>
<flip>true</flip>
<layer>-5</layer>
</dataNorth>
<dataEast>
<rotationOffset>90</rotationOffset>
<layer>-5</layer>
<offset>(0.6, 0, 0.15)</offset>
</dataEast>
<dataSouth>
<rotationOffset>-90</rotationOffset>
<offset>(-1.25, 0, 0.65)</offset>
</dataSouth>
<dataWest>
<rotationOffset>90</rotationOffset>
<offset>(-0.6, 0, 0.15)</offset>
</dataWest>
</drawData>
</li>
</renderNodeProperties>
</li>
<li Class="CompProperties_TurretGun">
<turretDef>Wula_MR_Mobile_Factory_Turret</turretDef>
<!-- <angleOffset>-90</angleOffset> -->
<renderNodeProperties>
<li>
<nodeClass>PawnRenderNode_TurretGun</nodeClass>
<workerClass>PawnRenderNodeWorker_TurretGun</workerClass>
<parentTagDef>Body</parentTagDef>
<overrideMeshSize>(1, 1)</overrideMeshSize>
<baseLayer>20</baseLayer>
<pawnType>Any</pawnType>
<drawData>
<dataNorth>
<rotationOffset>-90</rotationOffset>
<offset>(-1.25, 0, 0.45)</offset>
<flip>true</flip>
<layer>-5</layer>
</dataNorth>
<dataEast>
<rotationOffset>-90</rotationOffset>
<offset>(0.6, 0, 0.15)</offset>
</dataEast>
<dataSouth>
<rotationOffset>-90</rotationOffset>
<offset>(1.25, 0, 0.65)</offset>
</dataSouth>
<dataWest>
<rotationOffset>90</rotationOffset>
<layer>-5</layer>
<offset>(-0.6, 0, 0.15)</offset>
</dataWest>
</drawData>
</li>
</renderNodeProperties>
</li>
<li Class="CompProperties_Shield">
<startingTicksToReset>36000</startingTicksToReset><!-- 10 mins -->
<minDrawSize>4.2</minDrawSize>
<maxDrawSize>4.4</maxDrawSize>
<energyLossPerDamage>0.01</energyLossPerDamage>
<energyOnReset>4.0</energyOnReset>
<blocksRangedWeapons>false</blocksRangedWeapons>
</li>
<li Class="WulaFallenEmpire.CompProperties_AutoMechCarrier">
<freeProduction>true</freeProduction>
<disableHediff>WULA_MechCarrierSwitchHediff</disableHediff>
<fixedIngredient>Steel</fixedIngredient>
<maxIngredientCount>500</maxIngredientCount>
<startingIngredientCount>500</startingIngredientCount>
<costPerPawn>999</costPerPawn>
<cooldownTicks>9999</cooldownTicks>
<productionQueue>
<li>
<pawnKind>WULA_Mech_Flyer_Melta</pawnKind>
<count>2</count>
<cooldownTicks>50</cooldownTicks>
</li>
<li>
<pawnKind>WULA_Mech_Flyer_Melta_Slow</pawnKind>
<count>2</count>
<cooldownTicks>600</cooldownTicks>
</li>
</productionQueue>
<spawnEffecter>WarqueenWarUrchinsSpawned</spawnEffecter>
<spawnedMechEffecter>WarUrchinSpawned</spawnedMechEffecter>
</li>
<li Class="WulaFallenEmpire.CompProperties_AutoMechCarrier">
<freeProduction>true</freeProduction>
<disableHediff>WULA_MechCarrierSwitchHediff</disableHediff>
<fixedIngredient>Steel</fixedIngredient>
<maxIngredientCount>500</maxIngredientCount>
<startingIngredientCount>500</startingIngredientCount>
<costPerPawn>999</costPerPawn>
<cooldownTicks>9999</cooldownTicks>
<productionQueue>
<li>
<pawnKind>WULA_Mech_Flyer_Melta</pawnKind>
<count>2</count>
<cooldownTicks>50</cooldownTicks>
</li>
<li>
<pawnKind>WULA_Mech_Flyer_Melta_Slow</pawnKind>
<count>2</count>
<cooldownTicks>600</cooldownTicks>
</li>
</productionQueue>
<spawnEffecter>WarqueenWarUrchinsSpawned</spawnEffecter>
<spawnedMechEffecter>WarUrchinSpawned</spawnedMechEffecter>
</li>
<li Class="WulaFallenEmpire.CompProperties_AutoMechCarrier">
<freeProduction>true</freeProduction>
<disableHediff>WULA_MechCarrierSwitchHediff</disableHediff>
<fixedIngredient>Steel</fixedIngredient>
<maxIngredientCount>500</maxIngredientCount>
<startingIngredientCount>500</startingIngredientCount>
<costPerPawn>999</costPerPawn>
<cooldownTicks>9999</cooldownTicks>
<productionQueue>
<li>
<pawnKind>WULA_Mech_Flyer_Melta</pawnKind>
<count>2</count>
<cooldownTicks>50</cooldownTicks>
</li>
<li>
<pawnKind>WULA_Mech_Flyer_Melta_Slow</pawnKind>
<count>2</count>
<cooldownTicks>600</cooldownTicks>
</li>
</productionQueue>
<spawnEffecter>WarqueenWarUrchinsSpawned</spawnEffecter>
<spawnedMechEffecter>WarUrchinSpawned</spawnedMechEffecter>
</li>
<li Class="WulaFallenEmpire.CompProperties_AutoMechCarrier">
<freeProduction>true</freeProduction>
<disableHediff>WULA_MechCarrierSwitchHediff</disableHediff>
<fixedIngredient>Steel</fixedIngredient>
<maxIngredientCount>500</maxIngredientCount>
<startingIngredientCount>500</startingIngredientCount>
<costPerPawn>999</costPerPawn>
<cooldownTicks>9999</cooldownTicks>
<productionQueue>
<li>
<pawnKind>WULA_Mech_Flyer_Melta</pawnKind>
<count>2</count>
<cooldownTicks>50</cooldownTicks>
</li>
<li>
<pawnKind>WULA_Mech_Flyer_Melta_Slow</pawnKind>
<count>2</count>
<cooldownTicks>600</cooldownTicks>
</li>
</productionQueue>
<spawnEffecter>WarqueenWarUrchinsSpawned</spawnEffecter>
<spawnedMechEffecter>WarUrchinSpawned</spawnedMechEffecter>
</li>
</comps>
</ThingDef>
<PawnKindDef ParentName="Wula_Mech_Mobile_Factory_PawnKind">
<defName>Wula_Mech_Mobile_Factory_CR</defName> <!-- 修改了defName以避免冲突 -->
<label>MFm-21"炽焰"</label>
<race>Wula_Mech_Mobile_Factory_CR</race>
</PawnKindDef>
<ThingDef ParentName="Wula_Mech_Mobile_Factory">
<defName>Wula_Mech_Mobile_Factory_LR</defName> <!-- 修改了defName以避免冲突 -->
<label>MFm-91"公义"</label>
<description>乌拉帝国图书馆的陆行战舰——火力强大装甲厚重比起其通用型MFm-87"天秤",以等离子炮替换了所有的炮塔,用于在远距离上释放铺天盖地的火力。这个型号的陆行舰的生产能力不如其通用型,因此更加依赖其他部队的保护。</description>
<statBases>
<EnergyShieldEnergyMax>10</EnergyShieldEnergyMax>
</statBases>
<comps Inherit="False">
<!--加上这个组件的机械体会直接跳过原版指挥范围判定-->
<li Class="WulaFallenEmpire.CompProperties_GlobalMechCommand" />
<li Class="CompProperties_CanBeDormant" />
<li Class="CompProperties_WakeUpDormant">
<wakeUpOnDamage>true</wakeUpOnDamage>
<wakeUpCheckRadius>30</wakeUpCheckRadius>
<wakeUpSound>MechanoidsWakeUp</wakeUpSound>
</li>
<li MayRequire="Ludeon.RimWorld.Biotech" Class="CompProperties_OverseerSubject">
<needsOverseerEffect>MechUncontrolled</needsOverseerEffect>
<delayUntilFeralCheck>60000</delayUntilFeralCheck>
<feralMtbDays>10</feralMtbDays>
<feralCascadeRadialDistance>25</feralCascadeRadialDistance>
</li>
<li MayRequire="Ludeon.RimWorld.Biotech" Class="CompProperties_MechRepairable" />
<li Class="CompProperties_TurretGun">
<turretDef>Wula_LR_Mobile_Factory_Turret</turretDef>
<!-- <angleOffset>-90</angleOffset> -->
<renderNodeProperties>
<li>
<nodeClass>PawnRenderNode_TurretGun</nodeClass>
<workerClass>PawnRenderNodeWorker_TurretGun</workerClass>
<parentTagDef>Body</parentTagDef>
<overrideMeshSize>(1, 1)</overrideMeshSize>
<baseLayer>20</baseLayer>
<pawnType>Any</pawnType>
<drawData>
<dataNorth>
<rotationOffset>-90</rotationOffset>
<offset>(-1, 0, -1.45)</offset>
<flip>true</flip>
<layer>-5</layer>
</dataNorth>
<dataEast>
<rotationOffset>90</rotationOffset>
<layer>-5</layer>
<offset>(2.15, 0, -1)</offset>
</dataEast>
<dataSouth>
<rotationOffset>-90</rotationOffset>
<offset>(1, 0, -1.45)</offset>
</dataSouth>
<dataWest>
<rotationOffset>90</rotationOffset>
<offset>(-2.15, 0, -1)</offset>
</dataWest>
</drawData>
</li>
</renderNodeProperties>
</li>
<li Class="CompProperties_TurretGun">
<turretDef>Wula_LR_Mobile_Factory_Turret</turretDef>
<!-- <angleOffset>-90</angleOffset> -->
<renderNodeProperties>
<li>
<nodeClass>PawnRenderNode_TurretGun</nodeClass>
<workerClass>PawnRenderNodeWorker_TurretGun</workerClass>
<parentTagDef>Body</parentTagDef>
<overrideMeshSize>(1, 1)</overrideMeshSize>
<baseLayer>20</baseLayer>
<pawnType>Any</pawnType>
<drawData>
<dataNorth>
<rotationOffset>-90</rotationOffset>
<offset>(1, 0, -1.45)</offset>
<layer>-5</layer>
</dataNorth>
<dataEast>
<rotationOffset>-90</rotationOffset>
<offset>(2.15, 0, -1)</offset>
</dataEast>
<dataSouth>
<rotationOffset>-90</rotationOffset>
<offset>(-1, 0, -1.45)</offset>
</dataSouth>
<dataWest>
<rotationOffset>90</rotationOffset>
<offset>(-2.15, 0, -1)</offset>
<layer>-5</layer>
</dataWest>
</drawData>
</li>
</renderNodeProperties>
</li>
<li Class="CompProperties_TurretGun">
<turretDef>Wula_LR_Mobile_Factory_Turret</turretDef>
<!-- <angleOffset>-90</angleOffset> -->
<renderNodeProperties>
<li>
<nodeClass>PawnRenderNode_TurretGun</nodeClass>
<workerClass>PawnRenderNodeWorker_TurretGun</workerClass>
<parentTagDef>Body</parentTagDef>
<overrideMeshSize>(1, 1)</overrideMeshSize>
<baseLayer>20</baseLayer>
<pawnType>Any</pawnType>
<drawData>
<dataNorth>
<rotationOffset>-90</rotationOffset>
<offset>(-1.3, 0, -0.45)</offset>
<flip>true</flip>
<layer>-5</layer>
</dataNorth>
<dataEast>
<rotationOffset>90</rotationOffset>
<layer>-5</layer>
<offset>(1.4, 0, -0.35)</offset>
</dataEast>
<dataSouth>
<rotationOffset>-90</rotationOffset>
<offset>(1.3, 0, -0.45)</offset>
</dataSouth>
<dataWest>
<rotationOffset>90</rotationOffset>
<offset>(-1.4, 0, -0.35)</offset>
</dataWest>
</drawData>
</li>
</renderNodeProperties>
</li>
<li Class="CompProperties_TurretGun">
<turretDef>Wula_LR_Mobile_Factory_Turret</turretDef>
<!-- <angleOffset>-90</angleOffset> -->
<renderNodeProperties>
<li>
<nodeClass>PawnRenderNode_TurretGun</nodeClass>
<workerClass>PawnRenderNodeWorker_TurretGun</workerClass>
<parentTagDef>Body</parentTagDef>
<overrideMeshSize>(1, 1)</overrideMeshSize>
<baseLayer>20</baseLayer>
<pawnType>Any</pawnType>
<drawData>
<dataNorth>
<rotationOffset>-90</rotationOffset>
<offset>(1.3, 0, -0.45)</offset>
<flip>true</flip>
<layer>-5</layer>
</dataNorth>
<dataEast>
<rotationOffset>-90</rotationOffset>
<offset>(1.4, 0, -0.35)</offset>
</dataEast>
<dataSouth>
<rotationOffset>-90</rotationOffset>
<offset>(-1.3, 0, -0.45)</offset>
</dataSouth>
<dataWest>
<rotationOffset>90</rotationOffset>
<layer>-5</layer>
<offset>(-1.4, 0, -0.35)</offset>
</dataWest>
</drawData>
</li>
</renderNodeProperties>
</li>
<li Class="CompProperties_TurretGun">
<turretDef>Wula_LR_Mobile_Factory_Turret</turretDef>
<!-- <angleOffset>-90</angleOffset> -->
<renderNodeProperties>
<li>
<nodeClass>PawnRenderNode_TurretGun</nodeClass>
<workerClass>PawnRenderNodeWorker_TurretGun</workerClass>
<parentTagDef>Body</parentTagDef>
<overrideMeshSize>(1, 1)</overrideMeshSize>
<baseLayer>20</baseLayer>
<pawnType>Any</pawnType>
<drawData>
<dataNorth>
<rotationOffset>-90</rotationOffset>
<offset>(1.25, 0, 0.45)</offset>
<flip>true</flip>
<layer>-5</layer>
</dataNorth>
<dataEast>
<rotationOffset>90</rotationOffset>
<layer>-5</layer>
<offset>(0.6, 0, 0.15)</offset>
</dataEast>
<dataSouth>
<rotationOffset>-90</rotationOffset>
<offset>(-1.25, 0, 0.65)</offset>
</dataSouth>
<dataWest>
<rotationOffset>90</rotationOffset>
<offset>(-0.6, 0, 0.15)</offset>
</dataWest>
</drawData>
</li>
</renderNodeProperties>
</li>
<li Class="CompProperties_TurretGun">
<turretDef>Wula_LR_Mobile_Factory_Turret</turretDef>
<!-- <angleOffset>-90</angleOffset> -->
<renderNodeProperties>
<li>
<nodeClass>PawnRenderNode_TurretGun</nodeClass>
<workerClass>PawnRenderNodeWorker_TurretGun</workerClass>
<parentTagDef>Body</parentTagDef>
<overrideMeshSize>(1, 1)</overrideMeshSize>
<baseLayer>20</baseLayer>
<pawnType>Any</pawnType>
<drawData>
<dataNorth>
<rotationOffset>-90</rotationOffset>
<offset>(-1.25, 0, 0.45)</offset>
<flip>true</flip>
<layer>-5</layer>
</dataNorth>
<dataEast>
<rotationOffset>-90</rotationOffset>
<offset>(0.6, 0, 0.15)</offset>
</dataEast>
<dataSouth>
<rotationOffset>-90</rotationOffset>
<offset>(1.25, 0, 0.65)</offset>
</dataSouth>
<dataWest>
<rotationOffset>90</rotationOffset>
<layer>-5</layer>
<offset>(-0.6, 0, 0.15)</offset>
</dataWest>
</drawData>
</li>
</renderNodeProperties>
</li>
<li Class="CompProperties_Shield">
<startingTicksToReset>36000</startingTicksToReset><!-- 10 mins -->
<minDrawSize>4.2</minDrawSize>
<maxDrawSize>4.4</maxDrawSize>
<energyLossPerDamage>0.01</energyLossPerDamage>
<energyOnReset>4.0</energyOnReset>
<blocksRangedWeapons>false</blocksRangedWeapons>
</li>
<li Class="WulaFallenEmpire.CompProperties_AutoMechCarrier">
<freeProduction>true</freeProduction>
<disableHediff>WULA_MechCarrierSwitchHediff</disableHediff>
<fixedIngredient>Steel</fixedIngredient>
<maxIngredientCount>500</maxIngredientCount>
<startingIngredientCount>500</startingIngredientCount>
<costPerPawn>999</costPerPawn>
<cooldownTicks>9999</cooldownTicks>
<productionQueue>
<li>
<pawnKind>WULA_Mech_Flyer</pawnKind>
<count>1</count>
<cooldownTicks>50</cooldownTicks>
</li>
<li>
<pawnKind>WULA_Mech_Flyer_Slow</pawnKind>
<count>2</count>
<cooldownTicks>600</cooldownTicks>
</li>
</productionQueue>
<spawnEffecter>WarqueenWarUrchinsSpawned</spawnEffecter>
<spawnedMechEffecter>WarUrchinSpawned</spawnedMechEffecter>
</li>
<li Class="WulaFallenEmpire.CompProperties_AutoMechCarrier">
<freeProduction>true</freeProduction>
<disableHediff>WULA_MechCarrierSwitchHediff</disableHediff>
<fixedIngredient>Steel</fixedIngredient>
<maxIngredientCount>500</maxIngredientCount>
<startingIngredientCount>500</startingIngredientCount>
<costPerPawn>999</costPerPawn>
<cooldownTicks>9999</cooldownTicks>
<productionQueue>
<li>
<pawnKind>WULA_Mech_Flyer</pawnKind>
<count>1</count>
<cooldownTicks>50</cooldownTicks>
</li>
<li>
<pawnKind>WULA_Mech_Flyer_Slow</pawnKind>
<count>2</count>
<cooldownTicks>600</cooldownTicks>
</li>
</productionQueue>
<spawnEffecter>WarqueenWarUrchinsSpawned</spawnEffecter>
<spawnedMechEffecter>WarUrchinSpawned</spawnedMechEffecter>
</li>
<li Class="WulaFallenEmpire.CompProperties_AutoMechCarrier">
<freeProduction>true</freeProduction>
<disableHediff>WULA_MechCarrierSwitchHediff</disableHediff>
<fixedIngredient>Steel</fixedIngredient>
<maxIngredientCount>500</maxIngredientCount>
<startingIngredientCount>500</startingIngredientCount>
<costPerPawn>999</costPerPawn>
<cooldownTicks>9999</cooldownTicks>
<productionQueue>
<li>
<pawnKind>WULA_Mech_Flyer</pawnKind>
<count>1</count>
<cooldownTicks>50</cooldownTicks>
</li>
<li>
<pawnKind>WULA_Mech_Flyer_Slow</pawnKind>
<count>2</count>
<cooldownTicks>600</cooldownTicks>
</li>
</productionQueue>
<spawnEffecter>WarqueenWarUrchinsSpawned</spawnEffecter>
<spawnedMechEffecter>WarUrchinSpawned</spawnedMechEffecter>
</li>
<li Class="WulaFallenEmpire.CompProperties_AutoMechCarrier">
<freeProduction>true</freeProduction>
<disableHediff>WULA_MechCarrierSwitchHediff</disableHediff>
<fixedIngredient>Steel</fixedIngredient>
<maxIngredientCount>500</maxIngredientCount>
<startingIngredientCount>500</startingIngredientCount>
<costPerPawn>999</costPerPawn>
<cooldownTicks>9999</cooldownTicks>
<productionQueue>
<li>
<pawnKind>WULA_Mech_Flyer</pawnKind>
<count>1</count>
<cooldownTicks>50</cooldownTicks>
</li>
<li>
<pawnKind>WULA_Mech_Flyer_Slow</pawnKind>
<count>2</count>
<cooldownTicks>600</cooldownTicks>
</li>
</productionQueue>
<spawnEffecter>WarqueenWarUrchinsSpawned</spawnEffecter>
<spawnedMechEffecter>WarUrchinSpawned</spawnedMechEffecter>
</li>
</comps>
</ThingDef>
<PawnKindDef ParentName="Wula_Mech_Mobile_Factory_PawnKind">
<defName>Wula_Mech_Mobile_Factory_LR</defName> <!-- 修改了defName以避免冲突 -->
<label>MFm-91"公义"</label>
<race>Wula_Mech_Mobile_Factory_LR</race>
</PawnKindDef>
<PawnKindDef ParentName="Wula_Mech_Mobile_Factory_PawnKind">
<defName>Wula_Mech_Mobile_Factory_1</defName> <!-- 修改了defName以避免冲突 -->
<combatPower>1</combatPower>
<maxPerGroup>1</maxPerGroup>
</PawnKindDef>
<PawnKindDef ParentName="Wula_Mech_Mobile_Factory_PawnKind">
<defName>Wula_Mech_Mobile_Factory_10</defName> <!-- 修改了defName以避免冲突 -->
<combatPower>1</combatPower>
<maxPerGroup>10</maxPerGroup>
</PawnKindDef>
</Defs>

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

View File

@@ -0,0 +1,14 @@
using Verse;
namespace WulaFallenEmpire
{
/// <summary>
/// A marker component that holds custom flight properties.
/// The actual flight logic is handled by Harmony patches that check for this component
/// and use its properties to override or trigger vanilla flight behavior.
/// </summary>
public class CompPawnFlight : ThingComp
{
public CompProperties_PawnFlight Props => (CompProperties_PawnFlight)props;
}
}

View File

@@ -0,0 +1,55 @@
using Verse;
using RimWorld;
using System.Collections.Generic;
namespace WulaFallenEmpire
{
public enum FlightCondition
{
Drafted,
MechAlwaysExceptSpecialJobs // 新增:机械族在非特殊工作状态下始终飞行
}
public class CompProperties_PawnFlight : CompProperties
{
// --- Custom Flight Logic ---
public FlightCondition flightCondition = FlightCondition.Drafted;
// --- 新增:机械族特殊工作检查 ---
public List<JobDef> mechForbiddenJobs = new List<JobDef>
{
JobDefOf.MechCharge, // 充电工作
JobDefOf.SelfShutdown // 关机工作
};
// --- Vanilla PawnKindDef Flight Parameters ---
[NoTranslate]
public string flyingAnimationFramePathPrefix;
[NoTranslate]
public string flyingAnimationFramePathPrefixFemale;
public int flyingAnimationFrameCount;
public int flyingAnimationTicksPerFrame = -1;
public float flyingAnimationDrawSize = 1f;
public bool flyingAnimationDrawSizeIsMultiplier;
public bool flyingAnimationInheritColors;
// --- Vanilla PawnKindLifeStage Flight Parameters ---
public AnimationDef flyingAnimationEast;
public AnimationDef flyingAnimationNorth;
public AnimationDef flyingAnimationSouth;
public AnimationDef flyingAnimationEastFemale;
public AnimationDef flyingAnimationNorthFemale;
public AnimationDef flyingAnimationSouthFemale;
public CompProperties_PawnFlight()
{
compClass = typeof(CompPawnFlight);
}
}
}

View File

@@ -0,0 +1,22 @@
using Verse;
using UnityEngine;
namespace WulaFallenEmpire
{
public class PawnRenderNodeWorker_AttachmentBody_NoFlight : PawnRenderNodeWorker_AttachmentBody
{
public override bool CanDrawNow(PawnRenderNode node, PawnDrawParms parms)
{
if (parms.pawn.Flying)
{
return false;
}
return base.CanDrawNow(node, parms);
}
public override Vector3 ScaleFor(PawnRenderNode node, PawnDrawParms parms)
{
return base.ScaleFor(node, parms);
}
}
}

View File

@@ -0,0 +1,81 @@
using HarmonyLib;
using Verse;
using RimWorld;
using Verse.AI;
namespace WulaFallenEmpire
{
[HarmonyPatch]
public static class FlightHarmonyPatches
{
// Corrected Patch 1: The method signature now correctly matches the static target method.
[HarmonyPrefix]
[HarmonyPatch(typeof(Pawn_FlightTracker), "GetBestFlyAnimation")]
public static bool GetBestFlyAnimation_Prefix(Pawn pawn, ref AnimationDef __result) // Correct parameters: Pawn pawn, not __instance and ___pawn
{
var flightComp = pawn?.TryGetComp<CompPawnFlight>();
if (flightComp == null) // No props check needed, as the crash was due to wrong signature
{
return true;
}
var compProps = flightComp.Props;
AnimationDef selectedAnim = null;
if (pawn.gender == Gender.Female && compProps.flyingAnimationNorthFemale != null)
{
switch (pawn.Rotation.AsInt)
{
case 0: selectedAnim = compProps.flyingAnimationNorthFemale; break;
case 1: selectedAnim = compProps.flyingAnimationEastFemale; break;
case 2: selectedAnim = compProps.flyingAnimationSouthFemale; break;
case 3: selectedAnim = compProps.flyingAnimationEastFemale ?? compProps.flyingAnimationEast; break;
}
}
else
{
switch (pawn.Rotation.AsInt)
{
case 0: selectedAnim = compProps.flyingAnimationNorth; break;
case 1: selectedAnim = compProps.flyingAnimationEast; break;
case 2: selectedAnim = compProps.flyingAnimationSouth; break;
case 3: selectedAnim = compProps.flyingAnimationEast; break;
}
}
if (selectedAnim != null)
{
__result = selectedAnim;
return false;
}
return true;
}
// Patch 2 remains correct as Notify_JobStarted is a non-static method.
[HarmonyPrefix]
[HarmonyPatch(typeof(Pawn_FlightTracker), "Notify_JobStarted")]
public static bool Notify_JobStarted_Prefix(Job job, Pawn_FlightTracker __instance, Pawn ___pawn)
{
var flightComp = ___pawn?.TryGetComp<CompPawnFlight>();
if (flightComp == null || __instance == null || !__instance.CanEverFly || ___pawn == null || ___pawn.Dead)
{
return true;
}
var compProps = flightComp.Props;
bool shouldBeFlying = (compProps.flightCondition == FlightCondition.Drafted && ___pawn.Drafted);
if (shouldBeFlying)
{
if (!__instance.Flying) __instance.StartFlying();
job.flying = true;
}
else
{
if (__instance.Flying) __instance.ForceLand();
job.flying = false;
}
return false;
}
}
}

View File

@@ -175,6 +175,10 @@
<Compile Include="Pawn\WULA_Energy\WorkGiver_Warden_DeliverEnergy.cs" />
<Compile Include="Pawn\WULA_Energy\WorkGiver_Warden_FeedWula.cs" />
<Compile Include="Pawn\WULA_Energy\WulaCaravanEnergyDef.cs" />
<Compile Include="Pawn\WULA_Flight\CompPawnFlight.cs" />
<Compile Include="Pawn\WULA_Flight\CompProperties_PawnFlight.cs" />
<Compile Include="Pawn\WULA_Flight\PawnRenderNodeWorker_AttachmentBody_NoFlight.cs" />
<Compile Include="Pawn\WULA_Flight\Pawn_FlightTrackerPatches.cs" />
<Compile Include="Pawn\WULA_Maintenance\Building_MaintenancePod.cs" />
<Compile Include="Pawn\WULA_Maintenance\CompMaintenancePod.cs" />
<Compile Include="Pawn\WULA_Maintenance\HediffCompProperties_MaintenanceDamage.cs" />