大量更新

This commit is contained in:
Tourswen
2025-09-21 02:08:51 +08:00
parent 534cb901d4
commit ec4a6631fd
50 changed files with 1524 additions and 241 deletions

Binary file not shown.

View File

@@ -35,7 +35,7 @@
<defName>ARA_RaceBaseSwarmProduceOn</defName> <defName>ARA_RaceBaseSwarmProduceOn</defName>
<label>取消繁育抑制</label> <label>取消繁育抑制</label>
<description>重启该阿拉克涅督虫自动抚育辅虫的能力。</description> <description>重启该阿拉克涅督虫自动抚育辅虫的能力。</description>
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_BindDrone</iconPath> <iconPath>ArachnaeSwarm/UI/Abilities/ARA_RaceBaseSwarmProduceOn</iconPath>
<cooldownTicksRange>601</cooldownTicksRange> <cooldownTicksRange>601</cooldownTicksRange>
<hostile>false</hostile> <hostile>false</hostile>
<showOnCharacterCard>true</showOnCharacterCard> <showOnCharacterCard>true</showOnCharacterCard>
@@ -63,7 +63,7 @@
<defName>ARA_RaceBaseSwarmProduceOff</defName> <defName>ARA_RaceBaseSwarmProduceOff</defName>
<label>繁育抑制</label> <label>繁育抑制</label>
<description>关闭该阿拉克涅督虫自动抚育辅虫的能力。</description> <description>关闭该阿拉克涅督虫自动抚育辅虫的能力。</description>
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_BindDrone</iconPath> <iconPath>ArachnaeSwarm/UI/Abilities/ARA_RaceBaseSwarmProduceOff</iconPath>
<cooldownTicksRange>601</cooldownTicksRange> <cooldownTicksRange>601</cooldownTicksRange>
<hostile>false</hostile> <hostile>false</hostile>
<showOnCharacterCard>true</showOnCharacterCard> <showOnCharacterCard>true</showOnCharacterCard>
@@ -131,7 +131,7 @@
<defName>ARA_TumorSpew</defName> <defName>ARA_TumorSpew</defName>
<label>菌瘤释放</label> <label>菌瘤释放</label>
<description>排出一枚菌瘤,将附近的大片地区转变为菌毯地形,以方便虫群进行活动,并阻碍敌军的前进。</description> <description>排出一枚菌瘤,将附近的大片地区转变为菌毯地形,以方便虫群进行活动,并阻碍敌军的前进。</description>
<iconPath>UI/Commands/EggSpew</iconPath> <iconPath>ArachnaeSwarm/UI/Abilities/ARA_TumorSpew</iconPath>
<cooldownTicksRange>5000</cooldownTicksRange> <cooldownTicksRange>5000</cooldownTicksRange>
<aiCanUse>false</aiCanUse> <aiCanUse>false</aiCanUse>
<displayOrder>300</displayOrder> <displayOrder>300</displayOrder>
@@ -466,11 +466,11 @@
</li> </li>
</comps> </comps>
</AbilityDef> </AbilityDef>
<AbilityDef Name="LongJump"> <AbilityDef>
<defName>ARA_Skyraider_jump</defName> <defName>ARA_Skyraider_jump</defName>
<label>高空机动</label> <label>高空机动</label>
<description>使用强壮的翅膀瞬间加力,以重定位至一处新的地点。</description> <description>使用强壮的翅膀瞬间加力,以重定位至一处新的地点。</description>
<iconPath>UI/Abilities/Longjump</iconPath> <iconPath>ArachnaeSwarm/UI/Abilities/ARA_Skyraider_jump</iconPath> <!-- Placeholder Icon -->
<cooldownTicksRange>5000</cooldownTicksRange> <cooldownTicksRange>5000</cooldownTicksRange>
<hostile>false</hostile> <hostile>false</hostile>
<casterMustBeCapableOfViolence>false</casterMustBeCapableOfViolence> <casterMustBeCapableOfViolence>false</casterMustBeCapableOfViolence>
@@ -650,14 +650,15 @@
<AbilityDef> <AbilityDef>
<defName>ARA_PsychicBrainburn</defName> <defName>ARA_PsychicBrainburn</defName>
<label>心灵烧灼</label> <label>心灵烧灼</label>
<description>以强大的纯净灵能直接冲击目标,烧毁目标的中枢神经系统——这会直接杀死目标。</description> <description>以强大的纯净灵能冲击目标,烧毁目标的中枢神经系统——这会直接杀死目标。</description>
<iconPath>UI/Abilities/Slaughter</iconPath> <abilityClass>Psycast</abilityClass>
<category>Psychic</category>
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_PsychicBrainburn</iconPath>
<cooldownTicksRange>18000</cooldownTicksRange> <cooldownTicksRange>18000</cooldownTicksRange>
<aiCanUse>false</aiCanUse> <aiCanUse>false</aiCanUse>
<displayOrder>300</displayOrder> <displayOrder>300</displayOrder>
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted> <displayGizmoWhileUndrafted>false</displayGizmoWhileUndrafted>
<disableGizmoWhileUndrafted>false</disableGizmoWhileUndrafted> <showPsycastEffects>true</showPsycastEffects>
<showPsycastEffects>false</showPsycastEffects>
<sendMessageOnCooldownComplete>true</sendMessageOnCooldownComplete> <sendMessageOnCooldownComplete>true</sendMessageOnCooldownComplete>
<stunTargetWhileCasting>true</stunTargetWhileCasting> <stunTargetWhileCasting>true</stunTargetWhileCasting>
<moteOffsetAmountTowardsTarget>0.5</moteOffsetAmountTowardsTarget> <moteOffsetAmountTowardsTarget>0.5</moteOffsetAmountTowardsTarget>
@@ -665,6 +666,11 @@
<warmupEffecter>HoraxianAbilityCasting</warmupEffecter> <warmupEffecter>HoraxianAbilityCasting</warmupEffecter>
<warmupSound>AnomalyAbilityWarmup</warmupSound> <warmupSound>AnomalyAbilityWarmup</warmupSound>
<writeCombatLog>true</writeCombatLog> <writeCombatLog>true</writeCombatLog>
<statBases>
<Ability_EntropyGain>75</Ability_EntropyGain>
<Ability_PsyfocusCost>-1</Ability_PsyfocusCost>
<Ability_Duration>0</Ability_Duration>
</statBases>
<verbProperties> <verbProperties>
<verbClass>Verb_CastAbility</verbClass> <verbClass>Verb_CastAbility</verbClass>
<warmupTime>6</warmupTime> <warmupTime>6</warmupTime>
@@ -677,6 +683,7 @@
</verbProperties> </verbProperties>
<comps> <comps>
<li Class="ArachnaeSwarm.CompProperties_PsychicBrainburn"> <li Class="ArachnaeSwarm.CompProperties_PsychicBrainburn">
<psychic>True</psychic>
<!-- 视觉效果 --> <!-- 视觉效果 -->
<effecterDef>Skip_Entry</effecterDef> <effecterDef>Skip_Entry</effecterDef>
@@ -685,11 +692,11 @@
</li> </li>
</comps> </comps>
</AbilityDef> </AbilityDef>
<AbilityDef Name="LongJump"> <AbilityDef>
<defName>ARA_NeuroSwarm_jump</defName> <defName>ARA_NeuroSwarm_jump</defName>
<label>高空机动</label> <label>高空机动</label>
<description>增强用于使身体悬浮的力量快速进入较高的高度,然后飞到一处新的地点。</description> <description>增强用于使身体悬浮的力量快速进入较高的高度,然后飞到一处新的地点。</description>
<iconPath>UI/Abilities/Longjump</iconPath> <iconPath>ArachnaeSwarm/UI/Abilities/ARA_Skyraider_jump</iconPath>
<cooldownTicksRange>5000</cooldownTicksRange> <cooldownTicksRange>5000</cooldownTicksRange>
<hostile>false</hostile> <hostile>false</hostile>
<casterMustBeCapableOfViolence>false</casterMustBeCapableOfViolence> <casterMustBeCapableOfViolence>false</casterMustBeCapableOfViolence>
@@ -713,4 +720,60 @@
</verbProperties> </verbProperties>
<jobDef>CastJump</jobDef> <jobDef>CastJump</jobDef>
</AbilityDef> </AbilityDef>
<AbilityDef>
<defName>ARA_MimicNematode_Needle_Fire</defName>
<label>拟线种寄生针</label>
<description>向目标喷射若干伤害较低但是会引发阿拉克涅拟线种寄生的囊针,随着感染的推进,目标将逐渐被拟线种控制,逐渐无视外部刺激以获得强大的抗击打能力。\n\n这是一种危险的交易拟线种无法被女皇种控制聪明的虫巢在使用拟线种的力量前都需要思虑再三。</description>
<writeCombatLog>True</writeCombatLog>
<showPsycastEffects>False</showPsycastEffects>
<cooldownTicksRange>6000</cooldownTicksRange>
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_Toxic_Needle_Fire</iconPath>
<displayGizmoWhileUndrafted>false</displayGizmoWhileUndrafted>
<verbProperties>
<verbClass>Verb_AbilityShoot</verbClass>
<defaultProjectile>Bullet_ARA_MimicNematode_Needle</defaultProjectile>
<range>5</range>
<soundCast>Heatspikes_Shot</soundCast>
<soundCastTail>Heatspikes_Tail</soundCastTail>
<muzzleFlashScale>9</muzzleFlashScale>
<ticksBetweenBurstShots>2</ticksBetweenBurstShots>
<warmupTime>0</warmupTime>
<burstShotCount>32</burstShotCount>
<accuracyTouch>1</accuracyTouch>
<accuracyShort>1</accuracyShort>
<accuracyMedium>1</accuracyMedium>
<accuracyLong>1</accuracyLong>
<ai_IsWeapon>false</ai_IsWeapon>
</verbProperties>
<comps>
<li Class="ArachnaeSwarm.CompProperties_AbilityNeedCost">
<needDef>Food</needDef>
<needCost>0.1</needCost>
<failMessage>营养值不足,需要进食</failMessage>
</li>
<!-- <li Class="ArachnaeSwarm.CompProperties_AbilityBodyPartCheck">
<requiredPart>ARA_Toxic_Needle</requiredPart>
<failMessage>毒针腺受损或缺失,无法发射毒针</failMessage>
</li> -->
<li Class="ArachnaeSwarm.CompProperties_AbilityResearchPrereq">
<requiredResearch>ARA_Technology_2MED</requiredResearch>
<failMessage>需要科技 节点MED-2"拟线寄生" 以解锁技能</failMessage>
</li>
</comps>
</AbilityDef>
<ThingDef ParentName="BaseBullet">
<defName>Bullet_ARA_MimicNematode_Needle</defName>
<label>拟线种寄生针</label>
<graphicData>
<texPath>Things/Projectile/Bullet_Small</texPath>
<graphicClass>Graphic_Single</graphicClass>
<color>(117, 204, 49, 180)</color>
</graphicData>
<projectile>
<damageDef>ARA_MimicNematodeBite</damageDef>
<damageAmountBase>1</damageAmountBase>
<speed>40</speed>
</projectile>
</ThingDef>
</Defs> </Defs>

View File

@@ -208,4 +208,16 @@
</li> </li>
</comps> </comps>
</AbilityDef> </AbilityDef>
<AbilityDef ParentName="ARA_CocoonSpew_Base">
<defName>ARA_Cocoon_Medicine</defName>
<label>织物医药茧</label>
<description>投放一枚医药茧,内含可以孵化一组医疗用品或化学品的营养和遗传物质——参阅茧的超链接,了解其能生产的所有装备的特点。</description>
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_Cocoon_Medicine</iconPath>
<comps>
<li Class="CompProperties_AbilityLaunchProjectile">
<projectileDef>ARA_Cocoon_Proj_Medicine</projectileDef>
</li>
</comps>
</AbilityDef>
</Defs> </Defs>

View File

@@ -91,7 +91,7 @@
<li>Crafting</li> <li>Crafting</li>
<!-- <li>Cooking</li> --> <!-- <li>Cooking</li> -->
<li>Constructing</li> <li>Constructing</li>
<li>Caring</li> <!-- <li>Caring</li> -->
<li>Social</li> <li>Social</li>
<li>Artistic</li> <li>Artistic</li>
<li>Intellectual</li> <li>Intellectual</li>
@@ -210,7 +210,7 @@
<li>Crafting</li> <li>Crafting</li>
<li>Cooking</li> <li>Cooking</li>
<li>Constructing</li> <li>Constructing</li>
<!-- <li>Caring</li> --> <li>Caring</li>
<li>Social</li> <li>Social</li>
<li>Artistic</li> <li>Artistic</li>
<li>Intellectual</li> <li>Intellectual</li>

View File

@@ -1068,6 +1068,15 @@
<li>ARA_Acid_sacs</li> <li>ARA_Acid_sacs</li>
</groups> </groups>
</li> </li>
<!-- 毒针腺 -->
<li>
<def>ARA_Toxic_Needle</def>
<coverage>0.005</coverage>
<depth>Inside</depth>
<groups>
<li>ARA_Toxic_Needles</li>
</groups>
</li>
</parts> </parts>
</li> </li>
</parts> </parts>

View File

