public void addTask(EcsEntity task) { TaskJobComponent?job = task.get <TaskJobComponent>(); string jobName = job.HasValue ? job.Value.job : "none"; openTasks[jobName].Add(task); }
public new ActionTargetStatusEnum check(EcsEntity performer) { if (performer.get <UnitEquipmentComponent>()?.hauledItem == entity) { return(ActionTargetStatusEnum.READY); // item is in hands already } return(base.check(performer)); }
private string getUnitName(EcsEntity unit) { NameComponent?name = unit.get <NameComponent>(); return(name.HasValue ? name.Value.name : "no name"); }