Constructor tech tree move
This commit is contained in:
@@ -3575,6 +3575,7 @@ public class Blocks{
|
||||
deconstructSpeed = 1f;
|
||||
}};
|
||||
|
||||
//TODO consider usefulness and applicability to serpulo
|
||||
deconstructor = new PayloadDeconstructor("deconstructor"){{
|
||||
requirements(Category.units, with(Items.thorium, 250, Items.silicon, 200, Items.graphite, 250));
|
||||
itemCapacity = 250;
|
||||
@@ -3583,8 +3584,9 @@ public class Blocks{
|
||||
deconstructSpeed = 2f;
|
||||
}};
|
||||
|
||||
//TODO move completely to erekir tech tree?
|
||||
constructor = new Constructor("constructor"){{
|
||||
requirements(Category.units, with(Items.silicon, 50, Items.thorium, 70, Items.graphite, 50));
|
||||
requirements(Category.units, with(Items.silicon, 80, Items.graphite, 120));
|
||||
hasPower = true;
|
||||
consumes.power(2f);
|
||||
size = 3;
|
||||
@@ -3592,7 +3594,7 @@ public class Blocks{
|
||||
|
||||
//yes this block is pretty much useless
|
||||
largeConstructor = new Constructor("large-constructor"){{
|
||||
requirements(Category.units, with(Items.silicon, 100, Items.thorium, 150, Items.graphite, 50, Items.phaseFabric, 40));
|
||||
requirements(Category.units, with(Items.silicon, 150, Items.graphite, 150, Items.phaseFabric, 40));
|
||||
hasPower = true;
|
||||
consumes.power(2f);
|
||||
maxBlockSize = 4;
|
||||
|
||||
@@ -1157,11 +1157,11 @@ public class LExecutor{
|
||||
}
|
||||
}
|
||||
|
||||
public static class SpawnUniI implements LInstruction{
|
||||
public static class SpawnUnitI implements LInstruction{
|
||||
public int type, x, y, rotation, team, result;
|
||||
public boolean effect;
|
||||
|
||||
public SpawnUniI(int type, int x, int y, int rotation, int team, boolean effect, int result){
|
||||
public SpawnUnitI(int type, int x, int y, int rotation, int team, boolean effect, int result){
|
||||
this.type = type;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
@@ -1171,7 +1171,7 @@ public class LExecutor{
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public SpawnUniI(){
|
||||
public SpawnUnitI(){
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1202,7 +1202,7 @@ public class LStatements{
|
||||
|
||||
@Override
|
||||
public LInstruction build(LAssembler builder){
|
||||
return new SpawnUniI(builder.var(type), builder.var(x), builder.var(y), builder.var(rotation), builder.var(team), effect, builder.var(result));
|
||||
return new SpawnUnitI(builder.var(type), builder.var(x), builder.var(y), builder.var(rotation), builder.var(team), effect, builder.var(result));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,8 +141,7 @@ public class DroneCenter extends Block{
|
||||
}
|
||||
}
|
||||
|
||||
public static class EffectDroneAI extends AIController{
|
||||
//TODO non static?
|
||||
public class EffectDroneAI extends AIController{
|
||||
|
||||
@Override
|
||||
public void updateUnit(){
|
||||
@@ -150,18 +149,16 @@ public class DroneCenter extends Block{
|
||||
if(!(tether.building() instanceof DroneCenterBuild build)) return;
|
||||
if(build.target == null) return;
|
||||
|
||||
DroneCenter block = (DroneCenter)build.block;
|
||||
|
||||
target = build.target;
|
||||
|
||||
//TODO what angle?
|
||||
moveTo(target, build.target.hitSize / 1.8f + block.droneRange - 10f);
|
||||
moveTo(target, build.target.hitSize / 1.8f + droneRange - 10f);
|
||||
|
||||
unit.lookAt(target);
|
||||
|
||||
//TODO low power? status effects may not be the best way to do this...
|
||||
if(unit.within(target, block.droneRange + build.target.hitSize)){
|
||||
build.target.apply(block.status, block.statusDuration);
|
||||
if(unit.within(target, droneRange + build.target.hitSize)){
|
||||
build.target.apply(status, statusDuration);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user