@@ -59,7 +59,7 @@
<additionalHediffs> <additionalHediffs>
<li> <li>
<hediff>ARA_MimicNematode</hediff> <hediff>ARA_MimicNematode</hediff>
<severityPerDamageDealt>0.001</severityPerDamageDealt> <severityPerDamageDealt>0.05</severityPerDamageDealt>
</li> </li>
</additionalHediffs> </additionalHediffs>
</DamageDef> </DamageDef>
@@ -90,4 +90,30 @@
</additionalHediffs> </additionalHediffs>
</DamageDef> </DamageDef>
<DamageDef ParentName="Wula_Dark_Matter_Beam_DMG">
<defName>ARA_Psi_Damage</defName>
<ignoreShields>true</ignoreShields>
<igniteChanceByTargetFlammability>
<points>
<li>(0, 0)</li>
<li>(1, 0.5)</li>
</points>
</igniteChanceByTargetFlammability>
<label>灵能闪电</label>
<ignoreShields>true</ignoreShields>
<workerClass>DamageWorker_AddInjury</workerClass>
<externalViolence>true</externalViolence>
<deathMessage>{0} 被灵能闪电烧死了。</deathMessage>
<harmAllLayersUntilOutside>true</harmAllLayersUntilOutside>
<impactSoundType>Bullet</impactSoundType>
<hediff>Burn</hediff>
<armorCategory>Heat</armorCategory>
<overkillPctToDestroyPart>0~0.7</overkillPctToDestroyPart>
<isRanged>true</isRanged>
<makesAnimalsFlee>false</makesAnimalsFlee>
<defaultDamage>20</defaultDamage>
<defaultArmorPenetration>1.5</defaultArmorPenetration>
<buildingDamageFactorImpassable>1</buildingDamageFactorImpassable>
<buildingDamageFactorPassable>1</buildingDamageFactorPassable>
</DamageDef>
</Defs> </Defs>

View File

@@ -14,7 +14,6 @@
<label>连接至 {0} 个虫群工蜂</label> <label>连接至 {0} 个虫群工蜂</label>
<minSeverity>0</minSeverity> <minSeverity>0</minSeverity>
<foodPoisoningChanceFactor>0</foodPoisoningChanceFactor> <foodPoisoningChanceFactor>0</foodPoisoningChanceFactor>
<regeneration>500</regeneration>
<!-- Stat offsets will be added here later --> <!-- Stat offsets will be added here later -->
<disablesNeeds> <disablesNeeds>
<li>Joy</li> <li>Joy</li>
@@ -68,12 +67,6 @@
<letterText>一只新的阿拉克涅督虫 {0_labelShort} 已经破茧而出!她正在四处徘徊,等待女皇种的指示——使用阿拉克涅女皇种的信息素标记技能完成链接,或者等待其自行建立链接。</letterText> <letterText>一只新的阿拉克涅督虫 {0_labelShort} 已经破茧而出!她正在四处徘徊,等待女皇种的指示——使用阿拉克涅女皇种的信息素标记技能完成链接,或者等待其自行建立链接。</letterText>
<letterType>HumanPregnancy</letterType> <letterType>HumanPregnancy</letterType>
</li> </li>
<li Class="HediffCompProperties_GiveAbility">
<abilityDefs>
<li>ARA_RaceBaseSwarmProduceOn</li>
<li>ARA_RaceBaseSwarmProduceOff</li>
</abilityDefs>
</li>
</comps> </comps>
</HediffDef> </HediffDef>
<HediffDef> <HediffDef>
@@ -85,26 +78,6 @@
<isBad>false</isBad> <isBad>false</isBad>
<scenarioCanAdd>false</scenarioCanAdd> <scenarioCanAdd>false</scenarioCanAdd>
<comps> <comps>
<li Class="ArachnaeSwarm.HediffCompProperties_GiveHediffsInRangeToRace">
<range>6</range>
<hediff>ARA_CreepyCrawly_Hediff</hediff>
<!-- 定义可以被影响的种族列表 -->
<targetRaces>
<li>Colonist</li>
</targetRaces>
<!-- 其他参数和原版一样 -->
<targetingParameters>
<canTargetBuildings>false</canTargetBuildings>
<canTargetAnimals>false</canTargetAnimals>
<canTargetMechs>false</canTargetMechs>
<canTargetSelf>false</canTargetSelf>
<onlyTargetColonists>true</onlyTargetColonists>
</targetingParameters>
<onlyPawnsInSameFaction>false</onlyPawnsInSameFaction>
<hideMoteWhenNotDrafted>true</hideMoteWhenNotDrafted>
</li>
</comps> </comps>
<stages> <stages>
<li> <li>
@@ -117,6 +90,24 @@
</stages> </stages>
</HediffDef> </HediffDef>
<HediffDef>
<defName>ARA_HiveStrength</defName>
<label>虫群活力</label>
<description>这只阿拉克涅虫族的修复细胞与众不同,它能以非常快的速度自动治愈伤势,甚至是再生出一些已经损失的器官。</description>
<hediffClass>HediffWithComps</hediffClass>
<defaultLabelColor>(0.6, 0.4, 0.8)</defaultLabelColor>
<isBad>false</isBad>
<scenarioCanAdd>false</scenarioCanAdd>
<comps>
</comps>
<stages>
<li>
<minSeverity>0</minSeverity>
<regeneration>100</regeneration>
</li>
</stages>
</HediffDef>
<HediffDef> <HediffDef>
<defName>ARA_TemperatureRegulation</defName> <defName>ARA_TemperatureRegulation</defName>
<label>冷血动物</label> <label>冷血动物</label>
@@ -124,7 +115,7 @@
<hediffClass>Hediff_High</hediffClass> <hediffClass>Hediff_High</hediffClass>
<defaultLabelColor>(0.6, 0.8, 0.9)</defaultLabelColor> <defaultLabelColor>(0.6, 0.8, 0.9)</defaultLabelColor>
<maxSeverity>1.0</maxSeverity> <maxSeverity>1.0</maxSeverity>
<minSeverity>-0.01</minSeverity> <minSeverity>0.01</minSeverity>
<initialSeverity>0.5</initialSeverity> <initialSeverity>0.5</initialSeverity>
<comps> <comps>
<li Class="ArachnaeSwarm.HediffCompProperties_Temperature"> <li Class="ArachnaeSwarm.HediffCompProperties_Temperature">
@@ -239,37 +230,72 @@
<scenarioCanAdd>false</scenarioCanAdd> <scenarioCanAdd>false</scenarioCanAdd>
</HediffDef> </HediffDef>
<HediffDef ParentName="AddedBodyPartBase"> <HediffDef>
<defName>ARA_Psi_Master</defName>
<label>灵能专家</label>
<description>阿拉克涅织域种是虫巢中的灵能大师,她们对使用灵能能力得心应手,不仅自身可以依靠灵能进行飞行,还能为附近的己方单位提供保护,并将其作为灵能导线对敌人发射能量攻击。</description>
<hediffClass>Hediff_High</hediffClass>
<defaultLabelColor>(0.6, 0.8, 0.9)</defaultLabelColor>
<maxSeverity>1.0</maxSeverity>
<minSeverity>0.01</minSeverity>
<initialSeverity>0.5</initialSeverity>
<comps>
<li Class="ArachnaeSwarm.HediffCompProperties_GiveHediffsInRangeToRace">
<range>18</range>
<hediff>ARA_Psi_Conductor</hediff>
<!-- <mote>Mote_ARA_CreepyCrawly_HediffLinkLine</mote> -->
<!-- 定义可以被影响的种族列表 -->
<!-- <targetRaces>
<li>Human</li>
</targetRaces> -->
<!-- 其他参数和原版一样 -->
<targetingParameters>
<canTargetBuildings>false</canTargetBuildings>
<canTargetAnimals>true</canTargetAnimals>
<canTargetMechs>false</canTargetMechs>
<canTargetSelf>true</canTargetSelf>
<onlyTargetColonists>true</onlyTargetColonists>
</targetingParameters>
<onlyPawnsInSameFaction>true</onlyPawnsInSameFaction>
<hideMoteWhenNotDrafted>true</hideMoteWhenNotDrafted>
</li>
</comps>
<stages>
</stages>
</HediffDef>
<HediffDef>
<defName>ARA_Psi_Conductor</defName> <defName>ARA_Psi_Conductor</defName>
<label>灵能导体</label> <label>灵能导体</label>
<description>一只阿拉克涅织域种将这个殖民者的所有灵能抽出来,转化为可以</description> <description>一只阿拉克涅织域种将这个殖民者作为其强大灵能力量的导体,织域种可以通过控制这个殖民者的灵能对敌方发起自动攻击,并使得这个殖民者更加难以击倒——代价则是殖民者自身会短暂地出现灵能失聪的情况。</description>
<descriptionHyperlinks> <descriptionHyperlinks>
<ThingDef>WULA_Addons_Antenna_Shotgun</ThingDef> <ThingDef>ARA_Psi_Conductor_Turret</ThingDef>
<ThingDef>WULA_Addons_Antenna_Shotgun_Turret</ThingDef>
<RecipeDef>Install_WULA_Addons_Antenna_Shotgun</RecipeDef>
</descriptionHyperlinks> </descriptionHyperlinks>
<spawnThingOnRemoved>WULA_Addons_Antenna_Shield</spawnThingOnRemoved> <hediffClass>HediffWithComps</hediffClass>
<addedPartProps> <isBad>false</isBad>
<!-- <partEfficiency>1.5</partEfficiency> --> <defaultLabelColor>(0.6, 0.6, 0.6)</defaultLabelColor>
<betterThanNatural>true</betterThanNatural> <scenarioCanAdd>false</scenarioCanAdd>
</addedPartProps>
<stages> <stages>
<li> <li>
<statOffsets> <statFactors>
<MechBandwidth>-2</MechBandwidth> <IncomingDamageFactor>0.75</IncomingDamageFactor>
<MechControlGroups>-1</MechControlGroups> <PsychicSensitivity>0</PsychicSensitivity>
</statOffsets> </statFactors>
<capMods>
<li>
<capacity>Consciousness</capacity>
<offset>-0.1</offset>
</li>
</capMods>
</li> </li>
</stages> </stages>
<comps> <comps>
<li Class="WulaFallenEmpire.HediffCompProperties_TopTurret"> <li Class="HediffCompProperties_Disappears">
<turretDef>WULA_Addons_Antenna_Shotgun_Turret</turretDef> <showRemainingTime>false</showRemainingTime>
</li>
<li Class="HediffCompProperties_DisappearsOnDeath"/>
<li Class="HediffCompProperties_Link">
<requireLinkOnOtherPawn>false</requireLinkOnOtherPawn>
<maxDistance>18</maxDistance>
<!-- <customMote>Mote_ARA_CreepyCrawly_HediffLinkLine</customMote> -->
</li>
<li Class="ArachnaeSwarm.HediffCompProperties_TopTurret">
<turretDef>ARA_Psi_Conductor_Turret</turretDef>
<angleOffset>0</angleOffset> <angleOffset>0</angleOffset>
<autoAttack>true</autoAttack> <autoAttack>true</autoAttack>
</li> </li>

View File

@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<Defs> <Defs>
<HediffDef>
<HediffDef>
<defName>ARA_MimicNematode</defName> <defName>ARA_MimicNematode</defName>
<label>拟线种虫族寄生</label> <label>拟线种虫族寄生</label>
<description>被阿拉克涅拟线种虫族寄生了,如果不加以干预,拟线虫最终会杀死宿主并将其转化为没有意识的寄生体。拟线虫会通过寄生体的攻击行为感染其他躯体。</description> <description>该殖民者被阿拉克涅拟线种寄生了,如果不加以干预,拟线虫最终会杀死宿主并将其转化为没有意识的寄生体。拟线虫会通过寄生体的攻击行为感染其他躯体。</description>
<!-- 1. 指向我们创建的包含Comp的Hediff类 --> <!-- 1. 指向我们创建的包含Comp的Hediff类 -->
<hediffClass>ArachnaeSwarm.Hediff_NecroticVirus</hediffClass> <hediffClass>ArachnaeSwarm.Hediff_NecroticVirus</hediffClass>
@@ -29,7 +28,7 @@
<vomitMtbDays>1</vomitMtbDays> <vomitMtbDays>1</vomitMtbDays>
<painFactor>0.5</painFactor> <painFactor>0.5</painFactor>
<totalBleedFactor>0.9</totalBleedFactor> <totalBleedFactor>0.9</totalBleedFactor>
<becomeVisible>false</becomeVisible> <becomeVisible>true</becomeVisible>
<capMods> <capMods>
<li> <li>
<capacity>Talking</capacity> <capacity>Talking</capacity>
@@ -148,13 +147,12 @@
<extraDamageType>ARA_MimicNematodeBite</extraDamageType> <extraDamageType>ARA_MimicNematodeBite</extraDamageType>
</li> </li>
</modExtensions> </modExtensions>
</HediffDef> </HediffDef>
<RecipeDef ParentName="SurgeryFlesh"> <RecipeDef ParentName="SurgeryFlesh">
<defName>ARA_CureBloodRot</defName> <defName>ARA_CureBloodRot</defName>
<label>清除拟线虫感染</label> <label>清除拟线虫感染</label>
<description>通过多种药物联合靶向治疗清除患者体内的阿拉克涅拟线种虫族感染。</description> <description>通过多种药物联合靶向治疗清除患者体内的阿拉克涅拟线种虫族感染,这种手术非常复杂,只能使用来自闪耀世界的医药进行</description>
<workerClass>Recipe_RemoveHediff</workerClass> <workerClass>Recipe_RemoveHediff</workerClass>
<jobString>清除拟线虫感染.</jobString> <jobString>清除拟线虫感染.</jobString>
<workAmount>2000</workAmount> <workAmount>2000</workAmount>
@@ -173,7 +171,7 @@
<li>MedicineUltratech</li> <li>MedicineUltratech</li>
</thingDefs> </thingDefs>
</filter> </filter>
<count>10</count> <count>2</count>
</li> </li>
</ingredients> </ingredients>
<fixedIngredientFilter> <fixedIngredientFilter>
@@ -301,5 +299,4 @@
</li> </li>
</renderNodeProperties> </renderNodeProperties>
</HediffDef> </HediffDef>
</Defs> </Defs>

