private void setUpBedTimeIfNull()
 {
     if (this.bedTimePrerequisite == null)
     {
         this.bedTimePrerequisite = new TaskPrerequisites.BedTimePrerequisite(true);
     }
 }
Exemple #2
0
        public TaskMetaData(string Name, LocationPrerequisite LocationPrereque, StaminaPrerequisite StaminaPrerequisite = null, ToolPrerequisite ToolPrerequisite = null, InventoryFullPrerequisite InventoryFull = null, BedTimePrerequisite bedTimePrereq = null, ItemPrerequisite ItemPrereque = null)
        {
            this.name = Name;
            this.staminaPrerequisite   = StaminaPrerequisite;
            this.toolPrerequisite      = ToolPrerequisite;
            this.inventoryPrerequisite = InventoryFull;
            this.pathsToTake           = new List <List <TileNode> >();
            this.bedTimePrerequisite   = bedTimePrereq;

            this.itemPrerequisite     = ItemPrereque;
            this.locationPrerequisite = LocationPrereque;
            //Make sure to set values correctly incase of null
            setUpLocationPrerequsiteIfNull();
            setUpStaminaPrerequisiteIfNull();
            setUpToolPrerequisiteIfNull();
            setUpInventoryPrerequisiteIfNull();
            setUpBedTimeIfNull();
            setUpItemPrerequisiteIfNull();
            this.prerequisitesList = new List <TaskPrerequisites.GenericPrerequisite>();
            this.prerequisitesList.Add(this.staminaPrerequisite);
            this.prerequisitesList.Add(this.toolPrerequisite);
            this.prerequisitesList.Add(this.inventoryPrerequisite);
            this.prerequisitesList.Add(this.bedTimePrerequisite);
            this.prerequisitesList.Add(this.itemPrerequisite);
        }
        public TaskMetaData(string Name, TaskPrerequisites.StaminaPrerequisite StaminaPrerequisite = null, TaskPrerequisites.ToolPrerequisite ToolPrerequisite = null, TaskPrerequisites.InventoryFullPrerequisite InventoryFull = null, TaskPrerequisites.BedTimePrerequisite bedTimePrereq = null)
        {
            this.name = Name;
            this.staminaPrerequisite   = StaminaPrerequisite;
            this.toolPrerequisite      = ToolPrerequisite;
            this.inventoryPrerequisite = InventoryFull;

            this.bedTimePrerequisite = bedTimePrereq;
            //Make sure to set values correctly incase of null
            setUpStaminaPrerequisiteIfNull();
            setUpToolPrerequisiteIfNull();
            setUpInventoryPrerequisiteIfNull();
            setUpBedTimeIfNull();
            this.prerequisitesList = new List <TaskPrerequisites.GenericPrerequisite>();
            this.prerequisitesList.Add(this.staminaPrerequisite);
            this.prerequisitesList.Add(this.toolPrerequisite);
            this.prerequisitesList.Add(this.inventoryPrerequisite);
            this.prerequisitesList.Add(this.bedTimePrerequisite);
        }
        public TaskMetaData(string Name, float Priority, float Cost, float Utility, float Frequency, TaskPrerequisites.StaminaPrerequisite StaminaPrerequisite = null, TaskPrerequisites.ToolPrerequisite ToolPrerequisite = null, TaskPrerequisites.InventoryFullPrerequisite InventoryFull = null, TaskPrerequisites.BedTimePrerequisite BedTimePrereq = null)
        {
            this.name                  = Name;
            this.priority              = Priority;
            this.cost                  = Cost;
            this.utility               = Utility;
            this.frequency             = Frequency;
            this.staminaPrerequisite   = StaminaPrerequisite;
            this.toolPrerequisite      = ToolPrerequisite;
            this.inventoryPrerequisite = InventoryFull;
            this.bedTimePrerequisite   = BedTimePrereq;
            //Make sure to set values correctly incase of null
            setUpStaminaPrerequisiteIfNull();
            setUpToolPrerequisiteIfNull();
            setUpInventoryPrerequisiteIfNull();
            setUpBedTimeIfNull();
            this.prerequisitesList = new List <TaskPrerequisites.GenericPrerequisite>();
            this.prerequisitesList.Add(this.staminaPrerequisite);
            this.prerequisitesList.Add(this.toolPrerequisite);
            this.prerequisitesList.Add(this.inventoryPrerequisite);

            this.prerequisitesList.Add(this.bedTimePrerequisite);
        }