mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-13 12:16:53 +07:00
Bugfixes / Sprite tweak
This commit is contained in:
parent
526a61381d
commit
966efa0669
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
@ -258,7 +258,7 @@ public class TechTree implements ContentList{
|
|||||||
private TechNode node(Block block, Runnable children){
|
private TechNode node(Block block, Runnable children){
|
||||||
ItemStack[] requirements = new ItemStack[block.buildRequirements.length];
|
ItemStack[] requirements = new ItemStack[block.buildRequirements.length];
|
||||||
for(int i = 0; i < requirements.length; i++){
|
for(int i = 0; i < requirements.length; i++){
|
||||||
requirements[i] = new ItemStack(block.buildRequirements[i].item, block.buildRequirements[i].amount * 35);
|
requirements[i] = new ItemStack(block.buildRequirements[i].item, block.buildRequirements[i].amount * 30);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new TechNode(block, requirements, children);
|
return new TechNode(block, requirements, children);
|
||||||
|
@ -195,7 +195,7 @@ public class TileEntity extends BaseEntity implements TargetTrait, HealthTrait{
|
|||||||
|
|
||||||
if(other == null) continue;
|
if(other == null) continue;
|
||||||
other = other.target();
|
other = other.target();
|
||||||
if(other.entity == null || other.getTeamID() != tile.getTeamID()) continue;
|
if(other.entity == null || !(other.interactable(tile.getTeam()))) continue;
|
||||||
|
|
||||||
other.block().onProximityUpdate(other);
|
other.block().onProximityUpdate(other);
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ public class HudFragment extends Fragment{
|
|||||||
private Table lastUnlockTable;
|
private Table lastUnlockTable;
|
||||||
private Table lastUnlockLayout;
|
private Table lastUnlockLayout;
|
||||||
private boolean shown = true;
|
private boolean shown = true;
|
||||||
private float dsize = 58;
|
private float dsize = 59;
|
||||||
private float isize = 40;
|
private float isize = 40;
|
||||||
|
|
||||||
private float coreAttackTime;
|
private float coreAttackTime;
|
||||||
@ -58,7 +58,7 @@ public class HudFragment extends Fragment{
|
|||||||
select.left();
|
select.left();
|
||||||
select.defaults().size(dsize).left();
|
select.defaults().size(dsize).left();
|
||||||
|
|
||||||
ImageButton menu = select.addImageButton("icon-menu", "clear", isize, ui.paused::show).get();
|
select.addImageButton("icon-menu", "clear", isize, ui.paused::show);
|
||||||
flip = select.addImageButton("icon-arrow-up", "clear", isize, this::toggleMenus).get();
|
flip = select.addImageButton("icon-arrow-up", "clear", isize, this::toggleMenus).get();
|
||||||
|
|
||||||
select.addImageButton("icon-pause", "clear", isize, () -> {
|
select.addImageButton("icon-pause", "clear", isize, () -> {
|
||||||
@ -96,11 +96,11 @@ public class HudFragment extends Fragment{
|
|||||||
}
|
}
|
||||||
}).get();
|
}).get();
|
||||||
|
|
||||||
select.addImage("blank").color(Pal.accent).width(6f).fillY();
|
select.addImage("blank").color(Pal.accent).width(3f).fillY();
|
||||||
});
|
}).left();
|
||||||
|
|
||||||
cont.row();
|
cont.row();
|
||||||
cont.addImage("blank").height(6f).color(Pal.accent).fillX();
|
cont.addImage("blank").height(3f).color(Pal.accent).fillX();
|
||||||
cont.row();
|
cont.row();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ public class HudFragment extends Fragment{
|
|||||||
|
|
||||||
addWaveTable(waves);
|
addWaveTable(waves);
|
||||||
addPlayButton(btable);
|
addPlayButton(btable);
|
||||||
stuff.add(stack).width(dsize * 4 + 6f);
|
stuff.add(stack).width(dsize * 4 + 3f);
|
||||||
stuff.row();
|
stuff.row();
|
||||||
stuff.table("button", t -> t.margin(10f).add(new Bar("boss.health", Pal.health, () -> state.boss() == null ? 0f : state.boss().healthf()).blink(Color.WHITE))
|
stuff.table("button", t -> t.margin(10f).add(new Bar("boss.health", Pal.health, () -> state.boss() == null ? 0f : state.boss().healthf()).blink(Color.WHITE))
|
||||||
.grow()).fillX().visible(() -> world.isZone() && state.boss() != null).height(60f).get();
|
.grow()).fillX().visible(() -> world.isZone() && state.boss() != null).height(60f).get();
|
||||||
@ -147,9 +147,7 @@ public class HudFragment extends Fragment{
|
|||||||
t.table("flat", c -> c.add("$nearpoint")
|
t.table("flat", c -> c.add("$nearpoint")
|
||||||
.update(l -> l.setColor(Tmp.c1.set(Color.WHITE).lerp(Color.SCARLET, Mathf.absin(Time.time(), 10f, 1f))))
|
.update(l -> l.setColor(Tmp.c1.set(Color.WHITE).lerp(Color.SCARLET, Mathf.absin(Time.time(), 10f, 1f))))
|
||||||
.get().setAlignment(Align.center, Align.center))
|
.get().setAlignment(Align.center, Align.center))
|
||||||
.margin(6).update(u -> {
|
.margin(6).update(u -> u.color.a = Mathf.lerpDelta(u.color.a, Mathf.num(world.spawner.playerNear()), 0.1f)).get().color.a = 0f;
|
||||||
u.color.a = Mathf.lerpDelta(u.color.a, Mathf.num(world.spawner.playerNear()), 0.1f);
|
|
||||||
}).get().color.a = 0f;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//out of bounds warning
|
//out of bounds warning
|
||||||
|
@ -40,7 +40,7 @@ public class PowerGenerator extends PowerDistributor{
|
|||||||
if(hasPower && outputsPower && !consumes.has(ConsumePower.class)){
|
if(hasPower && outputsPower && !consumes.has(ConsumePower.class)){
|
||||||
bars.add("power", entity -> new Bar(() ->
|
bars.add("power", entity -> new Bar(() ->
|
||||||
Core.bundle.format("blocks.poweroutput",
|
Core.bundle.format("blocks.poweroutput",
|
||||||
Strings.toFixed(entity.tile.block().getPowerProduction(entity.tile)*60, 1)),
|
Strings.toFixed(entity.tile.block().getPowerProduction(entity.tile)*60 * entity.timeScale, 1)),
|
||||||
() -> Pal.powerBar,
|
() -> Pal.powerBar,
|
||||||
() -> ((GeneratorEntity)entity).productionEfficiency));
|
() -> ((GeneratorEntity)entity).productionEfficiency));
|
||||||
}
|
}
|
||||||
|
@ -167,6 +167,9 @@ public class Drill extends Block{
|
|||||||
public void update(Tile tile){
|
public void update(Tile tile){
|
||||||
DrillEntity entity = tile.entity();
|
DrillEntity entity = tile.entity();
|
||||||
|
|
||||||
|
if(Float.isNaN(entity.drillTime)) entity.drillTime = 0f;
|
||||||
|
if(Float.isNaN(entity.warmup)) entity.warmup = 0f;
|
||||||
|
|
||||||
if(entity.dominantItem == null){
|
if(entity.dominantItem == null){
|
||||||
oreCount.clear();
|
oreCount.clear();
|
||||||
itemArray.clear();
|
itemArray.clear();
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
package io.anuke.mindustry.world.blocks.storage;
|
package io.anuke.mindustry.world.blocks.storage;
|
||||||
|
|
||||||
import io.anuke.arc.Core;
|
|
||||||
import io.anuke.arc.graphics.Color;
|
|
||||||
import io.anuke.annotations.Annotations.Loc;
|
import io.anuke.annotations.Annotations.Loc;
|
||||||
import io.anuke.annotations.Annotations.Remote;
|
import io.anuke.annotations.Annotations.Remote;
|
||||||
|
import io.anuke.arc.Core;
|
||||||
|
import io.anuke.arc.graphics.Color;
|
||||||
|
import io.anuke.arc.graphics.g2d.Draw;
|
||||||
|
import io.anuke.arc.scene.ui.layout.Table;
|
||||||
import io.anuke.mindustry.entities.type.Player;
|
import io.anuke.mindustry.entities.type.Player;
|
||||||
import io.anuke.mindustry.entities.type.TileEntity;
|
import io.anuke.mindustry.entities.type.TileEntity;
|
||||||
import io.anuke.mindustry.gen.Call;
|
import io.anuke.mindustry.gen.Call;
|
||||||
@ -11,8 +13,6 @@ import io.anuke.mindustry.type.Item;
|
|||||||
import io.anuke.mindustry.world.Block;
|
import io.anuke.mindustry.world.Block;
|
||||||
import io.anuke.mindustry.world.Tile;
|
import io.anuke.mindustry.world.Tile;
|
||||||
import io.anuke.mindustry.world.blocks.SelectionTrait;
|
import io.anuke.mindustry.world.blocks.SelectionTrait;
|
||||||
import io.anuke.arc.graphics.g2d.Draw;
|
|
||||||
import io.anuke.arc.scene.ui.layout.Table;
|
|
||||||
|
|
||||||
import java.io.DataInput;
|
import java.io.DataInput;
|
||||||
import java.io.DataOutput;
|
import java.io.DataOutput;
|
||||||
|
Loading…
Reference in New Issue
Block a user