各种更新
This commit is contained in:
Binary file not shown.
@@ -868,10 +868,10 @@
|
||||
</verbProperties>
|
||||
<comps>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityGiveHediffWithSkillDuration">
|
||||
<hediffDef>ARA_Heal_By_Nurse_Hediff</hediffDef>
|
||||
<baseDurationSeconds>30</baseDurationSeconds>
|
||||
<skillDef>Medicine</skillDef>
|
||||
<extraSecondsPerSkillLevel>5</extraSecondsPerSkillLevel>
|
||||
<hediffDef>ARA_Heal_By_Nurse_Hediff</hediffDef>
|
||||
<baseDurationSeconds>30</baseDurationSeconds>
|
||||
<skillDef>Medicine</skillDef>
|
||||
<extraSecondsPerSkillLevel>5</extraSecondsPerSkillLevel>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityTerrainRestriction">
|
||||
<terrainDefs>
|
||||
|
||||
@@ -94,6 +94,16 @@
|
||||
<li Class="CompProperties_AbilityLaunchProjectile">
|
||||
<projectileDef>ARA_Proj_EggSac</projectileDef>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityShowSpawnablePawns">
|
||||
<spawnBuildingDef>ARA_InteractiveEggSac</spawnBuildingDef>
|
||||
<customLabel>0级阿拉克涅卵 可孵化的单位</customLabel>
|
||||
<showResearchRequirements>true</showResearchRequirements>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityShowTemperatureRange">
|
||||
<temperatureCheckBuilding>ARA_InteractiveEggSac</temperatureCheckBuilding>
|
||||
<customLabel>温度要求</customLabel>
|
||||
<showCurrentTemperature>true</showCurrentTemperature>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<AbilityDef ParentName="ARA_EggSpew_Base">
|
||||
@@ -105,6 +115,16 @@
|
||||
<li Class="CompProperties_AbilityLaunchProjectile">
|
||||
<projectileDef>ARA_Proj_EggSac_Huge</projectileDef>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityShowSpawnablePawns">
|
||||
<spawnBuildingDef>ARA_InteractiveEggSac_Huge</spawnBuildingDef>
|
||||
<customLabel>0级大型阿拉克涅卵 可孵化的单位</customLabel>
|
||||
<showResearchRequirements>true</showResearchRequirements>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityShowTemperatureRange">
|
||||
<temperatureCheckBuilding>ARA_InteractiveEggSac_Huge</temperatureCheckBuilding>
|
||||
<customLabel>温度要求</customLabel>
|
||||
<showCurrentTemperature>true</showCurrentTemperature>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<!-- T1 -->
|
||||
@@ -117,6 +137,16 @@
|
||||
<li Class="CompProperties_AbilityLaunchProjectile">
|
||||
<projectileDef>ARA_Proj_EggSac_1Stage</projectileDef>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityShowSpawnablePawns">
|
||||
<spawnBuildingDef>ARA_InteractiveEggSac_1Stage</spawnBuildingDef>
|
||||
<customLabel>1级阿拉克涅卵 可孵化的单位</customLabel>
|
||||
<showResearchRequirements>true</showResearchRequirements>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityShowTemperatureRange">
|
||||
<temperatureCheckBuilding>ARA_InteractiveEggSac_1Stage</temperatureCheckBuilding>
|
||||
<customLabel>温度要求</customLabel>
|
||||
<showCurrentTemperature>true</showCurrentTemperature>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<AbilityDef ParentName="ARA_EggSpew_Base">
|
||||
@@ -128,6 +158,16 @@
|
||||
<li Class="CompProperties_AbilityLaunchProjectile">
|
||||
<projectileDef>ARA_Proj_EggSac_Huge_1Stage</projectileDef>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityShowSpawnablePawns">
|
||||
<spawnBuildingDef>ARA_InteractiveEggSac_Huge_1Stage</spawnBuildingDef>
|
||||
<customLabel>1级大型阿拉克涅卵 可孵化的单位</customLabel>
|
||||
<showResearchRequirements>true</showResearchRequirements>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityShowTemperatureRange">
|
||||
<temperatureCheckBuilding>ARA_InteractiveEggSac_Huge_1Stage</temperatureCheckBuilding>
|
||||
<customLabel>温度要求</customLabel>
|
||||
<showCurrentTemperature>true</showCurrentTemperature>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<!-- T2 -->
|
||||
@@ -140,6 +180,16 @@
|
||||
<li Class="CompProperties_AbilityLaunchProjectile">
|
||||
<projectileDef>ARA_Proj_EggSac_2Stage</projectileDef>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityShowSpawnablePawns">
|
||||
<spawnBuildingDef>ARA_InteractiveEggSac_2Stage</spawnBuildingDef>
|
||||
<customLabel>2级阿拉克涅卵 可孵化的单位</customLabel>
|
||||
<showResearchRequirements>true</showResearchRequirements>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityShowTemperatureRange">
|
||||
<temperatureCheckBuilding>ARA_InteractiveEggSac_2Stage</temperatureCheckBuilding>
|
||||
<customLabel>温度要求</customLabel>
|
||||
<showCurrentTemperature>true</showCurrentTemperature>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<AbilityDef ParentName="ARA_EggSpew_Base">
|
||||
@@ -151,6 +201,16 @@
|
||||
<li Class="CompProperties_AbilityLaunchProjectile">
|
||||
<projectileDef>ARA_Proj_EggSac_Huge_2Stage</projectileDef>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityShowSpawnablePawns">
|
||||
<spawnBuildingDef>ARA_InteractiveEggSac_Huge_2Stage</spawnBuildingDef>
|
||||
<customLabel>2级大型阿拉克涅卵 可孵化的单位</customLabel>
|
||||
<showResearchRequirements>true</showResearchRequirements>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityShowTemperatureRange">
|
||||
<temperatureCheckBuilding>ARA_InteractiveEggSac_Huge_2Stage</temperatureCheckBuilding>
|
||||
<customLabel>温度要求</customLabel>
|
||||
<showCurrentTemperature>true</showCurrentTemperature>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
|
||||
@@ -164,6 +224,11 @@
|
||||
<li Class="CompProperties_AbilityLaunchProjectile">
|
||||
<projectileDef>ARA_Cocoon_Proj_Cloth</projectileDef>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityShowTemperatureRange">
|
||||
<temperatureCheckBuilding>ARA_Cocoon_Cloth</temperatureCheckBuilding>
|
||||
<customLabel>温度要求</customLabel>
|
||||
<showCurrentTemperature>true</showCurrentTemperature>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<AbilityDef ParentName="ARA_CocoonSpew_Base">
|
||||
@@ -175,6 +240,11 @@
|
||||
<li Class="CompProperties_AbilityLaunchProjectile">
|
||||
<projectileDef>ARA_Cocoon_Proj_Weapon</projectileDef>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityShowTemperatureRange">
|
||||
<temperatureCheckBuilding>ARA_Cocoon_Weapon</temperatureCheckBuilding>
|
||||
<customLabel>温度要求</customLabel>
|
||||
<showCurrentTemperature>true</showCurrentTemperature>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<!-- T1 -->
|
||||
@@ -187,6 +257,11 @@
|
||||
<li Class="CompProperties_AbilityLaunchProjectile">
|
||||
<projectileDef>ARA_Cocoon_Proj_Cloth_1Stage</projectileDef>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityShowTemperatureRange">
|
||||
<temperatureCheckBuilding>ARA_Cocoon_Cloth_1Stage</temperatureCheckBuilding>
|
||||
<customLabel>温度要求</customLabel>
|
||||
<showCurrentTemperature>true</showCurrentTemperature>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<AbilityDef ParentName="ARA_CocoonSpew_Base">
|
||||
@@ -198,6 +273,11 @@
|
||||
<li Class="CompProperties_AbilityLaunchProjectile">
|
||||
<projectileDef>ARA_Cocoon_Proj_Weapon_1Stage</projectileDef>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityShowTemperatureRange">
|
||||
<temperatureCheckBuilding>ARA_Cocoon_Weapon_1Stage</temperatureCheckBuilding>
|
||||
<customLabel>温度要求</customLabel>
|
||||
<showCurrentTemperature>true</showCurrentTemperature>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<!-- T2 -->
|
||||
@@ -210,6 +290,11 @@
|
||||
<li Class="CompProperties_AbilityLaunchProjectile">
|
||||
<projectileDef>ARA_Cocoon_Proj_Cloth_2Stage</projectileDef>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityShowTemperatureRange">
|
||||
<temperatureCheckBuilding>ARA_Cocoon_Cloth_2Stage</temperatureCheckBuilding>
|
||||
<customLabel>温度要求</customLabel>
|
||||
<showCurrentTemperature>true</showCurrentTemperature>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<AbilityDef ParentName="ARA_CocoonSpew_Base">
|
||||
@@ -221,6 +306,11 @@
|
||||
<li Class="CompProperties_AbilityLaunchProjectile">
|
||||
<projectileDef>ARA_Cocoon_Proj_Weapon_2Stage</projectileDef>
|
||||
</li>
|
||||
<li Class="ArachnaeSwarm.CompProperties_AbilityShowTemperatureRange">
|
||||
<temperatureCheckBuilding>ARA_Cocoon_Weapon_2Stage</temperatureCheckBuilding>
|
||||
<customLabel>温度要求</customLabel>
|
||||
<showCurrentTemperature>true</showCurrentTemperature>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
</li>
|
||||
</stages>
|
||||
</HediffDef>
|
||||
|
||||
<HediffDef>
|
||||
<defName>ARA_TerrainHealHediff</defName>
|
||||
<label>菌毯加成:治疗</label>
|
||||
@@ -100,4 +101,62 @@
|
||||
</li>
|
||||
</stages>
|
||||
</HediffDef>
|
||||
|
||||
<HediffDef>
|
||||
<defName>ARA_TerrainCooldownHediff</defName>
|
||||
<label>菌毯加成:战斗反应</label>
|
||||
<description>这只阿拉克捏督虫所着织物使其可以在菌毯上获得更短的近战冷却和远程冷却时间。在菌毯上呆的越久,效果越强,离开菌毯后效果将逐渐衰减。</description>
|
||||
<hediffClass>HediffWithComps</hediffClass>
|
||||
<maxSeverity>1.0</maxSeverity>
|
||||
<minSeverity>0.01</minSeverity>
|
||||
<isBad>false</isBad>
|
||||
<comps>
|
||||
<li Class="ArachnaeSwarm.HediffCompProperties_TerrainBasedSeverity">
|
||||
<interval>180</interval>
|
||||
|
||||
<!-- 目标地形列表 -->
|
||||
<terrainDefs>
|
||||
<!--<li>SterileTile</li> 无菌地砖 -->
|
||||
<!-- 您可以在这里添加更多地形, 比如: -->
|
||||
<li>ARA_InsectCreep</li>
|
||||
<li>ARA_InsectCreepFloor</li>
|
||||
</terrainDefs>
|
||||
|
||||
<!-- 站在目标地形上时,每次检查的严重性变化量 -->
|
||||
<severityOnTerrain>0.05</severityOnTerrain>
|
||||
|
||||
<!-- 不在目标地形上时,每次检查的严重性变化量 (负数表示减少) -->
|
||||
<severityOffTerrain>-0.0249</severityOffTerrain>
|
||||
</li>
|
||||
<li Class="HediffCompProperties_RemoveIfApparelDropped" />
|
||||
</comps>
|
||||
<stages>
|
||||
<li>
|
||||
<becomeVisible>false</becomeVisible>
|
||||
<minSeverity>0</minSeverity>
|
||||
<label>无</label>
|
||||
</li>
|
||||
<li>
|
||||
<minSeverity>0.1</minSeverity>
|
||||
<statFactors>
|
||||
<MeleeCooldownFactor>0.95</MeleeCooldownFactor>
|
||||
<RangedCooldownFactor>0.95</RangedCooldownFactor>
|
||||
</statFactors>
|
||||
</li>
|
||||
<li>
|
||||
<minSeverity>0.5</minSeverity>
|
||||
<statFactors>
|
||||
<MeleeCooldownFactor>0.9</MeleeCooldownFactor>
|
||||
<RangedCooldownFactor>0.9</RangedCooldownFactor>
|
||||
</statFactors>
|
||||
</li>
|
||||
<li>
|
||||
<minSeverity>0.8</minSeverity>
|
||||
<statFactors>
|
||||
<MeleeCooldownFactor>0.85</MeleeCooldownFactor>
|
||||
<RangedCooldownFactor>0.85</RangedCooldownFactor>
|
||||
</statFactors>
|
||||
</li>
|
||||
</stages>
|
||||
</HediffDef>
|
||||
</Defs>
|
||||
@@ -376,8 +376,8 @@
|
||||
</ThingDef>
|
||||
<ThingDef ParentName="ARA_ClothBase">
|
||||
<defName>ARA_Dragoon_Uniform</defName>
|
||||
<label>阿拉克涅骑兵装</label>
|
||||
<description>烧虫</description>
|
||||
<label>阿拉克涅卫兵装</label>
|
||||
<description>阿拉克涅虫群中的高阶战士所着织物,似乎拥有增强战斗能力的效果,并且给人一种意外的庄严感——只不过她们挥着咔咔作响的鳌钳将你的同伴撕裂时,所有美好的幻想都会成为泡影。</description>
|
||||
<descriptionHyperlinks>
|
||||
<ThingDef>ARA_Cocoon_Cloth_1Stage</ThingDef>
|
||||
</descriptionHyperlinks>
|
||||
@@ -408,7 +408,7 @@
|
||||
<costStuffCount>0</costStuffCount>
|
||||
<comps>
|
||||
<li Class="CompProperties_CauseHediff_Apparel">
|
||||
<hediff>ARA_TerrainMoveSpeedHediff</hediff>
|
||||
<hediff>ARA_TerrainCooldownHediff</hediff>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
|
||||
@@ -33,12 +33,32 @@
|
||||
</sowResearchPrerequisites>
|
||||
</plant>
|
||||
</ThingDef>
|
||||
<ThingDef ParentName="PlantFoodRawBase">
|
||||
<defName>ARA_CreepFungus</defName>
|
||||
<label>菌毯真菌</label>
|
||||
<description>从菌毯奇花上收获的真菌。可以直接生吃,但烹饪后味道更佳。</description>
|
||||
<graphicData>
|
||||
<texPath>Things/Item/Resource/PlantFoodRaw/RawFungus</texPath> <!-- 暂时使用原版真菌的贴图 -->
|
||||
</graphicData>
|
||||
<statBases>
|
||||
<MarketValue>1.1</MarketValue>
|
||||
</statBases>
|
||||
<ingestible>
|
||||
<foodType>Fungus</foodType>
|
||||
</ingestible>
|
||||
<comps>
|
||||
<li Class="CompProperties_Rottable">
|
||||
<daysToRotStart>30</daysToRotStart>
|
||||
<rotDestroys>true</rotDestroys>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
|
||||
<ThingDef ParentName="PlantBase">
|
||||
<defName>ARA_AcidlingTrapPlant</defName>
|
||||
<label>酸爆巢花</label>
|
||||
<thingClass>ArachnaeSwarm.Plant_Transforming</thingClass>
|
||||
<description>一种只能在阿拉克涅菌毯上生长的奇特植物,几乎不消耗肥力即可通过菌毯的营养管道茁壮生长,并转换成阿拉克涅酸爆茧。</description>
|
||||
<description>一种由阿拉克涅虫群培育的真菌混合体,它会汲取菌毯的营养,在生长到一定阶段后进行变态发育,最终转换成一枚阿拉克涅酸爆茧——一种会对附近的敌军释放自杀性辅虫的特殊陷阱。</description>
|
||||
<statBases>
|
||||
<MaxHitPoints>85</MaxHitPoints>
|
||||
<Beauty>4</Beauty>
|
||||
@@ -74,12 +94,11 @@
|
||||
</li>
|
||||
</modExtensions>
|
||||
</ThingDef>
|
||||
|
||||
<ThingDef ParentName="PlantBase">
|
||||
<defName>ARA_BeeSpikePlant</defName>
|
||||
<label>蜂刺巢花</label>
|
||||
<thingClass>ArachnaeSwarm.Plant_Transforming</thingClass>
|
||||
<description>一种只能在阿拉克涅菌毯上生长的奇特植物,几乎不消耗肥力即可通过菌毯的营养管道茁壮生长,并转换成蜂刺射手。</description>
|
||||
<description>一种由阿拉克涅虫群培育的真菌混合体,它会汲取菌毯的营养,在生长到一定阶段后进行变态发育,最终转换成一具蜂刺射手——一种会使用毒针射击来犯敌军的知觉真菌。</description>
|
||||
<statBases>
|
||||
<MaxHitPoints>85</MaxHitPoints>
|
||||
<Beauty>4</Beauty>
|
||||
@@ -115,25 +134,4 @@
|
||||
</li>
|
||||
</modExtensions>
|
||||
</ThingDef>
|
||||
|
||||
<ThingDef ParentName="PlantFoodRawBase">
|
||||
<defName>ARA_CreepFungus</defName>
|
||||
<label>菌毯真菌</label>
|
||||
<description>从菌毯奇花上收获的真菌。可以直接生吃,但烹饪后味道更佳。</description>
|
||||
<graphicData>
|
||||
<texPath>Things/Item/Resource/PlantFoodRaw/RawFungus</texPath> <!-- 暂时使用原版真菌的贴图 -->
|
||||
</graphicData>
|
||||
<statBases>
|
||||
<MarketValue>1.1</MarketValue>
|
||||
</statBases>
|
||||
<ingestible>
|
||||
<foodType>Fungus</foodType>
|
||||
</ingestible>
|
||||
<comps>
|
||||
<li Class="CompProperties_Rottable">
|
||||
<daysToRotStart>30</daysToRotStart>
|
||||
<rotDestroys>true</rotDestroys>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
</Defs>
|
||||
@@ -61,4 +61,4 @@
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
</Defs>
|
||||
</Defs>
|
||||
@@ -35,4 +35,12 @@
|
||||
<AbilityTerrainRestrictionTip>只能在以下地形使用:{0}</AbilityTerrainRestrictionTip>
|
||||
|
||||
<AbilitySkillDurationBonus>基于{0}技能(等级{1})延长{2}秒,总持续时间:{3}秒</AbilitySkillDurationBonus>
|
||||
|
||||
<!-- Temperature Range Ability Translations -->
|
||||
<AbilityCheckSafeTemperatureRangeLabel>安全温度范围</AbilityCheckSafeTemperatureRangeLabel>
|
||||
<AbilityCheckSafeTemperatureRange>{0}°C - {1}°C</AbilityCheckSafeTemperatureRange>
|
||||
<AbilityCheckCurrentTemperature>当前温度: {0}°C ({1})</AbilityCheckCurrentTemperature>
|
||||
<AbilityCheckTemperatureTooLow>过低</AbilityCheckTemperatureTooLow>
|
||||
<AbilityCheckTemperatureTooHigh>过高</AbilityCheckTemperatureTooHigh>
|
||||
<AbilityCheckTemperatureSafe>安全</AbilityCheckTemperatureSafe>
|
||||
</LanguageData>
|
||||
Binary file not shown.
@@ -3,16 +3,28 @@
|
||||
"WorkspaceRootPath": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\abilities\\ara_givehediffwithskillduration\\compabilityeffect_givehediffwithskillduration.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_givehediffwithskillduration\\compabilityeffect_givehediffwithskillduration.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\\ara_showtemperaturerange\\compabilityeffect_abilityshowtemperaturerange.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_showtemperaturerange\\compabilityeffect_abilityshowtemperaturerange.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\\ara_givehediffwithskillduration\\compproperties_givehediffwithskillduration.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_givehediffwithskillduration\\compproperties_givehediffwithskillduration.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\\ara_hediffdefof.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:ara_hediffdefof.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\\ara_terrainrestriction\\compabilityeffect_terrainrestriction .cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_terrainrestriction\\compabilityeffect_terrainrestriction .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\\mainharmony.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:mainharmony.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\\supercarryextension.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:supercarryextension.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\\floatmenuoptionprovider_supercarry.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:floatmenuoptionprovider_supercarry.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\\jobdriver_supercarry.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:jobdriver_supercarry.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
@@ -22,7 +34,7 @@
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 2,
|
||||
"SelectedChildIndex": 1,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
@@ -30,42 +42,76 @@
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "CompProperties_GiveHediffWithSkillDuration.cs",
|
||||
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_GiveHediffWithSkillDuration\\CompProperties_GiveHediffWithSkillDuration.cs",
|
||||
"RelativeDocumentMoniker": "Abilities\\ARA_GiveHediffWithSkillDuration\\CompProperties_GiveHediffWithSkillDuration.cs",
|
||||
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_GiveHediffWithSkillDuration\\CompProperties_GiveHediffWithSkillDuration.cs*",
|
||||
"RelativeToolTip": "Abilities\\ARA_GiveHediffWithSkillDuration\\CompProperties_GiveHediffWithSkillDuration.cs*",
|
||||
"ViewState": "AgIAAAEAAAAAAAAAAAAiwC4AAAAFAAAAAAAAAA==",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "CompAbilityEffect_AbilityShowTemperatureRange.cs",
|
||||
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_ShowTemperatureRange\\CompAbilityEffect_AbilityShowTemperatureRange.cs",
|
||||
"RelativeDocumentMoniker": "Abilities\\ARA_ShowTemperatureRange\\CompAbilityEffect_AbilityShowTemperatureRange.cs",
|
||||
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_ShowTemperatureRange\\CompAbilityEffect_AbilityShowTemperatureRange.cs",
|
||||
"RelativeToolTip": "Abilities\\ARA_ShowTemperatureRange\\CompAbilityEffect_AbilityShowTemperatureRange.cs",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAkAAAA9AAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-09-26T06:01:20.721Z",
|
||||
"WhenOpened": "2025-09-27T08:23:51.83Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "CompAbilityEffect_GiveHediffWithSkillDuration.cs",
|
||||
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_GiveHediffWithSkillDuration\\CompAbilityEffect_GiveHediffWithSkillDuration.cs",
|
||||
"RelativeDocumentMoniker": "Abilities\\ARA_GiveHediffWithSkillDuration\\CompAbilityEffect_GiveHediffWithSkillDuration.cs",
|
||||
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_GiveHediffWithSkillDuration\\CompAbilityEffect_GiveHediffWithSkillDuration.cs*",
|
||||
"RelativeToolTip": "Abilities\\ARA_GiveHediffWithSkillDuration\\CompAbilityEffect_GiveHediffWithSkillDuration.cs*",
|
||||
"ViewState": "AgIAACYAAAAAAAAAAAAqwEgAAAAnAAAAAAAAAA==",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "ARA_HediffDefOf.cs",
|
||||
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\ARA_HediffDefOf.cs",
|
||||
"RelativeDocumentMoniker": "ARA_HediffDefOf.cs",
|
||||
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\ARA_HediffDefOf.cs",
|
||||
"RelativeToolTip": "ARA_HediffDefOf.cs",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAA4AAAAJAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-09-26T06:00:59.354Z",
|
||||
"EditorCaption": ""
|
||||
"WhenOpened": "2025-09-27T03:14:05.334Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 2,
|
||||
"Title": "CompAbilityEffect_TerrainRestriction .cs",
|
||||
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_TerrainRestriction\\CompAbilityEffect_TerrainRestriction .cs",
|
||||
"RelativeDocumentMoniker": "Abilities\\ARA_TerrainRestriction\\CompAbilityEffect_TerrainRestriction .cs",
|
||||
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_TerrainRestriction\\CompAbilityEffect_TerrainRestriction .cs",
|
||||
"RelativeToolTip": "Abilities\\ARA_TerrainRestriction\\CompAbilityEffect_TerrainRestriction .cs",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAEsAAAAAAAAAAAAAAA==",
|
||||
"Title": "MainHarmony.cs",
|
||||
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\MainHarmony.cs",
|
||||
"RelativeDocumentMoniker": "MainHarmony.cs",
|
||||
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\MainHarmony.cs",
|
||||
"RelativeToolTip": "MainHarmony.cs",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-09-26T03:32:39.017Z",
|
||||
"EditorCaption": ""
|
||||
"WhenOpened": "2025-09-27T03:13:34.632Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 3,
|
||||
"Title": "SuperCarryExtension.cs",
|
||||
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\SuperCarryExtension.cs",
|
||||
"RelativeDocumentMoniker": "SuperCarryExtension.cs",
|
||||
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\SuperCarryExtension.cs",
|
||||
"RelativeToolTip": "SuperCarryExtension.cs",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-09-27T03:13:32.751Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 4,
|
||||
"Title": "FloatMenuOptionProvider_SuperCarry.cs",
|
||||
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\FloatMenuOptionProvider_SuperCarry.cs",
|
||||
"RelativeDocumentMoniker": "FloatMenuOptionProvider_SuperCarry.cs",
|
||||
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\FloatMenuOptionProvider_SuperCarry.cs",
|
||||
"RelativeToolTip": "FloatMenuOptionProvider_SuperCarry.cs",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-09-27T03:13:31.262Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 5,
|
||||
"Title": "JobDriver_SuperCarry.cs",
|
||||
"DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\JobDriver_SuperCarry.cs",
|
||||
"RelativeDocumentMoniker": "JobDriver_SuperCarry.cs",
|
||||
"ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\JobDriver_SuperCarry.cs",
|
||||
"RelativeToolTip": "JobDriver_SuperCarry.cs",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-09-27T03:13:30.358Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
public class CompAbilityEffect_ShowSpawnablePawns : CompAbilityEffect
|
||||
{
|
||||
public new CompProperties_AbilityShowSpawnablePawns Props => (CompProperties_AbilityShowSpawnablePawns)props;
|
||||
|
||||
public override void Apply(LocalTargetInfo target, LocalTargetInfo dest)
|
||||
{
|
||||
// 这个组件只用于显示信息,不执行实际效果
|
||||
}
|
||||
|
||||
public override bool Valid(LocalTargetInfo target, bool throwMessages = false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// 重写工具提示方法,显示可生成的pawn列表
|
||||
public override string ExtraTooltipPart()
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
|
||||
// 获取建筑定义的spawn comp
|
||||
var spawnComp = GetSpawnCompFromBuilding();
|
||||
if (spawnComp == null || spawnComp.spawnablePawns == null || spawnComp.spawnablePawns.Count == 0)
|
||||
{
|
||||
return null; // 没有可显示的内容
|
||||
}
|
||||
|
||||
stringBuilder.AppendLine(Props.customLabel + ":");
|
||||
stringBuilder.AppendLine();
|
||||
|
||||
// 显示每个可生成的pawn
|
||||
foreach (var spawnEntry in spawnComp.spawnablePawns)
|
||||
{
|
||||
if (spawnEntry.pawnKind != null)
|
||||
{
|
||||
string entryText = $" • {spawnEntry.pawnKind.LabelCap}";
|
||||
|
||||
// 如果有延迟,显示延迟信息
|
||||
if (spawnEntry.delayTicks > 0)
|
||||
{
|
||||
entryText += $" ({spawnEntry.delayTicks.ToStringTicksToPeriod()})";
|
||||
}
|
||||
|
||||
// 如果有科技需求,显示科技信息
|
||||
if (Props.showResearchRequirements && spawnEntry.requiredResearch != null)
|
||||
{
|
||||
bool researched = spawnEntry.requiredResearch.IsFinished;
|
||||
string researchStatus = researched ? "✓" : "✗";
|
||||
entryText += $" [{researchStatus}{spawnEntry.requiredResearch.LabelCap}]";
|
||||
}
|
||||
|
||||
stringBuilder.AppendLine(entryText);
|
||||
}
|
||||
}
|
||||
|
||||
return stringBuilder.ToString().TrimEndNewlines();
|
||||
}
|
||||
|
||||
// 从建筑定义获取spawn comp
|
||||
private CompProperties_SpawnPawnFromList GetSpawnCompFromBuilding()
|
||||
{
|
||||
if (Props.spawnBuildingDef == null)
|
||||
{
|
||||
Log.Error("CompProperties_AbilityShowSpawnablePawns: spawnBuildingDef is null");
|
||||
return null;
|
||||
}
|
||||
|
||||
// 查找建筑的spawn comp
|
||||
foreach (var comp in Props.spawnBuildingDef.comps)
|
||||
{
|
||||
if (comp is CompProperties_SpawnPawnFromList spawnComp)
|
||||
{
|
||||
return spawnComp;
|
||||
}
|
||||
}
|
||||
|
||||
Log.Warning($"CompProperties_AbilityShowSpawnablePawns: No spawn comp found on building {Props.spawnBuildingDef.defName}");
|
||||
return null;
|
||||
}
|
||||
|
||||
// 获取所有可生成的pawn种类(用于其他用途)
|
||||
public List<PawnKindDef> GetSpawnablePawnKinds()
|
||||
{
|
||||
var spawnComp = GetSpawnCompFromBuilding();
|
||||
var result = new List<PawnKindDef>();
|
||||
|
||||
if (spawnComp?.spawnablePawns != null)
|
||||
{
|
||||
foreach (var entry in spawnComp.spawnablePawns)
|
||||
{
|
||||
if (entry.pawnKind != null && (entry.requiredResearch == null || entry.requiredResearch.IsFinished))
|
||||
{
|
||||
result.Add(entry.pawnKind);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// 检查特定pawn种类是否可生成
|
||||
public bool CanSpawnPawnKind(PawnKindDef pawnKind)
|
||||
{
|
||||
var spawnComp = GetSpawnCompFromBuilding();
|
||||
if (spawnComp?.spawnablePawns != null)
|
||||
{
|
||||
foreach (var entry in spawnComp.spawnablePawns)
|
||||
{
|
||||
if (entry.pawnKind == pawnKind &&
|
||||
(entry.requiredResearch == null || entry.requiredResearch.IsFinished))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
public class CompProperties_AbilityShowSpawnablePawns : CompProperties_AbilityEffect
|
||||
{
|
||||
public ThingDef spawnBuildingDef; // 指向的建筑定义
|
||||
public string customLabel = "可生成单位"; // 自定义标签
|
||||
public bool showResearchRequirements = true; // 是否显示科技需求
|
||||
|
||||
public CompProperties_AbilityShowSpawnablePawns()
|
||||
{
|
||||
this.compClass = typeof(CompAbilityEffect_ShowSpawnablePawns);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
public class CompAbilityEffect_ShowTemperatureRange : CompAbilityEffect
|
||||
{
|
||||
public new CompProperties_AbilityShowTemperatureRange Props => (CompProperties_AbilityShowTemperatureRange)props;
|
||||
|
||||
public override void Apply(LocalTargetInfo target, LocalTargetInfo dest)
|
||||
{
|
||||
// This component is only for displaying information, no actual effect
|
||||
}
|
||||
|
||||
public override bool Valid(LocalTargetInfo target, bool throwMessages = false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Override tooltip method to display temperature range information
|
||||
public override string ExtraTooltipPart()
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
|
||||
// Get the temperature control component from the building
|
||||
var tempCompProps = GetTemperatureCompFromBuilding();
|
||||
if (tempCompProps == null)
|
||||
{
|
||||
return null; // No content to display
|
||||
}
|
||||
|
||||
stringBuilder.AppendLine(Props.customLabel.Translate() + ":");
|
||||
stringBuilder.AppendLine();
|
||||
|
||||
// Display temperature range
|
||||
stringBuilder.AppendLine(" " + "AbilityCheckSafeTemperatureRange".Translate(tempCompProps.minSafeTemperature, tempCompProps.maxSafeTemperature));
|
||||
|
||||
// Display current temperature (if enabled)
|
||||
if (Props.showCurrentTemperature && parent.pawn != null && parent.pawn.Map != null)
|
||||
{
|
||||
float currentTemp = GenTemperature.GetTemperatureForCell(parent.pawn.Position, parent.pawn.Map);
|
||||
string tempStatus = GetTemperatureStatus(currentTemp, tempCompProps.minSafeTemperature, tempCompProps.maxSafeTemperature);
|
||||
stringBuilder.AppendLine();
|
||||
stringBuilder.AppendLine("AbilityCheckCurrentTemperature".Translate(currentTemp.ToString("F1"), tempStatus));
|
||||
}
|
||||
return stringBuilder.ToString().TrimEndNewlines();
|
||||
}
|
||||
|
||||
// Get temperature status description
|
||||
private string GetTemperatureStatus(float currentTemp, float minSafe, float maxSafe)
|
||||
{
|
||||
if (currentTemp < minSafe)
|
||||
return "AbilityCheckTemperatureTooLow".Translate();
|
||||
else if (currentTemp > maxSafe)
|
||||
return "AbilityCheckTemperatureTooHigh".Translate();
|
||||
else
|
||||
return "AbilityCheckTemperatureSafe".Translate();
|
||||
}
|
||||
|
||||
// Get temperature control component from building definition
|
||||
private CompProperties_TemperatureRuinableDamage GetTemperatureCompFromBuilding()
|
||||
{
|
||||
if (Props.temperatureCheckBuilding == null)
|
||||
{
|
||||
Log.Error("CompProperties_AbilityShowTemperatureRange: temperatureCheckBuilding is null");
|
||||
return null;
|
||||
}
|
||||
|
||||
// Find the temperature control component of the building
|
||||
foreach (var comp in Props.temperatureCheckBuilding.comps)
|
||||
{
|
||||
if (comp is CompProperties_TemperatureRuinableDamage tempComp)
|
||||
{
|
||||
return tempComp;
|
||||
}
|
||||
}
|
||||
|
||||
Log.Warning($"CompProperties_AbilityShowTemperatureRange: No temperature comp found on building {Props.temperatureCheckBuilding.defName}");
|
||||
return null;
|
||||
}
|
||||
|
||||
// Get temperature range (for other uses)
|
||||
public (float min, float max) GetTemperatureRange()
|
||||
{
|
||||
var tempComp = GetTemperatureCompFromBuilding();
|
||||
if (tempComp != null)
|
||||
{
|
||||
return (tempComp.minSafeTemperature, tempComp.maxSafeTemperature);
|
||||
}
|
||||
return (0f, 100f); // Default value
|
||||
}
|
||||
|
||||
// Check if current temperature is within safe range
|
||||
public bool IsTemperatureSafe()
|
||||
{
|
||||
if (parent.pawn == null || parent.pawn.Map == null)
|
||||
return true;
|
||||
|
||||
var tempComp = GetTemperatureCompFromBuilding();
|
||||
if (tempComp == null)
|
||||
return true;
|
||||
|
||||
float currentTemp = GenTemperature.GetTemperatureForCell(parent.pawn.Position, parent.pawn.Map);
|
||||
return currentTemp >= tempComp.minSafeTemperature && currentTemp <= tempComp.maxSafeTemperature;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
namespace ArachnaeSwarm
|
||||
{
|
||||
public class CompProperties_AbilityShowTemperatureRange : CompProperties_AbilityEffect
|
||||
{
|
||||
public ThingDef temperatureCheckBuilding; // 要检查的建筑定义
|
||||
public string customLabel = "AbilityCheckSafeTemperatureRangeLabel"; // 自定义标签
|
||||
public bool showCurrentTemperature = true; // 是否显示当前温度
|
||||
|
||||
public CompProperties_AbilityShowTemperatureRange()
|
||||
{
|
||||
this.compClass = typeof(CompAbilityEffect_ShowTemperatureRange);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -91,6 +91,10 @@
|
||||
<Compile Include="Abilities\ARA_QueenAbility\CompAbilityEffect_ResearchPrereq.cs" />
|
||||
<Compile Include="Abilities\ARA_QueenAbility\CompAbilityEffect_SprayLiquidMulti.cs" />
|
||||
<Compile Include="Abilities\ARA_QueenAbility\CompProperties_AbilitySprayLiquidMulti.cs" />
|
||||
<Compile Include="Abilities\ARA_ShowSpawnablePawnsList\CompAbilityEffect_AbilityShowSpawnablePawns.cs" />
|
||||
<Compile Include="Abilities\ARA_ShowSpawnablePawnsList\CompProperties_AbilityShowSpawnablePawns.cs" />
|
||||
<Compile Include="Abilities\ARA_ShowTemperatureRange\CompAbilityEffect_AbilityShowTemperatureRange.cs" />
|
||||
<Compile Include="Abilities\ARA_ShowTemperatureRange\CompProperties_AbilityShowTemperatureRange.cs" />
|
||||
<Compile Include="Abilities\ARA_TerrainRestriction\CompAbilityEffect_TerrainRestriction .cs" />
|
||||
<Compile Include="Abilities\ARA_TerrainRestriction\CompProperties_TerrainRestriction.cs" />
|
||||
<Compile Include="Abilities\CompAbilityEffect_DRM_Deaddustpop.cs" />
|
||||
@@ -101,7 +105,7 @@
|
||||
<Compile Include="Abilities\TrackingCharge\CompProperties_TrackingCharge.cs" />
|
||||
<Compile Include="Abilities\TrackingCharge\PawnFlyer_TrackingCharge.cs" />
|
||||
<Compile Include="Abilities\TrackingCharge\Verb_CastAbilityTrackingCharge.cs" />
|
||||
<Compile Include="Hediffs\ARA_HediffDefOf.cs" />
|
||||
<Compile Include="ARA_HediffDefOf.cs" />
|
||||
<Compile Include="Building_Comps\ARA_BuildingTerrainSpawn\CompDelayedTerrainSpawn.cs" />
|
||||
<Compile Include="Building_Comps\ARA_BuildingTerrainSpawn\CompProperties_DelayedTerrainSpawn.cs" />
|
||||
<Compile Include="Building_Comps\ARA_CompInteractiveProducer\CompInteractiveProducer.cs" />
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.8 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.6 MiB |
Reference in New Issue
Block a user