变量诸元

This commit is contained in:
2025-07-31 17:17:07 +08:00
parent 9140f73226
commit 3f13f0c71f
4 changed files with 58 additions and 21 deletions

View File

@@ -153,6 +153,12 @@ namespace WulaFallenEmpire
public override void Execute(Dialog_CustomDisplay dialog = null)
{
// Only set the variable if it doesn't already exist.
if (EventContext.HasVariable(name))
{
return;
}
// Try to parse as int, then float, otherwise keep as string
if (int.TryParse(value, out int intValue))
{