diff --git a/core/src/mindustry/ai/types/CommandAI.java b/core/src/mindustry/ai/types/CommandAI.java index 763916539a..0a90db901d 100644 --- a/core/src/mindustry/ai/types/CommandAI.java +++ b/core/src/mindustry/ai/types/CommandAI.java @@ -445,52 +445,4 @@ public class CommandAI extends AIController{ this.stopAtTarget = stopAtTarget; } - /* - - //TODO ひどい - (does not work) - - public static float cohesionScl = 0.3f; - public static float cohesionRad = 3f, separationRad = 1.1f, separationScl = 1f, flockMult = 0.5f; - - Vec2 calculateFlock(){ - if(local.isEmpty()) return flockVec.setZero(); - - flockVec.setZero(); - separation.setZero(); - cohesion.setZero(); - massCenter.set(unit); - - float rad = unit.hitSize; - float sepDst = rad * separationRad, cohDst = rad * cohesionRad; - - //"cohesed" isn't even a word smh - int separated = 0, cohesed = 1; - - for(var other : local){ - float dst = other.dst(unit); - if(dst < sepDst){ - separation.add(Tmp.v1.set(unit).sub(other).scl(1f / sepDst)); - separated ++; - } - - if(dst < cohDst){ - massCenter.add(other); - cohesed ++; - } - } - - if(separated > 0){ - separation.scl(1f / separated); - flockVec.add(separation.scl(separationScl)); - } - - if(cohesed > 1){ - massCenter.scl(1f / cohesed); - flockVec.add(Tmp.v1.set(massCenter).sub(unit).limit(cohesionScl * unit.type.speed)); - //seek mass center? - } - - return flockVec; - }*/ } diff --git a/core/src/mindustry/game/CampaignRules.java b/core/src/mindustry/game/CampaignRules.java new file mode 100644 index 0000000000..32fec76cec --- /dev/null +++ b/core/src/mindustry/game/CampaignRules.java @@ -0,0 +1,6 @@ +package mindustry.game; + +public class CampaignRules{ + public boolean fog; + public boolean sectorInvasions; +}