This commit is contained in:
2025-12-23 18:16:43 +08:00
parent 3b3fd767fd
commit 25b1f563f6
11 changed files with 110 additions and 76 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -5,7 +5,10 @@
<ARA_FluxMode_Quality>品质</ARA_FluxMode_Quality> <ARA_FluxMode_Quality>品质</ARA_FluxMode_Quality>
<ARA_FluxMode_Balance>平衡</ARA_FluxMode_Balance> <ARA_FluxMode_Balance>平衡</ARA_FluxMode_Balance>
<ARA_FluxMode_Speed>速度</ARA_FluxMode_Speed> <ARA_FluxMode_Speed>速度</ARA_FluxMode_Speed>
<ARA_FluxMode_Manual_Desc>手动调节活性值</ARA_FluxMode_Manual_Desc>
<ARA_FluxMode_Quality_Desc>低活性,追求高品质产出</ARA_FluxMode_Quality_Desc>
<ARA_FluxMode_Balance_Desc>自动调节,在速度和品质间取得平衡</ARA_FluxMode_Balance_Desc>
<ARA_FluxMode_Speed_Desc>高活性,以最高速度进行生产</ARA_FluxMode_Speed_Desc>
<!-- 消息 --> <!-- 消息 -->
<ARA_Msg_QueueFull>队列已满!</ARA_Msg_QueueFull> <ARA_Msg_QueueFull>队列已满!</ARA_Msg_QueueFull>
<ARA_Msg_LarvaWorking>已有幼虫正在工作中,请等待完成</ARA_Msg_LarvaWorking> <ARA_Msg_LarvaWorking>已有幼虫正在工作中,请等待完成</ARA_Msg_LarvaWorking>
@@ -15,6 +18,10 @@
<ARA_Msg_LarvaCannotAccept>幼虫无法接受任务</ARA_Msg_LarvaCannotAccept> <ARA_Msg_LarvaCannotAccept>幼虫无法接受任务</ARA_Msg_LarvaCannotAccept>
<ARA_Msg_NoIncubationOptions>没有可用的孵化选项(检查 CompIncubatorData 配置)</ARA_Msg_NoIncubationOptions> <ARA_Msg_NoIncubationOptions>没有可用的孵化选项(检查 CompIncubatorData 配置)</ARA_Msg_NoIncubationOptions>
<ARA_Msg_NoProducibleItems>没有可生产的物品(检查建筑是否正确配置)</ARA_Msg_NoProducibleItems> <ARA_Msg_NoProducibleItems>没有可生产的物品(检查建筑是否正确配置)</ARA_Msg_NoProducibleItems>
<ARA_Msg_IncubatorBrokenQualityZero>制造舱因品质归零而损坏!</ARA_Msg_IncubatorBrokenQualityZero>
<ARA_Msg_IncubationCancelled>孵化已取消。</ARA_Msg_IncubationCancelled>
<ARA_Msg_IncubationComplete>孵化完成: {0}</ARA_Msg_IncubationComplete>
<ARA_Msg_IncubationStarted>孵化开始: {0}</ARA_Msg_IncubationStarted>
<!-- 品质等级 --> <!-- 品质等级 -->
<ARA_Quality_Legendary>传奇</ARA_Quality_Legendary> <ARA_Quality_Legendary>传奇</ARA_Quality_Legendary>
@@ -27,6 +34,21 @@
<!-- 状态文本 --> <!-- 状态文本 -->
<ARA_Status_Waiting>等待中</ARA_Status_Waiting> <ARA_Status_Waiting>等待中</ARA_Status_Waiting>
<ARA_Status_WaitingForLarva>等待幼虫</ARA_Status_WaitingForLarva> <ARA_Status_WaitingForLarva>等待幼虫</ARA_Status_WaitingForLarva>
<ARA_Status_Ready>就绪 - 点击选择目标</ARA_Status_Ready>
<ARA_Status_Incubating>正在孵化: {0}</ARA_Status_Incubating>
<ARA_Status_LarvaActivating>幼虫激活中...</ARA_Status_LarvaActivating>
<ARA_Status_LarvaOnTheWay>幼虫赶路中...</ARA_Status_LarvaOnTheWay>
<ARA_Status_Target>目标: {0}</ARA_Status_Target>
<ARA_Status_Progress>进度: {0}</ARA_Status_Progress>
<ARA_Status_CurrentFlux>当前活性: {0}</ARA_Status_CurrentFlux>
<ARA_Status_IncubationSpeed>孵化速度: {0}x</ARA_Status_IncubationSpeed>
<ARA_Status_Efficiency>效率</ARA_Status_Efficiency>
<ARA_Status_Speed>速度</ARA_Status_Speed>
<ARA_Status_Mode>模式: {0}</ARA_Status_Mode>
<ARA_Status_DormantWarning>⚠ 休眠中,品质下降!</ARA_Status_DormantWarning>
<ARA_Status_RemainingTime>剩余时间: {0} 天</ARA_Status_RemainingTime>
<ARA_Status_SpeedAndQuality>速度: {0} | 质量: {1}</ARA_Status_SpeedAndQuality>
<ARA_Status_Speed>速度: {0}</ARA_Status_Speed>
<!-- 检查面板 --> <!-- 检查面板 -->
<ARA_Inspect_Orders>订单: {0} / {1}</ARA_Inspect_Orders> <ARA_Inspect_Orders>订单: {0} / {1}</ARA_Inspect_Orders>
@@ -43,6 +65,15 @@
<ARA_Gizmo_LarvaWorkingDesc>一只幼虫正在操作孵化器(还有{0}个订单等待)</ARA_Gizmo_LarvaWorkingDesc> <ARA_Gizmo_LarvaWorkingDesc>一只幼虫正在操作孵化器(还有{0}个订单等待)</ARA_Gizmo_LarvaWorkingDesc>
<ARA_Gizmo_LarvaActivating>幼虫激活中</ARA_Gizmo_LarvaActivating> <ARA_Gizmo_LarvaActivating>幼虫激活中</ARA_Gizmo_LarvaActivating>
<ARA_Gizmo_LarvaOnTheWay>幼虫赶路中</ARA_Gizmo_LarvaOnTheWay> <ARA_Gizmo_LarvaOnTheWay>幼虫赶路中</ARA_Gizmo_LarvaOnTheWay>
<ARA_Gizmo_SpeedFactors>速度因子</ARA_Gizmo_SpeedFactors>
<ARA_Gizmo_QualityFactors>质量因子</ARA_Gizmo_QualityFactors>
<ARA_Gizmo_TotalSpeedMultiplier>总速度倍率: {0}</ARA_Gizmo_TotalSpeedMultiplier>
<ARA_Gizmo_TotalQualityMultiplier>总质量倍率: {0}</ARA_Gizmo_TotalQualityMultiplier>
<ARA_Gizmo_NeutronFlux_Title>活性强度</ARA_Gizmo_NeutronFlux_Title>
<ARA_Gizmo_NeutronFlux_TooltipTitle>【孵化活性控制】</ARA_Gizmo_NeutronFlux_TooltipTitle>
<ARA_Gizmo_NeutronFlux_CoreMechanic>▸ 活性越高 → 孵化越快\n▸ 活性越低 → 品质越高</ARA_Gizmo_NeutronFlux_CoreMechanic>
<ARA_Gizmo_NeutronFlux_Operations>点击拖动调节 | 右上角切换模式</ARA_Gizmo_NeutronFlux_Operations>
<ARA_Gizmo_CallLarvaActivationDesc>呼叫幼虫激活制造舱\n\n目标: {0}</ARA_Gizmo_CallLarvaActivationDesc>
<!-- 菜单 --> <!-- 菜单 -->
<ARA_Menu_SelectIncubationTarget>选择孵化目标</ARA_Menu_SelectIncubationTarget> <ARA_Menu_SelectIncubationTarget>选择孵化目标</ARA_Menu_SelectIncubationTarget>
@@ -64,7 +95,11 @@
<ARA_Tooltip_Ready>【就绪】</ARA_Tooltip_Ready> <ARA_Tooltip_Ready>【就绪】</ARA_Tooltip_Ready>
<ARA_Tooltip_Target>目标: </ARA_Tooltip_Target> <ARA_Tooltip_Target>目标: </ARA_Tooltip_Target>
<ARA_Tooltip_IncubationTime>孵化时间: {0} 天</ARA_Tooltip_IncubationTime> <ARA_Tooltip_IncubationTime>孵化时间: {0} 天</ARA_Tooltip_IncubationTime>
<ARA_Tooltip_Quality>品质: {0} ({1})</ARA_Tooltip_Quality>
<ARA_Tooltip_Progress>进度: {0}</ARA_Tooltip_Progress>
<ARA_Tooltip_Remaining>剩余: {0}</ARA_Tooltip_Remaining>
<!-- 营养分配器 --> <!-- 营养分配器/虫蜜 -->
<ARA_NutrientDispenser_MealsAvailable>可制作: {0} 份</ARA_NutrientDispenser_MealsAvailable> <ARA_NutrientDispenser_MealsAvailable>可制作: {0} 份</ARA_NutrientDispenser_MealsAvailable>
<ARA_FuelLabel_Nutrition>虫蜜</ARA_FuelLabel_Nutrition>
</LanguageData> </LanguageData>

