Skip to content

Commit 8380be6

Browse files
E1intBanane9
authored andcommitted
Add name overrides for delta time and cast nodes
1 parent 43058fa commit 8380be6

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

WikiIntegration/OpenWikiArticleButton.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ internal sealed class OpenWikiArticleButton : ConfiguredResoniteInspectorMonkey<
3232
private static readonly Lazy<LocaleString> _componentLocale = new(() => Mod.GetLocaleString("WikiHyperlink.Component"));
3333
private static readonly Lazy<LocaleString> _protoFluxLocale = new(() => Mod.GetLocaleString("WikiHyperlink.ProtoFlux"));
3434
private static ProtoFluxCategoryConfig _categoryConfig = null!;
35+
private static readonly Dictionary<string, string> _nameOverrides = new() {
36+
{"dT", "Delta_Time"},
37+
{"ObjectCast", "Object_Cast"},
38+
{"ValueCast", "Value_Cast"}
39+
};
40+
3541
public override int Priority => HarmonyLib.Priority.HigherThanNormal;
3642

3743
private static LocaleString ComponentLocale => _componentLocale.Value;
@@ -104,6 +110,9 @@ private static void AddHyperlink(Slot slot, Worker worker)
104110
nodeName = dotIndex > 0 ? overload[(dotIndex + 1)..] : nodeName;
105111
}
106112

113+
if (_nameOverrides.TryGetValue(nodeName, out var name))
114+
nodeName = name;
115+
107116
wikiPage = $"ProtoFlux:{nodeName.Replace(' ', '_')}";
108117
}
109118
else

0 commit comments

Comments
 (0)