internal static void Postfix(ToolMenu __instance) { ReadOptions(); var position = Mathf.Clamp(InspectToolSettings.Instance.ToolPosition, 0, __instance.basicTools.Count); var name = InspectToolStrings.TOOL_NAME; var tooltip = InspectToolStrings.TOOL_TOOLTIP; var largeIcon = InspectToolSettings.Instance.LargeIcon; var tc = ToolMenu.CreateToolCollection(name, InspectToolStrings.TOOL_ICON_SPRITE_NAME, PAction.GetKAction(), nameof(InspectTool), tooltip, largeIcon); __instance.basicTools.Insert(position, tc); }
internal static void Postfix() { ReadOptions(); var position = Mathf.Clamp(SandboxConduitToolSettings.Instance.ToolPosition, 0, ToolMenu.Instance.sandboxTools.Count); var name = SandboxConduitToolStrings.TOOL_NAME; var tooltip = SandboxConduitToolStrings.TOOL_TOOLTIP; var tc = ToolMenu.CreateToolCollection(name, "icon_action_empty_pipes", PAction.GetKAction(), nameof(SandboxConduitTool), tooltip, largeIcon: false); ToolMenu.Instance.sandboxTools.Insert(position, tc); }