This commit is contained in:
Tourswen
2025-10-02 22:27:05 +08:00
parent 09579a936f
commit 01c95d60a0
23 changed files with 392 additions and 262 deletions

Binary file not shown.

View File

@@ -23,7 +23,7 @@
<hediffSolid>Crack</hediffSolid>
<additionalHediffs>
<li>
<hediff>ToxicBuildup</hediff>
<hediff>ARA_ToxicBuildup</hediff>
<severityPerDamageDealt>0.02</severityPerDamageDealt>
<victimSeverityScaling>ToxicResistance</victimSeverityScaling>
<inverseStatScaling>true</inverseStatScaling>

View File

@@ -825,8 +825,8 @@
<severity>1</severity>
</li>
<li Class="ArachnaeSwarm.CompProperties_AbilityResearchPrereq">
<requiredResearch>ARA_Technology_1MED</requiredResearch>
<failMessage>需要科技 节点MED-1"制药" 以解锁进化</failMessage>
<requiredResearch>ARA_Technology_1BAC</requiredResearch>
<failMessage>需要科技 节点BAC-1"育菌种" 以解锁进化</failMessage>
</li>
</comps>
</AbilityDef>

View File

@@ -85,6 +85,111 @@
</stages>
</HediffDef>
<HediffDef>
<defName>ARA_ToxicBuildup</defName>
<label>阿拉克涅神经毒素</label>
<description>阿拉克涅毒针所携带的神经毒素正在攻击这个殖民者,这种强力毒素将使得目标快速丧失行动能力并造成恶心眩晕感,还有可能导致永久的大脑损伤。</description>
<hediffClass>HediffWithComps</hediffClass>
<defaultLabelColor>(0.7, 1.0, 0.7)</defaultLabelColor>
<!-- <lethalSeverity>1</lethalSeverity> -->
<!-- <canApplyDodChanceForCapacityChanges>true</canApplyDodChanceForCapacityChanges> -->
<makesSickThought>true</makesSickThought>
<scenarioCanAdd>true</scenarioCanAdd>
<taleOnVisible>ToxicityRevealed</taleOnVisible>
<comps>
<li Class="HediffCompProperties_Immunizable">
<compClass>HediffComp_ImmunizableToxic</compClass>
<severityPerDayNotImmune>-0.08</severityPerDayNotImmune>
</li>
</comps>
<stages>
<li>
<label>initial</label>
<becomeVisible>false</becomeVisible>
</li>
<li>
<label>initial</label>
<minSeverity>0.04</minSeverity>
<capMods>
<li>
<capacity>Consciousness</capacity>
<offset>-0.1</offset>
</li>
</capMods>
</li>
<li>
<label>minor</label>
<minSeverity>0.2</minSeverity>
<capMods>
<li>
<capacity>Consciousness</capacity>
<offset>-0.2</offset>
</li>
</capMods>
</li>
<li>
<label>moderate</label>
<minSeverity>0.40</minSeverity>
<vomitMtbDays>5</vomitMtbDays>
<capMods>
<li>
<capacity>Consciousness</capacity>
<offset>-0.3</offset>
</li>
</capMods>
<hediffGivers>
<li Class="HediffGiver_Random">
<hediff>Dementia</hediff>
<mtbDays>146</mtbDays>
<partsToAffect>
<li>Brain</li>
</partsToAffect>
</li>
</hediffGivers>
</li>
<li>
<label>serious</label>
<minSeverity>0.60</minSeverity>
<vomitMtbDays>1</vomitMtbDays>
<capMods>
<li>
<capacity>Consciousness</capacity>
<setMax>0.3</setMax>
</li>
</capMods>
<hediffGivers>
<li Class="HediffGiver_Random">
<hediff>Dementia</hediff>
<mtbDays>37</mtbDays>
<partsToAffect>
<li>Brain</li>
</partsToAffect>
</li>
</hediffGivers>
</li>
<li>
<label>extreme</label>
<minSeverity>0.80</minSeverity>
<vomitMtbDays>0.5</vomitMtbDays>
<capMods>
<li>
<capacity>Consciousness</capacity>
<setMax>0.10</setMax>
</li>
</capMods>
<hediffGivers>
<li Class="HediffGiver_Random">
<hediff>Dementia</hediff>
<mtbDays>13</mtbDays>
<partsToAffect>
<li>Brain</li>
</partsToAffect>
</li>
</hediffGivers>
</li>
</stages>
</HediffDef>
<HediffDef>
<defName>ARA_SkyhiveBite</defName>
<label>天巢种虫族附着</label>

View File

