public StockResourceAct(CreatureAI agent, ResourceAmount item) :
     base(agent)
 {
     ItemToStock = item.CloneResource();
     Name        = "Stock Item";
     Tree        = null;
 }
Beispiel #2
0
 public StockResourceAct(CreatureAI agent, ResourceAmount item)
     : base(agent)
 {
     ItemToStock = item.CloneResource();
     Name = "Stock Item";
     Tree = null;
 }
 public StockResourceTask(ResourceAmount entity)
 {
     Category       = TaskCategory.Gather;
     EntityToGather = entity.CloneResource();
     Name           = "Stock Entity: " + entity.ResourceType + " " + entity.NumResources;
     Priority       = PriorityType.Low;
 }
Beispiel #4
0
 public StockResourceTask(ResourceAmount entity)
 {
     Category        = TaskCategory.Gather;
     EntityToGather  = entity.CloneResource();
     Name            = "Stock Entity: " + entity.ResourceType + " " + entity.NumResources;
     Priority        = PriorityType.Medium;
     ReassignOnDeath = false;
     BoredomIncrease = GameSettings.Default.Boredom_NormalTask;
 }
Beispiel #5
0
 public StockResourceTask(ResourceAmount entity)
 {
     Category        = TaskCategory.Gather;
     EntityToGather  = entity.CloneResource();
     Name            = "Stock Entity: " + entity.ResourceType + " " + entity.NumResources;
     Priority        = PriorityType.Low;
     ReassignOnDeath = false;
     BoredomIncrease = 0.1f;
 }
Beispiel #6
0
        public List <Body> RemoveAndCreate(ResourceAmount resources)
        {
            List <Body> toReturn = new List <Body>();

            if (!Resources.RemoveResource(resources.CloneResource()))
            {
                return(toReturn);
            }

            for (int i = 0; i < resources.NumResources; i++)
            {
                Body newEntity = EntityFactory.CreateEntity <Body>(resources.ResourceType.ResourceName + " Resource",
                                                                   GlobalTransform.Translation + MathFunctions.RandVector3Cube() * 0.5f);
                toReturn.Add(newEntity);
            }

            return(toReturn);
        }
Beispiel #7
0
        public List <Body> RemoveAndCreate(ResourceAmount resources, RestockType type)
        {
            var         parentBody = GetRoot() as Body;
            var         pos        = parentBody == null ? GlobalTransform.Translation : parentBody.Position;
            List <Body> toReturn   = new List <Body>();

            if (!Remove(resources.CloneResource(), type))
            {
                return(toReturn);
            }

            for (int i = 0; i < resources.NumResources; i++)
            {
                Body newEntity = EntityFactory.CreateEntity <Body>(resources.ResourceType + " Resource",
                                                                   pos + MathFunctions.RandVector3Cube() * 0.5f);
                toReturn.Add(newEntity);
            }

            return(toReturn);
        }
Beispiel #8
0
        public List<Body> RemoveAndCreate(ResourceAmount resources)
        {
            List<Body> toReturn = new List<Body>();

            if(!Resources.RemoveResource(resources.CloneResource()))
            {
                return toReturn;
            }

            for(int i = 0; i < resources.NumResources; i++)
            {
                Body newEntity = EntityFactory.CreateEntity<Body>(resources.ResourceType.ResourceName + " Resource",
                    GlobalTransform.Translation + MathFunctions.RandVector3Cube()*0.5f);
                toReturn.Add(newEntity);
            }

            return toReturn;
        }
Beispiel #9
0
 public StockResourceTask(ResourceAmount entity)
 {
     EntityToGather = entity.CloneResource();
     Name = "Stock Entity: " + entity.ResourceType.ResourceName + " " + entity.NumResources;
     Priority = PriorityType.Low;
 }