View File

@@ -97,7 +97,7 @@ namespace ArachnaeSwarm
public override string CompInspectStringExtra() public override string CompInspectStringExtra()
{ {
string fuelLabel = string.IsNullOrEmpty(Props.FuelLabel) ? "Nutrition" : Props.FuelLabel; string fuelLabel = string.IsNullOrEmpty(Props.FuelLabel) ? "ARA_FuelLabel_Nutrition".Translate().ToString() : Props.FuelLabel;
string text = fuelLabel + ": " + Fuel.ToStringDecimalIfSmall() + " / " + Props.fuelCapacity.ToStringDecimalIfSmall(); string text = fuelLabel + ": " + Fuel.ToStringDecimalIfSmall() + " / " + Props.fuelCapacity.ToStringDecimalIfSmall();
if (currentConsumptionRate > 0f && HasFuel) if (currentConsumptionRate > 0f && HasFuel)

View File

@@ -140,7 +140,7 @@ namespace ArachnaeSwarm
if (qualityProgress <= 0 && qualityTotal > 0) if (qualityProgress <= 0 && qualityTotal > 0)
{ {
Messages.Message("制造舱因品质归零而损坏!", this, MessageTypeDefOf.NegativeEvent); Messages.Message("ARA_Msg_IncubatorBrokenQualityZero".Translate(), this, MessageTypeDefOf.NegativeEvent);
Destroy(DestroyMode.KillFinalize); Destroy(DestroyMode.KillFinalize);
return; return;
} }
@@ -216,28 +216,24 @@ namespace ArachnaeSwarm
public string GetSpeedFactorsDescription() public string GetSpeedFactorsDescription()
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.AppendLine("速度因子"); sb.AppendLine("ARA_Gizmo_SpeedFactors".Translate());
sb.AppendLine(); sb.AppendLine();
sb.Append("总速度倍率: " + SpeedMultiplier.ToStringPercent()); sb.Append("ARA_Gizmo_TotalSpeedMultiplier".Translate(SpeedMultiplier.ToStringPercent()));
return sb.ToString().TrimEndNewlines(); return sb.ToString().TrimEndNewlines();
} }
public string GetQualityFactorsDescription() public string GetQualityFactorsDescription()
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.AppendLine("质量因子"); sb.AppendLine("ARA_Gizmo_QualityFactors".Translate());
sb.AppendLine(); sb.AppendLine();
sb.Append("总质量倍率: " + QualityMultiplier.ToStringPercent()); sb.Append("ARA_Gizmo_TotalQualityMultiplier".Translate(QualityMultiplier.ToStringPercent()));
return sb.ToString().TrimEndNewlines(); return sb.ToString().TrimEndNewlines();
} }
private string BuildCallLarvaDescription(EquipmentIncubationConfig config) private string BuildCallLarvaDescription(EquipmentIncubationConfig config)
{ {
StringBuilder sb = new StringBuilder(); return "ARA_Gizmo_CallLarvaActivationDesc".Translate(config.thingDef.LabelCap);
sb.AppendLine("呼叫幼虫激活制造舱");
sb.AppendLine();
sb.AppendLine("目标: " + config.thingDef.LabelCap);
return sb.ToString().TrimEndNewlines();
} }
// === 幼虫交互 === // === 幼虫交互 ===
@@ -248,14 +244,14 @@ namespace ArachnaeSwarm
var larva = FindLarva(); var larva = FindLarva();
if (larva == null) if (larva == null)
{ {
Messages.Message("未找到可用的幼虫!", MessageTypeDefOf.RejectInput); Messages.Message("ARA_Msg_NoLarvaFound".Translate(), MessageTypeDefOf.RejectInput);
return; return;
} }
var job = JobMaker.MakeJob(ARA_JobDefOf.ARA_OperateIncubator, this); var job = JobMaker.MakeJob(ARA_JobDefOf.ARA_OperateIncubator, this);
larva.jobs.TryTakeOrderedJob(job, JobTag.MiscWork); larva.jobs.TryTakeOrderedJob(job, JobTag.MiscWork);
assignedLarva = larva; assignedLarva = larva;
Messages.Message("已呼叫幼虫。", MessageTypeDefOf.PositiveEvent); Messages.Message("ARA_Msg_LarvaCalled".Translate(), MessageTypeDefOf.PositiveEvent);
} }
private Pawn FindLarva() private Pawn FindLarva()
@@ -295,7 +291,7 @@ namespace ArachnaeSwarm
assignedLarva = null; assignedLarva = null;
larvaOperateTicksRemaining = 0; larvaOperateTicksRemaining = 0;
Messages.Message("孵化开始: " + incubatingThingDef.LabelCap, MessageTypeDefOf.PositiveEvent); Messages.Message("ARA_Msg_IncubationStarted".Translate(incubatingThingDef.LabelCap), MessageTypeDefOf.PositiveEvent);
} }
public void CancelIncubation() public void CancelIncubation()
@@ -303,7 +299,7 @@ namespace ArachnaeSwarm
isIncubating = false; isIncubating = false;
incubatingThingDef = null; incubatingThingDef = null;
incubationProgress = 0f; incubationProgress = 0f;
Messages.Message("孵化已取消。", MessageTypeDefOf.NeutralEvent); Messages.Message("ARA_Msg_IncubationCancelled".Translate(), MessageTypeDefOf.NeutralEvent);
} }
private void CompleteIncubation() private void CompleteIncubation()
@@ -332,7 +328,7 @@ namespace ArachnaeSwarm
GenSpawn.Spawn(thing, Position, Map); GenSpawn.Spawn(thing, Position, Map);
isIncubating = false; isIncubating = false;
incubatingThingDef = null; incubatingThingDef = null;
Messages.Message("孵化完成: " + thing.LabelCap, MessageTypeDefOf.PositiveEvent); Messages.Message("ARA_Msg_IncubationComplete".Translate(thing.LabelCap), MessageTypeDefOf.PositiveEvent);
Destroy(); Destroy();
} }
@@ -369,22 +365,22 @@ namespace ArachnaeSwarm
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
if (isIncubating && incubatingThingDef != null) if (isIncubating && incubatingThingDef != null)
{ {
sb.AppendLine("正在孵化: " + incubatingThingDef.LabelCap); sb.AppendLine("ARA_Status_Incubating".Translate(incubatingThingDef.LabelCap));
sb.AppendLine("进度: " + AdjustedProgressPercent.ToStringPercent()); sb.AppendLine("ARA_Status_Progress".Translate(AdjustedProgressPercent.ToStringPercent()));
sb.AppendLine("剩余时间: " + GetRemainingDays().ToString("F1") + " 天"); sb.AppendLine("ARA_Status_RemainingTime".Translate(GetRemainingDays().ToString("F1")));
sb.Append("速度: " + SpeedMultiplier.ToStringPercent() + " | 质量: " + QualityMultiplier.ToStringPercent()); sb.Append("ARA_Status_SpeedAndQuality".Translate(SpeedMultiplier.ToStringPercent(), QualityMultiplier.ToStringPercent()));
} }
else if (assignedLarva != null) else if (assignedLarva != null)
{ {
sb.Append(larvaOperateTicksRemaining > 0 ? "幼虫激活中..." : "幼虫赶路中..."); sb.Append(larvaOperateTicksRemaining > 0 ? "ARA_Status_LarvaActivating".Translate() : "ARA_Status_LarvaOnTheWay".Translate());
} }
else else
{ {
var config = EquipmentIncubatorData?.SelectedConfig; var config = EquipmentIncubatorData?.SelectedConfig;
if (config != null) if (config != null)
{ {
sb.AppendLine("目标: " + config.thingDef.LabelCap); sb.AppendLine("ARA_Status_Target".Translate(config.thingDef.LabelCap));
sb.Append("速度: " + SpeedMultiplier.ToStringPercent()); sb.Append("ARA_Status_Speed".Translate(SpeedMultiplier.ToStringPercent()));
} }
} }