@@ -225,6 +225,57 @@
<initialSeverity>1</initialSeverity> <!-- 初始层数设置为10 -->
<maxSeverity>1</maxSeverity> <!-- 最大层数,可以根据需要调整 -->
</HediffDef>
<RecipeDef ParentName="ARA_SurgeryInstallImplantBase">
<defName>ARA_Surgery_Install_Carapace_Shell</defName>
<label>甲壳增殖</label>
<description>以甲壳素为阿拉克涅虫族的甲壳进行加厚,获得额外的防御力。</description>
<descriptionHyperlinks>
<HediffDef>ARA_Carapace_Shell_Hediff</HediffDef>
</descriptionHyperlinks>
<jobString>正在实施定向变异</jobString>
<ingredients>
<li>
<filter>
<thingDefs>
<li>ARA_Carapace</li>
</thingDefs>
</filter>
<count>25</count>
</li>
</ingredients>
<fixedIngredientFilter>
<thingDefs>
<li>ARA_Carapace</li>
</thingDefs>
</fixedIngredientFilter>
<appliedOnFixedBodyParts>
<li>ARA_Chitin_Shell</li>
</appliedOnFixedBodyParts>
<addsHediff>ARA_Carapace_Shell_Hediff</addsHediff>
<researchPrerequisite>ARA_Technology_1EVO</researchPrerequisite>
</RecipeDef>
<HediffDef ParentName="AddedBodyPartBase">
<defName>ARA_Carapace_Shell_Hediff</defName>
<label>甲壳增殖</label>
<description>这只阿拉克涅虫族的甲壳以甲壳素进行了增厚,获得了额外防御力。</description>
<hediffClass>Hediff_Implant</hediffClass>
<defaultLabelColor>(0.52, 1, 0.95)</defaultLabelColor>
<descriptionHyperlinks>
<RecipeDef>ARA_Surgery_Install_Carapace_Shell</RecipeDef>
</descriptionHyperlinks>
<stages>
<li>
<statOffsets>
<ArmorRating_Sharp>0.25</ArmorRating_Sharp>
<ArmorRating_Blunt>0.25</ArmorRating_Blunt>
</statOffsets>
</li>
</stages>
<isBad>false</isBad>
<debugLabelExtra>other</debugLabelExtra>
<initialSeverity>1</initialSeverity> <!-- 初始层数设置为10 -->
<maxSeverity>1</maxSeverity> <!-- 最大层数,可以根据需要调整 -->
</HediffDef>
<!-- 腿部 -->
<RecipeDef ParentName="ARA_SurgeryInstallImplantBase">

View File

@@ -95,18 +95,6 @@
<prerequisites>
<li>ARA_Technology_2WMT</li>
</prerequisites>
</ResearchProjectDef>
<ResearchProjectDef ParentName="ARA_techBase">
<defName>ARA_Technology_9RVXI</defName>
<label>节点VXI-9X"热熔酸雾"</label>
<description>允许工艺种孵化新的武器。</description>
<baseCost>1000</baseCost>
<researchViewX>11.00</researchViewX>
<researchViewY>2.10</researchViewY>
<requiredResearchBuilding>ARA_ResearchBench</requiredResearchBuilding>
<prerequisites>
<li>ARA_Technology_9VXI</li>
</prerequisites>
</ResearchProjectDef>
<ResearchProjectDef ParentName="ARA_techBase">
<defName>ARA_Technology_10VXI</defName>
@@ -596,8 +584,8 @@
<!-- 改造发展 -->
<ResearchProjectDef ParentName="ARA_techBase">
<defName>ARA_Technology_1EVO</defName>
<label>节点EVO-1"大胃袋"</label>
<description>允许实行新的阿拉克涅进化手术,允许阿拉克涅虫族获得更大的营养储存能力。</description>
<label>节点EVO-1"初级进化"</label>
<description>允许实行新的阿拉克涅进化手术,使得阿拉克涅虫族获得更大的营养储存能力和更厚的甲壳</description>
<baseCost>250</baseCost>
<researchViewX>1.00</researchViewX>
<researchViewY>4.40</researchViewY>

View File

@@ -334,6 +334,7 @@
<li>ARA_MW_Cartilage_Whip</li>
<li>ARA_MW_Scything_Talons</li>
<li>ARA_RW_Missile_HG_Gun</li>
<li>ARA_RW_Toxic_Needle_SG</li>
</weaponList>
<onlyUseRaceRestrictedWeapons>false</onlyUseRaceRestrictedWeapons>
<!-- 可以穿戴的衣服 -->
@@ -693,8 +694,9 @@
<weaponList>
<li>ARA_RW_Acid_Mortar</li>
<li>ARA_RW_Basic_SniperCannon_Gun</li>
<li>ARA_RW_Basic_Acid_Spreay_Gun</li>
<li>ARA_RW_Basic_FireSpewer_Gun</li>
<li>ARA_RW_Missile_AR_Gun</li>
<li>ARA_RW_Basic_Rail_Gun</li>
</weaponList>
</raceRestriction>
</alienRace>
@@ -1479,7 +1481,7 @@
<race>
<!-- 身体类型 -->
<body>ArachnaeFighter_Body</body>
<body>ArachnaeSkyraider_Body</body>
<renderTree>ARA_ArachnaeRenderTree</renderTree>
<flightStartChanceOnJobStart>1.0</flightStartChanceOnJobStart>
<!-- <baseBodySize>0.8</baseBodySize> -->

View File

