Search in sources :

Example 1 with OccupiedCondition

use of main.elements.conditions.standard.OccupiedCondition in project Eidolons by IDemiurge.

the class FilterMaster method getCellsInRadius.

public static Set<Obj> getCellsInRadius(Obj centerObj, Integer radius) {
    Conditions conditions = new Conditions();
    conditions.add(ConditionMaster.getDistanceFilterCondition("SOURCE", radius, true));
    conditions.add(new NotCondition(new OccupiedCondition("MATCH")));
    Set<Obj> set = new Filter<Obj>(centerObj.getRef(), conditions, DC_TYPE.TERRAIN).getObjects();
    return set;
}
Also used : NotCondition(main.elements.conditions.NotCondition) Obj(main.entity.obj.Obj) OccupiedCondition(main.elements.conditions.standard.OccupiedCondition) Conditions(main.elements.conditions.Conditions)

Aggregations

Conditions (main.elements.conditions.Conditions)1 NotCondition (main.elements.conditions.NotCondition)1 OccupiedCondition (main.elements.conditions.standard.OccupiedCondition)1 Obj (main.entity.obj.Obj)1