新亚种
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -96,7 +96,7 @@
|
||||
<AbilityDef>
|
||||
<defName>ARA_TumorSpew</defName>
|
||||
<label>菌瘤释放</label>
|
||||
<description>排出一枚菌瘤,将附近的大片地区转变为菌毯地形,以方便虫群进行活动,并阻碍敌军的前进。</description>
|
||||
<description>排出一枚菌瘤,将附近的大片地区转变为菌毯地形,以方便虫群进行活动。</description>
|
||||
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_TumorSpew</iconPath>
|
||||
<cooldownTicksRange>5000</cooldownTicksRange>
|
||||
<aiCanUse>false</aiCanUse>
|
||||
@@ -134,6 +134,11 @@
|
||||
<ThingDef ParentName="ARA_EggSpew_Base_Proj">
|
||||
<defName>ARA_Proj_Tumor</defName>
|
||||
<label>阿拉克涅菌瘤</label>
|
||||
<graphicData>
|
||||
<texPath>ArachnaeSwarm/Building/ARA_Tumor</texPath>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<drawSize>1.2</drawSize>
|
||||
</graphicData>
|
||||
<projectile>
|
||||
<spawnsThingDef>ARA_Tumor_Smokepop</spawnsThingDef>
|
||||
</projectile>
|
||||
@@ -571,6 +576,101 @@
|
||||
</li> -->
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<!-- 王虫 -->
|
||||
<AbilityDef>
|
||||
<defName>ARA_Smokepop_Creeper_Ability_On</defName>
|
||||
<label>铺设菌毯:开启</label>
|
||||
<description>启动该阿拉克涅王虫种的菌毯铺设能力,会每隔一段时间就将附近的地形转变为阿拉克涅菌毯。此外,任何靠近该王虫种的敌军会遭到其菌瘤腔管的自动攻击,菌瘤腔管会发射能够改变地形以铺设菌毯的菌瘤射弹。</description>
|
||||
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_Smokepop_Creeper_Ability_On</iconPath>
|
||||
<cooldownTicksRange>601</cooldownTicksRange>
|
||||
<hostile>false</hostile>
|
||||
<showOnCharacterCard>true</showOnCharacterCard>
|
||||
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
|
||||
<aiCanUse>false</aiCanUse>
|
||||
<verbProperties>
|
||||
<verbClass>Verb_CastAbility</verbClass>
|
||||
<warmupTime>0</warmupTime>
|
||||
<drawAimPie>false</drawAimPie>
|
||||
<requireLineOfSight>false</requireLineOfSight>
|
||||
<targetable>false</targetable>
|
||||
<targetParams>
|
||||
<canTargetSelf>true</canTargetSelf>
|
||||
</targetParams>
|
||||
</verbProperties>
|
||||
<comps>
|
||||
<!-- 这是正确的用法 -->
|
||||
<li Class="CompProperties_AbilityGiveHediff">
|
||||
<compClass>ArachnaeSwarm.CompAbilityEffect_GiveSwitchHediff</compClass>
|
||||
<hediffDef>ARA_Smokepop_Creeper_Hediff</hediffDef>
|
||||
<applyToSelf>true</applyToSelf>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<AbilityDef>
|
||||
<defName>ARA_Smokepop_Creeper_Ability_Off</defName>
|
||||
<label>铺设菌毯:关闭</label>
|
||||
<description>关闭该阿拉克涅王虫种的菌毯铺设能力,不再尝试改变附近的地形。</description>
|
||||
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_Smokepop_Creeper_Ability_Off</iconPath>
|
||||
<cooldownTicksRange>601</cooldownTicksRange>
|
||||
<hostile>false</hostile>
|
||||
<showOnCharacterCard>true</showOnCharacterCard>
|
||||
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
|
||||
<aiCanUse>false</aiCanUse>
|
||||
<verbProperties>
|
||||
<verbClass>Verb_CastAbility</verbClass>
|
||||
<warmupTime>0</warmupTime>
|
||||
<drawAimPie>false</drawAimPie>
|
||||
<requireLineOfSight>false</requireLineOfSight>
|
||||
<targetable>false</targetable>
|
||||
<targetParams>
|
||||
<canTargetSelf>true</canTargetSelf>
|
||||
</targetParams>
|
||||
</verbProperties>
|
||||
<comps>
|
||||
<li Class="CompProperties_AbilityRemoveHediff">
|
||||
<compClass>ArachnaeSwarm.CompAbilityEffect_RemoveSwitchHediff</compClass>
|
||||
<hediffDef>ARA_Smokepop_Creeper_Hediff</hediffDef>
|
||||
<applyToSelf>true</applyToSelf>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<AbilityDef>
|
||||
<defName>ARA_Tumorthrow</defName>
|
||||
<label>菌瘤投掷</label>
|
||||
<description>将一枚菌瘤投射到目标地点,将附近的大片地区转变为菌毯地形,以方便虫群进行活动。</description>
|
||||
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_TumorSpew</iconPath>
|
||||
<cooldownTicksRange>5000</cooldownTicksRange>
|
||||
<aiCanUse>false</aiCanUse>
|
||||
<displayOrder>300</displayOrder>
|
||||
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
|
||||
<hostile>false</hostile>
|
||||
<casterMustBeCapableOfViolence>false</casterMustBeCapableOfViolence>
|
||||
<warmupStartSound>AcidSpray_Warmup</warmupStartSound>
|
||||
<verbProperties>
|
||||
<verbClass>Verb_CastAbility</verbClass>
|
||||
<range>36</range>
|
||||
<warmupTime>1</warmupTime>
|
||||
<soundCast>AcidSpray_Resolve</soundCast>
|
||||
<violent>false</violent>
|
||||
<drawAimPie>false</drawAimPie>
|
||||
<targetParams>
|
||||
<canTargetSelf>True</canTargetSelf>
|
||||
<canTargetLocations>True</canTargetLocations>
|
||||
</targetParams>
|
||||
</verbProperties>
|
||||
<comps>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityNeedCost">
|
||||
<customLabel>饮食</customLabel>
|
||||
<showProgressBar>true</showProgressBar>
|
||||
<needDef>Food</needDef>
|
||||
<needCost>0.2</needCost>
|
||||
<failMessage>营养值不足,需要进食</failMessage>
|
||||
</li>
|
||||
<li Class="CompProperties_AbilityLaunchProjectile">
|
||||
<projectileDef>ARA_Proj_Tumor</projectileDef>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
|
||||
<!-- 巢卫 -->
|
||||
<AbilityDef>
|
||||
@@ -1399,7 +1499,7 @@
|
||||
<cooldownTicksRange>601</cooldownTicksRange>
|
||||
<hostile>false</hostile>
|
||||
<showOnCharacterCard>true</showOnCharacterCard>
|
||||
<displayGizmoWhileUndrafted>false</displayGizmoWhileUndrafted>
|
||||
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
|
||||
<aiCanUse>false</aiCanUse>
|
||||
<verbProperties>
|
||||
<verbClass>Verb_CastAbility</verbClass>
|
||||
@@ -1428,7 +1528,7 @@
|
||||
<cooldownTicksRange>601</cooldownTicksRange>
|
||||
<hostile>false</hostile>
|
||||
<showOnCharacterCard>true</showOnCharacterCard>
|
||||
<displayGizmoWhileUndrafted>false</displayGizmoWhileUndrafted>
|
||||
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
|
||||
<aiCanUse>false</aiCanUse>
|
||||
<verbProperties>
|
||||
<verbClass>Verb_CastAbility</verbClass>
|
||||
|
||||
@@ -947,11 +947,13 @@
|
||||
<abilityDefs>
|
||||
<li>ARA_Ability_Smokepop</li>
|
||||
<li>ARA_Smokepop_Production_Bacterium</li>
|
||||
<li>ARA_Smokepop_Creeper</li>
|
||||
</abilityDefs>
|
||||
</li>
|
||||
<li Class="HediffCompProperties_RemoveIfOtherHediff">
|
||||
<hediffs>
|
||||
<li>ARA_Smokepop_Production_Bacterium</li>
|
||||
<li>ARA_Smokepop_Creeper</li>
|
||||
</hediffs>
|
||||
</li>
|
||||
</comps>
|
||||
@@ -1060,6 +1062,104 @@
|
||||
</li>
|
||||
</comps>
|
||||
</HediffDef>
|
||||
<AbilityDef>
|
||||
<defName>ARA_Smokepop_Creeper</defName>
|
||||
<label>迷雾种转换——菌毯支援</label>
|
||||
<description>使迷雾种发生内驱性进化,以牺牲喷射信息素为代价,使其获得额外防御力、移动速度和大范围、高速铺设菌毯的能力。\n\n该进化过程不可逆!</description>
|
||||
<iconPath>ArachnaeSwarm/UI/Abilities/ARA_Smokepop_Production_Bacterium</iconPath>
|
||||
<cooldownTicksRange>1800</cooldownTicksRange>
|
||||
<hostile>false</hostile>
|
||||
<groupAbility>true</groupAbility>
|
||||
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
|
||||
<disableGizmoWhileUndrafted>false</disableGizmoWhileUndrafted>
|
||||
<aiCanUse>false</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_Smokepop_Creeper</hediffDef>
|
||||
<onlyApplyToSelf>True</onlyApplyToSelf>
|
||||
<replaceExisting>true</replaceExisting>
|
||||
<severity>1</severity>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityResearchPrereq">
|
||||
<requiredResearch>ARA_Technology_3CRP</requiredResearch>
|
||||
<failMessage>需要科技 节点CRP-3"菌毯铺设" 以解锁进化</failMessage>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<HediffDef>
|
||||
<defName>ARA_Smokepop_Creeper</defName>
|
||||
<label>亚种-王虫种</label>
|
||||
<description>这只阿拉克涅迷雾种已经获得拔耀,可以一边移动一边在周围铺设菌毯,以改造巢穴周边的地形或建立一条侵略其他定居点的路径。此外,它也获得了向敌方投射菌瘤的能力。</description>
|
||||
<hediffClass>HediffWithComps</hediffClass>
|
||||
<defaultLabelColor>(0.6, 0.4, 0.8)</defaultLabelColor>
|
||||
<isBad>false</isBad>
|
||||
<scenarioCanAdd>false</scenarioCanAdd>
|
||||
<maxSeverity>1.0</maxSeverity>
|
||||
<renderNodeProperties>
|
||||
<li>
|
||||
<nodeClass>PawnRenderNode_AttachmentHead</nodeClass>
|
||||
<workerClass>PawnRenderNodeWorker_FlipWhenCrawling</workerClass>
|
||||
<texPath>ArachnaeSwarm/Things/ARA_HiveNode/Addons/ArachnaeNode_Race_Addons_Smokepop_Armor</texPath>
|
||||
<parentTagDef>Body</parentTagDef>
|
||||
<useSkinShader>false</useSkinShader>
|
||||
<useRottenColor>false</useRottenColor>
|
||||
<rotDrawMode>Fresh, Rotting</rotDrawMode>
|
||||
<drawSize>0.85</drawSize>
|
||||
<drawData>
|
||||
<dataNorth>
|
||||
<offset>(0, 0, 0)</offset>
|
||||
<layer>-400</layer>
|
||||
</dataNorth>
|
||||
<dataEast>
|
||||
<offset>(0, 0, 0)</offset>
|
||||
</dataEast>
|
||||
<dataSouth>
|
||||
<offset>(0, 0, 0)</offset>
|
||||
</dataSouth>
|
||||
<dataWest>
|
||||
<offset>(0, 0, 0)</offset>
|
||||
</dataWest>
|
||||
<defaultData>
|
||||
<layer>800</layer>
|
||||
</defaultData>
|
||||
</drawData>
|
||||
</li>
|
||||
</renderNodeProperties>
|
||||
<stages>
|
||||
<li>
|
||||
<minSeverity>0.01</minSeverity>
|
||||
<statOffsets>
|
||||
<MoveSpeed>1</MoveSpeed>
|
||||
<ArmorRating_Blunt>0.25</ArmorRating_Blunt>
|
||||
<ArmorRating_Sharp>0.25</ArmorRating_Sharp>
|
||||
</statOffsets>
|
||||
</li>
|
||||
</stages>
|
||||
<comps>
|
||||
<li Class="HediffCompProperties_GiveAbility">
|
||||
<abilityDefs>
|
||||
<li>ARA_Smokepop_Creeper_Ability_On</li>
|
||||
<li>ARA_Smokepop_Creeper_Ability_Off</li>
|
||||
<li>ARA_Tumorthrow</li>
|
||||
</abilityDefs>
|
||||
</li>
|
||||
</comps>
|
||||
</HediffDef>
|
||||
|
||||
<!-- 盾头种 -->
|
||||
<HediffDef>
|
||||
|
||||
@@ -265,4 +265,28 @@
|
||||
</li>
|
||||
</stages>
|
||||
</HediffDef>
|
||||
|
||||
<HediffDef>
|
||||
<defName>ARA_Smokepop_Creeper_Hediff</defName>
|
||||
<label>菌毯铺设</label>
|
||||
<description>阿拉克涅王虫种正在铺设菌毯,每隔一段时间都会改变附近的地形。</description>
|
||||
<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</minSeverity>
|
||||
</li>
|
||||
</stages>
|
||||
<comps>
|
||||
<li Class="ArachnaeSwarm.CompProperties_HediffTerrainSpawn">
|
||||
<terrainToSpawn>ARA_InsectCreep</terrainToSpawn>
|
||||
<spawnRadius>8</spawnRadius>
|
||||
<intervalTicks>60</intervalTicks>
|
||||
<onlyWhenMoving>true</onlyWhenMoving>
|
||||
</li>
|
||||
</comps>
|
||||
</HediffDef>
|
||||
</Defs>
|
||||
@@ -711,6 +711,21 @@
|
||||
<li>ARA_Base_Technology</li>
|
||||
</prerequisites>
|
||||
</ResearchProjectDef>
|
||||
<ResearchProjectDef ParentName="ARA_techBase_Needtechprint">
|
||||
<defName>ARA_Technology_3CRP</defName>
|
||||
<label>节点CRP-3"菌毯铺设"</label>
|
||||
<description>允许迷雾种进行定向进化,抛弃喷射信息素的能力,以获得防御力、移动速度的增强和大规模铺设菌毯的能力。\n\n阿拉克涅虫群所有需要蓝图的科技,其蓝图只能通过女皇种的基因试验卵获取。</description>
|
||||
<baseCost>300</baseCost>
|
||||
<researchViewX>7.50</researchViewX>
|
||||
<researchViewY>0.90</researchViewY>
|
||||
<requiredResearchBuilding>ARA_ResearchBench</requiredResearchBuilding>
|
||||
<hiddenPrerequisites>
|
||||
<li>ARA_Technology_5KYC</li>
|
||||
</hiddenPrerequisites>
|
||||
<prerequisites>
|
||||
<li>ARA_Technology_6GUT</li>
|
||||
</prerequisites>
|
||||
</ResearchProjectDef>
|
||||
<!-- 改造发展 -->
|
||||
<ResearchProjectDef ParentName="ARA_techBase">
|
||||
<defName>ARA_Technology_1EVO</defName>
|
||||
@@ -837,8 +852,8 @@
|
||||
<label>节点EVO-10"高级肺"</label>
|
||||
<description>允许实行新的阿拉克涅进化手术,允许阿拉克涅虫族获得更强大的肺部。</description>
|
||||
<baseCost>1000</baseCost>
|
||||
<researchViewX>11.00</researchViewX>
|
||||
<researchViewY>3.80</researchViewY>
|
||||
<researchViewX>7.50</researchViewX>
|
||||
<researchViewY>5.30</researchViewY>
|
||||
<requiredResearchBuilding>ARA_ResearchBench</requiredResearchBuilding> <!-- ARA_MorphableResearchBench-->
|
||||
<hiddenPrerequisites>
|
||||
<li>ARA_Technology_5ESS</li>
|
||||
|
||||
@@ -1948,7 +1948,7 @@
|
||||
<AccuracyShort>1</AccuracyShort>
|
||||
<AccuracyMedium>1</AccuracyMedium>
|
||||
<AccuracyLong>1</AccuracyLong>
|
||||
<Mass>5</Mass>
|
||||
<Mass>0</Mass>
|
||||
</statBases>
|
||||
<verbs>
|
||||
<li>
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
<Beauty>-20</Beauty>
|
||||
<ShootingAccuracyTurret>0.96</ShootingAccuracyTurret>
|
||||
</statBases>
|
||||
<tickerType>Rare</tickerType>
|
||||
<!-- <tickerType>Rare</tickerType> -->
|
||||
<comps>
|
||||
<li Class="CompProperties_Forbiddable"/>
|
||||
<li Class="ArachnaeSwarm.CompProperties_ForceTargetable" />
|
||||
@@ -211,7 +211,7 @@
|
||||
<fillPercent>0.20</fillPercent>
|
||||
<leaveResourcesWhenKilled>false</leaveResourcesWhenKilled>
|
||||
<rotatable>false</rotatable>
|
||||
<tickerType>Rare</tickerType>
|
||||
<!-- <tickerType>Rare</tickerType> -->
|
||||
<building>
|
||||
<isTrap>true</isTrap>
|
||||
<trapDestroyOnSpring>true</trapDestroyOnSpring>
|
||||
|
||||
Binary file not shown.
@@ -1,9 +1,13 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\",
|
||||
"WorkspaceRootPath": "D:\\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\\abilities\\compabilityeffect_randomhediff.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\hediffs\\ara_hediffterrainspawn\\comphediffterrainspawn.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:hediffs\\ara_hediffterrainspawn\\comphediffterrainspawn.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\abilities\\compabilityeffect_randomhediff.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\compabilityeffect_randomhediff.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
@@ -23,12 +27,25 @@
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "CompHediffTerrainSpawn.cs",
|
||||
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Hediffs\\ARA_HediffTerrainSpawn\\CompHediffTerrainSpawn.cs",
|
||||
"RelativeDocumentMoniker": "Hediffs\\ARA_HediffTerrainSpawn\\CompHediffTerrainSpawn.cs",
|
||||
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Hediffs\\ARA_HediffTerrainSpawn\\CompHediffTerrainSpawn.cs",
|
||||
"RelativeToolTip": "Hediffs\\ARA_HediffTerrainSpawn\\CompHediffTerrainSpawn.cs",
|
||||
"ViewState": "AgIAAF4AAAAAAAAAAAAAAG4AAAAAAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-10-23T08:00:28.236Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "CompAbilityEffect_RandomHediff.cs",
|
||||
"DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\CompAbilityEffect_RandomHediff.cs",
|
||||
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\CompAbilityEffect_RandomHediff.cs",
|
||||
"RelativeDocumentMoniker": "Abilities\\CompAbilityEffect_RandomHediff.cs",
|
||||
"ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\CompAbilityEffect_RandomHediff.cs",
|
||||
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\CompAbilityEffect_RandomHediff.cs",
|
||||
"RelativeToolTip": "Abilities\\CompAbilityEffect_RandomHediff.cs",
|
||||
"ViewState": "AgIAAM4AAAAAAAAAAAAswL8AAAA9AAAAAAAAAA==",
|
||||
"ViewState": "AgIAALoAAAAAAAAAAAAqwNcAAAAZAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-10-22T06:34:08.063Z",
|
||||
"EditorCaption": ""
|
||||
|
||||
@@ -132,6 +132,8 @@
|
||||
<Compile Include="EventSystem\QuestNode_Root_EventLetter.cs" />
|
||||
<Compile Include="HediffGiver\HediffGiver_NonPlayerFaction.cs" />
|
||||
<Compile Include="Hediffs\ARA_DrawMoteInRange\HediffComp_DrawMoteInRange.cs" />
|
||||
<Compile Include="Hediffs\ARA_HediffTerrainSpawn\CompHediffTerrainSpawn.cs" />
|
||||
<Compile Include="Hediffs\ARA_HediffTerrainSpawn\CompProperties_HediffTerrainSpawn.cs" />
|
||||
<Compile Include="Hediffs\HediffComp_LifespanDisplay.cs" />
|
||||
<Compile Include="Jobs\JobDriver_CarryPrisonerToRefuelingVat.cs" />
|
||||
<Compile Include="MentalState\MentalState_HiveMindCascade.cs" />
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
/// <summary>
|
||||
/// Hediff component that periodically changes terrain around the pawn.
|
||||
/// Runs at specified intervals while the hediff is active.
|
||||
/// </summary>
|
||||
public class CompHediffTerrainSpawn : HediffComp
|
||||
{
|
||||
private CompProperties_HediffTerrainSpawn Props => (CompProperties_HediffTerrainSpawn)props;
|
||||
|
||||
private int ticksUntilNextSpawn;
|
||||
private bool initialized = false;
|
||||
|
||||
public override void CompPostTick(ref float severityAdjustment)
|
||||
{
|
||||
base.CompPostTick(ref severityAdjustment);
|
||||
|
||||
// 初始化计数器
|
||||
if (!initialized)
|
||||
{
|
||||
ticksUntilNextSpawn = Props.intervalTicks;
|
||||
initialized = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查条件
|
||||
if (!CanSpawnTerrain())
|
||||
return;
|
||||
|
||||
// 倒计时
|
||||
ticksUntilNextSpawn--;
|
||||
if (ticksUntilNextSpawn <= 0)
|
||||
{
|
||||
DoTerrainSpawn();
|
||||
ticksUntilNextSpawn = Props.intervalTicks; // 重置计数器
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查是否满足地形生成条件
|
||||
/// </summary>
|
||||
private bool CanSpawnTerrain()
|
||||
{
|
||||
// 基本检查
|
||||
if (parent.pawn == null || parent.pawn.Destroyed || parent.pawn.Map == null ||
|
||||
Props.terrainToSpawn == null || Props.spawnRadius <= 0)
|
||||
return false;
|
||||
|
||||
// 检查可选条件
|
||||
if (Props.onlyWhenDowned && !parent.pawn.Downed)
|
||||
return false;
|
||||
|
||||
if (Props.onlyWhenMoving && (parent.pawn.pather == null || !parent.pawn.pather.Moving))
|
||||
return false;
|
||||
|
||||
// 确保pawn在地图内
|
||||
if (!parent.pawn.Position.InBounds(parent.pawn.Map))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 执行地形生成
|
||||
/// </summary>
|
||||
private void DoTerrainSpawn()
|
||||
{
|
||||
try
|
||||
{
|
||||
Map map = parent.pawn.Map;
|
||||
IntVec3 center = parent.pawn.Position;
|
||||
|
||||
foreach (IntVec3 current in GenRadial.RadialCellsAround(center, Props.spawnRadius, true))
|
||||
{
|
||||
if (current.InBounds(map) && current.Walkable(map))
|
||||
{
|
||||
// 检查当前地形是否有 ARA_Creep 标签
|
||||
TerrainDef currentTerrain = map.terrainGrid.TerrainAt(current);
|
||||
if (currentTerrain != null && HasCreepTag(currentTerrain))
|
||||
{
|
||||
continue; // 跳过有 ARA_Creep 标签的地面
|
||||
}
|
||||
|
||||
map.terrainGrid.SetTerrain(current, Props.terrainToSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
Log.Error($"Error in CompHediffTerrainSpawn.DoTerrainSpawn: {ex}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查地形是否具有 ARA_Creep 标签
|
||||
/// </summary>
|
||||
private bool HasCreepTag(TerrainDef terrain)
|
||||
{
|
||||
return terrain.tags != null && terrain.tags.Contains("ARA_Creep");
|
||||
}
|
||||
|
||||
public override void CompExposeData()
|
||||
{
|
||||
base.CompExposeData();
|
||||
Scribe_Values.Look(ref ticksUntilNextSpawn, "ticksUntilNextSpawn", Props.intervalTicks);
|
||||
Scribe_Values.Look(ref initialized, "initialized", false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 调试信息显示
|
||||
/// </summary>
|
||||
public override string CompDebugString()
|
||||
{
|
||||
if (!CanSpawnTerrain())
|
||||
return "Cannot spawn terrain: conditions not met";
|
||||
|
||||
return $"Next spawn in: {ticksUntilNextSpawn} ticks\n" +
|
||||
$"Interval: {Props.intervalTicks} ticks\n" +
|
||||
$"Radius: {Props.spawnRadius}\n" +
|
||||
$"Terrain: {Props.terrainToSpawn?.defName ?? "None"}";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using Verse;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
/// <summary>
|
||||
/// Properties for the CompHediffTerrainSpawn component.
|
||||
/// Allows a hediff to periodically change terrain around the pawn.
|
||||
/// </summary>
|
||||
public class CompProperties_HediffTerrainSpawn : HediffCompProperties
|
||||
{
|
||||
public TerrainDef terrainToSpawn;
|
||||
public float spawnRadius = 0f;
|
||||
public int intervalTicks = 60; // 默认1秒
|
||||
|
||||
// 可选:是否只在特定条件下生效
|
||||
public bool onlyWhenDowned = false;
|
||||
public bool onlyWhenMoving = false;
|
||||
|
||||
public CompProperties_HediffTerrainSpawn()
|
||||
{
|
||||
compClass = typeof(CompHediffTerrainSpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user