View File

@@ -348,4 +348,153 @@
</li> </li>
</comps> </comps>
</HediffDef> </HediffDef>
<!-- 蜜罐种 -->
<HediffDef>
<defName>ARA_Myrmecocystus_Production_InsectJelly</defName>
<label>产出虫蜜</label>
<description>这只阿拉克涅蜜罐种正在产出虫蜜以滋养虫群。一只蜜罐种每天产出10份阿拉克涅虫蜜。</description>
<descriptionHyperlinks>
<ThingDef>ARA_InsectJelly</ThingDef>
</descriptionHyperlinks>
<hediffClass>HediffWithComps</hediffClass>
<defaultLabelColor>(0.6, 0.4, 0.8)</defaultLabelColor>
<isBad>false</isBad>
<scenarioCanAdd>false</scenarioCanAdd>
<maxSeverity>1.0</maxSeverity>
<!-- <stages>
<li>
<becomeVisible>ture</becomeVisible>
</li>
<li>
<minSeverity>1.01</minSeverity>
<becomeVisible>false</becomeVisible>
</li>
</stages> -->
<comps>
<li Class="ArachnaeSwarm.MoharHediffs.HediffCompProperties_Spawner">
<!--
==================================================
基础设置 (Basic Settings)
==================================================
-->
<!-- [DEBUG] 如果为true则为此组件启用详细的调试日志记录。 -->
<debug>true</debug>
<!-- 要生成的物品的ThingDef。 -->
<thingToSpawn>ARA_InsectJelly</thingToSpawn>
<!-- 每次生成的基础物品数量。 -->
<spawnCount>10</spawnCount>
<!--
==================================================
生成周期 (Spawning Interval)
==================================================
-->
<!-- 下一次生成事件发生前的最少天数。 -->
<minDaysB4Next>1</minDaysB4Next>
<!-- 下一次生成事件发生前的最大天数。 -->
<maxDaysB4Next>1</maxDaysB4Next>
<randomGrace>0</randomGrace>
<!--
==================================================
与年龄相关的调整 (Age-Related Adjustments)
==================================================
-->
<!-- 如果为true生成数量将根据宿主的年龄进行调整。 -->
<ageWeightedQuantity>false</ageWeightedQuantity>
<!-- 如果为true且ageWeightedQuantity为true则随着宿主年龄增长生成数量变多。 -->
<olderBiggerQuantity>true</olderBiggerQuantity>
<!-- 如果为true且ageWeightedQuantity为true则随年龄增长的数量缩放将是指数性的而非线性的。 -->
<exponentialQuantity>true</exponentialQuantity>
<!-- 指数级数量缩放的最大乘数,以防止出现荒谬的数字。 -->
<exponentialRatioLimit>20</exponentialRatioLimit>
<!--
==================================================
生成条件 (Spawning Conditions)
==================================================
-->
<!-- 如果为true当宿主Pawn饥饿时生成将暂停。 -->
<hungerRelative>true</hungerRelative>
<!-- 如果为true当宿主Pawn受伤时生成将暂停。 -->
<healthRelative>false</healthRelative>
</li>
<li Class="HediffCompProperties_GiveAbility">
<abilityDefs>
<li>ARA_Myrmecocystus_Production_Medicine</li>
</abilityDefs>
</li>
<li Class="HediffCompProperties_RemoveIfOtherHediff">
<hediffs>
<li>ARA_Myrmecocystus_Production_Medicine</li>
</hediffs>
</li>
</comps>
</HediffDef>
<AbilityDef>
<defName>ARA_Myrmecocystus_Production_Medicine</defName>
<label>蜜罐种转换——医药专精</label>
<description>使蜜罐种发生内驱性进化,以牺牲生产阿拉克涅虫蜜的代价,使其可以孵化医药茧,并允许使用医疗能力和操纵拟线种。\n\n该进化过程不可逆</description>
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_Myrmecocystus_Production_Medicine</iconPath>
<cooldownTicksRange>1800</cooldownTicksRange>
<hostile>false</hostile>
<groupAbility>true</groupAbility>
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
<disableGizmoWhileUndrafted>false</disableGizmoWhileUndrafted>
<aiCanUse>true</aiCanUse>
<ai_IsOffensive>true</ai_IsOffensive>
<targetRequired>false</targetRequired>
<jobDef>CastAbilityOnThing</jobDef>
<verbProperties>
<verbClass>Verb_CastAbility</verbClass>
<range>1</range>
<warmupTime>12</warmupTime>
<soundCast>AcidSpray_Resolve</soundCast>
<violent>false</violent>
<targetable>false</targetable>
<targetParams>
<canTargetSelf>True</canTargetSelf>
</targetParams>
</verbProperties>
<comps>
<li Class="CompProperties_AbilityGiveHediff">
<compClass>CompAbilityEffect_GiveHediff</compClass>
<hediffDef>ARA_Myrmecocystus_Production_Medicine</hediffDef>
<onlyApplyToSelf>True</onlyApplyToSelf>
<replaceExisting>true</replaceExisting>
<severity>1</severity>
</li>
<li Class="ArachnaeSwarm.CompProperties_AbilityResearchPrereq">
<requiredResearch>ARA_Technology_1MED</requiredResearch>
<failMessage>需要科技 节点MED-1"制药" 以解锁进化</failMessage>
</li>
</comps>
</AbilityDef>
<HediffDef>
<defName>ARA_Myrmecocystus_Production_Medicine</defName>
<label>医疗专精</label>
<description>这只阿拉克涅蜜罐种已经获得拔耀,不再生产虫蜜,而是生产巢穴所稀缺的药物、化学品,并可以操纵拟线种。</description>
<descriptionHyperlinks>
<ThingDef>ARA_InsectJelly</ThingDef>
</descriptionHyperlinks>
<hediffClass>HediffWithComps</hediffClass>
<defaultLabelColor>(0.6, 0.4, 0.8)</defaultLabelColor>
<isBad>false</isBad>
<scenarioCanAdd>false</scenarioCanAdd>
<maxSeverity>1.0</maxSeverity>
<stages>
<li>
<minSeverity>0.01</minSeverity>
<statOffsets>
<MedicalTendQualityOffset>1</MedicalTendQualityOffset>
</statOffsets>
</li>
</stages>
<comps>
<li Class="HediffCompProperties_GiveAbility">
<abilityDefs>
<li>ARA_Cocoon_Medicine</li>
<li>ARA_MimicNematode_Needle_Fire</li>
</abilityDefs>
</li>
</comps>
</HediffDef>
</Defs> </Defs>

View File

@@ -118,7 +118,7 @@
<ResearchProjectDef ParentName="ARA_techBase"> <ResearchProjectDef ParentName="ARA_techBase">
<defName>ARA_Technology_5KYC</defName> <defName>ARA_Technology_5KYC</defName>
<label>节点KYC-5"巨甲"</label> <label>节点KYC-5"巨甲"</label>
<description>允许女皇种孵化新的虫族——浓雾种,一种拥有厚重甲壳的大型督虫,可以铺设菌毯、释放烟雾阻燃剂以协助虫群进行集群冲击。</description> <description>允许女皇种孵化新的虫族——浓雾种,一种拥有厚重甲壳的大型督虫,可以释放烟雾阻燃剂和召唤虫族增援的信息素以协助虫群进行集群冲击。</description>
<baseCost>150</baseCost> <baseCost>150</baseCost>
<researchViewX>5.50</researchViewX> <researchViewX>5.50</researchViewX>
<researchViewY>4.60</researchViewY> <researchViewY>4.60</researchViewY>
@@ -204,6 +204,18 @@
<li>ARA_Base_Technology</li> <li>ARA_Base_Technology</li>
</prerequisites> </prerequisites>
</ResearchProjectDef> </ResearchProjectDef>
<ResearchProjectDef ParentName="ARA_techBase">
<defName>ARA_Technology_6SHL</defName>
<label>节点SHL-6"温度控制"</label>
<description>允许虫族建造一种可以控制房间温度的特殊固定辅虫。</description>
<baseCost>150</baseCost>
<researchViewX>2.00</researchViewX>
<researchViewY>2.00</researchViewY>
<requiredResearchBuilding>ARA_ResearchBench</requiredResearchBuilding>
<prerequisites>
<li>ARA_Base_Technology</li>
</prerequisites>
</ResearchProjectDef>
<!-- 子巢发展 --> <!-- 子巢发展 -->
<ResearchProjectDef ParentName="ARA_techBase"> <ResearchProjectDef ParentName="ARA_techBase">
<defName>ARA_Technology_6SPV</defName> <defName>ARA_Technology_6SPV</defName>
@@ -218,4 +230,30 @@
<li>ARA_Technology_5PAV</li> <li>ARA_Technology_5PAV</li>
</prerequisites> </prerequisites>
</ResearchProjectDef> </ResearchProjectDef>
</Defs> <!-- 药物发展 -->
<ResearchProjectDef ParentName="ARA_techBase">
<defName>ARA_Technology_1MED</defName>
<label>节点MED-1"制药"</label>
<description>允许蜜罐种进行定向进化,以强化其自身的医疗能力并解锁孵化医药茧的技能。</description>
<baseCost>150</baseCost>
<researchViewX>5.50</researchViewX>
<researchViewY>2.70</researchViewY>
<requiredResearchBuilding>ARA_ResearchBench</requiredResearchBuilding>
<prerequisites>
<li>ARA_Technology_1WMT</li>
</prerequisites>
</ResearchProjectDef>
<ResearchProjectDef ParentName="ARA_techBase">
<defName>ARA_Technology_2MED</defName>
<label>节点MED-2"拟线寄生"</label>
<description>允许蜜罐种使用拟线种寄生的能力,并在医药茧中解锁拟线种抑制剂的制作。</description>
<baseCost>150</baseCost>
<researchViewX>6.50</researchViewX>
<researchViewY>2.70</researchViewY>
<requiredResearchBuilding>ARA_ResearchBench</requiredResearchBuilding>
<prerequisites>
<li>ARA_Technology_1MED</li>
<li>ARA_Technology_5PAV</li>
</prerequisites>
</ResearchProjectDef>
</Defs>

View File

@@ -321,6 +321,7 @@
<whiteFoodList> <whiteFoodList>
<li>ARA_InsectJelly</li> <li>ARA_InsectJelly</li>
<li>ARA_NutrientPasteMeal</li> <li>ARA_NutrientPasteMeal</li>
<li>ARA_PheromoneSolvent</li>
</whiteFoodList> </whiteFoodList>
<onlyEatRaceRestrictedFood>true</onlyEatRaceRestrictedFood> <onlyEatRaceRestrictedFood>true</onlyEatRaceRestrictedFood>
<!-- 武器列表 --> <!-- 武器列表 -->
@@ -736,11 +737,11 @@
</race> </race>
<comps> <comps>
<li Class="ArachnaeSwarm.CompProperties_MilkableArachnae"> <!-- <li Class="ArachnaeSwarm.CompProperties_MilkableArachnae">
<milkDef>ARA_InsectJelly</milkDef> <milkDef>ARA_InsectJelly</milkDef>
<milkIntervalDays>1</milkIntervalDays> <milkIntervalDays>1</milkIntervalDays>
<milkAmount>10</milkAmount> <milkAmount>10</milkAmount>
</li> </li> -->
<li Class="ArachnaeSwarm.CompProperties_AutoMechCarrier"> <li Class="ArachnaeSwarm.CompProperties_AutoMechCarrier">
<freeProduction>true</freeProduction> <freeProduction>true</freeProduction>
<disableHediff>ARA_RaceBaseSwarmProduceSwitchHediff</disableHediff> <disableHediff>ARA_RaceBaseSwarmProduceSwitchHediff</disableHediff>
@@ -764,6 +765,13 @@
<tooltipOverride>阿拉克涅的督虫们生命如精密的发条般运转着。</tooltipOverride> <tooltipOverride>阿拉克涅的督虫们生命如精密的发条般运转着。</tooltipOverride>
<showGizmoOnNonPlayerControlled>true</showGizmoOnNonPlayerControlled> <showGizmoOnNonPlayerControlled>true</showGizmoOnNonPlayerControlled>
</li> </li>
<li Class="ArachnaeSwarm.CompProperties_HediffGiver">
<hediffs>
<li>ARA_Myrmecocystus_Production_InsectJelly</li>
</hediffs>
<addChance>1.0</addChance>
<allowDuplicates>false</allowDuplicates>
</li>
</comps> </comps>
</AlienRace.ThingDef_AlienRace> </AlienRace.ThingDef_AlienRace>
<AlienRace.ThingDef_AlienRace ParentName="ARA_NodeBase"> <AlienRace.ThingDef_AlienRace ParentName="ARA_NodeBase">
@@ -918,11 +926,6 @@
</generalSettings> </generalSettings>
<raceRestriction> <raceRestriction>
<onlyEatRaceRestrictedFood>true</onlyEatRaceRestrictedFood> <onlyEatRaceRestrictedFood>true</onlyEatRaceRestrictedFood>
<recipeList>
<li>ARA_WeaponSmith_Upgrade_1_Stage</li>
<!-- <li>ARA_WeaponSmith_Upgrade_2_Stage</li> -->
<!-- <li>ARA_WeaponSmith_Upgrade_3_Stage</li> -->
</recipeList>
</raceRestriction> </raceRestriction>
</alienRace> </alienRace>
@@ -963,11 +966,6 @@
<baseHealthScale>0.75</baseHealthScale> <baseHealthScale>0.75</baseHealthScale>
</race> </race>
<recipes Inherit="False">
<li>ARA_WeaponSmith_Upgrade_1_Stage</li>
</recipes>
<comps> <comps>
<li Class="ArachnaeSwarm.CompProperties_HediffGiver"> <li Class="ArachnaeSwarm.CompProperties_HediffGiver">
<hediffs> <hediffs>
@@ -1771,6 +1769,9 @@
<li Class="ArachnaeSwarm.CompProperties_HediffGiver"> <li Class="ArachnaeSwarm.CompProperties_HediffGiver">
<hediffs> <hediffs>
<li>ARA_HiveMindDrone</li> <li>ARA_HiveMindDrone</li>
<li>ARA_HiveStrength</li>
<li>ARA_Psi_Master</li>
<li>PsychicAmplifier</li>
</hediffs> </hediffs>
<addChance>1.0</addChance> <addChance>1.0</addChance>
<allowDuplicates>false</allowDuplicates> <allowDuplicates>false</allowDuplicates>

