mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-10 18:57:39 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
1a30edc55f
@ -494,7 +494,7 @@ public class DesktopInput extends InputHandler{
|
||||
}else if(selected != null){
|
||||
//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
|
||||
&& !((!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;
|
||||
}
|
||||
}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. */
|
||||
boolean tryBeginMine(Tile tile){
|
||||
if(canMine(tile)){
|
||||
//if a block is clicked twice, reset it
|
||||
player.unit().mineTile = player.unit().mineTile == tile ? null : tile;
|
||||
player.unit().mineTile = tile;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -54,7 +54,9 @@ public class MendProjector extends Block{
|
||||
|
||||
@Override
|
||||
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{
|
||||
|
@ -47,7 +47,9 @@ public class OverdriveProjector extends Block{
|
||||
|
||||
@Override
|
||||
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
|
||||
|
@ -11,6 +11,7 @@ import mindustry.annotations.Annotations.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.logic.*;
|
||||
import mindustry.world.*;
|
||||
import mindustry.world.meta.*;
|
||||
|
||||
@ -63,7 +64,7 @@ public class RepairPoint extends Block{
|
||||
return new TextureRegion[]{baseRegion, region};
|
||||
}
|
||||
|
||||
public class RepairPointBuild extends Building{
|
||||
public class RepairPointBuild extends Building implements Ranged{
|
||||
public Unit target;
|
||||
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();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float range(){
|
||||
return repairRadius;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(Writes write){
|
||||
super.write(write);
|
||||
|
@ -339,7 +339,7 @@ public class ServerControl implements ApplicationListener{
|
||||
if(!maps.all().isEmpty()){
|
||||
info("Maps:");
|
||||
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{
|
||||
info("No maps found.");
|
||||
|
Loading…
Reference in New Issue
Block a user