@@ -1,3 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Defs>
</Defs>

View File

@@ -300,8 +300,8 @@
<warmupTime>0.25</warmupTime>
<defaultProjectile>Bullet_ARA_RW_Basic_Fist_Needle_Gun</defaultProjectile>
<range>14</range>
<burstShotCount>6</burstShotCount>
<ticksBetweenBurstShots>2</ticksBetweenBurstShots>
<burstShotCount>4</burstShotCount>
<ticksBetweenBurstShots>4</ticksBetweenBurstShots>
<soundCast>SpitterSpit</soundCast>
<targetParams>
<canTargetLocations>true</canTargetLocations>
@@ -468,7 +468,7 @@
<ThingDef>ARA_Cocoon_Weapon_1Stage</ThingDef>
</descriptionHyperlinks>
<graphicData>
<texPath>ArachnaeSwarm/Weapon/ARA_RW_Toxic_Needle_MG</texPath>
<texPath>ArachnaeSwarm/Weapon/ARA_RW_Toxic_Needle_SG</texPath>
<graphicClass>Graphic_Single</graphicClass>
<drawSize>1</drawSize>
</graphicData>
@@ -536,7 +536,6 @@
</li>
</comps>
</ThingDef>
<ThingDef ParentName="BaseBullet">
<defName>ARA_Bullet_SniperCannon</defName>
<label>阿拉克涅棘刺</label>
@@ -553,7 +552,6 @@
<speed>120</speed>
</projectile>
</ThingDef>
<ThingDef ParentName="BaseHumanMakeableGun">
<defName>ARA_RW_Basic_SniperCannon_Gun</defName>
<label>武装器官"血链棘刺炮"</label>
@@ -635,7 +633,6 @@
</li>
</comps>
</ThingDef>
<ThingDef ParentName="BaseBullet">
<defName>ARA_Bullet_Rail</defName>
<label>阿拉克涅穿梭棘刺</label>
@@ -661,10 +658,9 @@
<stoppingPower>5</stoppingPower>
</projectile>
</ThingDef>
<ThingDef ParentName="BaseHumanMakeableGun">
<defName>ARA_RW_Basic_Rail_Gun</defName>
<label>武装器官"血棘穿梭炮"</label>
<label>武装器官"血棘梭炮"</label>
<description>阿拉克涅虫群的大型武装器官,拥有张牙舞爪的侵略性外形,其口器与一连串可以增生巨型棘刺的血链相连,并通过肌肉压缩获得极高的膛压以射出腔内破坏力惊人的棘刺。这种改型进一步提高了膛压能够发射出具有极强穿透力的巨型棘刺,但缺少快速发射的能力。</description>
<tickerType>Normal</tickerType>
<techLevel>Animal</techLevel>
@@ -672,7 +668,7 @@
<ThingDef>ARA_Cocoon_Weapon_2Stage</ThingDef>
</descriptionHyperlinks>
<graphicData>
<texPath>ArachnaeSwarm/Weapon/ARA_RW_Basic_SniperCannon_Gun</texPath>
<texPath>ArachnaeSwarm/Weapon/ARA_RW_Basic_Rail_Gun</texPath>
<graphicClass>Graphic_Single</graphicClass>
<drawSize>1.5</drawSize>
</graphicData>
@@ -851,20 +847,19 @@
</projectile>
</ThingDef>
<ThingDef ParentName="BaseHumanMakeableGun">
<defName>ARA_RW_Basic_Acid_Spreay_Gun</defName>
<defName>ARA_RW_Basic_FireSpewer_Gun</defName>
<label>武装器官"炎酸炮"</label>
<description>阿拉克涅虫群的大型远程武装器官,拥有布满酸腺的液囊和强健的肌肉纤管,可以向瞄准的方向喷射酸雨,覆盖范围内的敌人并融化它们的装甲和血肉。</description>
<description>阿拉克涅虫群的大型远程武装器官,拥有布满酸腺的液囊和强健的肌肉纤管,可以向瞄准的方向喷射火酸热熔气团,覆盖范围内的敌人并融化它们的装甲和血肉。</description>
<tickerType>Normal</tickerType>
<techLevel>Animal</techLevel>
<descriptionHyperlinks>
<ThingDef>ARA_Cocoon_Weapon_1Stage</ThingDef>
</descriptionHyperlinks>
<graphicData>
<texPath>ArachnaeSwarm/Weapon/ARA_RW_Basic_Acid_Spreay_Gun</texPath>
<texPath>ArachnaeSwarm/Weapon/ARA_RW_Basic_FireSpewer_Gun</texPath>
<graphicClass>Graphic_Single</graphicClass>
<drawSize>1.5</drawSize>
<drawSize>1.2</drawSize>
</graphicData>
<uiIconScale>0.75</uiIconScale>
<soundInteract>SpitterSpawn</soundInteract>
<recipeMaker>
<recipeUsers Inherit="False" />
@@ -880,27 +875,30 @@
<AccuracyMedium>0.45</AccuracyMedium>
<AccuracyLong>0.3</AccuracyLong>
<RangedWeapon_Cooldown>2.5</RangedWeapon_Cooldown>
<ARA_IncubationCost>200</ARA_IncubationCost>
<ARA_IncubationTime>8</ARA_IncubationTime>
<ARA_IncubationCost>450</ARA_IncubationCost>
<ARA_IncubationTime>15</ARA_IncubationTime>
</statBases>
<verbs>
<li Class="ArachnaeSwarm.VerbProperties_ShootSprayMulti">
<verbClass>ArachnaeSwarm.Verb_ShootSprayMulti</verbClass>
<li Class="ArachnaeSwarm.VerbProperties_FireSpew">
<verbClass>ArachnaeSwarm.Verb_ShootFireSpew</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<forceNormalTimeSpeed>false</forceNormalTimeSpeed>
<warmupTime>1.0</warmupTime>
<defaultProjectile>ARA_Proj_StrongSludgeSpray_Eco</defaultProjectile>
<isMortar>false</isMortar>
<requireLineOfSight>false</requireLineOfSight>
<minRange>3</minRange>
<range>28</range>
<burstShotCount>8</burstShotCount>
<ticksBetweenBurstShots>2</ticksBetweenBurstShots>
<soundCast>SpitterSpit</soundCast>
<targetParams>
<canTargetLocations>true</canTargetLocations>
</targetParams>
<numCellsToHit>4</numCellsToHit>
<warmupTime>1.5</warmupTime>
<range>16</range> <!-- Standard range property -->
<ticksBetweenBurstShots>12</ticksBetweenBurstShots>
<burstShotCount>3</burstShotCount>
<soundCast>Shot_MiniFlameblaster</soundCast>
<soundCastTail>GunTail_Medium</soundCastTail>
<muzzleFlashScale>9</muzzleFlashScale>
<!-- Custom Properties for the modified Verb_SpewFire logic -->
<degrees>15</degrees>
<damageDef>ARA_AcidBurn</damageDef>
<damageAmount>12</damageAmount>
<filthDef>Filth_SpentAcid</filthDef>
<effecterDef>ARA_Fire_Spew</effecterDef>
<propagationSpeed>0.5</propagationSpeed>
<chanceToStartFire>0</chanceToStartFire>
<avoidFriendlyFire>false</avoidFriendlyFire>
</li>
</verbs>
<costList Inherit="False">
@@ -933,6 +931,71 @@
</li>
</comps>
</ThingDef>
<EffecterDef>
<defName>ARA_Fire_Spew</defName>
<children>
<li>
<subEffecterClass>SubEffecter_SprayerChance</subEffecterClass>
<positionRadius>0.15</positionRadius>
<fleckDef>ARA_FireSpew_A</fleckDef>
<chancePerTick>0.9</chancePerTick>
<burstCount>5~10</burstCount>
<speed>15.5</speed>
<scale>0.8~1.2</scale>
<angle>-15~15</angle>
<positionLerpFactor>0.85</positionLerpFactor>
<fleckUsesAngleForVelocity>true</fleckUsesAngleForVelocity>
</li>
<li>
<subEffecterClass>SubEffecter_SprayerChance</subEffecterClass>
<positionRadius>0.1</positionRadius>
<fleckDef>FireSpew_Base</fleckDef>
<chancePerTick>0.1</chancePerTick>
<speed>0.6</speed>
<scale>0.8</scale>
<angle>-9~9</angle>
<positionLerpFactor>0.75</positionLerpFactor>
<fleckUsesAngleForVelocity>true</fleckUsesAngleForVelocity>
</li>
<li>
<subEffecterClass>SubEffecter_SprayerChance</subEffecterClass>
<positionRadius>0.1</positionRadius>
<moteDef>Mote_SparkThrownFast</moteDef>
<chancePerTick>0.5</chancePerTick>
<speed>3.3~5</speed>
<scale>0.1~0.2</scale>
<angle>-12~12</angle>
<positionLerpFactor>0.8</positionLerpFactor>
<fleckUsesAngleForVelocity>true</fleckUsesAngleForVelocity>
</li>
<li>
<subEffecterClass>SubEffecter_SprayerChance</subEffecterClass>
<positionRadius>0.2</positionRadius>
<fleckDef>FireSpew_Glow</fleckDef>
<chancePerTick>0.16</chancePerTick>
<positionLerpFactor>0.65</positionLerpFactor>
</li>
</children>
</EffecterDef>
<FleckDef ParentName="FleckBase_Thrown">
<defName>ARA_FireSpew_A</defName>
<altitudeLayer>MoteOverhead</altitudeLayer>
<fadeInTime>0.2</fadeInTime>
<solidTime>0.5</solidTime>
<fadeOutTime>0.2</fadeOutTime>
<rotateTowardsMoveDirection>true</rotateTowardsMoveDirection>
<rotateTowardsMoveDirectionExtraAngle>-90</rotateTowardsMoveDirectionExtraAngle>
<graphicData>
<graphicClass>Graphic_FleckPulse</graphicClass>
<shaderType>GlowAnimated</shaderType>
<texPath>ArachnaeSwarm/Mote/ARA_FireSpew_B</texPath>
<shaderParameters>
<_NumFrames>5</_NumFrames>
<_FramesPerSec>7</_FramesPerSec>
</shaderParameters>
<drawSize>1.2</drawSize>
</graphicData>
</FleckDef>
<ThingDef ParentName="BaseHumanMakeableGun">
<defName>ARA_RW_Acid_Mortar</defName>
<label>武装器官"腐蚀臼炮"</label>