View File

@@ -411,6 +411,7 @@
<whiteFoodList> <whiteFoodList>
<li>ARA_InsectJelly</li> <li>ARA_InsectJelly</li>
<li>ARA_NutrientPasteMeal</li> <li>ARA_NutrientPasteMeal</li>
<li>ARA_PheromoneSolvent</li>
</whiteFoodList> </whiteFoodList>
<onlyEatRaceRestrictedFood>true</onlyEatRaceRestrictedFood> <onlyEatRaceRestrictedFood>true</onlyEatRaceRestrictedFood>
<!-- 可以驯服的宠物,主要是防止小虫由别人驯服 --> <!-- 可以驯服的宠物,主要是防止小虫由别人驯服 -->
@@ -431,9 +432,6 @@
<canReproduce>false</canReproduce> <canReproduce>false</canReproduce>
<!-- 允许操纵的配方 --> <!-- 允许操纵的配方 -->
<recipeList> <recipeList>
<li>ARA_WeaponSmith_Upgrade_1_Stage</li>
<!-- <li>ARA_WeaponSmith_Upgrade_2_Stage</li> -->
<!-- <li>ARA_WeaponSmith_Upgrade_3_Stage</li> -->
</recipeList> </recipeList>
<!-- 允许的工作台类型,放开以供其他种族使用 --> <!-- 允许的工作台类型,放开以供其他种族使用 -->
<!-- <workGiverList> <!-- <workGiverList>
@@ -700,6 +698,7 @@
<li Class="ArachnaeSwarm.CompProperties_HediffGiver"> <li Class="ArachnaeSwarm.CompProperties_HediffGiver">
<hediffs> <hediffs>
<li>ARA_Queen_0_Stage</li> <li>ARA_Queen_0_Stage</li>
<li>ARA_HiveStrength</li>
<li>ARA_HiveMindMaster</li> <li>ARA_HiveMindMaster</li>
</hediffs> </hediffs>
<addChance>1.0</addChance> <addChance>1.0</addChance>

View File

@@ -1,8 +1,36 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<Defs> <Defs>
<ThingDef ParentName="MedicineBase">
<!-- ==================== 1. 物品定义:阿拉克涅信息素溶剂 ==================== --> <defName>ARA_Medicine</defName>
<label>阿拉克涅愈合素</label>
<description>由阿拉克涅医药孵化茧所孵化的药物,效力等同于常规的医药,但是需要在冷藏条件下保存。</description>
<possessionCount>10</possessionCount>
<graphicData>
<texPath>Things/Item/Resource/Medicine/MedicineHerbal</texPath>
<graphicClass>Graphic_StackCount</graphicClass>
<drawSize>0.85</drawSize>
</graphicData>
<techLevel>Animal</techLevel>
<statBases>
<MarketValue>10</MarketValue>
<Mass>0.5</Mass>
<Flammability>1</Flammability>
<MedicalPotency>1</MedicalPotency>
<MedicalQualityMax>1.00</MedicalQualityMax>
<DeteriorationRate>2</DeteriorationRate>
<WorkToMake>700</WorkToMake>
</statBases>
<tickerType>Rare</tickerType>
<comps>
<li Class="CompProperties_Rottable">
<daysToRotStart>150</daysToRotStart>
<rotDestroys>true</rotDestroys>
</li>
</comps>
<allowedArchonexusCount>20</allowedArchonexusCount>
</ThingDef>
<!-- ==================== 信息素 ==================== -->
<ThingDef ParentName="MakeableDrugPillBase"> <ThingDef ParentName="MakeableDrugPillBase">
<defName>ARA_PheromoneSolvent</defName> <defName>ARA_PheromoneSolvent</defName>
<label>阿拉克涅信息素溶剂</label> <label>阿拉克涅信息素溶剂</label>
@@ -12,9 +40,9 @@
<HediffDef>ARA_MimicNematode</HediffDef> <HediffDef>ARA_MimicNematode</HediffDef>
</descriptionHyperlinks> </descriptionHyperlinks>
<graphicData> <graphicData>
<texPath>Things/Item/Drug/WakeUp</texPath> <!-- 暂时使用WakeUp的贴图可后续替换 --> <texPath>ArachnaeSwarm/Item/ARA_PheromoneSolvent</texPath>
<graphicClass>Graphic_StackCount</graphicClass> <graphicClass>Graphic_Single</graphicClass>
<color>(1.0, 0.647, 0.0, 0.5)</color> <!-- 橙色 --> <shaderType>TransparentPostLight</shaderType>
</graphicData> </graphicData>
<rotatable>false</rotatable> <rotatable>false</rotatable>
<statBases> <statBases>
@@ -22,7 +50,7 @@
<MarketValue>50</MarketValue> <MarketValue>50</MarketValue>
<Mass>0.01</Mass> <Mass>0.01</Mass>
</statBases> </statBases>
<techLevel>Industrial</techLevel> <techLevel>Animal</techLevel>
<ingestible> <ingestible>
<drugCategory>Medical</drugCategory> <!-- 定义为医疗品,而非娱乐品 --> <drugCategory>Medical</drugCategory> <!-- 定义为医疗品,而非娱乐品 -->
<outcomeDoers> <outcomeDoers>
@@ -33,13 +61,10 @@
</outcomeDoers> </outcomeDoers>
</ingestible> </ingestible>
<recipeMaker> <recipeMaker>
<researchPrerequisite>MedicineProduction</researchPrerequisite> <!-- 假设需要基础制药解锁 --> <researchPrerequisite>ARA_Technology_2MED</researchPrerequisite> <!-- 假设需要基础制药解锁 -->
<recipeUsers> <recipeUsers Inherit="False"/>
<li>DrugLab</li>
</recipeUsers>
</recipeMaker> </recipeMaker>
<costList> <costList>
<Neutroamine>2</Neutroamine>
<ARA_InsectJelly>5</ARA_InsectJelly> <!-- 使用虫胶作为特色材料 --> <ARA_InsectJelly>5</ARA_InsectJelly> <!-- 使用虫胶作为特色材料 -->
</costList> </costList>
<comps> <comps>
@@ -51,14 +76,11 @@
</li> </li>
</comps> </comps>
</ThingDef> </ThingDef>
<!-- ==================== 2. Hediff定义共生稳定器效果 ==================== -->
<HediffDef> <HediffDef>
<defName>ARA_SymbioticStabilizer</defName> <defName>ARA_SymbioticStabilizer</defName>
<label>信息素抑制</label> <label>信息素抑制</label>
<labelNoun>一种信息素抑制效果</labelNoun> <labelNoun>一种信息素抑制效果</labelNoun>
<description>阿拉克涅信息素溶剂的效果正在生效,它模拟了虫群的共生信号,抑制了体内寄生体的活性。</description> <description>阿拉克涅信息素溶剂的效果正在生效,它模拟了虫群的共生信号,抑制了体内寄生体的活性。在溶剂生效时不会使得拟线种虫族寄生的进度超过80%。</description>
<hediffClass>HediffWithComps</hediffClass> <hediffClass>HediffWithComps</hediffClass>
<defaultLabelColor>(0.7, 1.0, 0.7)</defaultLabelColor> <defaultLabelColor>(0.7, 1.0, 0.7)</defaultLabelColor>
<isBad>false</isBad> <isBad>false</isBad>
@@ -69,47 +91,12 @@
</li> </li>
</comps> </comps>
</HediffDef> </HediffDef>
<!-- ==================== 3. 物品定义:阿拉克涅拟线种虫卵 ==================== -->
<ThingDef ParentName="MakeableDrugPillBase">
<defName>ARA_NematodeEgg</defName>
<label>阿拉克涅拟线种虫卵</label>
<description>一个经过特殊处理的阿拉克涅拟线种虫卵,可以被直接服用。服用后,虫卵会迅速在宿主体内孵化并释放大量阿拉克涅拟线虫,导致极其严重的感染。</description>
<descriptionHyperlinks>
<HediffDef>ARA_MimicNematode</HediffDef>
</descriptionHyperlinks>
<graphicData>
<texPath>Things/Item/Drug/Luciferium</texPath>
<graphicClass>Graphic_StackCount</graphicClass>
<color>(100,50,100)</color> <!-- 深紫色 -->
</graphicData>
<statBases>
<MarketValue>75</MarketValue>
<Mass>0.05</Mass>
</statBases>
<techLevel>Industrial</techLevel>
<ingestible>
<drugCategory>None</drugCategory> <!-- 修正:这不是药物,不应被药物政策管理 -->
<foodType>AnimalProduct</foodType>
<outcomeDoers>
<li Class="IngestionOutcomeDoer_GiveHediff">
<hediffDef>ARA_MimicNematode</hediffDef>
<severity>0.5</severity> <!-- 直接给予0.7的严重性 -->
</li>
</outcomeDoers>
</ingestible>
<recipeMaker IsNull="True" /> <!-- 明确声明此物品不可制造,以覆盖父类的设置 -->
</ThingDef>
<!-- ==================== 3. 阿拉克涅信息素成瘾机制 ==================== -->
<ChemicalDef> <ChemicalDef>
<defName>ARA_Pheromone</defName> <defName>ARA_Pheromone</defName>
<label>阿拉克涅信息素</label> <label>阿拉克涅信息素</label>
<addictionHediff>ARA_PheromoneAddiction</addictionHediff> <addictionHediff>ARA_PheromoneAddiction</addictionHediff>
</ChemicalDef> </ChemicalDef>
<NeedDef ParentName="DrugAddictionNeedBase"> <NeedDef ParentName="DrugAddictionNeedBase">
<defName>Chemical_ARA_Pheromone</defName> <defName>Chemical_ARA_Pheromone</defName>
<needClass>Need_Chemical</needClass> <needClass>Need_Chemical</needClass>
@@ -118,7 +105,6 @@
<fallPerDay>0.333</fallPerDay> <fallPerDay>0.333</fallPerDay>
<listPriority>50</listPriority> <listPriority>50</listPriority>
</NeedDef> </NeedDef>
<HediffDef ParentName="AddictionBase"> <HediffDef ParentName="AddictionBase">
<defName>ARA_PheromoneAddiction</defName> <defName>ARA_PheromoneAddiction</defName>
<label>信息素依赖</label> <label>信息素依赖</label>
@@ -147,7 +133,6 @@
</li> </li>
</stages> </stages>
</HediffDef> </HediffDef>
<ThoughtDef> <ThoughtDef>
<defName>ARA_PheromoneWithdrawal</defName> <defName>ARA_PheromoneWithdrawal</defName>
<workerClass>ThoughtWorker_Hediff</workerClass> <workerClass>ThoughtWorker_Hediff</workerClass>
@@ -164,5 +149,4 @@
</li> </li>
</stages> </stages>
</ThoughtDef> </ThoughtDef>
</Defs> </Defs>

View File