View File

@@ -372,11 +372,11 @@ namespace ArachnaeSwarm
var current = SelectedConfig; var current = SelectedConfig;
if (current != null && current.thingDef != null) if (current != null && current.thingDef != null)
{ {
string status = "ARA_EquipmentIncubator.IncubationTarget".Translate(current.thingDef.LabelCap); string status = "ARA_Status_Target".Translate(current.thingDef.LabelCap);
if (current.requiredResearch != null && !current.requiredResearch.IsFinished) if (current.requiredResearch != null && !current.requiredResearch.IsFinished)
{ {
status += " (" + "ARA_EquipmentIncubator.Requires".Translate() + ": " + current.requiredResearch.LabelCap + ")"; status += " (" + "ARA_Menu_RequiresResearch".Translate(current.requiredResearch.LabelCap) + ")";
} }
return status; return status;

View File

@@ -169,7 +169,7 @@ namespace ArachnaeSwarm
assignedLarva = null; assignedLarva = null;
larvaOperateTicksRemaining = 0; larvaOperateTicksRemaining = 0;
Messages.Message("ARA_OothecaIncubator.IncubationStarted".Translate() + " " + incubatingPawnKind.LabelCap, MessageTypeDefOf.PositiveEvent); Messages.Message("ARA_Msg_IncubationStarted".Translate(incubatingPawnKind.LabelCap), MessageTypeDefOf.PositiveEvent);
} }
public void CancelIncubation() public void CancelIncubation()
@@ -178,7 +178,7 @@ namespace ArachnaeSwarm
incubationProgress = 0f; incubationProgress = 0f;
incubationDuration = 0f; incubationDuration = 0f;
incubatingPawnKind = null; incubatingPawnKind = null;
Messages.Message("ARA_OothecaIncubator.IncubationCancelled".Translate(), MessageTypeDefOf.NeutralEvent); Messages.Message("ARA_Msg_IncubationCancelled".Translate(), MessageTypeDefOf.NeutralEvent);
} }
private void CompleteIncubation() private void CompleteIncubation()
@@ -193,7 +193,7 @@ namespace ArachnaeSwarm
isIncubating = false; isIncubating = false;
incubatingPawnKind = null; incubatingPawnKind = null;
Messages.Message("ARA_OothecaIncubator.IncubationComplete".Translate() + " " + pawn.LabelCap, MessageTypeDefOf.PositiveEvent); Messages.Message("ARA_Msg_IncubationComplete".Translate(pawn.LabelCap), MessageTypeDefOf.PositiveEvent);
Destroy(); Destroy();
} }
@@ -245,7 +245,7 @@ namespace ArachnaeSwarm
if (qualityProgress <= 0 && qualityTotal > 0) if (qualityProgress <= 0 && qualityTotal > 0)
{ {
Messages.Message("卵囊因品质归零而损坏!", this, MessageTypeDefOf.NegativeEvent); Messages.Message("ARA_Msg_IncubatorBrokenQualityZero".Translate(), this, MessageTypeDefOf.NegativeEvent);
Destroy(DestroyMode.KillFinalize); Destroy(DestroyMode.KillFinalize);
return; return;
} }
@@ -374,22 +374,22 @@ namespace ArachnaeSwarm
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
if (isIncubating && incubatingPawnKind != null) if (isIncubating && incubatingPawnKind != null)
{ {
sb.AppendLine("正在孵化: " + incubatingPawnKind.LabelCap); sb.AppendLine("ARA_Status_Incubating".Translate(incubatingPawnKind.LabelCap));
sb.AppendLine("进度: " + AdjustedProgressPercent.ToStringPercent()); sb.AppendLine("ARA_Status_Progress".Translate(AdjustedProgressPercent.ToStringPercent()));
sb.AppendLine("剩余时间: " + GetRemainingDays().ToString("F1") + " 天"); sb.AppendLine("ARA_Status_RemainingTime".Translate(GetRemainingDays().ToString("F1")));
sb.Append("速度: " + SpeedMultiplier.ToStringPercent() + " | 质量: " + QualityMultiplier.ToStringPercent()); sb.Append("ARA_Status_SpeedAndQuality".Translate(SpeedMultiplier.ToStringPercent(), QualityMultiplier.ToStringPercent()));
} }
else if (assignedLarva != null) else if (assignedLarva != null)
{ {
sb.Append(larvaOperateTicksRemaining > 0 ? "幼虫激活中..." : "幼虫赶路中..."); sb.Append(larvaOperateTicksRemaining > 0 ? "ARA_Status_LarvaActivating".Translate() : "ARA_Status_LarvaOnTheWay".Translate());
} }
else else
{ {
var config = IncubatorData?.SelectedConfig; var config = IncubatorData?.SelectedConfig;
if (config != null) if (config != null)
{ {
sb.AppendLine("目标: " + config.pawnKind.LabelCap); sb.AppendLine("ARA_Status_Target".Translate(config.pawnKind.LabelCap));
sb.Append("速度: " + SpeedMultiplier.ToStringPercent()); sb.Append("ARA_Status_Speed".Translate(SpeedMultiplier.ToStringPercent()));
} }
} }

