public void ColonistNotificationHandler(ColonistNotification notification) { if (notification.type == ColonistNotificationType.New) { this.defaultGroup.Add(notification.colonist); } else if (notification.type == ColonistNotificationType.Buried || notification.type == ColonistNotificationType.Lost || notification.type == ColonistNotificationType.Deleted) { this.defaultGroup.Remove(notification.colonist); } }
public void ColonistChanged(ColonistNotification notification) { this.Message("SquadManager.ColonistChanged()"); if (notification.type == ColonistNotificationType.New) { this.allColonistsSquad.Add(notification.colonist.Pawn); if (this.SquadChanged != null) { this.SquadChanged(this.allColonistsSquad); } } else if (notification.type == ColonistNotificationType.Buried) { this.RemovePawnFromAllSquads(notification.colonist.Pawn); } else if (notification.type == ColonistNotificationType.Lost) { this.RemovePawnFromAllSquads(notification.colonist.Pawn); } else if (notification.type == ColonistNotificationType.Deleted) { this.RemovePawnFromAllSquads(notification.colonist.Pawn); } }