@@ -38,6 +38,9 @@
<defName>ARA_Bodystocking_White</defName> <defName>ARA_Bodystocking_White</defName>
<label>连身白丝</label> <label>连身白丝</label>
<description>阿拉克涅虫群的装饰性织物,对于虫群来说应该是没啥用的东西。</description> <description>阿拉克涅虫群的装饰性织物,对于虫群来说应该是没啥用的东西。</description>
<descriptionHyperlinks>
<ThingDef>ARA_Cocoon_Cloth</ThingDef>
</descriptionHyperlinks>
<graphicData> <graphicData>
<texPath>ArachnaeSwarm/Apparel/ARA_Bodystocking_White</texPath> <texPath>ArachnaeSwarm/Apparel/ARA_Bodystocking_White</texPath>
</graphicData> </graphicData>
@@ -58,6 +61,9 @@
<defName>ARA_Bodystocking_Black</defName> <defName>ARA_Bodystocking_Black</defName>
<label>连身黑丝</label> <label>连身黑丝</label>
<description>阿拉克涅虫群的装饰性织物,对于虫群来说应该是没啥用的东西。</description> <description>阿拉克涅虫群的装饰性织物,对于虫群来说应该是没啥用的东西。</description>
<descriptionHyperlinks>
<ThingDef>ARA_Cocoon_Cloth</ThingDef>
</descriptionHyperlinks>
<graphicData> <graphicData>
<texPath>ArachnaeSwarm/Apparel/ARA_Bodystocking_Black</texPath> <texPath>ArachnaeSwarm/Apparel/ARA_Bodystocking_Black</texPath>
</graphicData> </graphicData>
@@ -156,6 +162,9 @@
<defName>ARA_Maid_Uniform</defName> <defName>ARA_Maid_Uniform</defName>
<label>阿拉克涅女仆装</label> <label>阿拉克涅女仆装</label>
<description>阿拉克涅督虫们所着织物中的一种,设计上修身轻便,可以使其在阿拉克捏菌毯上获得额外的速度,是她们永远服侍虫巢的形象的完美具现化。</description> <description>阿拉克涅督虫们所着织物中的一种,设计上修身轻便,可以使其在阿拉克捏菌毯上获得额外的速度,是她们永远服侍虫巢的形象的完美具现化。</description>
<descriptionHyperlinks>
<ThingDef>ARA_Cocoon_Cloth</ThingDef>
</descriptionHyperlinks>
<recipeMaker Inherit="False"> <recipeMaker Inherit="False">
<researchPrerequisite>ARA_Technology_4DIL</researchPrerequisite> <researchPrerequisite>ARA_Technology_4DIL</researchPrerequisite>
</recipeMaker> </recipeMaker>

View File

@@ -5,6 +5,9 @@
<defName>ARA_MW_Bone_Sword</defName> <defName>ARA_MW_Bone_Sword</defName>
<label>武装器官"骨刃"</label> <label>武装器官"骨刃"</label>
<description>阿拉克涅虫群督虫使用基础近战武装器官,通过多根外露神经束与督虫的辅肢相连。尽管它只是一块坚硬的剑形骨片,但是丝毫不影响那些拥有无穷蛮力的阿拉克涅虫群督虫使用它将侵犯虫巢之敌一一斩首。</description> <description>阿拉克涅虫群督虫使用基础近战武装器官,通过多根外露神经束与督虫的辅肢相连。尽管它只是一块坚硬的剑形骨片,但是丝毫不影响那些拥有无穷蛮力的阿拉克涅虫群督虫使用它将侵犯虫巢之敌一一斩首。</description>
<descriptionHyperlinks>
<ThingDef>ARA_Cocoon_Weapon</ThingDef>
</descriptionHyperlinks>
<weaponTags> <weaponTags>
<li>ARA_Armed_Organ</li> <li>ARA_Armed_Organ</li>
<li>ARA_Armed_Organ_Melee</li> <li>ARA_Armed_Organ_Melee</li>
@@ -72,6 +75,9 @@
<description>阿拉克涅虫群督虫使用基础远程武装器官,外表就像一只拳套,可以通过神经束缠绕接在阿拉克涅督虫的辅肢上。这种武器小巧轻盈,虽然射程很短,但是面对敌人时能喷出一整排的带毒尖刺,把对手扎个透心凉。</description> <description>阿拉克涅虫群督虫使用基础远程武装器官,外表就像一只拳套,可以通过神经束缠绕接在阿拉克涅督虫的辅肢上。这种武器小巧轻盈,虽然射程很短,但是面对敌人时能喷出一整排的带毒尖刺,把对手扎个透心凉。</description>
<tickerType>Normal</tickerType> <tickerType>Normal</tickerType>
<techLevel>Animal</techLevel> <techLevel>Animal</techLevel>
<descriptionHyperlinks>
<ThingDef>ARA_Cocoon_Weapon</ThingDef>
</descriptionHyperlinks>
<graphicData> <graphicData>
<texPath>ArachnaeSwarm/Weapon/ARA_RW_Basic_Fist_Needle_Gun</texPath> <texPath>ArachnaeSwarm/Weapon/ARA_RW_Basic_Fist_Needle_Gun</texPath>
<graphicClass>Graphic_Single</graphicClass> <graphicClass>Graphic_Single</graphicClass>
@@ -170,6 +176,9 @@
<description>阿拉克涅虫群督虫所使用的武装器官,拥有四排刺针管道,可以在联结神经束的指挥下交替发射大量的毒针,虽然准度较差但是威力不逊色于人类所使用的机枪。</description> <description>阿拉克涅虫群督虫所使用的武装器官,拥有四排刺针管道,可以在联结神经束的指挥下交替发射大量的毒针,虽然准度较差但是威力不逊色于人类所使用的机枪。</description>
<tickerType>Normal</tickerType> <tickerType>Normal</tickerType>
<techLevel>Animal</techLevel> <techLevel>Animal</techLevel>
<descriptionHyperlinks>
<ThingDef>ARA_Cocoon_Weapon_1Stage</ThingDef>
</descriptionHyperlinks>
<graphicData> <graphicData>
<texPath>ArachnaeSwarm/Weapon/ARA_RW_Basic_Fist_Needle_Gun</texPath> <texPath>ArachnaeSwarm/Weapon/ARA_RW_Basic_Fist_Needle_Gun</texPath>
<graphicClass>Graphic_Single</graphicClass> <graphicClass>Graphic_Single</graphicClass>
@@ -239,6 +248,9 @@
<description>阿拉克涅虫群督虫使用基础远程武装器官,可以通过肌肉的瞬间加压喷出一团包含阿拉克涅酸液的液体团。这种酸液团的飞行速度很慢,但是能在目标地点炸开,并灼烧所有粘上酸液的敌人。</description> <description>阿拉克涅虫群督虫使用基础远程武装器官,可以通过肌肉的瞬间加压喷出一团包含阿拉克涅酸液的液体团。这种酸液团的飞行速度很慢,但是能在目标地点炸开,并灼烧所有粘上酸液的敌人。</description>
<tickerType>Normal</tickerType> <tickerType>Normal</tickerType>
<techLevel>Animal</techLevel> <techLevel>Animal</techLevel>
<descriptionHyperlinks>
<ThingDef>ARA_Cocoon_Weapon</ThingDef>
</descriptionHyperlinks>
<graphicData> <graphicData>
<texPath>ArachnaeSwarm/Weapon/ARA_RW_Basic_Acid_Bladder_Gun</texPath> <texPath>ArachnaeSwarm/Weapon/ARA_RW_Basic_Acid_Bladder_Gun</texPath>
<graphicClass>Graphic_Single</graphicClass> <graphicClass>Graphic_Single</graphicClass>
@@ -345,6 +357,9 @@
<description>阿拉克涅虫群督虫使用大型远程武装器官,膛内布满了强健的肌肉组织,可以在一瞬间的收缩后将一团酸液发射到空中,以在安全距离下对敌人的集群进行轰炸。</description> <description>阿拉克涅虫群督虫使用大型远程武装器官,膛内布满了强健的肌肉组织,可以在一瞬间的收缩后将一团酸液发射到空中,以在安全距离下对敌人的集群进行轰炸。</description>
<tickerType>Normal</tickerType> <tickerType>Normal</tickerType>
<techLevel>Animal</techLevel> <techLevel>Animal</techLevel>
<descriptionHyperlinks>
<ThingDef>ARA_Cocoon_Weapon_1Stage</ThingDef>
</descriptionHyperlinks>
<graphicData> <graphicData>
<texPath>ArachnaeSwarm/Weapon/ARA_RW_Basic_Acid_Bladder_Gun</texPath> <texPath>ArachnaeSwarm/Weapon/ARA_RW_Basic_Acid_Bladder_Gun</texPath>
<graphicClass>Graphic_Single</graphicClass> <graphicClass>Graphic_Single</graphicClass>
@@ -454,6 +469,9 @@
<description>阿拉科涅虫群的生物武器</description> <description>阿拉科涅虫群的生物武器</description>
<tickerType>Normal</tickerType> <tickerType>Normal</tickerType>
<techLevel>Animal</techLevel> <techLevel>Animal</techLevel>
<descriptionHyperlinks>
<ThingDef>ARA_Cocoon_Weapon_1Stage</ThingDef>
</descriptionHyperlinks>
<graphicData> <graphicData>
<texPath>ArachnaeSwarm/Weapon/ARA_RW_Basic_Acid_Bladder_Gun</texPath> <texPath>ArachnaeSwarm/Weapon/ARA_RW_Basic_Acid_Bladder_Gun</texPath>
<graphicClass>Graphic_Single</graphicClass> <graphicClass>Graphic_Single</graphicClass>
@@ -628,4 +646,83 @@
<li>RewardStandardQualitySuper</li> <li>RewardStandardQualitySuper</li>
</thingSetMakerTags> </thingSetMakerTags>
</ThingDef> </ThingDef>
<!-- 炮塔 -->
<ThingDef ParentName="BaseWeaponTurret">
<defName>ARA_Psi_Conductor_Turret</defName>
<label>灵能导线</label>
<description>阿拉克涅织域种正在通过这个殖民者对敌方发起攻击——这种攻击的发动无关殖民者的状态,无论它目前在干什么,攻击都会照常进行。</description>
<graphicData>
<texPath>ArachnaeSwarm/Weapon/ARA_Weapon_Empty</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<descriptionHyperlinks>
<HediffDef>ARA_Psi_Conductor</HediffDef>
</descriptionHyperlinks>
<statBases>
<AccuracyTouch>1</AccuracyTouch>
<AccuracyShort>1</AccuracyShort>
<AccuracyMedium>1</AccuracyMedium>
<AccuracyLong>1</AccuracyLong>
<Mass>5</Mass>
</statBases>
<verbs>
<li>
<verbClass>Verb_Shoot</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<defaultProjectile>Bullet_ARA_Psi_Conductor_Turret</defaultProjectile>
<range>6</range>
<burstShotCount>1</burstShotCount>
<soundCast>AgonyPulse_Cast</soundCast>
<soundCastTail>GunTail_Medium</soundCastTail>
<muzzleFlashScale>9</muzzleFlashScale>
<defaultCooldownTime>4</defaultCooldownTime>
</li>
</verbs>
</ThingDef>
<ThingDef ParentName="BaseBullet">
<defName>Bullet_ARA_Psi_Conductor_Turret</defName>
<label>灵能闪电</label>
<thingClass>Beam</thingClass>
<graphicData>
<texPath>Things/Projectile/Bullet_Small</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<projectile>
<damageDef>ARA_Psi_Damage</damageDef>
<damageAmountBase>4</damageAmountBase>
<beamMoteDef>ARA_Psi_Conductor_Turret_ArcBeam</beamMoteDef>
<beamStartOffset>0.5</beamStartOffset>
<armorPenetrationBase>1</armorPenetrationBase>
</projectile>
</ThingDef>
<ThingDef ParentName="MoteBase">
<defName>ARA_Psi_Conductor_Turret_ArcBeam</defName>
<thingClass>MoteDualAttached</thingClass>
<altitudeLayer>MoteOverhead</altitudeLayer>
<mote>
<fadeInTime>0</fadeInTime>
<fadeOutTime>1</fadeOutTime>
<solidTime>0.4</solidTime>
<needsMaintenance>False</needsMaintenance>
<rotateTowardsTarget>True</rotateTowardsTarget>
<scaleToConnectTargets>True</scaleToConnectTargets>
<fadeOutUnmaintained>False</fadeOutUnmaintained>
</mote>
<drawOffscreen>true</drawOffscreen>
<graphicData>
<texPath>ArachnaeSwarm/Mote/ARA_Lighting_Beam</texPath>
<color>(140, 49, 138, 255)</color>
<graphicClass>Graphic_MoteWithAgeSecs</graphicClass>
<shaderType>MoteGlow</shaderType>
<drawSize>(1.5,1)</drawSize>
<shaderParameters>
<_ExtraTexA>/Things/Mote/BeamSecondaryNoise_A</_ExtraTexA>
<_ExtraTexB>/Things/Mote/BeamSecondaryNoise_B</_ExtraTexB>
<_ScrollSpeedA>-4 </_ScrollSpeedA>
<_ScrollSpeedB>3</_ScrollSpeedB>
<_Intensity>2</_Intensity>
</shaderParameters>
</graphicData>
</ThingDef>
</Defs> </Defs>

View File

