summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI
diff options
context:
space:
mode:
Diffstat (limited to 'src/StardewModdingAPI')
-rw-r--r--src/StardewModdingAPI/Translation.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/StardewModdingAPI/Translation.cs b/src/StardewModdingAPI/Translation.cs
index 8dcaee0f..31a1b7e1 100644
--- a/src/StardewModdingAPI/Translation.cs
+++ b/src/StardewModdingAPI/Translation.cs
@@ -107,8 +107,11 @@ namespace StardewModdingAPI
// from object properties
else
{
- foreach (PropertyInfo prop in tokens.GetType().GetProperties())
+ Type type = tokens.GetType();
+ foreach (PropertyInfo prop in type.GetProperties())
tokenLookup[prop.Name] = prop.GetValue(tokens)?.ToString();
+ foreach (FieldInfo field in type.GetFields())
+ tokenLookup[field.Name] = field.GetValue(tokens)?.ToString();
}
}