Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -494,7 +494,7 @@ public class DesktopInput extends InputHandler{
|
|||||||
}else if(selected != null){
|
}else if(selected != null){
|
||||||
//only begin shooting if there's no cursor event
|
//only begin shooting if there's no cursor event
|
||||||
if(!tryTapPlayer(Core.input.mouseWorld().x, Core.input.mouseWorld().y) && !tileTapped(selected.build) && !player.unit().activelyBuilding() && !droppingItem
|
if(!tryTapPlayer(Core.input.mouseWorld().x, Core.input.mouseWorld().y) && !tileTapped(selected.build) && !player.unit().activelyBuilding() && !droppingItem
|
||||||
&& !((!settings.getBool("doubletapmine") || (selected == prevSelected && Time.timeSinceMillis(selectMillis) < 500)) && tryBeginMine(selected)) && !Core.scene.hasKeyboard()){
|
&& !(tryStopMine(selected) || (!settings.getBool("doubletapmine") || selected == prevSelected && Time.timeSinceMillis(selectMillis) < 500) && tryBeginMine(selected)) && !Core.scene.hasKeyboard()){
|
||||||
player.shooting = shouldShoot;
|
player.shooting = shouldShoot;
|
||||||
}
|
}
|
||||||
}else if(!Core.scene.hasKeyboard()){ //if it's out of bounds, shooting is just fine
|
}else if(!Core.scene.hasKeyboard()){ //if it's out of bounds, shooting is just fine
|
||||||
|
|||||||
@@ -948,8 +948,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||||||
/** Tries to begin mining a tile, returns true if successful. */
|
/** Tries to begin mining a tile, returns true if successful. */
|
||||||
boolean tryBeginMine(Tile tile){
|
boolean tryBeginMine(Tile tile){
|
||||||
if(canMine(tile)){
|
if(canMine(tile)){
|
||||||
//if a block is clicked twice, reset it
|
player.unit().mineTile = tile;
|
||||||
player.unit().mineTile = player.unit().mineTile == tile ? null : tile;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -54,7 +54,9 @@ public class MendProjector extends Block{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawPlace(int x, int y, int rotation, boolean valid){
|
public void drawPlace(int x, int y, int rotation, boolean valid){
|
||||||
Drawf.dashCircle(x * tilesize + offset, y * tilesize + offset, range, Pal.accent);
|
Drawf.dashCircle(x * tilesize + offset, y * tilesize + offset, range, baseColor);
|
||||||
|
|
||||||
|
indexer.eachBlock(player.team(), x * tilesize + offset, y * tilesize + offset, range, other -> true, other -> Drawf.selected(other, Tmp.c1.set(baseColor).a(Mathf.absin(4f, 1f))));
|
||||||
}
|
}
|
||||||
|
|
||||||
public class MendBuild extends Building implements Ranged{
|
public class MendBuild extends Building implements Ranged{
|
||||||
|
|||||||
@@ -47,7 +47,9 @@ public class OverdriveProjector extends Block{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawPlace(int x, int y, int rotation, boolean valid){
|
public void drawPlace(int x, int y, int rotation, boolean valid){
|
||||||
Drawf.dashCircle(x * tilesize + offset, y * tilesize + offset, range, Pal.accent);
|
Drawf.dashCircle(x * tilesize + offset, y * tilesize + offset, range, baseColor);
|
||||||
|
|
||||||
|
indexer.eachBlock(player.team(), x * tilesize + offset, y * tilesize + offset, range, other -> other.block.canOverdrive, other -> Drawf.selected(other, Tmp.c1.set(baseColor).a(Mathf.absin(4f, 1f))));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import mindustry.annotations.Annotations.*;
|
|||||||
import mindustry.entities.*;
|
import mindustry.entities.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.graphics.*;
|
import mindustry.graphics.*;
|
||||||
|
import mindustry.logic.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
import mindustry.world.meta.*;
|
import mindustry.world.meta.*;
|
||||||
|
|
||||||
@@ -63,7 +64,7 @@ public class RepairPoint extends Block{
|
|||||||
return new TextureRegion[]{baseRegion, region};
|
return new TextureRegion[]{baseRegion, region};
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RepairPointBuild extends Building{
|
public class RepairPointBuild extends Building implements Ranged{
|
||||||
public Unit target;
|
public Unit target;
|
||||||
public float strength, rotation = 90;
|
public float strength, rotation = 90;
|
||||||
|
|
||||||
@@ -126,6 +127,11 @@ public class RepairPoint extends Block{
|
|||||||
return Mathf.equal(efficiency(), 0f, 0.01f) ? BlockStatus.noInput : cons.status();
|
return Mathf.equal(efficiency(), 0f, 0.01f) ? BlockStatus.noInput : cons.status();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float range(){
|
||||||
|
return repairRadius;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void write(Writes write){
|
public void write(Writes write){
|
||||||
super.write(write);
|
super.write(write);
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ public class ServerControl implements ApplicationListener{
|
|||||||
if(!maps.all().isEmpty()){
|
if(!maps.all().isEmpty()){
|
||||||
info("Maps:");
|
info("Maps:");
|
||||||
for(Map map : maps.all()){
|
for(Map map : maps.all()){
|
||||||
info(" @: &fi@ / @x@", map.name(), map.custom ? "Custom" : "Default", map.width, map.height);
|
info(" @: &fi@ / @x@", map.name().replace(' ', '_'), map.custom ? "Custom" : "Default", map.width, map.height);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
info("No maps found.");
|
info("No maps found.");
|
||||||
|
|||||||
Reference in New Issue
Block a user