View File

@@ -435,11 +435,11 @@ namespace ArachnaeSwarm
var current = SelectedConfig; var current = SelectedConfig;
if (current != null) if (current != null)
{ {
string status = "IncubationTarget".Translate() + current.pawnKind.LabelCap; string status = "ARA_Status_Target".Translate(current.pawnKind.LabelCap);
if (current.requiredResearch != null && !current.requiredResearch.IsFinished) if (current.requiredResearch != null && !current.requiredResearch.IsFinished)
{ {
status += " (" + "Requires".Translate() + ": " + current.requiredResearch.LabelCap + ")"; status += " (" + "ARA_Menu_RequiresResearch".Translate(current.requiredResearch.LabelCap) + ")";
} }
return status; return status;

View File

@@ -64,7 +64,7 @@ namespace ArachnaeSwarm
} }
else else
{ {
title = "选择生产目标..."; title = "ARA_Menu_SelectProductionTarget".Translate();
} }
if (canAdd) if (canAdd)
@@ -86,7 +86,7 @@ namespace ArachnaeSwarm
else else
{ {
GUI.color = new Color(0.5f, 0.5f, 0.5f); GUI.color = new Color(0.5f, 0.5f, 0.5f);
Widgets.Label(titleRect, title.Truncate(titleRect.width) + " (满)"); Widgets.Label(titleRect, title.Truncate(titleRect.width) + " " + "ARA_Gizmo_QueueFull".Translate());
GUI.color = Color.white; GUI.color = Color.white;
} }
curY += Text.LineHeight + Spacing; curY += Text.LineHeight + Spacing;
@@ -137,7 +137,7 @@ namespace ArachnaeSwarm
{ {
Text.Font = GameFont.Tiny; Text.Font = GameFont.Tiny;
GUI.color = new Color(0.7f, 0.7f, 0.7f); GUI.color = new Color(0.7f, 0.7f, 0.7f);
Widgets.Label(new Rect(innerRect.x, curY, innerRect.width, 20f), "就绪 - 点击上方选择目标"); Widgets.Label(new Rect(innerRect.x, curY, innerRect.width, 20f), "ARA_Status_Ready".Translate());
GUI.color = Color.white; GUI.color = Color.white;
} }
@@ -155,7 +155,7 @@ namespace ArachnaeSwarm
if (order.status == OrderStatus.WaitingForLarva) if (order.status == OrderStatus.WaitingForLarva)
{ {
GUI.color = new Color(1f, 0.8f, 0.4f); GUI.color = new Color(1f, 0.8f, 0.4f);
Widgets.Label(labelRect, $"{order.label} [等待幼虫]"); Widgets.Label(labelRect, $"{order.label} [" + "ARA_Status_WaitingForLarva".Translate() + "]");
} }
else else
{ {
@@ -189,7 +189,10 @@ namespace ArachnaeSwarm
Widgets.DrawLineVertical(midX, barRect.y, barRect.height); Widgets.DrawLineVertical(midX, barRect.y, barRect.height);
string tooltip = $"{order.label}\n品质: {order.qualityProgress.ToStringPercent()} → {order.estimatedQuality}\n进度: {order.productionProgress.ToStringPercent()}"; // Tooltip
string tooltip = $"{order.label}\n" +
"ARA_Tooltip_Quality".Translate(order.qualityProgress.ToStringPercent(), order.estimatedQuality) + "\n" +
"ARA_Tooltip_Progress".Translate(order.productionProgress.ToStringPercent());
TooltipHandler.TipRegion(barRect, tooltip); TooltipHandler.TipRegion(barRect, tooltip);
} }
else else
@@ -198,7 +201,7 @@ namespace ArachnaeSwarm
Text.Font = GameFont.Tiny; Text.Font = GameFont.Tiny;
Text.Anchor = TextAnchor.MiddleCenter; Text.Anchor = TextAnchor.MiddleCenter;
GUI.color = new Color(0.8f, 0.6f, 0.2f); GUI.color = new Color(0.8f, 0.6f, 0.2f);
Widgets.Label(barRect, "等待幼虫激活"); Widgets.Label(barRect, "ARA_Status_WaitingForLarva".Translate());
GUI.color = Color.white; GUI.color = Color.white;
Text.Anchor = TextAnchor.UpperLeft; Text.Anchor = TextAnchor.UpperLeft;
} }

