Placement range check rule implemented

This commit is contained in:
Anuken
2022-02-13 21:02:33 -05:00
parent c8b11c4447
commit 3ebdb5309e
5 changed files with 6 additions and 3 deletions

View File

@@ -16,6 +16,7 @@ import static mindustry.Vars.*;
public class BaseTurret extends Block{
public float range = 80f;
public float placeOverlapMargin = 8 * 6f;
public float rotateSpeed = 5;
public float coolantUsage = 0.2f;
@@ -45,7 +46,7 @@ public class BaseTurret extends Block{
consumes.add(coolantOverride != null ? new ConsumeLiquid(coolantOverride, coolantUsage) : new ConsumeCoolant(coolantUsage)).update(false).boost();
}
placeOverlapRange = Math.max(placeOverlapRange, range);
placeOverlapRange = Math.max(placeOverlapRange, range + placeOverlapMargin);
super.init();
}