public override void Start(ICoreAPI api) { AiTaskManager.RegisterTaskType("AiTaskSleep", typeof(AiTaskSleep)); //AiTaskManager.RegisterTaskType("seekastar", typeof(AiTaskBaseAStar)); AiTaskManager.RegisterTaskType("fixedseekfoodandeat", typeof(FixedAiTaskSeekFoodAndEat)); //AiTaskManager.RegisterTaskType("fleepoi", typeof(AiTaskFleePOI)); AiTaskManager.RegisterTaskType("injured", typeof(AiTaskInjured)); api.RegisterEntityBehaviorClass("fixedmultiply", typeof(FixedEntityBehaviorMultiply)); }
public void StopAll() { AiTaskManager mang = entity.GetBehavior <EntityBehaviorTaskAI>()?.taskManager; if (mang != null) { mang.StopTask(typeof(AiTaskHarvest)); mang.StopTask(typeof(AiTaskPlant)); mang.StopTask(typeof(AiTaskSqueezeHoney)); mang.StopTask(typeof(AiTaskMilk)); mang.StopTask(typeof(AiTaskToChest)); mang.StopTask(typeof(AiTaskFromChest)); mang.StopTask(typeof(AiTaskSeekItem)); mang.StopTask(typeof(AiTaskToBarrel)); mang.StopTask(typeof(AiTaskGetFuel)); mang.StopTask(typeof(AiTaskRefuel)); mang.StopTask(typeof(AiTaskGetSeed)); mang.StopTask(typeof(AiTaskSeekItemAny)); mang.StopTask(typeof(AiTaskProgMeleeAttack)); mang.StopTask(typeof(AiTaskSeekEntity)); mang.StopTask(typeof(AiTaskQuarry)); mang.StopTask(typeof(AiTaskStayCloseToOwner)); mang.StopTask(typeof(AiTaskPathBuilder)); mang.StopTask(typeof(AiTaskQuarry)); mang.StopTask(typeof(AiTaskToAltChest)); mang.StopTask(typeof(AiTaskProgRangedAttack)); mang.StopTask(typeof(AiTaskForm)); mang.StopTask(typeof(AiTaskToPoint)); mang.StopTask(typeof(AiTaskGetItem)); mang.StopTask(typeof(AiTaskAnyFromChest)); mang.StopTask(typeof(AiTaskGetTool)); } }
public override void Start(ICoreAPI api) { AiTaskManager.RegisterTaskType("AiTaskSleep", typeof(AiTaskSleep)); }