View File

@@ -50,7 +50,7 @@ namespace ArachnaeSwarm
Text.Font = GameFont.Small; Text.Font = GameFont.Small;
Text.Anchor = TextAnchor.MiddleLeft; Text.Anchor = TextAnchor.MiddleLeft;
Rect titleRect = new Rect(innerRect.x, innerRect.y, innerRect.width - 24f, 18f); Rect titleRect = new Rect(innerRect.x, innerRect.y, innerRect.width - 24f, 18f);
Widgets.Label(titleRect, "活性"); Widgets.Label(titleRect, "ARA_Gizmo_NeutronFlux_Title".Translate());
// === 右上角模式切换按钮 === // === 右上角模式切换按钮 ===
float buttonSize = 20f; float buttonSize = 20f;
@@ -163,7 +163,7 @@ namespace ArachnaeSwarm
// 效率 // 效率
GUI.color = new Color(0.7f, 0.7f, 0.7f); GUI.color = new Color(0.7f, 0.7f, 0.7f);
Rect effRect = new Rect(infoX, barRect.y + 22f, infoWidth, 14f); Rect effRect = new Rect(infoX, barRect.y + 22f, infoWidth, 14f);
Widgets.Label(effRect, "效率"); Widgets.Label(effRect, "ARA_Status_Efficiency".Translate());
Rect effValRect = new Rect(infoX, barRect.y + 36f, infoWidth, 14f); Rect effValRect = new Rect(infoX, barRect.y + 36f, infoWidth, 14f);
GUI.color = Color.white; GUI.color = Color.white;
Widgets.Label(effValRect, (controller.FluxEfficiency * 100f).ToString("0") + "%"); Widgets.Label(effValRect, (controller.FluxEfficiency * 100f).ToString("0") + "%");
@@ -172,7 +172,7 @@ namespace ArachnaeSwarm
GUI.color = new Color(0.7f, 0.7f, 0.7f); GUI.color = new Color(0.7f, 0.7f, 0.7f);
float speedMultiplier = controller.FluxEfficiency * 5f; float speedMultiplier = controller.FluxEfficiency * 5f;
Rect speedRect = new Rect(infoX, barRect.y + 54f, infoWidth, 14f); Rect speedRect = new Rect(infoX, barRect.y + 54f, infoWidth, 14f);
Widgets.Label(speedRect, "速度"); Widgets.Label(speedRect, "ARA_Status_Speed".Translate());
Rect speedValRect = new Rect(infoX, barRect.y + 68f, infoWidth, 14f); Rect speedValRect = new Rect(infoX, barRect.y + 68f, infoWidth, 14f);
GUI.color = speedMultiplier >= 1f ? new Color(0.5f, 1f, 0.5f) : new Color(1f, 0.7f, 0.5f); GUI.color = speedMultiplier >= 1f ? new Color(0.5f, 1f, 0.5f) : new Color(1f, 0.7f, 0.5f);
Widgets.Label(speedValRect, speedMultiplier.ToString("0.0") + "x"); Widgets.Label(speedValRect, speedMultiplier.ToString("0.0") + "x");
@@ -201,48 +201,45 @@ namespace ArachnaeSwarm
{ {
var sb = new System.Text.StringBuilder(); var sb = new System.Text.StringBuilder();
sb.AppendLine("【孵化活性】"); sb.AppendLine("ARA_Gizmo_NeutronFlux_TooltipTitle".Translate());
sb.AppendLine(); sb.AppendLine();
// 核心机制(简洁明了) // 核心机制
sb.AppendLine("▸ 活性越高 → 孵化越快"); sb.AppendLine("ARA_Gizmo_NeutronFlux_CoreMechanic".Translate());
sb.AppendLine("▸ 活性越低 → 品质越高");
sb.AppendLine(); sb.AppendLine();
// 当前状态 // 当前状态
sb.AppendLine($"当前活性: {(controller.RawFlux * 100f):0}%"); sb.AppendLine("ARA_Status_CurrentFlux".Translate(controller.RawFlux.ToStringPercent("0")));
sb.AppendLine($"孵化速度: {(controller.FluxEfficiency * 5f):0.0}x"); sb.AppendLine("ARA_Status_IncubationSpeed".Translate((controller.FluxEfficiency * 5f).ToString("0.0")));
sb.AppendLine(); sb.AppendLine();
// 模式说明 // 模式说明
sb.AppendLine($"模式: {controller.GetModeName()}"); sb.AppendLine("ARA_Status_Mode".Translate(controller.GetModeName()));
switch (controller.CurrentFluxMode)
string modeDescKey = controller.CurrentFluxMode switch
{ {
case FluxMode.Manual: FluxMode.Manual => "ARA_FluxMode_Manual_Desc",
sb.AppendLine(" 手动调节活性"); FluxMode.Quality => "ARA_FluxMode_Quality_Desc",
break; FluxMode.Balance => "ARA_FluxMode_Balance_Desc",
case FluxMode.Quality: FluxMode.Speed => "ARA_FluxMode_Speed_Desc",
sb.AppendLine(" 低活性,追求品质"); _ => ""
break; };
case FluxMode.Balance: if (!string.IsNullOrEmpty(modeDescKey))
sb.AppendLine(" 自动平衡速度和品质"); {
break; sb.AppendLine(" " + modeDescKey.Translate());
case FluxMode.Speed:
sb.AppendLine(" 高活性,快速孵化");
break;
} }
sb.AppendLine(); sb.AppendLine();
// 操作 // 操作
sb.AppendLine("点击拖动调节 | 右上角切换模式"); sb.AppendLine("ARA_Gizmo_NeutronFlux_Operations".Translate());
if (controller.IsDormant) if (controller.IsDormant)
{ {
sb.AppendLine(); sb.AppendLine();
sb.AppendLine("<color=red>⚠ 休眠中,品质下降!</color>"); sb.AppendLine("<color=red>" + "ARA_Status_DormantWarning".Translate() + "</color>");
} }
return sb.ToString().TrimEndNewlines(); return sb.ToString().TrimEnd();
} }
} }
} }