@@ -523,4 +523,71 @@
</li> </li>
</comps> </comps>
</ThingDef> </ThingDef>
<ThingDef ParentName="BuildingBase">
<defName>ARA_SmartThermostat</defName>
<label>阿拉克涅纤管虫</label>
<description>一只只有基础反射反应的阿拉克涅辅虫,它会尝试将通过气体交换,维持尾部所向的房间的温度。必须像制冷器一样安装在墙上。</description>
<thingClass>ArachnaeSwarm.Building_SmartThermostat</thingClass>
<uiIconPath>ArachnaeSwarm/Building/ARA_SmartThermostat_south</uiIconPath>
<graphicData>
<texPath>ArachnaeSwarm/Building/ARA_SmartThermostat</texPath>
<graphicClass>Graphic_Multi</graphicClass>
<drawSize>(1.75,1.75)</drawSize>
<shadowData>
<volume>(0.6, 0.4, 0.3)</volume>
<offset>(0,0,-0.1)</offset>
</shadowData>
</graphicData>
<uiIconScale>0.6</uiIconScale>
<altitudeLayer>BuildingOnTop</altitudeLayer>
<passability>Impassable</passability>
<blockWind>true</blockWind>
<fillPercent>1</fillPercent>
<coversFloor>true</coversFloor>
<blockLight>true</blockLight>
<blockWeather>true</blockWeather>
<castEdgeShadows>true</castEdgeShadows>
<canOverlapZones>false</canOverlapZones>
<staticSunShadowHeight>0</staticSunShadowHeight>
<terrainAffordanceNeeded>ARA_Creep</terrainAffordanceNeeded>
<statBases>
<WorkToBuild>400</WorkToBuild>
<MaxHitPoints>100</MaxHitPoints>
<Flammability>1.0</Flammability>
</statBases>
<tickerType>Rare</tickerType>
<costList>
<ARA_Carapace>30</ARA_Carapace>
</costList>
<placeWorkers>
<li>PlaceWorker_Vent</li>
</placeWorkers>
<drawPlaceWorkersWhileSelected>true</drawPlaceWorkersWhileSelected>
<building>
<canPlaceOverWall>true</canPlaceOverWall>
<canExchangeVacuum>true</canExchangeVacuum>
<isAirtight>true</isAirtight>
</building>
<researchPrerequisites>
<li>ARA_Technology_6SHL</li>
</researchPrerequisites>
<designationCategory>ARA_Buildings</designationCategory>
<comps>
<!-- 提供开关按钮 -->
<li Class="CompProperties_Flickable">
<commandTexture>UI/Commands/Vent</commandTexture>
<commandLabelKey>CommandDesignateOpenCloseVentLabel</commandLabelKey>
<commandDescKey>CommandDesignateOpenCloseVentDesc</commandDescKey>
</li>
<!-- 提供温度控制UI和逻辑 -->
<li Class="ArachnaeSwarm.CompProperties_TempControl_Fixed">
<!-- 这是设备的热交换功率。数值越大,制冷/制热速度越快。-->
<energyPerSecond>2</energyPerSecond>
</li>
<li Class="CompProperties_Breakdownable"/>
</comps>
</ThingDef>
</Defs> </Defs>

View File

@@ -66,8 +66,8 @@
</descriptionHyperlinks> </descriptionHyperlinks>
<researchPrerequisites> <researchPrerequisites>
<li>ARA_Base_Technology</li> <li>ARA_Base_Technology</li>
<li>ARA_Technology_1KYC</li>
</researchPrerequisites> </researchPrerequisites>
<comps> <comps>
<li Class="CompProperties_Glower"> <li Class="CompProperties_Glower">
<glowRadius>6</glowRadius> <glowRadius>6</glowRadius>
@@ -219,6 +219,10 @@
<graphicData> <graphicData>
<drawSize>(1.2,1.2)</drawSize> <drawSize>(1.2,1.2)</drawSize>
</graphicData> </graphicData>
<researchPrerequisites>
<li>ARA_Technology_2KYC</li>
<li>ARA_Technology_4KYC</li>
</researchPrerequisites>
<comps> <comps>
<li Class="CompProperties_Glower"> <li Class="CompProperties_Glower">
@@ -285,6 +289,10 @@
<color>(0.9, 0.9 ,0.5)</color> <color>(0.9, 0.9 ,0.5)</color>
<drawSize>(1.4,1.4)</drawSize> <drawSize>(1.4,1.4)</drawSize>
</graphicData> </graphicData>
<researchPrerequisites>
<li>ARA_Technology_5KYC</li>
<li>ARA_Technology_6KYC</li>
</researchPrerequisites>
<comps> <comps>
<li Class="CompProperties_Glower"> <li Class="CompProperties_Glower">
@@ -496,15 +504,13 @@
</ThingDef> </ThingDef>
<ThingDef ParentName="ARA_Cocoon_Base"> <ThingDef ParentName="ARA_Cocoon_Base">
<defName>ARA_Cocoon_Cloth</defName> <defName>ARA_Cocoon_Cloth</defName>
<label>阿拉克涅孵化茧 基础织物</label> <label>阿拉克涅孵化茧 织物</label>
<description>一个脆弱、易燃、黏滑的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一套基础织物装备的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感该类型的茧适温为-30~55°C需要小心保护</description> <description>一个脆弱、易燃、黏滑的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一套基础织物装备的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感该类型的茧适温为-30~55°C需要小心保护</description>
<descriptionHyperlinks> <descriptionHyperlinks>
<ThingDef>ARA_Bodystocking_White</ThingDef> <ThingDef>ARA_Bodystocking_White</ThingDef>
<ThingDef>ARA_Bodystocking_Black</ThingDef> <ThingDef>ARA_Bodystocking_Black</ThingDef>
<ThingDef>ARA_Maid_Uniform</ThingDef>
</descriptionHyperlinks> </descriptionHyperlinks>
<researchPrerequisites>
<li>ARA_Technology_4DIL</li>
</researchPrerequisites>
<comps> <comps>
<!-- The new, GrowthVat-style fuel component --> <!-- The new, GrowthVat-style fuel component -->
@@ -697,15 +703,12 @@
</ThingDef> </ThingDef>
<ThingDef ParentName="ARA_Cocoon_Base"> <ThingDef ParentName="ARA_Cocoon_Base">
<defName>ARA_Cocoon_Cloth_1Stage</defName> <defName>ARA_Cocoon_Cloth_1Stage</defName>
<label>阿拉克涅孵化茧 基础织物</label> <label>阿拉克涅孵化茧 织物</label>
<description>一个脆弱、易燃、黏滑的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一套基础织物装备的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感该类型的茧适温为-30~55°C需要小心保护</description> <description>一个脆弱、易燃、黏滑的囊状物,是阿拉克涅工艺种所诞之卵,内含孵化一套基础织物装备的营养物质,可以通过阿拉克涅工艺种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感该类型的茧适温为-30~55°C需要小心保护</description>
<descriptionHyperlinks> <descriptionHyperlinks>
<ThingDef>ARA_Bodystocking_White</ThingDef> <ThingDef>ARA_Bodystocking_White</ThingDef>
<ThingDef>ARA_Bodystocking_Black</ThingDef> <ThingDef>ARA_Bodystocking_Black</ThingDef>
</descriptionHyperlinks> </descriptionHyperlinks>
<researchPrerequisites>
<li>ARA_Technology_4DIL</li>
</researchPrerequisites>
<comps> <comps>
<!-- The new, GrowthVat-style fuel component --> <!-- The new, GrowthVat-style fuel component -->
@@ -889,4 +892,98 @@
</li> </li>
</comps> </comps>
</ThingDef> </ThingDef>
<!-- 医药 -->
<ThingDef ParentName="ARA_CocoonSpew_Base_Proj">
<defName>ARA_Cocoon_Proj_Medicine</defName>
<projectile>
<spawnsThingDef>ARA_Cocoon_Medicine</spawnsThingDef>
</projectile>
</ThingDef>
<ThingDef ParentName="ARA_Cocoon_Base">
<defName>ARA_Cocoon_Medicine</defName>
<label>阿拉克涅孵化茧 医药</label>
<description>一个脆弱、易燃、黏滑的囊状物,是阿拉克涅蜜罐种所诞之卵,内含孵化一组医疗用品或化学品的营养物质,可以通过阿拉克涅蜜罐种的交互完成激活进程——参阅茧的超链接,了解其能生产的所有装备的特点。\n\n孵化茧对温度极度敏感该类型的茧适温为0~12°C需要小心保护</description>
<descriptionHyperlinks>
<ThingDef>ARA_PheromoneSolvent</ThingDef>
</descriptionHyperlinks>
<comps>
<!-- The new, GrowthVat-style fuel component -->
<li Class="ArachnaeSwarm.CompProperties_RefuelableNutrition">
<fuelCapacity>10</fuelCapacity>
<fuelLabel>虫蜜</fuelLabel>
<fuelFilter>
<thingDefs>
<li>ARA_InsectJelly</li>
</thingDefs>
</fuelFilter>
<fuelConsumptionRate>0</fuelConsumptionRate> <!-- IMPORTANT: Disable base class consumption -->
<showAllowAutoRefuelToggle>true</showAllowAutoRefuelToggle>
<initialFuelPercent>1</initialFuelPercent>
<autoRefuelPercent>1</autoRefuelPercent>
</li>
<!-- The refactored producer component -->
<li Class="ArachnaeSwarm.CompProperties_InteractiveProducer">
<processes>
<li>
<thingDef>ARA_Medicine</thingDef>
<productionTicks>36000</productionTicks>
<totalNutritionNeeded>10</totalNutritionNeeded>
</li>
<li>
<thingDef>ARA_PheromoneSolvent</thingDef>
<productionTicks>72000</productionTicks>
<totalNutritionNeeded>20</totalNutritionNeeded>
<requiredResearch>ARA_Technology_2MED</requiredResearch>
</li>
</processes>
<whitelist>
<li>ArachnaeNode_Race_Myrmecocystus</li>
</whitelist>
<spawnCount>10</spawnCount>
<destroyOnSpawn>True</destroyOnSpawn>
<minSafeTemperature>0</minSafeTemperature>
<maxSafeTemperature>12</maxSafeTemperature>
<penaltyPerDegreePerTick>0.00001</penaltyPerDegreePerTick>
<damagePerTickWhenUnfueled>0.2</damagePerTickWhenUnfueled>
<minNutritionToStart>1.0</minNutritionToStart>
<qualityThresholds>
<li>
<quality>Legendary</quality>
<threshold>0.99</threshold>
</li>
<li>
<quality>Masterwork</quality>
<threshold>0.90</threshold>
</li>
<li>
<quality>Excellent</quality>
<threshold>0.70</threshold>
</li>
<li>
<quality>Good</quality>
<threshold>0.50</threshold>
</li>
<li>
<quality>Normal</quality>
<threshold>0.20</threshold>
</li>
<li>
<quality>Poor</quality>
<threshold>0.10</threshold>
</li>
</qualityThresholds>
</li>
<li Class="ArachnaeSwarm.CompProperties_TemperatureRuinableDamage">
<minSafeTemperature>0</minSafeTemperature>
<maxSafeTemperature>12</maxSafeTemperature>
<progressPerDegreePerTick>0.00005</progressPerDegreePerTick>
<damagePerTick>0.005</damagePerTick>
<recoveryRate>0.001</recoveryRate>
</li>
</comps>
</ThingDef>
</Defs> </Defs>

View File

@@ -1,66 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
<ThingDef ParentName="BuildingBase">
<defName>ARA_SmartThermostat</defName>
<label>阿拉克涅纤管虫</label>
<description>一个不耗电的温控虫虫。它是一个可逆的热泵,能自动制热或制冷以维持设定的目标温度。必须像制冷器一样安装在墙上。</description>
<thingClass>ArachnaeSwarm.Building_SmartThermostat</thingClass> <!-- 使用我们新的建筑类 -->
<graphicData>
<texPath>Things/Building/Misc/TempControl/Cooler</texPath> <!-- 暂时使用制冷器的贴图 -->
<graphicClass>Graphic_Multi</graphicClass>
<shadowData>
<volume>(0.6, 0.4, 0.3)</volume>
<offset>(0,0,-0.1)</offset>
</shadowData>
</graphicData>
<altitudeLayer>Building</altitudeLayer>
<passability>Impassable</passability>
<blockWind>true</blockWind>
<fillPercent>1</fillPercent>
<coversFloor>true</coversFloor>
<blockLight>true</blockLight>
<blockWeather>true</blockWeather>
<castEdgeShadows>true</castEdgeShadows>
<canOverlapZones>false</canOverlapZones>
<staticSunShadowHeight>0</staticSunShadowHeight>
<statBases>
<WorkToBuild>400</WorkToBuild>
<MaxHitPoints>100</MaxHitPoints>
<Flammability>1.0</Flammability>
</statBases>
<tickerType>Rare</tickerType>
<costList>
<ARA_Carapace>30</ARA_Carapace>
</costList>
<terrainAffordanceNeeded>Medium</terrainAffordanceNeeded>
<placeWorkers>
<li>PlaceWorker_Vent</li>
</placeWorkers>
<drawPlaceWorkersWhileSelected>true</drawPlaceWorkersWhileSelected>
<building>
<canPlaceOverWall>true</canPlaceOverWall>
<canExchangeVacuum>true</canExchangeVacuum>
<isAirtight>true</isAirtight>
</building>
<researchPrerequisites>
<li>AirConditioning</li>
</researchPrerequisites>
<designationCategory>ARA_Buildings</designationCategory>
<comps>
<!-- 提供开关按钮 -->
<li Class="CompProperties_Flickable">
<commandTexture>UI/Commands/Vent</commandTexture>
<commandLabelKey>CommandDesignateOpenCloseVentLabel</commandLabelKey>
<commandDescKey>CommandDesignateOpenCloseVentDesc</commandDescKey>
</li>
<!-- 提供温度控制UI和逻辑 -->
<li Class="ArachnaeSwarm.CompProperties_TempControl_Fixed">
<!-- 这是设备的热交换功率。数值越大,制冷/制热速度越快。-->
<energyPerSecond>34</energyPerSecond>
</li>
<li Class="CompProperties_Breakdownable"/>
</comps>
</ThingDef>
</Defs>

View File

