暂存
This commit is contained in:
Binary file not shown.
@@ -15,9 +15,6 @@
|
|||||||
<Shooting>2</Shooting>
|
<Shooting>2</Shooting>
|
||||||
<Melee>2</Melee>
|
<Melee>2</Melee>
|
||||||
</skillGains>
|
</skillGains>
|
||||||
<forcedHediffs>
|
|
||||||
<li>ARA_HiveMindMaster</li>
|
|
||||||
</forcedHediffs>
|
|
||||||
|
|
||||||
<spawnCategories>
|
<spawnCategories>
|
||||||
<li>ArachnaeQueen_spawnCategoriesA</li>
|
<li>ArachnaeQueen_spawnCategoriesA</li>
|
||||||
@@ -56,10 +53,6 @@
|
|||||||
<li>ArachnaeNode_spawnCategoriesA</li>
|
<li>ArachnaeNode_spawnCategoriesA</li>
|
||||||
</spawnCategories>
|
</spawnCategories>
|
||||||
|
|
||||||
<forcedHediffs>
|
|
||||||
<li>ARA_HiveMindDrone</li>
|
|
||||||
</forcedHediffs>
|
|
||||||
|
|
||||||
<requiresSpawnCategory>true</requiresSpawnCategory>
|
<requiresSpawnCategory>true</requiresSpawnCategory>
|
||||||
</AlienRace.AlienBackstoryDef>
|
</AlienRace.AlienBackstoryDef>
|
||||||
<AlienRace.AlienBackstoryDef ParentName="ARA_BaseBackStory">
|
<AlienRace.AlienBackstoryDef ParentName="ARA_BaseBackStory">
|
||||||
@@ -68,21 +61,21 @@
|
|||||||
<titleShort>蜜罐种</titleShort>
|
<titleShort>蜜罐种</titleShort>
|
||||||
<description>[PAWN_nameDef]是一只阿拉克涅蜜罐种督虫。基因的选择性表达使其长出了肿胀的囊袋和复杂的口器,这使得她可以吞噬那些未经过处理的尸体和各种杂食或是将其进一步分解,并通过消化器官将其转变为阿拉克涅虫蜜以供其他虫族食用。\n\n[PAWN_nameDef]在战斗中并不是一个值得正视的对手,她没有可以接入武装器官的副肢,脆弱臃肿的特性也决定了她几乎无法躲开任何攻击。</description>
|
<description>[PAWN_nameDef]是一只阿拉克涅蜜罐种督虫。基因的选择性表达使其长出了肿胀的囊袋和复杂的口器,这使得她可以吞噬那些未经过处理的尸体和各种杂食或是将其进一步分解,并通过消化器官将其转变为阿拉克涅虫蜜以供其他虫族食用。\n\n[PAWN_nameDef]在战斗中并不是一个值得正视的对手,她没有可以接入武装器官的副肢,脆弱臃肿的特性也决定了她几乎无法躲开任何攻击。</description>
|
||||||
<slot>Adulthood</slot>
|
<slot>Adulthood</slot>
|
||||||
<workDisables>
|
<workDisables>
|
||||||
<li>Cleaning</li>
|
<li>Cleaning</li>
|
||||||
<!-- <li>Hauling</li> -->
|
<!-- <li>Hauling</li> -->
|
||||||
<li>Mining</li>
|
<li>Mining</li>
|
||||||
<li>PlantWork</li>
|
<li>PlantWork</li>
|
||||||
<li>Animals</li>
|
<li>Animals</li>
|
||||||
<li>Hunting</li>
|
<li>Hunting</li>
|
||||||
<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>
|
||||||
</workDisables>
|
</workDisables>
|
||||||
|
|
||||||
<spawnCategories>
|
<spawnCategories>
|
||||||
<li>ArachnaeNode_spawnCategories_Myrmecocystus</li>
|
<li>ArachnaeNode_spawnCategories_Myrmecocystus</li>
|
||||||
@@ -94,23 +87,23 @@
|
|||||||
<titleShort>盾头种</titleShort>
|
<titleShort>盾头种</titleShort>
|
||||||
<description>[PAWN_nameDef]是一只阿拉克涅盾头种督虫。盾头种是一种笨重的阿拉克涅虫族,她们拥有厚厚的经常过度生长的甲壳,除了生产甲壳素外,也拥有接入武装器官的辅肢,可以凭借虫群的武装器官和自己与生俱来的盔甲承担保卫虫巢的任务。</description>
|
<description>[PAWN_nameDef]是一只阿拉克涅盾头种督虫。盾头种是一种笨重的阿拉克涅虫族,她们拥有厚厚的经常过度生长的甲壳,除了生产甲壳素外,也拥有接入武装器官的辅肢,可以凭借虫群的武装器官和自己与生俱来的盔甲承担保卫虫巢的任务。</description>
|
||||||
<slot>Adulthood</slot>
|
<slot>Adulthood</slot>
|
||||||
<workDisables>
|
<workDisables>
|
||||||
<li>Cleaning</li>
|
<li>Cleaning</li>
|
||||||
<li>Hauling</li>
|
<li>Hauling</li>
|
||||||
<!-- <li>Mining</li> -->
|
<!-- <li>Mining</li> -->
|
||||||
<li>PlantWork</li>
|
<li>PlantWork</li>
|
||||||
<li>Animals</li>
|
<li>Animals</li>
|
||||||
<li>Hunting</li>
|
<li>Hunting</li>
|
||||||
<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>
|
||||||
</workDisables>
|
</workDisables>
|
||||||
<skillGains>
|
<skillGains>
|
||||||
<Mining>5</Mining>
|
<Mining>5</Mining>
|
||||||
</skillGains>
|
</skillGains>
|
||||||
|
|
||||||
<spawnCategories>
|
<spawnCategories>
|
||||||
@@ -123,23 +116,23 @@
|
|||||||
<titleShort>工艺种</titleShort>
|
<titleShort>工艺种</titleShort>
|
||||||
<description>[PAWN_nameDef]是一只阿拉克涅工艺种督虫。能够产出专门用来孵化阿拉克涅武装器官的孵化茧,以强化虫巢的战斗力。\n\n尽管[PAWN_nameDef]可以拿起武装器官,但是非常害怕任何伤害,尽量避免她直接暴露在攻击下。</description>
|
<description>[PAWN_nameDef]是一只阿拉克涅工艺种督虫。能够产出专门用来孵化阿拉克涅武装器官的孵化茧,以强化虫巢的战斗力。\n\n尽管[PAWN_nameDef]可以拿起武装器官,但是非常害怕任何伤害,尽量避免她直接暴露在攻击下。</description>
|
||||||
<slot>Adulthood</slot>
|
<slot>Adulthood</slot>
|
||||||
<workDisables>
|
<workDisables>
|
||||||
<li>Cleaning</li>
|
<li>Cleaning</li>
|
||||||
<li>Hauling</li>
|
<li>Hauling</li>
|
||||||
<li>Mining</li>
|
<li>Mining</li>
|
||||||
<li>PlantWork</li>
|
<li>PlantWork</li>
|
||||||
<li>Animals</li>
|
<li>Animals</li>
|
||||||
<li>Hunting</li>
|
<li>Hunting</li>
|
||||||
<!-- <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>
|
||||||
</workDisables>
|
</workDisables>
|
||||||
<skillGains>
|
<skillGains>
|
||||||
<Construction>5</Construction>
|
<Construction>5</Construction>
|
||||||
</skillGains>
|
</skillGains>
|
||||||
|
|
||||||
<spawnCategories>
|
<spawnCategories>
|
||||||
|
|||||||
48
1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Temperature.xml
Normal file
48
1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Temperature.xml
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<Defs>
|
||||||
|
|
||||||
|
<HediffDef>
|
||||||
|
<defName>ARA_TemperatureRegulation</defName>
|
||||||
|
<label>环境温度适应</label>
|
||||||
|
<description>根据环境温度调整生理状态。阿拉克涅虫族对环境温度比其他生物更加敏感,温度不适宜时将会影响意识。最低适应16°,最高适应26°环境温度。</description>
|
||||||
|
<hediffClass>HediffWithComps</hediffClass>
|
||||||
|
<defaultLabelColor>(0.6, 0.8, 0.9)</defaultLabelColor>
|
||||||
|
<maxSeverity>1.0</maxSeverity>
|
||||||
|
<initialSeverity>0.5</initialSeverity>
|
||||||
|
<comps>
|
||||||
|
<li Class="ArachnaeSwarm.HediffCompProperties_Temperature">
|
||||||
|
<minComfortableTemperature>16</minComfortableTemperature>
|
||||||
|
<maxComfortableTemperature>26</maxComfortableTemperature>
|
||||||
|
<severityChangeIn>0.01</severityChangeIn>
|
||||||
|
<severityChangeOut>-0.01</severityChangeOut>
|
||||||
|
</li>
|
||||||
|
</comps>
|
||||||
|
<stages>
|
||||||
|
<li>
|
||||||
|
<minSeverity>0</minSeverity>
|
||||||
|
<label>不适应</label>
|
||||||
|
<capMods>
|
||||||
|
<li>
|
||||||
|
<capacity>Consciousness</capacity>
|
||||||
|
<offset>-0.2</offset>
|
||||||
|
</li>
|
||||||
|
</capMods>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<minSeverity>0.4</minSeverity>
|
||||||
|
<label>适应</label>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<minSeverity>0.8</minSeverity>
|
||||||
|
<label>舒适</label>
|
||||||
|
<capMods>
|
||||||
|
<li>
|
||||||
|
<capacity>Consciousness</capacity>
|
||||||
|
<offset>0.1</offset>
|
||||||
|
</li>
|
||||||
|
</capMods>
|
||||||
|
</li>
|
||||||
|
</stages>
|
||||||
|
</HediffDef>
|
||||||
|
|
||||||
|
</Defs>
|
||||||
@@ -62,6 +62,13 @@
|
|||||||
</deathAction> -->
|
</deathAction> -->
|
||||||
</race>
|
</race>
|
||||||
<comps>
|
<comps>
|
||||||
|
<li Class="ArachnaeSwarm.CompProperties_HediffGiver">
|
||||||
|
<hediffs>
|
||||||
|
<li>ARA_TemperatureRegulation</li>
|
||||||
|
</hediffs>
|
||||||
|
<addChance>1.0</addChance>
|
||||||
|
<allowDuplicates>false</allowDuplicates>
|
||||||
|
</li>
|
||||||
<li Class="ArachnaeSwarm.CompProperties_HediffGiver">
|
<li Class="ArachnaeSwarm.CompProperties_HediffGiver">
|
||||||
<hediffs>
|
<hediffs>
|
||||||
<li>ARA_HiveMindWorker</li>
|
<li>ARA_HiveMindWorker</li>
|
||||||
|
|||||||
@@ -574,6 +574,13 @@
|
|||||||
<li MayRequire="Nals.FacialAnimation">
|
<li MayRequire="Nals.FacialAnimation">
|
||||||
<compClass>FacialAnimation.FacialAnimationControllerComp</compClass>
|
<compClass>FacialAnimation.FacialAnimationControllerComp</compClass>
|
||||||
</li>
|
</li>
|
||||||
|
<li Class="ArachnaeSwarm.CompProperties_HediffGiver">
|
||||||
|
<hediffs>
|
||||||
|
<li>ARA_HiveMindDrone</li>
|
||||||
|
</hediffs>
|
||||||
|
<addChance>1.0</addChance>
|
||||||
|
<allowDuplicates>false</allowDuplicates>
|
||||||
|
</li>
|
||||||
<!--<li>
|
<!--<li>
|
||||||
<compClass>FacialAnimation.EmotionControllerComp</compClass>
|
<compClass>FacialAnimation.EmotionControllerComp</compClass>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -217,6 +217,13 @@
|
|||||||
<minMonolithLevelForStudy>1</minMonolithLevelForStudy>
|
<minMonolithLevelForStudy>1</minMonolithLevelForStudy>
|
||||||
<requiresImprisonment>true</requiresImprisonment>
|
<requiresImprisonment>true</requiresImprisonment>
|
||||||
</li>
|
</li>
|
||||||
|
<li Class="ArachnaeSwarm.CompProperties_HediffGiver">
|
||||||
|
<hediffs>
|
||||||
|
<li>ARA_TemperatureRegulation</li>
|
||||||
|
</hediffs>
|
||||||
|
<addChance>1.0</addChance>
|
||||||
|
<allowDuplicates>false</allowDuplicates>
|
||||||
|
</li>
|
||||||
</comps>
|
</comps>
|
||||||
</ThingDef>
|
</ThingDef>
|
||||||
<AlienRace.ThingDef_AlienRace Name="ARA_QueenBase" ParentName="ARA_PawnBase">
|
<AlienRace.ThingDef_AlienRace Name="ARA_QueenBase" ParentName="ARA_PawnBase">
|
||||||
@@ -742,7 +749,13 @@
|
|||||||
</recipes>
|
</recipes>
|
||||||
|
|
||||||
<comps>
|
<comps>
|
||||||
|
<li Class="ArachnaeSwarm.CompProperties_HediffGiver">
|
||||||
|
<hediffs>
|
||||||
|
<li>ARA_HiveMindMaster</li>
|
||||||
|
</hediffs>
|
||||||
|
<addChance>1.0</addChance>
|
||||||
|
<allowDuplicates>false</allowDuplicates>
|
||||||
|
</li>
|
||||||
</comps>
|
</comps>
|
||||||
</AlienRace.ThingDef_AlienRace>
|
</AlienRace.ThingDef_AlienRace>
|
||||||
</Defs>
|
</Defs>
|
||||||
@@ -65,7 +65,8 @@ namespace ArachnaeSwarm
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 3. 准备抱脸虫和Hediff
|
// 3. 准备抱脸虫和Hediff
|
||||||
Pawn originalCaster = caster.SplitOff(1) as Pawn;
|
Pawn originalCaster = PawnGenerator.GeneratePawn(caster.kindDef, caster.Faction);
|
||||||
|
PawnDataUtility.TransferSoul(caster, originalCaster); // 确保克隆体有完全一致的数据
|
||||||
Hediff_Possession hediff = (Hediff_Possession)HediffMaker.MakeHediff(HediffDef.Named("ARA_Possession"), targetPawn);
|
Hediff_Possession hediff = (Hediff_Possession)HediffMaker.MakeHediff(HediffDef.Named("ARA_Possession"), targetPawn);
|
||||||
hediff.originalHostData = originalHostData; // 将宿主数据存入Hediff
|
hediff.originalHostData = originalHostData; // 将宿主数据存入Hediff
|
||||||
|
|
||||||
@@ -76,6 +77,12 @@ namespace ArachnaeSwarm
|
|||||||
|
|
||||||
// 5. 灵魂转移,此时 targetPawn 的技能被 caster 的技能覆盖
|
// 5. 灵魂转移,此时 targetPawn 的技能被 caster 的技能覆盖
|
||||||
PawnDataUtility.TransferSoul(caster, targetPawn);
|
PawnDataUtility.TransferSoul(caster, targetPawn);
|
||||||
|
|
||||||
|
// 夺舍成功后,原始的抱脸虫应该消失
|
||||||
|
if (!caster.Destroyed)
|
||||||
|
{
|
||||||
|
caster.Destroy(DestroyMode.Vanish);
|
||||||
|
}
|
||||||
|
|
||||||
// 6. 技能合并:在灵魂转移后,直接在最终的身体 (targetPawn) 上进行合并
|
// 6. 技能合并:在灵魂转移后,直接在最终的身体 (targetPawn) 上进行合并
|
||||||
if (targetPawn.skills != null)
|
if (targetPawn.skills != null)
|
||||||
|
|||||||
@@ -129,6 +129,9 @@
|
|||||||
<Compile Include="ARA_TrainingWork\JobClean\ThinkNode_ConditionalAnimalShouldDoCleaningWork.cs" />
|
<Compile Include="ARA_TrainingWork\JobClean\ThinkNode_ConditionalAnimalShouldDoCleaningWork.cs" />
|
||||||
<Compile Include="ARA_TrainingWork\JobClean\WorkGiver_ArachnaeClean.cs" />
|
<Compile Include="ARA_TrainingWork\JobClean\WorkGiver_ArachnaeClean.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="HediffComp_Temperature.cs" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- 自定义清理任务,删除obj文件夹中的临时文件 -->
|
<!-- 自定义清理任务,删除obj文件夹中的临时文件 -->
|
||||||
<Target Name="CleanDebugFiles" AfterTargets="Build">
|
<Target Name="CleanDebugFiles" AfterTargets="Build">
|
||||||
|
|||||||
53
Source/ArachnaeSwarm/HediffComp_Temperature.cs
Normal file
53
Source/ArachnaeSwarm/HediffComp_Temperature.cs
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
using RimWorld;
|
||||||
|
using UnityEngine;
|
||||||
|
using Verse;
|
||||||
|
|
||||||
|
namespace ArachnaeSwarm
|
||||||
|
{
|
||||||
|
public class HediffComp_Temperature : HediffComp
|
||||||
|
{
|
||||||
|
public HediffCompProperties_Temperature Props => (HediffCompProperties_Temperature)props;
|
||||||
|
|
||||||
|
public override void CompPostTick(ref float severityAdjustment)
|
||||||
|
{
|
||||||
|
if (!parent.pawn.IsHashIntervalTick(360)) // 每 60 ticks 检查一次
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
float ambientTemperature = parent.pawn.AmbientTemperature;
|
||||||
|
float minComfortable = Props.minComfortableTemperature;
|
||||||
|
float maxComfortable = Props.maxComfortableTemperature;
|
||||||
|
|
||||||
|
if (ambientTemperature >= minComfortable && ambientTemperature <= maxComfortable)
|
||||||
|
{
|
||||||
|
// 在舒适温度范围内
|
||||||
|
if (Props.severityChangeIn != 0f)
|
||||||
|
{
|
||||||
|
severityAdjustment += Props.severityChangeIn;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 在舒适温度范围外
|
||||||
|
if (Props.severityChangeOut != 0f)
|
||||||
|
{
|
||||||
|
severityAdjustment += Props.severityChangeOut;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class HediffCompProperties_Temperature : HediffCompProperties
|
||||||
|
{
|
||||||
|
public float minComfortableTemperature = 16f;
|
||||||
|
public float maxComfortableTemperature = 26f;
|
||||||
|
public float severityChangeIn = 0f;
|
||||||
|
public float severityChangeOut = 0f;
|
||||||
|
|
||||||
|
public HediffCompProperties_Temperature()
|
||||||
|
{
|
||||||
|
compClass = typeof(HediffComp_Temperature);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user