public static void OnUpgradePre(BuildTool_Upgrade __instance) { if (UndoManager.IgnoreAllEvents.Value) { return; } if (NebulaModAPI.IsMultiplayerActive) { if (NebulaModAPI.MultiplayerSession.LocalPlayer.IsClient) { return; } } upgradeIds.Clear(); upgradeList.Clear(); RecordUpgrades = true; }
public static void OnUpgradePost(BuildTool_Upgrade __instance) { if (UndoManager.IgnoreAllEvents.Value) { return; } if (NebulaModAPI.IsMultiplayerActive) { if (NebulaModAPI.MultiplayerSession.LocalPlayer.IsClient) { return; } } RecordUpgrades = false; if (upgradeList.Count > 0) { PlayerUndo data = UndoManager.GetCurrentPlayerData(); data.AddUndoItem(new UndoUpgrade(data, upgradeList)); } }
public static void BuildTool_Upgrade_DeterminePreviews_Postfix(BuildTool_Upgrade __instance) { RenderBuildCounter(__instance); }