View File

@@ -1,156 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<ThingDef ParentName="BaseHumanMakeableGun">
<defName>ARA_RW_Basic_FireSpewer_Gun</defName>
<label>武装器官"害虫克星"</label>
<description>阿拉克涅虫群督虫使用基础远程武装器官,可以加压喷出热熔气团。瞬间伤害路径范围内的所有敌人。</description>
<tickerType>Normal</tickerType>
<techLevel>Animal</techLevel>
<descriptionHyperlinks>
<ThingDef>ARA_Cocoon_Weapon_2Stage</ThingDef>
</descriptionHyperlinks>
<graphicData>
<texPath>ArachnaeSwarm/Weapon/ARA_RW_Basic_Acid_Bladder_Gun</texPath>
<graphicClass>Graphic_Single</graphicClass>
<drawSize>1.2</drawSize>
</graphicData>
<soundInteract>SpitterSpawn</soundInteract>
<recipeMaker>
<recipeUsers Inherit="False" />
<researchPrerequisite>ARA_Technology_9RVXI</researchPrerequisite>
<unfinishedThingDef>UnfinishedWeapon</unfinishedThingDef>
</recipeMaker>
<statBases>
<WorkToMake>1300</WorkToMake>
<!-- <MarketValue>370</MarketValue> -->
<Mass>3.5</Mass>
<AccuracyTouch>0.5</AccuracyTouch>
<AccuracyShort>0.6</AccuracyShort>
<AccuracyMedium>0.45</AccuracyMedium>
<AccuracyLong>0.3</AccuracyLong>
<RangedWeapon_Cooldown>2.5</RangedWeapon_Cooldown>
<ARA_IncubationCost>450</ARA_IncubationCost>
<ARA_IncubationTime>15</ARA_IncubationTime>
</statBases>
<verbs>
<li Class="ArachnaeSwarm.VerbProperties_FireSpew">
<verbClass>ArachnaeSwarm.Verb_ShootFireSpew</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<warmupTime>1.5</warmupTime>
<range>16</range> <!-- Standard range property -->
<ticksBetweenBurstShots>12</ticksBetweenBurstShots>
<burstShotCount>3</burstShotCount>
<soundCast>Shot_MiniFlameblaster</soundCast>
<soundCastTail>GunTail_Medium</soundCastTail>
<muzzleFlashScale>9</muzzleFlashScale>
<!-- Custom Properties for the modified Verb_SpewFire logic -->
<degrees>15</degrees>
<damageDef>ARA_AcidBurn</damageDef>
<damageAmount>12</damageAmount>
<filthDef>Filth_SpentAcid</filthDef>
<effecterDef>ARA_Fire_Spew</effecterDef>
<propagationSpeed>0.5</propagationSpeed>
<chanceToStartFire>0</chanceToStartFire>
<avoidFriendlyFire>false</avoidFriendlyFire>
</li>
</verbs>
<costList Inherit="False">
<ARA_Carapace>50</ARA_Carapace>
</costList>
<weaponTags Inherit="False">
<li>ARA_Armed_Organ</li>
<li>ARA_Armed_Organ_Ranged</li>
<li>ARA_Armed_Organ_T1</li>
</weaponTags>
<thingSetMakerTags>
<li>RewardStandardQualitySuper</li>
</thingSetMakerTags>
<comps>
<li Class="ArachnaeSwarm.CompProperties_ExtraIncubationInfo">
<cocoonDefs>
<li>ARA_Cocoon_Weapon_2Stage</li>
<li>ARA_BioforgeIncubator_Thing</li>
</cocoonDefs>
</li>
<li Class="ArachnaeSwarm.CompProperties_CustomUniqueWeapon" MayRequire="Ludeon.RimWorld.Odyssey">
<forcedTraits>
<li>ARA_Weapon_Damage_Acid</li>
</forcedTraits>
<numTraitsRange>
<min>1</min>
<max>1</max>
</numTraitsRange>
</li>
</comps>
</ThingDef>
<EffecterDef>
<defName>ARA_Fire_Spew</defName>
<children>
<li>
<subEffecterClass>SubEffecter_SprayerChance</subEffecterClass>
<positionRadius>0.15</positionRadius>
<fleckDef>ARA_FireSpew_A</fleckDef>
<chancePerTick>0.9</chancePerTick>
<burstCount>5~10</burstCount>
<speed>15.5</speed>
<scale>0.8~1.2</scale>
<angle>-15~15</angle>
<positionLerpFactor>0.85</positionLerpFactor>
<fleckUsesAngleForVelocity>true</fleckUsesAngleForVelocity>
</li>
<li>
<subEffecterClass>SubEffecter_SprayerChance</subEffecterClass>
<positionRadius>0.1</positionRadius>
<fleckDef>FireSpew_Base</fleckDef>
<chancePerTick>0.1</chancePerTick>
<speed>0.6</speed>
<scale>0.8</scale>
<angle>-9~9</angle>
<positionLerpFactor>0.75</positionLerpFactor>
<fleckUsesAngleForVelocity>true</fleckUsesAngleForVelocity>
</li>
<li>
<subEffecterClass>SubEffecter_SprayerChance</subEffecterClass>
<positionRadius>0.1</positionRadius>
<moteDef>Mote_SparkThrownFast</moteDef>
<chancePerTick>0.5</chancePerTick>
<speed>3.3~5</speed>
<scale>0.1~0.2</scale>
<angle>-12~12</angle>
<positionLerpFactor>0.8</positionLerpFactor>
<fleckUsesAngleForVelocity>true</fleckUsesAngleForVelocity>
</li>
<li>
<subEffecterClass>SubEffecter_SprayerChance</subEffecterClass>
<positionRadius>0.2</positionRadius>
<fleckDef>FireSpew_Glow</fleckDef>
<chancePerTick>0.16</chancePerTick>
<positionLerpFactor>0.65</positionLerpFactor>
</li>
</children>
</EffecterDef>
<FleckDef ParentName="FleckBase_Thrown">
<defName>ARA_FireSpew_A</defName>
<altitudeLayer>MoteOverhead</altitudeLayer>
<fadeInTime>0.2</fadeInTime>
<solidTime>0.5</solidTime>
<fadeOutTime>0.2</fadeOutTime>
<rotateTowardsMoveDirection>true</rotateTowardsMoveDirection>
<rotateTowardsMoveDirectionExtraAngle>-90</rotateTowardsMoveDirectionExtraAngle>
<graphicData>
<graphicClass>Graphic_FleckPulse</graphicClass>
<shaderType>GlowAnimated</shaderType>
<texPath>ArachnaeSwarm/Mote/ARA_FireSpew_B</texPath>
<shaderParameters>
<_NumFrames>5</_NumFrames>
<_FramesPerSec>7</_FramesPerSec>
</shaderParameters>
<drawSize>1.2</drawSize>
</graphicData>
</FleckDef>
</Defs>

