31 lines
997 B
C#
31 lines
997 B
C#
using Verse;
|
||
using RimWorld;
|
||
|
||
namespace ArachnaeSwarm
|
||
{
|
||
/// <summary>
|
||
/// XML配置类,用于在HediffDef的comp中指定转化后的MutantDef
|
||
/// </summary>
|
||
public class HediffCompProperties_NecroticTransformation : HediffCompProperties
|
||
{
|
||
// 在XML中需要指定的MutantDef的defName
|
||
public MutantDef mutantDef;
|
||
|
||
// 在XML中配置触发转变所需的严重性阈值
|
||
public float triggerSeverity = 0.7f;
|
||
|
||
public HediffCompProperties_NecroticTransformation()
|
||
{
|
||
compClass = typeof(HediffComp_NecroticTransformation);
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// HediffComp,用于在运行时存储和提供由XML定义的MutantDef
|
||
/// </summary>
|
||
public class HediffComp_NecroticTransformation : HediffComp
|
||
{
|
||
// 属性,用于方便地从Comp中获取配置
|
||
public HediffCompProperties_NecroticTransformation Props => (HediffCompProperties_NecroticTransformation)props;
|
||
}
|
||
} |