Example #1
0
    public void GuardConfirm(List <Human> GuardList)
    {
        List <int> oldList = objectStorage.Guard;

        objectStorage.Guard = new List <int>();
        foreach (var item in GuardList)
        {
            if (item.Activity != Human.ActivityType.Working)
            {
                item.Hire(objectStorage);
            }
            objectStorage.Guard.Add(item.ID);
            oldList.Remove(item.ID);
        }
        foreach (var item in oldList)
        {
            SessionData.Data.ResourceStorage.People[item].Fire();
        }
        GuardCount.text = objectStorage.HiredGuard.ToString();
        objectStorage.RefreshWillProtection();
        Factors[6].Progress = objectStorage.Protection.WillFactor / ImpactFactors.MaxValue;
    }