View File

@@ -763,7 +763,7 @@
<description>一个布满尖刺的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一个武装器官的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感该类型的茧适温为-20~35°C需要小心保护</description>
<descriptionHyperlinks>
<ThingDef>ARA_MW_Cartilage_Whip</ThingDef>
<ThingDef>ARA_RW_Basic_Acid_Spreay_Gun</ThingDef>
<ThingDef>ARA_RW_Basic_FireSpewer_Gun</ThingDef>
<ThingDef>ARA_RW_Toxic_Needle_SG</ThingDef>
<ThingDef>ARA_RW_Toxic_Needle_MG</ThingDef>
<ThingDef>ARA_RW_Basic_SkyHive_Gun</ThingDef>
@@ -786,33 +786,6 @@
</li>
<!-- The refactored producer component -->
<li Class="ArachnaeSwarm.CompProperties_InteractiveProducer">
<!-- <processes>
<li>
<thingDef>ARA_MW_Cartilage_Whip</thingDef>
<productionTicks>240000</productionTicks>
<totalNutritionNeeded>30</totalNutritionNeeded>
<requiredResearch>ARA_Technology_2MEL</requiredResearch>
</li>
<li>
<thingDef>ARA_RW_Basic_Acid_Spreay_Gun</thingDef>
<productionTicks>240000</productionTicks>
<totalNutritionNeeded>30</totalNutritionNeeded>
<requiredResearch>ARA_Technology_8VXI</requiredResearch>
</li>
<li>
<thingDef>ARA_RW_Toxic_Needle_MG</thingDef>
<productionTicks>180000</productionTicks>
<totalNutritionNeeded>25</totalNutritionNeeded>
<requiredResearch>ARA_Technology_6PAV</requiredResearch>
</li>
<li>
<thingDef>ARA_RW_Basic_SkyHive_Gun</thingDef>
<productionTicks>180000</productionTicks>
<totalNutritionNeeded>25</totalNutritionNeeded>
<requiredResearch>ARA_Technology_6SPV</requiredResearch>
</li>
</processes> -->
<whitelist>
<li>ArachnaeNode_Race_WeaponSmith</li>
</whitelist>
@@ -951,7 +924,6 @@
<description>一个布满尖刺的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一个武装器官的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感该类型的茧适温为21~30°C需要小心保护</description>
<descriptionHyperlinks>
<ThingDef>ARA_RW_Basic_SniperCannon_Gun</ThingDef>
<ThingDef>ARA_RW_Basic_FireSpewer_Gun</ThingDef>
<ThingDef>ARA_RW_Missile_HG_Gun</ThingDef>
<ThingDef>ARA_RW_Missile_AR_Gun</ThingDef>
<ThingDef>ARA_RW_Acid_Mortar</ThingDef>

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@@ -2,6 +2,10 @@
"Version": 1,
"WorkspaceRootPath": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|e:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\building_comps\\ara_compinteractiveproducer\\compinteractiveproducer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:building_comps\\ara_compinteractiveproducer\\compinteractiveproducer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|e:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\building_comps\\wula_mutifuelspawner\\comprefuelablenutrition_withkey.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:building_comps\\wula_mutifuelspawner\\comprefuelablenutrition_withkey.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
@@ -23,12 +27,25 @@
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "CompInteractiveProducer.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\ARA_CompInteractiveProducer\\CompInteractiveProducer.cs",
"RelativeDocumentMoniker": "Building_Comps\\ARA_CompInteractiveProducer\\CompInteractiveProducer.cs",
"ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\ARA_CompInteractiveProducer\\CompInteractiveProducer.cs",
"RelativeToolTip": "Building_Comps\\ARA_CompInteractiveProducer\\CompInteractiveProducer.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAB4AAAA0AAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-10-02T10:43:34.234Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "CompRefuelableNutrition_WithKey.cs",
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\WULA_MutiFuelSpawner\\CompRefuelableNutrition_WithKey.cs",
"RelativeDocumentMoniker": "Building_Comps\\WULA_MutiFuelSpawner\\CompRefuelableNutrition_WithKey.cs",
"ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Building_Comps\\WULA_MutiFuelSpawner\\CompRefuelableNutrition_WithKey.cs",
"RelativeToolTip": "Building_Comps\\WULA_MutiFuelSpawner\\CompRefuelableNutrition_WithKey.cs",
"ViewState": "AgIAABwAAAAAAAAAAAAUwFsAAAAcAAAAAAAAAA==",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAFsAAAAcAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-10-02T06:18:10.518Z",
"EditorCaption": ""

