修维护仓
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -33,3 +33,4 @@ Source/MCP/pid.txt
|
||||
# MCP Knowledge Base Cache and Logs
|
||||
*.log
|
||||
MCP/vector_cache/*.txt
|
||||
MCP/mcpserver.log
|
||||
|
||||
Binary file not shown.
@@ -793,8 +793,8 @@
|
||||
<targetFuelLevelConfigurable>true</targetFuelLevelConfigurable>
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.CompProperties_MaintenancePod">
|
||||
<baseDurationTicks>180000</baseDurationTicks> <!-- Merged from user feedback -->
|
||||
<ticksPerSeverity>30000</ticksPerSeverity> <!-- Kept from previous change -->
|
||||
<baseDurationTicks>30000</baseDurationTicks> <!-- Merged from user feedback -->
|
||||
<ticksPerSeverity>150000</ticksPerSeverity> <!-- Kept from previous change -->
|
||||
<powerConsumptionRunning>500</powerConsumptionRunning>
|
||||
<powerConsumptionIdle>25</powerConsumptionIdle>
|
||||
<hediffToRemove>WULA_Maintenance_Neglect</hediffToRemove>
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
<WULA_MaintenancePod_CancelDesc>中止维护并弹出殖民者。</WULA_MaintenancePod_CancelDesc>
|
||||
<WULA_MaintenanceComplete>{PAWN_nameDef} 的维护已完成。</WULA_MaintenanceComplete>
|
||||
<WULA_MaintenanceCanceled>维护已取消。</WULA_MaintenanceCanceled>
|
||||
<WULA_MaintenanceHealedAllWounds>{PAWN_nameDef} 的所有受损部位都已修复。</WULA_MaintenanceHealedAllWounds>
|
||||
<WULA_MaintenanceNoEffect>{PAWN_nameDef} 的维护已完成,但{PAWN_nameDef} 没有可修复的受损部位。</WULA_MaintenanceNoEffect>
|
||||
<WULA_NoComponentsToHaul>没有可用的零部件来搬运。</WULA_NoComponentsToHaul>
|
||||
|
||||
</LanguageData>
|
||||
@@ -1042,3 +1042,31 @@ requests.exceptions.SSLError: HTTPSConnectionPool(host='dashscope.aliyuncs.com',
|
||||
2025-08-14 09:32:45,198 - INFO - Processing request of type ListToolsRequest
|
||||
2025-08-14 09:32:45,199 - INFO - Processing request of type ListResourcesRequest
|
||||
2025-08-14 09:32:45,201 - INFO - Processing request of type ListResourceTemplatesRequest
|
||||
2025-08-14 09:32:51,544 - INFO - 成功加载 DASHSCOPE_API_KEY。
|
||||
2025-08-14 09:32:51,553 - INFO - RimWorld 向量知识库 (FastMCP版, v2.1-v4-model) 正在启动...
|
||||
2025-08-14 09:32:51,560 - INFO - Processing request of type ListToolsRequest
|
||||
2025-08-14 09:32:51,561 - INFO - Processing request of type ListResourcesRequest
|
||||
2025-08-14 09:32:51,561 - INFO - Processing request of type ListResourceTemplatesRequest
|
||||
2025-08-14 09:38:03,879 - INFO - Processing request of type CallToolRequest
|
||||
2025-08-14 09:38:03,879 - INFO - 收到问题: JobDriver for entering cryptosleep casket
|
||||
2025-08-14 09:38:03,880 - INFO - 找到的潜在关键词: ['JobDriver']
|
||||
2025-08-14 09:38:03,880 - INFO - 提取到关键词: ['JobDriver']
|
||||
2025-08-14 09:38:03,880 - INFO - 缓存未命中,开始实时搜索: JobDriver
|
||||
2025-08-14 09:38:05,311 - INFO - 找到 380 个候选文件,开始向量化处理...
|
||||
2025-08-14 09:38:05,312 - INFO - 文件名精确匹配: C:\Steam\steamapps\common\RimWorld\Data\dll1.6\Verse.AI\JobDriver.txt
|
||||
2025-08-14 09:38:05,312 - WARNING - 候选文件过多 (379),仅处理前 25 个。
|
||||
2025-08-14 09:38:12,339 - INFO - 向量搜索完成。找到了 1 个匹配项并成功提取了代码。
|
||||
2025-08-14 09:43:38,598 - INFO - Processing request of type CallToolRequest
|
||||
2025-08-14 09:43:38,598 - INFO - 收到问题: JobDriver_EnterCryptosleepCasket
|
||||
2025-08-14 09:43:38,598 - INFO - 找到的潜在关键词: ['JobDriver_EnterCryptosleepCasket']
|
||||
2025-08-14 09:43:38,598 - INFO - 提取到关键词: ['JobDriver_EnterCryptosleepCasket']
|
||||
2025-08-14 09:43:38,608 - INFO - 缓存命中: 关键词 'JobDriver_EnterCryptosleepCasket'
|
||||
2025-08-14 10:16:31,150 - INFO - Processing request of type CallToolRequest
|
||||
2025-08-14 10:16:31,152 - INFO - 收到问题: class DebugSettings
|
||||
2025-08-14 10:16:31,152 - INFO - 找到的潜在关键词: ['DebugSettings']
|
||||
2025-08-14 10:16:31,152 - INFO - 提取到关键词: ['DebugSettings']
|
||||
2025-08-14 10:16:31,152 - INFO - 缓存未命中,开始实时搜索: DebugSettings
|
||||
2025-08-14 10:16:32,933 - INFO - 找到 207 个候选文件,开始向量化处理...
|
||||
2025-08-14 10:16:32,934 - INFO - 文件名精确匹配: C:\Steam\steamapps\common\RimWorld\Data\dll1.6\Verse\DebugSettings.txt
|
||||
2025-08-14 10:16:32,934 - WARNING - 候选文件过多 (206),仅处理前 25 个。
|
||||
2025-08-14 10:16:40,201 - INFO - 向量搜索完成。找到了 2 个匹配项并成功提取了代码。
|
||||
|
||||
@@ -165,6 +165,8 @@ namespace WulaFallenEmpire
|
||||
return;
|
||||
}
|
||||
|
||||
// 1. Fix the maintenance hediff
|
||||
bool maintenanceDone = false;
|
||||
if (Props.hediffToRemove != null)
|
||||
{
|
||||
Hediff hediff = occupant.health.hediffSet.GetFirstHediffOfDef(Props.hediffToRemove);
|
||||
@@ -172,8 +174,34 @@ namespace WulaFallenEmpire
|
||||
{
|
||||
hediff.Severity = Props.hediffSeverityAfterCycle;
|
||||
Messages.Message("WULA_MaintenanceComplete".Translate(occupant.Named("PAWN")), occupant, MessageTypeDefOf.PositiveEvent);
|
||||
maintenanceDone = true;
|
||||
}
|
||||
}
|
||||
|
||||
// 2. Heal all other injuries
|
||||
int injuriesHealed = 0;
|
||||
while (HealthUtility.TryGetWorstHealthCondition(occupant, out var hediffToFix, out var _))
|
||||
{
|
||||
// Ensure we don't try to "heal" the maintenance hediff itself
|
||||
if (hediffToFix.def == Props.hediffToRemove)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
HealthUtility.FixWorstHealthCondition(occupant);
|
||||
injuriesHealed++;
|
||||
}
|
||||
|
||||
if (injuriesHealed > 0)
|
||||
{
|
||||
Messages.Message("WULA_MaintenanceHealedAllWounds".Translate(occupant.Named("PAWN")), occupant, MessageTypeDefOf.PositiveEvent);
|
||||
}
|
||||
else if (!maintenanceDone)
|
||||
{
|
||||
// If nothing was done at all, give a neutral message
|
||||
Messages.Message("WULA_MaintenanceNoEffect".Translate(occupant.Named("PAWN")), occupant, MessageTypeDefOf.NeutralEvent);
|
||||
}
|
||||
|
||||
EjectPawn();
|
||||
}
|
||||
|
||||
@@ -262,6 +290,21 @@ namespace WulaFallenEmpire
|
||||
};
|
||||
yield return cancelCommand;
|
||||
}
|
||||
|
||||
// DEV GIZMO
|
||||
if (DebugSettings.godMode && state == MaintenancePodState.Running)
|
||||
{
|
||||
var finishCommand = new Command_Action
|
||||
{
|
||||
defaultLabel = "DEV: Finish Cycle",
|
||||
action = () =>
|
||||
{
|
||||
Log.Warning("[WulaPodDebug] DEV: Force finishing cycle.");
|
||||
CycleFinished();
|
||||
}
|
||||
};
|
||||
yield return finishCommand;
|
||||
}
|
||||
}
|
||||
|
||||
private List<FloatMenuOption> GetPawnOptions()
|
||||
|
||||
Reference in New Issue
Block a user