예제 #1
0
        public WorkPriority Clone(PriorityTracker newParent)
        {
            var clone = new WorkPriority(newParent)
            {
                priorities = (int[])priorities.Clone(),
                workgiver  = workgiver
            };

            return(clone);
        }
예제 #2
0
 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;
     }
 }
예제 #3
0
 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;
     }
 }
예제 #4
0
 // Scribe
 public WorkPriority(PriorityTracker parent)
 {
     _parent = parent;
 }