View File

@@ -101,6 +101,22 @@ namespace ArachnaeSwarm
Log.Warning($"Could not find ProcessDef for {selectedProcessThingDef.defName} after loading. Resetting production.");
ResetProduction();
}
// 关键修复:检查时间戳是否有效
else if (productionUntilTick > 0)
{
// 如果生产结束时间已经过去,立即完成生产
if (Find.TickManager.TicksGame >= productionUntilTick)
{
Log.Warning($"Production time already passed for {selectedProcessThingDef.defName}. Finishing immediately.");
FinishProduction();
}
// 如果时间戳异常(比如超过游戏当前时间太多),重新计算
else if (productionUntilTick - Find.TickManager.TicksGame > _selectedProcess.productionTicks * 10)
{
Log.Warning($"Abnormal production time detected for {selectedProcessThingDef.defName}. Recalculating.");
productionUntilTick = Find.TickManager.TicksGame + _selectedProcess.productionTicks;
}
}
}
}
@@ -205,6 +221,14 @@ namespace ArachnaeSwarm
base.CompTick();
if (InProduction && productionUntilTick > 0)
{
// 关键修复:添加时间戳有效性检查
if (productionUntilTick <= 0)
{
Log.Error($"Invalid productionUntilTick: {productionUntilTick}. Resetting production.");
ResetProduction();
return;
}
if (FuelComp == null) return;
bool hasFuel = FuelComp.HasFuel;
@@ -212,6 +236,10 @@ namespace ArachnaeSwarm
if (!hasFuel)
{
parent.TakeDamage(new DamageInfo(DamageDefOf.Rotting, Props.damagePerTickWhenUnfueled));
// 修复:没有燃料时不推进生产,而是暂停
// 移除原来的 productionUntilTick++ 逻辑
return;
}
float ambientTemperature = parent.AmbientTemperature;
@@ -226,7 +254,8 @@ namespace ArachnaeSwarm
temperaturePenaltyPercent = Mathf.Min(1f, temperaturePenaltyPercent + tempDelta * Props.penaltyPerDegreePerTick);
}
if (Find.TickManager.TicksGame >= productionUntilTick)
// 修复:添加额外的边界检查
if (productionUntilTick > 0 && Find.TickManager.TicksGame >= productionUntilTick)
{
FinishProduction();
}
@@ -306,27 +335,37 @@ namespace ArachnaeSwarm
{
if (_selectedProcess == null)
{
Log.Warning("FinishProduction called but _selectedProcess is null. Resetting.");
ResetProduction();
return;
}
var qualityDetails = GetEstimatedQualityDetails();
QualityCategory finalQuality = qualityDetails.quality;
for (int i = 0; i < Props.spawnCount.RandomInRange; i++)
try
{
Thing product = ThingMaker.MakeThing(_selectedProcess.thingDef);
product.TryGetComp<CompQuality>()?.SetQuality(finalQuality, ArtGenerationContext.Colony);
GenPlace.TryPlaceThing(product, parent.Position, parent.Map, ThingPlaceMode.Near);
}
var qualityDetails = GetEstimatedQualityDetails();
QualityCategory finalQuality = qualityDetails.quality;
if (Props.destroyOnSpawn)
for (int i = 0; i < Props.spawnCount.RandomInRange; i++)
{
Thing product = ThingMaker.MakeThing(_selectedProcess.thingDef);
product.TryGetComp<CompQuality>()?.SetQuality(finalQuality, ArtGenerationContext.Colony);
GenPlace.TryPlaceThing(product, parent.Position, parent.Map, ThingPlaceMode.Near);
}
if (Props.destroyOnSpawn)
{
parent.Destroy(DestroyMode.Vanish);
}
}
catch (System.Exception ex)
{
parent.Destroy(DestroyMode.Vanish);
Log.Error($"Error in FinishProduction: {ex.Message}");
}
finally
{
ResetProduction();
}
ResetProduction();
}
private void ResetProduction()
@@ -378,6 +417,16 @@ namespace ArachnaeSwarm
icon = CancelIcon,
action = () => ResetProduction()
};
// 调试命令:强制完成生产
if (Prefs.DevMode)
{
yield return new Command_Action
{
defaultLabel = "Debug: Force Finish",
action = () => FinishProduction()
};
}
}
}
}

