Drill output/speed display
This commit is contained in:
@@ -420,6 +420,7 @@ blocks.speedincrease = Speed Increase
|
|||||||
blocks.range = Range
|
blocks.range = Range
|
||||||
blocks.drilltier = Drillables
|
blocks.drilltier = Drillables
|
||||||
blocks.drillspeed = Base Drill Speed
|
blocks.drillspeed = Base Drill Speed
|
||||||
|
blocks.drilltierreq = Better Drill Required
|
||||||
blocks.boosteffect = Boost Effect
|
blocks.boosteffect = Boost Effect
|
||||||
blocks.maxunits = Max Active Units
|
blocks.maxunits = Max Active Units
|
||||||
blocks.health = Health
|
blocks.health = Health
|
||||||
|
|||||||
@@ -1140,7 +1140,7 @@ public class Blocks implements ContentList{
|
|||||||
pneumaticDrill = new Drill("pneumatic-drill"){{
|
pneumaticDrill = new Drill("pneumatic-drill"){{
|
||||||
requirements(Category.production, ItemStack.with(Items.copper, 35, Items.graphite, 15));
|
requirements(Category.production, ItemStack.with(Items.copper, 35, Items.graphite, 15));
|
||||||
tier = 3;
|
tier = 3;
|
||||||
drillTime = 480;
|
drillTime = 400;
|
||||||
size = 2;
|
size = 2;
|
||||||
drawMineItem = true;
|
drawMineItem = true;
|
||||||
consumes.liquid(Liquids.water, 0.06f).boost();
|
consumes.liquid(Liquids.water, 0.06f).boost();
|
||||||
@@ -1161,7 +1161,7 @@ public class Blocks implements ContentList{
|
|||||||
|
|
||||||
blastDrill = new Drill("blast-drill"){{
|
blastDrill = new Drill("blast-drill"){{
|
||||||
requirements(Category.production, ItemStack.with(Items.copper, 130, Items.silicon, 120, Items.titanium, 100, Items.thorium, 150));
|
requirements(Category.production, ItemStack.with(Items.copper, 130, Items.silicon, 120, Items.titanium, 100, Items.thorium, 150));
|
||||||
drillTime = 270;
|
drillTime = 280;
|
||||||
size = 4;
|
size = 4;
|
||||||
drawRim = true;
|
drawRim = true;
|
||||||
hasPower = true;
|
hasPower = true;
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ public class LoadingFragment extends Fragment{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void show(String text){
|
public void show(String text){
|
||||||
|
table.touchable(Touchable.enabled);
|
||||||
table.<Label>find("namelabel").setText(text);
|
table.<Label>find("namelabel").setText(text);
|
||||||
table.visible(true);
|
table.visible(true);
|
||||||
table.getColor().a = 1f;
|
table.getColor().a = 1f;
|
||||||
@@ -51,6 +52,7 @@ public class LoadingFragment extends Fragment{
|
|||||||
|
|
||||||
public void hide(){
|
public void hide(){
|
||||||
table.toFront();
|
table.toFront();
|
||||||
|
table.touchable(Touchable.disabled);
|
||||||
table.actions(Actions.fadeOut(1f), Actions.visible(false));
|
table.actions(Actions.fadeOut(1f), Actions.visible(false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,19 @@
|
|||||||
package io.anuke.mindustry.world.blocks.production;
|
package io.anuke.mindustry.world.blocks.production;
|
||||||
|
|
||||||
import io.anuke.arc.Core;
|
import io.anuke.arc.*;
|
||||||
import io.anuke.arc.collection.Array;
|
import io.anuke.arc.collection.*;
|
||||||
import io.anuke.arc.collection.ObjectIntMap;
|
import io.anuke.arc.graphics.*;
|
||||||
import io.anuke.arc.graphics.Blending;
|
|
||||||
import io.anuke.arc.graphics.Color;
|
|
||||||
import io.anuke.arc.graphics.g2d.*;
|
import io.anuke.arc.graphics.g2d.*;
|
||||||
import io.anuke.arc.math.Mathf;
|
import io.anuke.arc.math.*;
|
||||||
import io.anuke.arc.util.Strings;
|
import io.anuke.arc.util.*;
|
||||||
import io.anuke.arc.util.Time;
|
import io.anuke.mindustry.content.*;
|
||||||
import io.anuke.mindustry.content.Fx;
|
import io.anuke.mindustry.entities.*;
|
||||||
import io.anuke.mindustry.entities.Effects;
|
import io.anuke.mindustry.entities.Effects.*;
|
||||||
import io.anuke.mindustry.entities.Effects.Effect;
|
import io.anuke.mindustry.entities.type.*;
|
||||||
import io.anuke.mindustry.entities.type.TileEntity;
|
import io.anuke.mindustry.graphics.*;
|
||||||
import io.anuke.mindustry.graphics.Layer;
|
import io.anuke.mindustry.type.*;
|
||||||
import io.anuke.mindustry.graphics.Pal;
|
import io.anuke.mindustry.ui.*;
|
||||||
import io.anuke.mindustry.type.Item;
|
import io.anuke.mindustry.world.*;
|
||||||
import io.anuke.mindustry.type.ItemType;
|
|
||||||
import io.anuke.mindustry.ui.Bar;
|
|
||||||
import io.anuke.mindustry.world.Block;
|
|
||||||
import io.anuke.mindustry.world.Tile;
|
|
||||||
import io.anuke.mindustry.world.meta.*;
|
import io.anuke.mindustry.world.meta.*;
|
||||||
|
|
||||||
import static io.anuke.mindustry.Vars.*;
|
import static io.anuke.mindustry.Vars.*;
|
||||||
@@ -138,8 +132,24 @@ public class Drill extends Block{
|
|||||||
public void drawPlace(int x, int y, int rotation, boolean valid){
|
public void drawPlace(int x, int y, int rotation, boolean valid){
|
||||||
Tile tile = world.tile(x, y);
|
Tile tile = world.tile(x, y);
|
||||||
if(tile == null) return;
|
if(tile == null) return;
|
||||||
|
|
||||||
countOre(tile);
|
countOre(tile);
|
||||||
drawPlaceText(Core.bundle.formatFloat("bar.drillspeed", 60f / (drillTime + hardnessDrillMultiplier * returnItem.hardness) * returnCount, 2), x, y, valid);
|
|
||||||
|
if(returnItem != null){
|
||||||
|
drawPlaceText(Core.bundle.formatFloat("bar.drillspeed", 60f / (drillTime + hardnessDrillMultiplier * returnItem.hardness) * returnCount, 2), x, y, valid);
|
||||||
|
|
||||||
|
float dx = x * tilesize + offset() - 31f, dy = y * tilesize + offset() + size * tilesize / 2f + 5;
|
||||||
|
Draw.mixcol(Color.DARK_GRAY, 1f);
|
||||||
|
Draw.rect(returnItem.icon(Item.Icon.large), dx, dy - 1);
|
||||||
|
Draw.reset();
|
||||||
|
Draw.rect(returnItem.icon(Item.Icon.large), dx, dy);
|
||||||
|
}else{
|
||||||
|
Tile to = tile.getLinkedTilesAs(this, tempTiles).find(t -> t.drop() != null && t.drop().hardness > tier);
|
||||||
|
Item item = to == null ? null : to.drop();
|
||||||
|
if(item != null){
|
||||||
|
drawPlaceText(Core.bundle.get("blocks.drilltierreq"), x, y, valid);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -171,6 +181,9 @@ public class Drill extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
void countOre(Tile tile){
|
void countOre(Tile tile){
|
||||||
|
returnItem = null;
|
||||||
|
returnCount = 0;
|
||||||
|
|
||||||
oreCount.clear();
|
oreCount.clear();
|
||||||
itemArray.clear();
|
itemArray.clear();
|
||||||
|
|
||||||
@@ -204,6 +217,7 @@ public class Drill extends Block{
|
|||||||
|
|
||||||
if(entity.dominantItem == null){
|
if(entity.dominantItem == null){
|
||||||
countOre(tile);
|
countOre(tile);
|
||||||
|
if(returnItem == null) return;
|
||||||
entity.dominantItem = returnItem;
|
entity.dominantItem = returnItem;
|
||||||
entity.dominantItems = returnCount;
|
entity.dominantItems = returnCount;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ task dist(type: Jar, dependsOn: classes){
|
|||||||
def target = getTarget()
|
def target = getTarget()
|
||||||
if(target.contains("windows")){
|
if(target.contains("windows")){
|
||||||
def prefix = target.contains("32") ? "64" : ""
|
def prefix = target.contains("32") ? "64" : ""
|
||||||
exclude('**.so', "**.dylib", "sdl-arc${prefix}.dll", "gdx${prefix}.dll", "gdx-freetype${prefix}.dll")
|
exclude('**.so', "**.dylib", "sdl-arc${prefix}.dll", "gdx${prefix}.dll", "gdx-freetype${prefix}.dll", "**/music/**", "**/sounds/**")
|
||||||
}
|
}
|
||||||
if(target == "mac") exclude('**.so', "**.dll")
|
if(target == "mac") exclude('**.so', "**.dll")
|
||||||
if(target == "linux") exclude('**.dll', "**.dylib")
|
if(target == "linux") exclude('**.dll', "**.dylib")
|
||||||
@@ -81,6 +81,16 @@ task ikdist{
|
|||||||
into file(folder)
|
into file(folder)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
copy{
|
||||||
|
from files("../core/assets/music")
|
||||||
|
into file(folder + "/music")
|
||||||
|
}
|
||||||
|
|
||||||
|
copy{
|
||||||
|
from files("../core/assets/sounds")
|
||||||
|
into file(folder + "/sounds")
|
||||||
|
}
|
||||||
|
|
||||||
copy{
|
copy{
|
||||||
from(getTarget().contains("32") ? "$IKVM_DIR/libraries_32" : "$IKVM_DIR/libraries")
|
from(getTarget().contains("32") ? "$IKVM_DIR/libraries_32" : "$IKVM_DIR/libraries")
|
||||||
into folder
|
into folder
|
||||||
|
|||||||
Reference in New Issue
Block a user