This commit is contained in:
2025-09-11 21:12:51 +08:00
parent f3d6c4e35e
commit 8cbd09e036
3 changed files with 26 additions and 21 deletions

Binary file not shown.

View File

@@ -6,7 +6,7 @@
<defName>ARA_Ability_Morph</defName>
<label>织域形态</label>
<description>将自己转换为一个坚固的静态建筑形态,或从建筑形态恢复。</description>
<iconPath>UI/Commands/Attack</iconPath> <!-- TODO: 替换为你的图标路径 -->
<iconPath>UI/Commands/EggSpew</iconPath> <!-- TODO: 替换为你的图标路径 -->
<cooldownTicksRange>600</cooldownTicksRange>
<hotKey>Misc12</hotKey>
<targetRequired>false</targetRequired>
@@ -52,7 +52,7 @@
<staticSunShadowHeight>0</staticSunShadowHeight>
<terrainAffordanceNeeded>ARA_Creep</terrainAffordanceNeeded>
<statBases>
<MaxHitPoints>250</MaxHitPoints>
<MaxHitPoints>1000</MaxHitPoints>
<WorkToBuild>2800</WorkToBuild>
<Flammability>1.0</Flammability>
<ResearchSpeedFactor>1.0</ResearchSpeedFactor>
@@ -62,6 +62,7 @@
<building>
<workTableRoomRole>Laboratory</workTableRoomRole>
<workTableNotInRoomRoleFactor>0.8</workTableNotInRoomRoleFactor>
<deconstructible>false</deconstructible>
</building>
<!-- 不可建造,只能通过变形生成 -->
<comps Inherit="False">

View File

@@ -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);