public static void ClientUnlockGroup(TechGroup techGroup) { if (!techGroup.SharedCanUnlock(Client.Characters.CurrentPlayerCharacter, out var error)) { NotificationSystem.ClientShowNotification(NotificationCannotUnlockTech, error, NotificationColor.Bad); return; } Instance.CallServer(_ => _.ServerRemote_UnlockGroup(techGroup)); }
public static bool ClientValidateCanUnlock( TechGroup techGroup, bool showErrorNotification) { if (techGroup.SharedCanUnlock(Client.Characters.CurrentPlayerCharacter, skipLearningPointsCheck: false, out var error)) { return(true); } if (showErrorNotification) { NotificationSystem.ClientShowNotification(NotificationCannotUnlockTech, error, NotificationColor.Bad); } return(false); }