This commit is contained in:
2025-08-11 22:45:25 +08:00
parent 2f90aa1917
commit ffc0241f43
4 changed files with 119 additions and 50 deletions

View File

@@ -3,10 +3,10 @@
<WulaFallenEmpire.EventDef>
<defName>Wula_TestEvent_HideWhenDisabled</defName>
<label>测试事件:隐藏禁用选项</label>
<characterName>测试者</characterName>
<label><![CDATA[<color=cyan>测试事件</color><i><color=yellow>富文本</color></i>]]></label>
<characterName><![CDATA[<color=#ff8c00><b>测试者</b></color>]]></characterName>
<descriptions>
<li>这是一个用于演示新功能的测试事件。它包含多个选项,展示了不同的条件和可见性行为。当前机械族好感度: {MechanoidGoodwill}</li>
<li><![CDATA[这是一个用于演示<b>富文本</b>功能的测试事件。你可以看到<color=red>红色</color>、<color=green>绿色</color>和<color=blue>蓝色</color>的文本,以及<i>斜体</i>和<b>粗体</b>样式。当前机械族好感度: {MechanoidGoodwill}]]></li>
</descriptions>
<conditionalDescriptions>
@@ -17,14 +17,14 @@
<value>1</value>
</li>
</conditions>
<text>变量 TestVar 的值现在是 1所以你看到了这段额外的描述。</text>
<text><![CDATA[\n\n<color=magenta><b>变量 TestVar 的值现在是 1</b></color>,所以你看到了这段<color=yellow><i>额外</i></color>的描述。]]></text>
</li>
</conditionalDescriptions>
<options>
<!-- 选项 1: 设置 TestVar=1 并重新打开事件 -->
<li>
<label>选项一 (设置 TestVar = 1)</label>
<label><![CDATA[选项一 (<color=green>设置 TestVar = 1</color>)]]></label>
<optionEffects>
<li Class="WulaFallenEmpire.ConditionalEffects">
<effects>
@@ -32,8 +32,8 @@
<name>TestVar</name>
<value>1</value>
</li>
<li Class="WulaFallenEmpire.Effect_OpenDialog">
<def>Wula_TestEvent_HideWhenDisabled</def>
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_TestEvent_HideWhenDisabled</defName>
</li>
</effects>
</li>
@@ -42,7 +42,7 @@
<!-- 选项 2: 条件不满足时,显示为灰色禁用按钮 -->
<li>
<label>选项二 (需要 TestVar = 1, 禁用但可见)</label>
<label><![CDATA[选项二 (需要 <color=orange>TestVar = 1</color>, 禁用但可见)]]></label>
<conditions>
<li Class="WulaFallenEmpire.Condition_VariableEquals">
<name>TestVar</name>
@@ -60,7 +60,7 @@
<!-- 选项 3: 条件不满足时,完全隐藏 -->
<li>
<label>选项三 (需要 TestVar = 1, 禁用时隐藏)</label>
<label><![CDATA[选项三 (需要 <color=orange>TestVar = 1</color>, 禁用时隐藏)]]></label>
<hideWhenDisabled>true</hideWhenDisabled>
<conditions>
<li Class="WulaFallenEmpire.Condition_VariableEquals">
@@ -76,18 +76,18 @@
</li>
</optionEffects>
</li>
<!-- 选项 4: 移除 TestVar 并重新打开事件 -->
<li>
<label>选项四 (移除 TestVar)</label>
<label><![CDATA[选项四 (<color=red>移除 TestVar</color>)]]></label>
<optionEffects>
<li Class="WulaFallenEmpire.ConditionalEffects">
<effects>
<li Class="WulaFallenEmpire.Effect_RemoveVariable">
<li Class="WulaFallenEmpire.Effect_ClearVariable">
<name>TestVar</name>
</li>
<li Class="WulaFallenEmpire.Effect_OpenDialog">
<def>Wula_TestEvent_HideWhenDisabled</def>
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_TestEvent_HideWhenDisabled</defName>
</li>
</effects>
</li>
@@ -96,7 +96,7 @@
<!-- 选项 5: 检查机械族好感度 -->
<li>
<label>选项五 (检查机械族好感度)</label>
<label><![CDATA[选项五 (检查<color=#add8e6>机械族</color>好感度)]]></label>
<optionEffects>
<li Class="WulaFallenEmpire.ConditionalEffects">
<effects>
@@ -104,8 +104,8 @@
<factionDef>Mechanoid</factionDef>
<variableName>MechanoidGoodwill</variableName>
</li>
<li Class="WulaFallenEmpire.Effect_OpenDialog">
<def>Wula_TestEvent_HideWhenDisabled</def>
<li Class="WulaFallenEmpire.Effect_OpenCustomUI">
<defName>Wula_TestEvent_HideWhenDisabled</defName>
</li>
</effects>
</li>