diff --git a/RuriLib/Blocks/BlockBase.cs b/RuriLib/Blocks/BlockBase.cs index 892a77c..889ccda 100644 --- a/RuriLib/Blocks/BlockBase.cs +++ b/RuriLib/Blocks/BlockBase.cs @@ -211,6 +211,14 @@ namespace RuriLib break; case CVar.VarType.List: + + // If it's just the list name, replace it with its string representation + if (string.IsNullOrEmpty(args)) + { + output = output.Replace(full, v.ToString()); + break; + } + var index = 0; int.TryParse(ParseArguments(args, '[', ']')[0], out index); var item = v.GetListItem(index); // Can return null @@ -218,6 +226,7 @@ namespace RuriLib break; case CVar.VarType.Dictionary: + if (args.Contains("(") && args.Contains(")")) { var dicKey = ParseArguments(args, '(', ')')[0]; @@ -228,6 +237,11 @@ namespace RuriLib var dicVal = ParseArguments(args, '{', '}')[0]; try { output = output.Replace(full, v.GetDictKey(dicVal)); } catch { } } + else // If it's just the dictionary name, replace it with its string representation + { + output = output.Replace(full, v.ToString()); + break; + } break; } }