@@ -26,4 +26,5 @@
<MessageTrapSprung>{TRAP} 被 {PAWN} 触发!</MessageTrapSprung> <MessageTrapSprung>{TRAP} 被 {PAWN} 触发!</MessageTrapSprung>
<MessageTrapSprung_NoInstigator>{TRAP} 被触发!</MessageTrapSprung_NoInstigator> <MessageTrapSprung_NoInstigator>{TRAP} 被触发!</MessageTrapSprung_NoInstigator>
<delivery>{PAWN}生成了{THING}。</delivery>
</LanguageData> </LanguageData>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 761 KiB

After

Width:  |  Height:  |  Size: 768 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,12 +1,7 @@
{ {
"Version": 1, "Version": 1,
"WorkspaceRootPath": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\", "WorkspaceRootPath": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\",
"Documents": [ "Documents": [],
{
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\hediffs\\ara_hediffcomp_topturret\\hediffcomp_topturret.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:hediffs\\ara_hediffcomp_topturret\\hediffcomp_topturret.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [ "DocumentGroupContainers": [
{ {
"Orientation": 0, "Orientation": 0,
@@ -14,21 +9,8 @@
"DocumentGroups": [ "DocumentGroups": [
{ {
"DockedWidth": 200, "DockedWidth": 200,
"SelectedChildIndex": 0, "SelectedChildIndex": -1,
"Children": [ "Children": [
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "HediffComp_TopTurret.cs",
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Hediffs\\ARA_HediffComp_TopTurret\\HediffComp_TopTurret.cs",
"RelativeDocumentMoniker": "Hediffs\\ARA_HediffComp_TopTurret\\HediffComp_TopTurret.cs",
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Hediffs\\ARA_HediffComp_TopTurret\\HediffComp_TopTurret.cs",
"RelativeToolTip": "Hediffs\\ARA_HediffComp_TopTurret\\HediffComp_TopTurret.cs",
"ViewState": "AgIAAIUAAAAAAAAAAAAswAoAAAAFAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-09-20T03:55:47.292Z",
"EditorCaption": ""
},
{ {
"$type": "Bookmark", "$type": "Bookmark",
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}" "Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"

View File

@@ -147,6 +147,9 @@
<Compile Include="Hediffs\HediffComp_TerrainBasedSeverity\HediffComp_TerrainBasedSeverity.cs" /> <Compile Include="Hediffs\HediffComp_TerrainBasedSeverity\HediffComp_TerrainBasedSeverity.cs" />
<Compile Include="Hediffs\HediffComp_TerrainBasedSeverity\HediffCompProperties_TerrainBasedSeverity.cs" /> <Compile Include="Hediffs\HediffComp_TerrainBasedSeverity\HediffCompProperties_TerrainBasedSeverity.cs" />
<Compile Include="Hediffs\HediffGiver_RandomWithSeverity.cs" /> <Compile Include="Hediffs\HediffGiver_RandomWithSeverity.cs" />
<Compile Include="Hediffs\MoharHediffs\HediffCompProperties_Spawner.cs" />
<Compile Include="Hediffs\MoharHediffs\HediffComp_Spawner.cs" />
<Compile Include="Hediffs\MoharHediffs\Tools.cs" />
<Compile Include="Hediffs\ProphecyGearEffect.cs" /> <Compile Include="Hediffs\ProphecyGearEffect.cs" />
<Compile Include="Hediffs\WULA_HediffDamgeShield\DRMDamageShield.cs" /> <Compile Include="Hediffs\WULA_HediffDamgeShield\DRMDamageShield.cs" />
<Compile Include="Hediffs\WULA_HediffDamgeShield\Hediff_DamageShield.cs" /> <Compile Include="Hediffs\WULA_HediffDamgeShield\Hediff_DamageShield.cs" />

View File

@@ -0,0 +1,118 @@
using System;
using Verse;
namespace ArachnaeSwarm.MoharHediffs
{
public class HediffCompProperties_Spawner : HediffCompProperties
{
public HediffCompProperties_Spawner()
{
this.compClass = typeof(HediffComp_Spawner);
}
/// <summary>
/// 要生成的物品的ThingDef。如果animalThing为false则使用此项。
/// </summary>
public ThingDef thingToSpawn;
/// <summary>
/// 每次生成的基础物品数量。
/// </summary>
public int spawnCount = 1;
/// <summary>
/// 如果为true则生成一个Pawn动物。如果为false则生成一个Thing。
/// </summary>
public bool animalThing;
/// <summary>
/// 要生成的动物的PawnKindDef。如果animalThing为true则使用此项。
/// </summary>
public PawnKindDef animalToSpawn;
/// <summary>
/// 如果为true生成的动物将属于玩家派系。
/// </summary>
public bool factionOfPlayerAnimal;
/// <summary>
/// 下一次生成事件发生前的最少天数。
/// </summary>
public float minDaysB4Next = 1f;
/// <summary>
/// 下一次生成事件发生前的最大天数。
/// </summary>
public float maxDaysB4Next = 2f;
/// <summary>
/// 生成后进入宽限期延迟下一次生成的几率0.0到1.0)。
/// </summary>
public float randomGrace;
/// <summary>
/// 如果触发,宽限期的持续时间(天)。
/// </summary>
public float graceDays = 0.5f;
/// <summary>
/// 附近允许的相同Pawn的最大数量。如果超过该数量则暂停生成。-1为禁用。
/// </summary>
public int spawnMaxAdjacent = -1;
/// <summary>
/// 如果为true生成的物品将被禁用。
/// </summary>
public bool spawnForbidden;
/// <summary>
/// 如果为true当宿主Pawn饥饿时生成将暂停。
/// </summary>
public bool hungerRelative;
/// <summary>
/// 如果为true当宿主Pawn受伤时生成将暂停。
/// </summary>
public bool healthRelative;
/// <summary>
/// 如果为true生成数量将根据宿主的年龄进行调整。
/// </summary>
public bool ageWeightedQuantity;
/// <summary>
/// 如果为true生成周期两次生成之间的时间将根据宿主的年龄进行调整。
/// </summary>
public bool ageWeightedPeriod;
/// <summary>
/// 如果为true且ageWeightedPeriod为true则随着宿主年龄增长生成周期变短。如果为false则变长。
/// </summary>
public bool olderSmallerPeriod;
/// <summary>
/// 如果为true且ageWeightedQuantity为true则随着宿主年龄增长生成数量变多。如果为false则变少。
/// </summary>
public bool olderBiggerQuantity;
/// <summary>
/// 如果为true且ageWeightedQuantity为true则随年龄增长的数量缩放将是指数性的而非线性的。
/// </summary>
public bool exponentialQuantity;
/// <summary>
/// 指数级数量缩放的最大乘数,以防止出现荒谬的数字。
/// </summary>
public int exponentialRatioLimit = 15;
/// <summary>
/// 生成时显示的消息的翻译键(例如,“{PAWN}下了一个蛋。”)。
/// </summary>
public string spawnVerb = "delivery";
/// <summary>
/// 如果为true则为此组件启用详细的调试日志记录。
/// </summary>
public bool debug;
}
}

View File

@@ -0,0 +1,565 @@
using System;
using System.Collections.Generic;
using System.Linq;
using RimWorld;
using RimWorld.Planet;
using Verse;
namespace ArachnaeSwarm.MoharHediffs
{
public class HediffComp_Spawner : HediffComp
{
public HediffCompProperties_Spawner Props
{
get
{
return (HediffCompProperties_Spawner)this.props;
}
}
public override void CompExposeData()
{
Scribe_Values.Look<int>(ref this.ticksUntilSpawn, "ticksUntilSpawn", 0, false);
Scribe_Values.Look<int>(ref this.initialTicksUntilSpawn, "initialTicksUntilSpawn", 0, false);
Scribe_Values.Look<float>(ref this.calculatedMinDaysB4Next, "calculatedMinDaysB4Next", 0f, false);
Scribe_Values.Look<float>(ref this.calculatedMaxDaysB4Next, "calculatedMaxDaysB4Next", 0f, false);
Scribe_Values.Look<int>(ref this.calculatedQuantity, "calculatedQuantity", 0, false);
Scribe_Values.Look<int>(ref this.graceTicks, "graceTicks", 0, false);
}
public override void CompPostMake()
{
this.myDebug = this.Props.debug;
Tools.Warn(string.Concat(new string[]
{
">>> ",
this.parent.pawn.Label,
" - ",
this.parent.def.defName,
" - CompPostMake start"
}), this.myDebug);
this.TraceProps();
this.CheckProps();
this.CalculateValues();
this.CheckCalculatedValues();
this.TraceCalculatedValues();
if (this.initialTicksUntilSpawn == 0)
{
Tools.Warn("Reseting countdown bc initialTicksUntilSpawn == 0 (comppostmake)", this.myDebug);
this.ResetCountdown();
}
}
public override void CompPostTick(ref float severityAdjustment)
{
this.pawn = this.parent.pawn;
if (!Tools.OkPawn(this.pawn))
{
return;
}
if (this.blockSpawn)
{
return;
}
if (this.graceTicks > 0)
{
this.graceTicks--;
return;
}
if (this.Props.hungerRelative && this.pawn.IsHungry(this.myDebug))
{
int num = (int)(this.RandomGraceDays() * 60000f);
this.hungerReset++;
this.graceTicks = num;
return;
}
if (this.Props.healthRelative && this.pawn.IsInjured(this.myDebug))
{
int num2 = (int)(this.RandomGraceDays() * 60000f);
this.healthReset++;
this.graceTicks = num2;
return;
}
this.hungerReset = (this.healthReset = 0);
if (this.CheckShouldSpawn())
{
Tools.Warn("Reseting countdown bc spawned thing", this.myDebug);
this.CalculateValues();
this.CheckCalculatedValues();
this.ResetCountdown();
if (Rand.Chance(this.Props.randomGrace))
{
int num3 = (int)(this.RandomGraceDays() * 60000f);
this.graceTicks = num3;
}
}
}
private void TraceProps()
{
Tools.Warn(string.Concat(new string[]
{
"Props => minDaysB4Next: ",
this.Props.minDaysB4Next.ToString(),
"; maxDaysB4Next: ",
this.Props.maxDaysB4Next.ToString(),
"; randomGrace: ",
this.Props.randomGrace.ToString(),
"; graceDays: ",
this.Props.graceDays.ToString(),
"; hungerRelative: ",
this.Props.hungerRelative.ToString(),
"; healthRelative: ",
this.Props.healthRelative.ToString(),
"; "
}), this.myDebug);
if (this.Props.animalThing)
{
Tools.Warn(string.Concat(new string[]
{
"animalThing: ",
this.Props.animalThing.ToString(),
"; animalName: ",
this.Props.animalToSpawn.defName,
"; factionOfPlayerAnimal: ",
this.Props.factionOfPlayerAnimal.ToString(),
"; "
}), this.myDebug);
}
if (this.Props.ageWeightedQuantity)
{
Tools.Warn(string.Concat(new string[]
{
"ageWeightedQuantity:",
this.Props.ageWeightedQuantity.ToString(),
"; olderBiggerQuantity:",
this.Props.olderBiggerQuantity.ToString(),
"; ",
this.myDebug.ToString()
}), false);
if (this.Props.exponentialQuantity)
{
Tools.Warn(string.Concat(new string[]
{
"exponentialQuantity:",
this.Props.exponentialQuantity.ToString(),
"; exponentialRatioLimit:",
this.Props.exponentialRatioLimit.ToString(),
"; "
}), this.myDebug);
}
}
Tools.Warn(string.Concat(new string[]
{
"ageWeightedPeriod:",
this.Props.ageWeightedPeriod.ToString(),
"; olderSmallerPeriod:",
this.Props.olderSmallerPeriod.ToString(),
"; ",
this.myDebug.ToString()
}), false);
}
private void CalculateValues()
{
float num = Tools.GetPawnAgeOverlifeExpectancyRatio(this.parent.pawn, this.myDebug);
num = ((num > 1f) ? 1f : num);
this.calculatedMinDaysB4Next = this.Props.minDaysB4Next;
this.calculatedMaxDaysB4Next = this.Props.maxDaysB4Next;
if (this.Props.ageWeightedPeriod)
{
float num2 = this.Props.olderSmallerPeriod ? (-num) : num;
this.calculatedMinDaysB4Next = this.Props.minDaysB4Next * (1f + num2);
this.calculatedMaxDaysB4Next = this.Props.maxDaysB4Next * (1f + num2);
Tools.Warn(string.Concat(new string[]
{
" ageWeightedPeriod: ",
this.Props.ageWeightedPeriod.ToString(),
" ageRatio: ",
num.ToString(),
" minDaysB4Next: ",
this.Props.minDaysB4Next.ToString(),
" maxDaysB4Next: ",
this.Props.maxDaysB4Next.ToString(),
" daysAgeRatio: ",
num2.ToString(),
" calculatedMinDaysB4Next: ",
this.calculatedMinDaysB4Next.ToString(),
"; calculatedMaxDaysB4Next: ",
this.calculatedMaxDaysB4Next.ToString(),
"; "
}), this.myDebug);
}
this.calculatedQuantity = this.Props.spawnCount;
if (this.Props.ageWeightedQuantity)
{
float num3 = this.Props.olderBiggerQuantity ? num : (-num);
Tools.Warn("quantityAgeRatio: " + num3.ToString(), this.myDebug);
this.calculatedQuantity = (int)Math.Round((double)this.Props.spawnCount * (double)(1f + num3));
if (this.Props.exponentialQuantity)
{
num3 = 1f - num;
if (num3 == 0f)
{
Tools.Warn(">ERROR< quantityAgeRatio is f* up : " + num3.ToString(), this.myDebug);
this.blockSpawn = true;
Tools.DestroyParentHediff(this.parent, this.myDebug);
return;
}
float num4 = this.Props.olderBiggerQuantity ? (1f / num3) : (num3 * num3);
bool flag = false;
bool flag2 = false;
if (num4 > (float)this.Props.exponentialRatioLimit)
{
num4 = (float)this.Props.exponentialRatioLimit;
flag = true;
}
this.calculatedQuantity = (int)Math.Round((double)this.Props.spawnCount * (double)num4);
if (this.calculatedQuantity < 1)
{
this.calculatedQuantity = 1;
flag2 = true;
}
Tools.Warn(string.Concat(new string[]
{
" exponentialQuantity: ",
this.Props.exponentialQuantity.ToString(),
"; expoFactor: ",
num4.ToString(),
"; gotLimited: ",
flag.ToString(),
"; gotAugmented: ",
flag2.ToString()
}), this.myDebug);
}
Tools.Warn("; Props.spawnCount: " + this.Props.spawnCount.ToString() + "; calculatedQuantity: " + this.calculatedQuantity.ToString(), this.myDebug);
}
}
private void CheckCalculatedValues()
{
if (this.calculatedQuantity > this.errorSpawnCount)
{
Tools.Warn(string.Concat(new string[]
{
">ERROR< calculatedQuantity is too high: ",
this.calculatedQuantity.ToString(),
"(>",
this.errorSpawnCount.ToString(),
"), check and adjust your hediff props"
}), this.myDebug);
this.blockSpawn = true;
Tools.DestroyParentHediff(this.parent, this.myDebug);
return;
}
if (this.calculatedMinDaysB4Next < this.errorMinDaysB4Next)
{
this.calculatedMinDaysB4Next = this.errorMinDaysB4Next;
}
if (this.calculatedMaxDaysB4Next < this.errorMinDaysB4Next)
{
this.calculatedMaxDaysB4Next = this.errorMinDaysB4Next;
}
}
private void TraceCalculatedValues()
{
Tools.Warn("calculatedMinDaysB4Next:" + this.calculatedMinDaysB4Next.ToString(), this.myDebug);
Tools.Warn("calculatedMaxDaysB4Next:" + this.calculatedMaxDaysB4Next.ToString(), this.myDebug);
Tools.Warn("calculatedQuantity:" + this.calculatedQuantity.ToString(), this.myDebug);
}
private void CheckProps()
{
if (this.Props.animalThing && this.Props.animalToSpawn == null)
{
Tools.Warn(this.parent.pawn.Label + " has a hediffcomp_spawner with animalflag but without animalToSpawn", true);
this.blockSpawn = true;
Tools.DestroyParentHediff(this.parent, this.myDebug);
return;
}
if (this.Props.minDaysB4Next <= 0f)
{
Tools.Warn(this.parent.pawn.Label + " has a hediffcomp_spawner with null/negative minDaysB4Next", true);
this.blockSpawn = true;
Tools.DestroyParentHediff(this.parent, this.myDebug);
return;
}
if (this.Props.maxDaysB4Next <= 0f)
{
Tools.Warn(this.parent.pawn.Label + " has a hediffcomp_spawner with null/negative maxDaysB4Next", true);
this.blockSpawn = true;
Tools.DestroyParentHediff(this.parent, this.myDebug);
return;
}
if (this.Props.maxDaysB4Next < this.Props.minDaysB4Next)
{
Tools.Warn(this.parent.pawn.Label + " has a hediffcomp_spawner with maxDaysB4Next < minDaysB4Next", true);
this.blockSpawn = true;
Tools.DestroyParentHediff(this.parent, this.myDebug);
return;
}
if (this.Props.spawnCount <= 0)
{
Tools.Warn(this.parent.pawn.Label + " has a hediffcomp_spawner with null/negative spawnCount", true);
this.blockSpawn = true;
Tools.DestroyParentHediff(this.parent, this.myDebug);
return;
}
if (!this.Props.animalThing && this.Props.thingToSpawn == null)
{
Tools.Warn(this.parent.pawn.Label + " has a hediffcomp_spawner without thingToSpawn", true);
this.blockSpawn = true;
Tools.DestroyParentHediff(this.parent, this.myDebug);
return;
}
if (this.Props.ageWeightedQuantity && this.Props.exponentialQuantity && this.Props.exponentialRatioLimit > this.errorExponentialLimit)
{
Tools.Warn(string.Concat(new string[]
{
this.parent.pawn.Label,
" has a hediffcomp_spawner with exponentialRatioLimit>",
this.errorExponentialLimit.ToString(),
" this is not allowed. It will be set to ",
this.errorExponentialLimit.ToString()
}), true);
this.Props.exponentialRatioLimit = this.errorExponentialLimit;
}
}
private bool CheckShouldSpawn()
{
this.ticksUntilSpawn--;
if (this.ticksUntilSpawn <= 0)
{
if (this.TryDoSpawn())
{
return true;
}
Tools.Warn("Did not spawn, reseting countdown", this.myDebug);
this.ResetCountdown();
}
return false;
}
private PawnKindDef MyPawnKindDefNamed(string myDefName)
{
return DefDatabase<PawnKindDef>.GetNamed(myDefName, true);
}
public bool TryDoSpawn()
{
Pawn pawn = this.parent.pawn;
if (this.Props.spawnMaxAdjacent > 0 && pawn.Map.mapPawns.AllPawns.Where(delegate(Pawn mP)
{
ThingDef defToCompare = this.Props.animalThing ? this.Props.animalToSpawn?.race : this.Props.thingToSpawn;
if (defToCompare?.race == null)
{
return false;
}
return mP.def == defToCompare && mP.Position.InHorDistOf(pawn.Position, (float)this.Props.spawnMaxAdjacent);
}).Count<Pawn>() >= this.Props.spawnMaxAdjacent)
{
return false;
}
if (this.Props.animalThing)
{
if (this.Props.animalToSpawn == null)
{
return false;
}
Faction faction = this.Props.factionOfPlayerAnimal ? Faction.OfPlayer : null;
int i = 0;
while (i < this.calculatedQuantity)
{
IntVec3 intVec;
if (!this.TryFindSpawnCell(out intVec))
{
return false;
}
Pawn pawn2 = PawnGenerator.GeneratePawn(this.Props.animalToSpawn, faction);
if (pawn2 == null)
{
return false;
}
GenSpawn.Spawn(pawn2, intVec, pawn.Map, WipeMode.Vanish);
pawn2.SetFaction(faction, null);
FilthMaker.TryMakeFilth(intVec, pawn.Map, ThingDefOf.Filth_AmnioticFluid, pawn.LabelIndefinite(), 5, FilthSourceFlags.None);
if (!this.Props.spawnForbidden)
{
pawn2.playerSettings.Master = pawn;
pawn2.training.Train(TrainableDefOf.Obedience, pawn, true);
}
i++;
continue;
}
if (PawnUtility.ShouldSendNotificationAbout(pawn) || PawnUtility.ShouldSendNotificationAbout(pawn))
{
Messages.Message(this.Props.spawnVerb.Translate(pawn.Named("PAWN")), pawn, MessageTypeDefOf.PositiveEvent, true);
}
return true;
}
else
{
IntVec3 intVec2;
if (!this.TryFindSpawnCell(out intVec2))
{
return false;
}
Thing thing = ThingMaker.MakeThing(this.Props.thingToSpawn, null);
if (thing == null)
{
return false;
}
thing.stackCount = this.calculatedQuantity;
if (this.Props.spawnForbidden)
{
thing.SetForbidden(true, true);
}
GenPlace.TryPlaceThing(thing, intVec2, pawn.Map, ThingPlaceMode.Direct, null, null, default(Rot4));
if (PawnUtility.ShouldSendNotificationAbout(pawn))
{
Messages.Message(this.Props.spawnVerb.Translate(pawn.Named("PAWN"), thing.Named("THING")), thing, MessageTypeDefOf.PositiveEvent, true);
}
return true;
}
}
private bool TryFindSpawnCell(out IntVec3 result)
{
result = IntVec3.Invalid;
bool result2;
if (this.pawn == null)
{
result2 = false;
}
else
{
Map map = this.pawn.Map;
if (map == null)
{
result2 = false;
}
else
{
result = CellFinder.RandomClosewalkCellNear(this.pawn.Position, map, 5, null);
result2 = true;
}
}
return result2;
}
private void ResetCountdown()
{
this.ticksUntilSpawn = (int)(this.RandomDays2wait() * 60000f);
this.initialTicksUntilSpawn = this.ticksUntilSpawn;
}
private float RandomDays2wait()
{
return Rand.Range(this.calculatedMinDaysB4Next, this.calculatedMaxDaysB4Next);
}
private float RandomGraceDays()
{
return Rand.Range(this.Props.graceDays / 2f, this.Props.graceDays);
}
public override string CompTipStringExtra
{
get
{
if (!this.myDebug)
{
return null;
}
string text = "ticksUntilSpawn: " + this.ticksUntilSpawn.ToString() + "\n";
string text2 = text;
text = string.Concat(new string[]
{
text2,
"initialTicksUntilSpawn: ",
this.initialTicksUntilSpawn.ToString(),
"\n"
});
text2 = text;
text = string.Concat(new string[]
{
text2,
"graceTicks: ",
this.graceTicks.ToString(),
"\n"
});
text2 = text;
text = string.Concat(new string[]
{
text2,
"hunger resets: ",
this.hungerReset.ToString(),
"\n"
});
text2 = text;
text = string.Concat(new string[]
{
text2,
"health resets: ",
this.healthReset.ToString(),
"\n"
});
text2 = text;
text = string.Concat(new string[]
{
text2,
"calculatedMinDaysB4Next: ",
this.calculatedMinDaysB4Next.ToString(),
"\n"
});
text2 = text;
text = string.Concat(new string[]
{
text2,
"calculatedMaxDaysB4Next: ",
this.calculatedMaxDaysB4Next.ToString(),
"\n"
});
text2 = text;
text = string.Concat(new string[]
{
text2,
"calculatedQuantity: ",
this.calculatedQuantity.ToString(),
"\n"
});
return text + "blockSpawn: " + this.blockSpawn.ToString();
}
}
private int ticksUntilSpawn;
private int initialTicksUntilSpawn;
private int hungerReset;
private int healthReset;
private int graceTicks;
private Pawn pawn;
private float calculatedMaxDaysB4Next = 2f;
private float calculatedMinDaysB4Next = 1f;
private int calculatedQuantity = 1;
private bool blockSpawn;
private bool myDebug;
private readonly float errorMinDaysB4Next = 0.001f;
private readonly int errorExponentialLimit = 20;
private readonly int errorSpawnCount = 750;
}
}

View File

@@ -0,0 +1,106 @@
using System;
using System.Collections.Generic;
using RimWorld;
using UnityEngine;
using Verse;
namespace ArachnaeSwarm.MoharHediffs
{
public static class Tools
{
public static void DestroyParentHediff(Hediff parentHediff, bool debug = false)
{
if (parentHediff.pawn != null && parentHediff.def.defName != null && debug)
{
Log.Warning(parentHediff.pawn.Label + "'s Hediff: " + parentHediff.def.defName + " says goodbye.");
}
parentHediff.Severity = 0f;
}
public static float GetPawnAgeOverlifeExpectancyRatio(Pawn pawn, bool debug = false)
{
float result = 1f;
if (pawn == null)
{
if (debug)
{
Log.Warning("GetPawnAgeOverlifeExpectancyRatio pawn NOT OK");
}
return result;
}
result = pawn.ageTracker.AgeBiologicalYearsFloat / pawn.RaceProps.lifeExpectancy;
if (debug)
{
Log.Warning(string.Concat(new string[]
{
pawn.Label,
" Age: ",
pawn.ageTracker.AgeBiologicalYearsFloat.ToString(),
"; lifeExpectancy: ",
pawn.RaceProps.lifeExpectancy.ToString(),
"; ratio:",
result.ToString()
}));
}
return result;
}
public static bool IsInjured(this Pawn pawn, bool debug = false)
{
if (pawn == null)
{
if (debug)
{
Log.Warning("pawn is null - wounded ");
}
return false;
}
float num = 0f;
List<Hediff> hediffs = pawn.health.hediffSet.hediffs;
for (int i = 0; i < hediffs.Count; i++)
{
if (hediffs[i] is Hediff_Injury && !hediffs[i].IsPermanent())
{
num += hediffs[i].Severity;
}
}
if (debug && num > 0f)
{
Log.Warning(pawn.Label + " is wounded ");
}
return num > 0f;
}
public static bool IsHungry(this Pawn pawn, bool debug = false)
{
if (pawn == null)
{
if (debug)
{
Log.Warning("pawn is null - IsHungry ");
}
return false;
}
bool flag = pawn.needs.food != null && pawn.needs.food.CurCategory == HungerCategory.Starving;
if (debug && flag)
{
Log.Warning(pawn.Label + " is hungry ");
}
return flag;
}
public static bool OkPawn(Pawn pawn)
{
return pawn != null && pawn.Map != null;
}
public static void Warn(string warning, bool debug = false)
{
if (debug)
{
Log.Warning(warning);
}
}
}
}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.