This commit is contained in:
2025-08-28 12:23:30 +08:00
parent d22a3c268a
commit c5201d26b7
8 changed files with 3150 additions and 73 deletions

View File

@@ -243,4 +243,11 @@
<defName>Damage_WULA_Melta_Small</defName> <defName>Damage_WULA_Melta_Small</defName>
<defaultDamage>5</defaultDamage> <defaultDamage>5</defaultDamage>
</DamageDef> </DamageDef>
<DamageDef ParentName="Bullet">
<defName>WULA_Shuttle_Autocannon_Bullet</defName>
<label>bullet</label>
<buildingDamageFactorPassable>0</buildingDamageFactorPassable>
</DamageDef>
</Defs> </Defs>

View File

@@ -1072,7 +1072,7 @@
</li> </li>
</comps> </comps>
</ThingDef> </ThingDef>
<ThingDef ParentName="BaseBullet"> <ThingDef Name="Bullet_WULA_WM_Panzer_Autocannon" ParentName="BaseBullet">
<defName>Bullet_WULA_WM_Panzer_Autocannon</defName> <defName>Bullet_WULA_WM_Panzer_Autocannon</defName>
<label>辉锑自动炮子弹</label> <label>辉锑自动炮子弹</label>
<thingClass>Projectile_Explosive</thingClass> <thingClass>Projectile_Explosive</thingClass>
@@ -1095,6 +1095,7 @@
<screenShakeFactor>0.1</screenShakeFactor> <screenShakeFactor>0.1</screenShakeFactor>
</projectile> </projectile>
</ThingDef> </ThingDef>
<AbilityDef> <AbilityDef>
<defName>WULA_WM_Panzer_Autocannon_Ability</defName> <defName>WULA_WM_Panzer_Autocannon_Ability</defName>
<label>PRr-34"石英"</label> <label>PRr-34"石英"</label>

View File

@@ -134,6 +134,7 @@
<chargeIntervalTicks>-1</chargeIntervalTicks> <chargeIntervalTicks>-1</chargeIntervalTicks>
<chargeDurationTicks>0</chargeDurationTicks> <chargeDurationTicks>0</chargeDurationTicks>
</li> </li>
<li Class="WulaFallenEmpire.CompProperties_ForceTargetable" />
</comps> </comps>
<placeWorkers> <placeWorkers>
<li>PlaceWorker_NotUnderRoof</li> <li>PlaceWorker_NotUnderRoof</li>
@@ -332,10 +333,9 @@
</comps> </comps>
</ThingDef> </ThingDef>
<ThingDef ParentName="BaseGun"> <ThingDef ParentName="BaseGun">
<defName>WULA_Shuttle_Autocannon</defName> <defName>WULA_Shuttle_Autocannon</defName>
<label>PMr-89"四叶"</label> <label>SRc-22"四叶"</label>
<description>由乌拉帝国的穿梭机所装备的自动炮,能够组织起高射速的弹幕压制杀伤大规模目标。</description> <description>由乌拉帝国的穿梭机所装备的自动炮,能够组织起高射速的弹幕压制杀伤大规模目标。</description>
<techLevel>Ultra</techLevel> <techLevel>Ultra</techLevel>
<relicChance>0</relicChance> <relicChance>0</relicChance>
@@ -353,10 +353,9 @@
<AccuracyShort>0.5</AccuracyShort> <AccuracyShort>0.5</AccuracyShort>
<AccuracyMedium>0.4</AccuracyMedium> <AccuracyMedium>0.4</AccuracyMedium>
<AccuracyLong>0.35</AccuracyLong> <AccuracyLong>0.35</AccuracyLong>
<RangedWeapon_Cooldown>1.35</RangedWeapon_Cooldown> <RangedWeapon_Cooldown>1.5</RangedWeapon_Cooldown>
</statBases> </statBases>
<weaponTags> <weaponTags>
<li>WULA_AI_Heavy_Panzer_Gunner_Weapon</li>
</weaponTags> </weaponTags>
<costList Inherit="False"> <costList Inherit="False">
<Steel>500</Steel> <Steel>500</Steel>
@@ -365,53 +364,47 @@
</costList> </costList>
<verbs> <verbs>
<li> <li>
<verbClass>WulaFallenEmpire.Verb_ShootShotgun</verbClass> <verbClass>Verb_Shoot</verbClass>
<hasStandardCommand>true</hasStandardCommand> <hasStandardCommand>true</hasStandardCommand>
<defaultProjectile>Bullet_Shuttle_Homing_Autocannon</defaultProjectile> <defaultProjectile>Bullet_WULA_Shuttle_Autocannon</defaultProjectile>
<warmupTime>1.2</warmupTime> <warmupTime>0.25</warmupTime>
<range>24</range> <range>24</range>
<burstShotCount>24</burstShotCount> <burstShotCount>10</burstShotCount>
<forcedMissRadius>0.35</forcedMissRadius>
<ticksBetweenBurstShots>6</ticksBetweenBurstShots> <ticksBetweenBurstShots>6</ticksBetweenBurstShots>
<soundCast>Shot_BeamRepeater</soundCast> <soundCast>Shot_TurretSniper</soundCast>
<soundCastTail>GunTail_Medium</soundCastTail> <soundCastTail>GunTail_Heavy</soundCastTail>
<muzzleFlashScale>9</muzzleFlashScale> <muzzleFlashScale>12</muzzleFlashScale>
<aimingChargeMote>Mote_BeamRepeater_Charge</aimingChargeMote> <targetParams>
<aimingChargeMoteOffset>1.07</aimingChargeMoteOffset> <canTargetPawns>true</canTargetPawns>
<canTargetLocations>true</canTargetLocations>
<canTargetBuildings>true</canTargetBuildings>
</targetParams>
</li> </li>
</verbs> </verbs>
</ThingDef> </ThingDef>
<ThingDef ParentName="BaseBullet"> <ThingDef ParentName="BaseBullet">
<defName>Bullet_Shuttle_Homing_Autocannon</defName> <defName>Bullet_WULA_Shuttle_Autocannon</defName>
<label>磷叶等离子体射</label> <label>四叶自动炮子</label>
<thingClass>Projectile_Explosive</thingClass>
<tickerType>Normal</tickerType>
<neverMultiSelect>True</neverMultiSelect>
<graphicData> <graphicData>
<texPath>Wula/Projectile/WULA_Bullet_Plasma</texPath> <texPath>Wula/Projectile/WULA_Bullet_ChargeLanceShot_Red_Double</texPath>
<graphicClass>Graphic_Single</graphicClass> <graphicClass>Graphic_Single</graphicClass>
<color>(61,199,157,202)</color> <shaderType>TransparentPostLight</shaderType>
<drawSize>(0.75,1)</drawSize> <drawSize>1.4</drawSize>
</graphicData> </graphicData>
<projectile> <projectile>
<damageDef>Bullet</damageDef> <damageDef>WULA_Shuttle_Autocannon_Bullet</damageDef>
<damageAmountBase>6</damageAmountBase> <damageAmountBase>14</damageAmountBase>
<speed>120</speed>
<explosionRadius>2.4</explosionRadius>
<arcHeightFactor>0.4</arcHeightFactor>
<soundExplode>Explosion_Rocket</soundExplode>
<armorPenetrationBase>0.75</armorPenetrationBase> <armorPenetrationBase>0.75</armorPenetrationBase>
<speed>60</speed> <screenShakeFactor>0.1</screenShakeFactor>
</projectile> </projectile>
<thingClass>WulaFallenEmpire.Projectile_WulaLineAttack</thingClass>
<modExtensions>
<li Class="WulaFallenEmpire.Wula_PathPierce_Extension">
<!-- 最多穿透3个目标设为-1则无限穿透 -->
<maxHits>-1</maxHits>
<!-- 每次穿透损失25%伤害 -->
<damageFalloff>0</damageFalloff>
<!-- 防止友军伤害 -->
<preventFriendlyFire>true</preventFriendlyFire>
<!-- 拖尾特效定义 -->
<tailFleckDef>WULA_GunTail_Plasma</tailFleckDef>
</li>
<li Class="WulaFallenEmpire.ShotgunExtension">
<pelletCount>2</pelletCount>
</li>
</modExtensions>
</ThingDef> </ThingDef>
<ThingDef ParentName="ShuttleSkyfallerBase"> <ThingDef ParentName="ShuttleSkyfallerBase">

