Пример #1
0
 public StockResourceAct(CreatureAI agent, ResourceAmount item) :
     base(agent)
 {
     ItemToStock = item.CloneResource();
     Name        = "Stock Item";
     Tree        = null;
 }
Пример #2
0
 public StockResourceAct(CreatureAI agent, ResourceAmount item)
     : base(agent)
 {
     ItemToStock = item.CloneResource();
     Name = "Stock Item";
     Tree = null;
 }
Пример #3
0
 public StockResourceTask(ResourceAmount entity)
 {
     Category       = TaskCategory.Gather;
     EntityToGather = entity.CloneResource();
     Name           = "Stock Entity: " + entity.ResourceType + " " + entity.NumResources;
     Priority       = PriorityType.Low;
 }
Пример #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;
 }
Пример #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;
 }
Пример #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);
        }
Пример #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);
        }
Пример #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;
        }
Пример #9
0
 public StockResourceTask(ResourceAmount entity)
 {
     EntityToGather = entity.CloneResource();
     Name = "Stock Entity: " + entity.ResourceType.ResourceName + " " + entity.NumResources;
     Priority = PriorityType.Low;
 }