暂存
This commit is contained in:
@@ -142,31 +142,14 @@ namespace ArachnaeSwarm
|
||||
public override string GetInspectString()
|
||||
{
|
||||
List<string> inspectStrings = new List<string>();
|
||||
string baseString = base.GetInspectString();
|
||||
if (!baseString.NullOrEmpty())
|
||||
{
|
||||
inspectStrings.Add(baseString);
|
||||
}
|
||||
|
||||
|
||||
if (compMorphable?.StoredPawn != null)
|
||||
{
|
||||
Pawn pawn = compMorphable.StoredPawn;
|
||||
|
||||
SkillRecord intellectualSkill = pawn.skills?.GetSkill(SkillDefOf.Intellectual);
|
||||
if (intellectualSkill != null)
|
||||
{
|
||||
inspectStrings.Add($"{SkillDefOf.Intellectual.LabelCap}: {intellectualSkill.Level} ({intellectualSkill.XpProgressPercent:P0})");
|
||||
}
|
||||
|
||||
Need_Rest restNeed = pawn.needs?.rest;
|
||||
if (restNeed != null)
|
||||
{
|
||||
inspectStrings.Add($"{restNeed.LabelCap}: {restNeed.CurLevelPercentage:P0}");
|
||||
}
|
||||
|
||||
// 1. 活动状态 (置于首位)
|
||||
TimeAssignmentDef assignment = pawn.timetable?.CurrentAssignment ?? TimeAssignmentDefOf.Anything;
|
||||
bool isWorkingTime = !forceSleep && (assignment == TimeAssignmentDefOf.Work || assignment == TimeAssignmentDefOf.Anything);
|
||||
|
||||
string activity;
|
||||
if (isWorkingTime)
|
||||
{
|
||||
@@ -185,6 +168,27 @@ namespace ArachnaeSwarm
|
||||
activity = "Activity".Translate() + ": " + "Sleeping".Translate();
|
||||
}
|
||||
inspectStrings.Add(activity);
|
||||
|
||||
// 2. 智识技能
|
||||
SkillRecord intellectualSkill = pawn.skills?.GetSkill(SkillDefOf.Intellectual);
|
||||
if (intellectualSkill != null)
|
||||
{
|
||||
inspectStrings.Add($"{SkillDefOf.Intellectual.LabelCap}: {intellectualSkill.Level} ({intellectualSkill.XpProgressPercent:P0})");
|
||||
}
|
||||
|
||||
// 3. 休息需求
|
||||
Need_Rest restNeed = pawn.needs?.rest;
|
||||
if (restNeed != null)
|
||||
{
|
||||
inspectStrings.Add($"{restNeed.LabelCap}: {virtualRest.ToStringPercent()}");
|
||||
}
|
||||
}
|
||||
|
||||
// 基础信息(如HP)最后添加
|
||||
string baseString = base.GetInspectString();
|
||||
if (!baseString.NullOrEmpty())
|
||||
{
|
||||
inspectStrings.Add(baseString);
|
||||
}
|
||||
|
||||
return string.Join("\n", inspectStrings);
|
||||
|
||||
Reference in New Issue
Block a user