public WorkPriority Clone(PriorityTracker newParent) { var clone = new WorkPriority(newParent) { priorities = (int[])priorities.Clone(), workgiver = workgiver }; return(clone); }
public WorkPriority(PriorityTracker parent, WorkGiverDef workgiver) : this( parent ) { this.workgiver = workgiver; this.priorities = new int[GenDate.HoursPerDay]; var priority = parent.Pawn?.GetVanillaPriority(workgiver.workType) ?? 0; for (int hour = 0; hour < GenDate.HoursPerDay; hour++) { priorities[hour] = priority; } }
public WorkPriority(PriorityTracker parent, WorkGiverDef workgiver) : this( parent ) { this.workgiver = workgiver; this.priorities = new int[GenDate.HoursPerDay]; var priority = parent.Pawn?.GetVanillaPriority(workgiver.workType) ?? 0; Logger.Debug($"Initiating worktracker for {parent.Pawn.LabelShort}, Priority: {priority}, default: {Settings.defaultPriority}"); if (priority > 0) { priority = Settings.defaultPriority; } for (int hour = 0; hour < GenDate.HoursPerDay; hour++) { priorities[hour] = priority; } }
// Scribe public WorkPriority(PriorityTracker parent) { _parent = parent; }