View File

@@ -143,7 +143,7 @@ namespace ArachnaeSwarm
// 无订单时的提示 // 无订单时的提示
Text.Font = GameFont.Tiny; Text.Font = GameFont.Tiny;
GUI.color = new Color(0.7f, 0.7f, 0.7f); GUI.color = new Color(0.7f, 0.7f, 0.7f);
Widgets.Label(new Rect(innerRect.x, curY, innerRect.width, 20f), "就绪 - 点击上方选择目标"); Widgets.Label(new Rect(innerRect.x, curY, innerRect.width, 20f), "ARA_Status_Ready".Translate());
GUI.color = Color.white; GUI.color = Color.white;
} }
@@ -162,7 +162,7 @@ namespace ArachnaeSwarm
if (order.status == OrderStatus.WaitingForLarva) if (order.status == OrderStatus.WaitingForLarva)
{ {
GUI.color = new Color(1f, 0.8f, 0.4f); GUI.color = new Color(1f, 0.8f, 0.4f);
Widgets.Label(labelRect, $"{order.label} [等待幼虫]"); Widgets.Label(labelRect, $"{order.label} [" + "ARA_Status_WaitingForLarva".Translate() + "]");
} }
else else
{ {
@@ -204,7 +204,10 @@ namespace ArachnaeSwarm
Widgets.DrawLineVertical(midX, barRect.y, barRect.height); Widgets.DrawLineVertical(midX, barRect.y, barRect.height);
// Tooltip // Tooltip
string tooltip = $"{order.label}\n品质: {order.qualityProgress.ToStringPercent()} → {order.estimatedQuality}\n进度: {order.progress.ToStringPercent()}\n剩余: {order.remainingTime}"; string tooltip = $"{order.label}\n" +
"ARA_Tooltip_Quality".Translate(order.qualityProgress.ToStringPercent(), order.estimatedQuality) + "\n" +
"ARA_Tooltip_Progress".Translate(order.progress.ToStringPercent()) + "\n" +
"ARA_Tooltip_Remaining".Translate(order.remainingTime);
TooltipHandler.TipRegion(barRect, tooltip); TooltipHandler.TipRegion(barRect, tooltip);
} }
else else
@@ -214,7 +217,7 @@ namespace ArachnaeSwarm
Text.Font = GameFont.Tiny; Text.Font = GameFont.Tiny;
Text.Anchor = TextAnchor.MiddleCenter; Text.Anchor = TextAnchor.MiddleCenter;
GUI.color = new Color(0.8f, 0.6f, 0.2f); GUI.color = new Color(0.8f, 0.6f, 0.2f);
Widgets.Label(barRect, "等待幼虫激活"); Widgets.Label(barRect, "ARA_Status_WaitingForLarva".Translate());
GUI.color = Color.white; GUI.color = Color.white;
Text.Anchor = TextAnchor.UpperLeft; Text.Anchor = TextAnchor.UpperLeft;
} }