zc
This commit is contained in:
@@ -16,7 +16,18 @@ namespace WulaFallenEmpire.EventSystem.AI.UI
|
||||
this.doWindowBackground = true;
|
||||
this.absorbInputAroundWindow = true;
|
||||
this.closeOnClickedOutside = true;
|
||||
|
||||
_tempPrompt = WulaFallenEmpireMod.settings?.extraPersonalityPrompt ?? "";
|
||||
|
||||
// 如果目前是空的,默认显示当前 XML/Def 的内容供玩家修改
|
||||
if (string.IsNullOrWhiteSpace(_tempPrompt))
|
||||
{
|
||||
var core = Find.World?.GetComponent<AIIntelligenceCore>();
|
||||
if (core != null)
|
||||
{
|
||||
_tempPrompt = core.GetEffectiveBasePersona();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void DoWindowContents(Rect inRect)
|
||||
@@ -32,8 +43,8 @@ namespace WulaFallenEmpire.EventSystem.AI.UI
|
||||
Rect textRect = new Rect(0, curY, inRect.width, inRect.height - curY - 50f);
|
||||
_tempPrompt = Widgets.TextArea(textRect, _tempPrompt);
|
||||
|
||||
Rect btnRect = new Rect(inRect.width / 2 - 60f, inRect.height - 40f, 120f, 35f);
|
||||
if (Widgets.ButtonText(btnRect, "Wula_Save".Translate()))
|
||||
Rect saveBtnRect = new Rect(inRect.width / 2 - 130f, inRect.height - 40f, 120f, 35f);
|
||||
if (Widgets.ButtonText(saveBtnRect, "Wula_Save".Translate()))
|
||||
{
|
||||
if (WulaFallenEmpireMod.settings != null)
|
||||
{
|
||||
@@ -42,6 +53,16 @@ namespace WulaFallenEmpire.EventSystem.AI.UI
|
||||
}
|
||||
this.Close();
|
||||
}
|
||||
|
||||
Rect resetBtnRect = new Rect(inRect.width / 2 + 10f, inRect.height - 40f, 120f, 35f);
|
||||
if (Widgets.ButtonText(resetBtnRect, "Wula_Reset".Translate()))
|
||||
{
|
||||
var core = Find.World?.GetComponent<AIIntelligenceCore>();
|
||||
if (core != null)
|
||||
{
|
||||
_tempPrompt = core.GetEffectiveBasePersona();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user