File diff suppressed because one or more lines are too long

View File

@@ -1,28 +0,0 @@
using HarmonyLib;
using Verse;
using RimWorld;
namespace WulaFallenEmpire
{
[HarmonyPatch(typeof(Building_ArmedShuttle), "get_CanSetForcedTarget")]
public static class Patch_Building_ArmedShuttle_CanSetForcedTarget
{
/// <summary>
/// Postfix patch to allow armed shuttles with CompForceTargetable to be manually targeted.
/// </summary>
public static void Postfix(Building_ArmedShuttle __instance, ref bool __result)
{
// If the result is already true, no need to do anything.
if (__result)
{
return;
}
// Check if the shuttle has our marker component and belongs to the player.
if (__instance.GetComp<CompForceTargetable>() != null && __instance.Faction == Faction.OfPlayer)
{
__result = true;
}
}
}
}

View File

@@ -142,7 +142,7 @@ namespace WulaFallenEmpire
public virtual Verb AttackVerb => GunCompEq.PrimaryVerb; public virtual Verb AttackVerb => GunCompEq.PrimaryVerb;
public bool IsMannable => mannableComp != null; public bool IsMannable => mannableComp != null;
private bool PlayerControlled => (base.Faction == Faction.OfPlayer || MannedByColonist) && !MannedByNonColonist && !IsActivable; private bool PlayerControlled => (base.Faction == Faction.OfPlayer || MannedByColonist) && !MannedByNonColonist && !IsActivable;
protected virtual bool CanSetForcedTarget => mannableComp != null && PlayerControlled; protected virtual bool CanSetForcedTarget => (mannableComp != null || GetComp<CompForceTargetable>() != null) && PlayerControlled;
private bool CanToggleHoldFire => PlayerControlled; private bool CanToggleHoldFire => PlayerControlled;
private bool IsMortar => def.building.IsMortar; private bool IsMortar => def.building.IsMortar;
private bool IsMortarOrProjectileFliesOverhead => AttackVerb.ProjectileFliesOverhead() || IsMortar; private bool IsMortarOrProjectileFliesOverhead => AttackVerb.ProjectileFliesOverhead() || IsMortar;

View File

@@ -190,7 +190,6 @@
<Compile Include="HediffComp_GiveHediffsInRangeToRace.cs" /> <Compile Include="HediffComp_GiveHediffsInRangeToRace.cs" />
<Compile Include="CompForceTargetable.cs" /> <Compile Include="CompForceTargetable.cs" />
<Compile Include="Patch_ForceTargetable.cs" /> <Compile Include="Patch_ForceTargetable.cs" />
<Compile Include="Patch_ArmedShuttle_ForceTargetable.cs" />
<Compile Include="Verb\VerbProperties_Excalibur.cs" /> <Compile Include="Verb\VerbProperties_Excalibur.cs" />
<Compile Include="Verb\Verb_Excalibur.cs" /> <Compile Include="Verb\Verb_Excalibur.cs" />
</ItemGroup> </ItemGroup>