View File

@@ -141,6 +141,13 @@ namespace ArachnaeSwarm
foreach(var order in producingOrders)
{
// 关键修复:检查时间戳有效性
if (order.productionUntilTick <= 0)
{
Log.Error($"Invalid productionUntilTick: {order.productionUntilTick} for {order.process?.thingDef?.defName}. Skipping.");
continue;
}
if(hasFuel && isTempSafe)
{
order.ticksUnderOptimalConditions++;
@@ -150,10 +157,8 @@ namespace ArachnaeSwarm
float tempDelta = (ambientTemperature > Props.maxSafeTemperature) ? ambientTemperature - Props.maxSafeTemperature : Props.minSafeTemperature - ambientTemperature;
order.temperaturePenaltyPercent = Mathf.Min(1f, order.temperaturePenaltyPercent + tempDelta * Props.penaltyPerDegreePerTick);
}
if (!hasFuel)
{
order.productionUntilTick++;
}
// 修复:移除原来的 order.productionUntilTick++ 逻辑
// 没有燃料时暂停生产
}
if (FuelComp != null)
@@ -217,14 +222,27 @@ namespace ArachnaeSwarm
private void FinishProduction(QueuedProcessOrder order)
{
var qualityDetails = GetEstimatedQualityDetails(order);
QualityCategory finalQuality = qualityDetails.quality;
for (int i = 0; i < Props.spawnCount.RandomInRange; i++)
if (order.process == null)
{
Thing product = ThingMaker.MakeThing(order.process.thingDef);
product.TryGetComp<CompQuality>()?.SetQuality(finalQuality, ArtGenerationContext.Colony);
GenPlace.TryPlaceThing(product, parent.Position, parent.Map, ThingPlaceMode.Near);
Log.Warning("FinishProduction called but order.process is null. Skipping.");
return;
}
try
{
var qualityDetails = GetEstimatedQualityDetails(order);
QualityCategory finalQuality = qualityDetails.quality;
for (int i = 0; i < Props.spawnCount.RandomInRange; i++)
{
Thing product = ThingMaker.MakeThing(order.process.thingDef);
product.TryGetComp<CompQuality>()?.SetQuality(finalQuality, ArtGenerationContext.Colony);
GenPlace.TryPlaceThing(product, parent.Position, parent.Map, ThingPlaceMode.Near);
}
}
catch (System.Exception ex)
{
Log.Error($"Error in FinishProduction for {order.process.thingDef.defName}: {ex.Message}");
}
}
@@ -306,6 +324,26 @@ namespace ArachnaeSwarm
Log.Warning($"CompQueuedInteractiveProducer: Could not find a matching ProcessDef for '{order.tempThingDefName}' after loading. The item may have been removed. Removing order.");
return true;
}
// 关键修复:检查加载后的时间戳有效性
if (order.productionUntilTick > 0)
{
// 如果生产结束时间已经过去,立即完成生产
if (Find.TickManager.TicksGame >= order.productionUntilTick)
{
Log.Warning($"Production time already passed for {order.tempThingDefName}. Finishing immediately.");
FinishProduction(order);
return true;
}
// 如果时间戳异常(比如超过游戏当前时间太多),重新计算
else if (order.productionUntilTick - Find.TickManager.TicksGame > order.process.productionTicks * 10)
{
Log.Warning($"Abnormal production time detected for {order.tempThingDefName}. Recalculating.");
float speedFactor = 1f + (FacilitiesComp?.GetStatOffset(StatDef.Named("ARA_IncubationSpeedFactor")) ?? 0f);
int modifiedDelay = (int)(order.process.productionTicks / speedFactor);
order.productionUntilTick = Find.TickManager.TicksGame + modifiedDelay;
}
}
return false;
});
@@ -419,4 +457,4 @@ namespace ArachnaeSwarm
return 10f;
}
}
}
}