Closes Anuken/Mindustry-Suggestions/issues/5967
This commit is contained in:
@@ -116,7 +116,7 @@ public class Blocks{
|
|||||||
|
|
||||||
//transport
|
//transport
|
||||||
conveyor, titaniumConveyor, plastaniumConveyor, armoredConveyor, distributor, junction, itemBridge, phaseConveyor, sorter, invertedSorter, router,
|
conveyor, titaniumConveyor, plastaniumConveyor, armoredConveyor, distributor, junction, itemBridge, phaseConveyor, sorter, invertedSorter, router,
|
||||||
overflowGate, underflowGate, massDriver,
|
overflowGate, underflowGate, unloader, massDriver,
|
||||||
|
|
||||||
//transport - alternate
|
//transport - alternate
|
||||||
duct, armoredDuct, ductRouter, overflowDuct, underflowDuct, ductBridge, ductUnloader,
|
duct, armoredDuct, ductRouter, overflowDuct, underflowDuct, ductBridge, ductUnloader,
|
||||||
@@ -143,7 +143,7 @@ public class Blocks{
|
|||||||
cliffCrusher, largeCliffCrusher, plasmaBore, largePlasmaBore, impactDrill, eruptionDrill,
|
cliffCrusher, largeCliffCrusher, plasmaBore, largePlasmaBore, impactDrill, eruptionDrill,
|
||||||
|
|
||||||
//storage
|
//storage
|
||||||
coreShard, coreFoundation, coreNucleus, vault, container, unloader,
|
coreShard, coreFoundation, coreNucleus, vault, container,
|
||||||
//storage - erekir
|
//storage - erekir
|
||||||
coreBastion, coreCitadel, coreAcropolis, reinforcedContainer, reinforcedVault,
|
coreBastion, coreCitadel, coreAcropolis, reinforcedContainer, reinforcedVault,
|
||||||
|
|
||||||
@@ -2154,6 +2154,12 @@ public class Blocks{
|
|||||||
invert = true;
|
invert = true;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
unloader = new Unloader("unloader"){{
|
||||||
|
requirements(Category.distribution, with(Items.titanium, 25, Items.silicon, 30));
|
||||||
|
speed = 60f / 11f;
|
||||||
|
group = BlockGroup.transportation;
|
||||||
|
}};
|
||||||
|
|
||||||
massDriver = new MassDriver("mass-driver"){{
|
massDriver = new MassDriver("mass-driver"){{
|
||||||
requirements(Category.distribution, with(Items.titanium, 125, Items.silicon, 75, Items.lead, 125, Items.thorium, 50));
|
requirements(Category.distribution, with(Items.titanium, 125, Items.silicon, 75, Items.lead, 125, Items.thorium, 50));
|
||||||
size = 3;
|
size = 3;
|
||||||
@@ -3218,13 +3224,6 @@ public class Blocks{
|
|||||||
scaledHealth = 55;
|
scaledHealth = 55;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
//TODO move tabs?
|
|
||||||
unloader = new Unloader("unloader"){{
|
|
||||||
requirements(Category.effect, with(Items.titanium, 25, Items.silicon, 30));
|
|
||||||
speed = 60f / 11f;
|
|
||||||
group = BlockGroup.transportation;
|
|
||||||
}};
|
|
||||||
|
|
||||||
reinforcedContainer = new StorageBlock("reinforced-container"){{
|
reinforcedContainer = new StorageBlock("reinforced-container"){{
|
||||||
requirements(Category.effect, with(Items.tungsten, 30, Items.graphite, 40));
|
requirements(Category.effect, with(Items.tungsten, 30, Items.graphite, 40));
|
||||||
size = 2;
|
size = 2;
|
||||||
|
|||||||
@@ -1172,6 +1172,24 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||||||
Draw.draw(Layer.groundUnit - 1, () -> {
|
Draw.draw(Layer.groundUnit - 1, () -> {
|
||||||
drawCommanded(false);
|
drawCommanded(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Draw.draw(Layer.overlayUI, () -> {
|
||||||
|
drawCommandedTargets();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void drawCommandedTargets(){
|
||||||
|
if(commandMode){
|
||||||
|
for(Unit unit : selectedUnits){
|
||||||
|
if(unit.controller() instanceof CommandAI ai){
|
||||||
|
var cmd = ai.currentCommand();
|
||||||
|
|
||||||
|
if(ai.attackTarget != null && cmd.drawTarget){
|
||||||
|
Drawf.target(ai.attackTarget.getX(), ai.attackTarget.getY(), 6f, Pal.remove);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawCommanded(boolean flying){
|
public void drawCommanded(boolean flying){
|
||||||
@@ -1183,7 +1201,6 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||||||
//happens sometimes
|
//happens sometimes
|
||||||
selectedUnits.removeAll(u -> !u.allowCommand());
|
selectedUnits.removeAll(u -> !u.allowCommand());
|
||||||
|
|
||||||
//draw command overlay UI
|
|
||||||
for(Unit unit : selectedUnits){
|
for(Unit unit : selectedUnits){
|
||||||
|
|
||||||
Color color = unit.controller() instanceof LogicAI ? Team.malis.color : Pal.accent;
|
Color color = unit.controller() instanceof LogicAI ? Team.malis.color : Pal.accent;
|
||||||
@@ -1194,10 +1211,6 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||||||
var cmd = ai.currentCommand();
|
var cmd = ai.currentCommand();
|
||||||
lastPos = ai.attackTarget != null ? ai.attackTarget : ai.targetPos;
|
lastPos = ai.attackTarget != null ? ai.attackTarget : ai.targetPos;
|
||||||
|
|
||||||
if(flying && ai.attackTarget != null && cmd.drawTarget){
|
|
||||||
Drawf.target(ai.attackTarget.getX(), ai.attackTarget.getY(), 6f, Pal.remove);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(unit.isFlying() != flying) continue;
|
if(unit.isFlying() != flying) continue;
|
||||||
|
|
||||||
//draw target line
|
//draw target line
|
||||||
|
|||||||
@@ -415,7 +415,7 @@ public class DataPatcher{
|
|||||||
}catch(Throwable e){
|
}catch(Throwable e){
|
||||||
warn("Failed to read value @.@ = @: (type = @ elementType = @)\n@", object, field, value, metadata.type, metadata.elementType, Strings.getSimpleMessages(e));
|
warn("Failed to read value @.@ = @: (type = @ elementType = @)\n@", object, field, value, metadata.type, metadata.elementType, Strings.getSimpleMessages(e));
|
||||||
}
|
}
|
||||||
parser.listeners.pop();
|
parser.listeners.pop();
|
||||||
}else{
|
}else{
|
||||||
//assign each field manually
|
//assign each field manually
|
||||||
var childFields = parser.getJson().getFields(prevValue.getClass().isAnonymousClass() ? prevValue.getClass().getSuperclass() : prevValue.getClass());
|
var childFields = parser.getJson().getFields(prevValue.getClass().isAnonymousClass() ? prevValue.getClass().getSuperclass() : prevValue.getClass());
|
||||||
|
|||||||
Reference in New Issue
Block a user