Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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);
        }