Misc small fixes
This commit is contained in:
@@ -27,7 +27,8 @@ public class RtsAI{
|
||||
static final IntSet assignedTargets = new IntSet();
|
||||
static final float squadRadius = 120f;
|
||||
static final int timeUpdate = 0, timerSpawn = 1;
|
||||
static final float minWeight = 0.9f;
|
||||
//TODO make configurable
|
||||
static final float minWeight = 1.1f;
|
||||
|
||||
//in order of priority??
|
||||
static final BlockFlag[] flags = {BlockFlag.generator, BlockFlag.factory, BlockFlag.core, BlockFlag.battery};
|
||||
|
||||
@@ -3733,14 +3733,13 @@ public class Blocks{
|
||||
}};
|
||||
|
||||
smallDeconstructor = new PayloadDeconstructor("small-deconstructor"){{
|
||||
requirements(Category.units, with(Items.beryllium, 100, Items.silicon, 100, Items.oxide, 50, Items.graphite, 80));
|
||||
requirements(Category.units, with(Items.beryllium, 100, Items.silicon, 100, Items.oxide, 40, Items.graphite, 80));
|
||||
itemCapacity = 100;
|
||||
consumePower(1f);
|
||||
size = 3;
|
||||
deconstructSpeed = 1f;
|
||||
}};
|
||||
|
||||
//TODO consider usefulness and applicability to serpulo... or anything really
|
||||
deconstructor = new PayloadDeconstructor("deconstructor"){{
|
||||
requirements(Category.units, with(Items.beryllium, 250, Items.oxide, 100, Items.silicon, 250, Items.carbide, 250));
|
||||
itemCapacity = 250;
|
||||
@@ -3756,7 +3755,7 @@ public class Blocks{
|
||||
consumePower(2f);
|
||||
size = 3;
|
||||
//TODO expand this list
|
||||
filter = Seq.with(Blocks.tungstenWallLarge, Blocks.berylliumWallLarge, Blocks.reinforcedLiquidContainer, Blocks.beamNode);
|
||||
filter = Seq.with(Blocks.tungstenWallLarge, Blocks.berylliumWallLarge, Blocks.reinforcedLiquidContainer, Blocks.reinforcedContainer, Blocks.beamNode);
|
||||
}};
|
||||
|
||||
//yes this block is pretty much useless
|
||||
|
||||
@@ -42,7 +42,7 @@ public class UnitTypes{
|
||||
|
||||
//air
|
||||
public static @EntityDef({Unitc.class}) UnitType flare, eclipse, horizon, zenith, antumbra,
|
||||
evoke;
|
||||
evoke, avert;
|
||||
|
||||
//air, legacy
|
||||
public static @EntityDef(value = {Unitc.class}, legacy = true) UnitType mono;
|
||||
@@ -2917,6 +2917,27 @@ public class UnitTypes{
|
||||
//endregion
|
||||
//region erekir - flying
|
||||
|
||||
/*
|
||||
avert = new ErekirUnitType("avert"){{
|
||||
lowAltitude = false;
|
||||
flying = true;
|
||||
drag = 0.08f;
|
||||
speed = 2.5f;
|
||||
rotateSpeed = 5f;
|
||||
accel = 0.09f;
|
||||
health = 600f;
|
||||
armor = 2f;
|
||||
hitSize = 12f;
|
||||
engineSize = 0;
|
||||
|
||||
setEnginesMirror(
|
||||
new UnitEngine(21 / 4f, 19 / 4f, 2.2f, 45f),
|
||||
new UnitEngine(23 / 4f, -22 / 4f, 2.2f, 315f)
|
||||
);
|
||||
}};
|
||||
|
||||
*/
|
||||
|
||||
quell = new ErekirUnitType("quell"){{
|
||||
aiController = FlyingFollowAI::new;
|
||||
envDisabled = 0;
|
||||
|
||||
@@ -399,7 +399,7 @@ public class DesktopInput extends InputHandler{
|
||||
cursorType = ui.drillCursor;
|
||||
}
|
||||
|
||||
if(commandMode && selectedUnits.any() && ((cursor.build != null && cursor.build.team != player.team()) || (selectedEnemyUnit(input.mouseWorldX(), input.mouseWorldY()) != null))){
|
||||
if(commandMode && selectedUnits.any() && ((cursor.build != null && !cursor.build.inFogTo(player.team()) && cursor.build.team != player.team()) || (selectedEnemyUnit(input.mouseWorldX(), input.mouseWorldY()) != null))){
|
||||
cursorType = ui.targetCursor;
|
||||
}
|
||||
|
||||
|
||||
@@ -1266,7 +1266,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
}
|
||||
}
|
||||
|
||||
return tmpUnits.min(u -> u.dst(x, y) - u.hitSize/2f);
|
||||
return tmpUnits.min(u -> !u.inFogTo(player.team()), u -> u.dst(x, y) - u.hitSize/2f);
|
||||
}
|
||||
|
||||
public Seq<Unit> selectedCommandUnits(float x, float y, float w, float h){
|
||||
|
||||
Reference in New Issue
Block a user