Visual tweaks

This commit is contained in:
Anuken
2020-01-14 17:07:39 -05:00
parent 373b842c3d
commit eaa86023f9
14 changed files with 543 additions and 539 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 679 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 749 B

After

Width:  |  Height:  |  Size: 748 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 741 KiB

After

Width:  |  Height:  |  Size: 744 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 KiB

After

Width:  |  Height:  |  Size: 261 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 924 KiB

After

Width:  |  Height:  |  Size: 924 KiB

View File

@@ -624,10 +624,6 @@ public class Blocks implements ContentList{
); );
hasPower = true; hasPower = true;
craftTime = 35f; craftTime = 35f;
spinnerLength = 1.5f;
spinnerRadius = 3.5f;
spinnerThickness = 1.5f;
spinnerSpeed = 3f;
size = 2; size = 2;
consumes.power(1f); consumes.power(1f);

View File

@@ -242,6 +242,10 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
return tile == null ? (Floor)Blocks.air : tile.floor(); return tile == null ? (Floor)Blocks.air : tile.floor();
} }
public @Nullable Tile tileOn(){
return world.tileWorld(x, y);
}
public void onRespawn(Tile tile){ public void onRespawn(Tile tile){
} }

View File

@@ -27,7 +27,7 @@ public class ItemImage extends Stack{
if(stack.amount != 0){ if(stack.amount != 0){
Table t = new Table().left().bottom(); Table t = new Table().left().bottom();
t.add(stack.amount + "").name("item-label"); t.add(stack.amount + "").name("item-label").style(Styles.outlineLabel);
add(t); add(t);
} }
} }

View File

@@ -24,13 +24,13 @@ public class LiquidDisplay extends Table{
if(amount != 0){ if(amount != 0){
Table t = new Table().left().bottom(); Table t = new Table().left().bottom();
t.add(Strings.autoFixed(amount, 1)); t.add(Strings.autoFixed(amount, 1)).style(Styles.outlineLabel);
add(t); add(t);
} }
}}).size(8 * 4).padRight(3 + (amount != 0 && Strings.autoFixed(amount, 1).length() > 2 ? 8 : 0)); }}).size(8 * 4).padRight(3 + (amount != 0 && Strings.autoFixed(amount, 1).length() > 2 ? 8 : 0));
if(perSecond){ if(perSecond){
add(StatUnit.perSecond.localized()).padLeft(2).padRight(5).color(Color.lightGray); add(StatUnit.perSecond.localized()).padLeft(2).padRight(5).color(Color.lightGray).style(Styles.outlineLabel);
} }
add(liquid.localizedName); add(liquid.localizedName);

View File

@@ -53,7 +53,7 @@ public class ScriptConsoleFragment extends Table{
clearChatInput(); clearChatInput();
} }
return shown && Vars.net.active(); return shown && !Vars.net.active();
}); });
update(() -> { update(() -> {

View File

@@ -1,6 +1,6 @@
package mindustry.world.blocks.production; package mindustry.world.blocks.production;
import arc.graphics.*; import arc.*;
import arc.graphics.g2d.*; import arc.graphics.g2d.*;
import arc.math.*; import arc.math.*;
import arc.util.ArcAnnotate.*; import arc.util.ArcAnnotate.*;
@@ -15,15 +15,11 @@ import mindustry.world.meta.values.*;
* Extracts a random list of items from an input item and an input liquid. * Extracts a random list of items from an input item and an input liquid.
*/ */
public class Separator extends Block{ public class Separator extends Block{
protected @NonNull ItemStack[] results; public @NonNull ItemStack[] results;
protected float craftTime; public float craftTime;
protected float spinnerRadius = 2.5f;
protected float spinnerLength = 1f;
protected float spinnerThickness = 1f;
protected float spinnerSpeed = 2f;
protected Color color = Color.valueOf("858585"); public int liquidRegion, spinnerRegion;
protected int liquidRegion; public float spinnerSpeed = 3f;
public Separator(String name){ public Separator(String name){
super(name); super(name);
@@ -33,6 +29,7 @@ public class Separator extends Block{
hasLiquids = true; hasLiquids = true;
liquidRegion = reg("-liquid"); liquidRegion = reg("-liquid");
spinnerRegion = reg("-spinner");
entityType = GenericCrafterEntity::new; entityType = GenericCrafterEntity::new;
} }
@@ -70,10 +67,10 @@ public class Separator extends Block{
Draw.alpha(tile.entity.liquids.total() / liquidCapacity); Draw.alpha(tile.entity.liquids.total() / liquidCapacity);
Draw.rect(reg(liquidRegion), tile.drawx(), tile.drawy()); Draw.rect(reg(liquidRegion), tile.drawx(), tile.drawy());
Draw.color(color);
Lines.stroke(spinnerThickness);
Lines.spikes(tile.drawx(), tile.drawy(), spinnerRadius, spinnerLength, 3, entity.totalProgress * spinnerSpeed);
Draw.reset(); Draw.reset();
if(Core.atlas.isFound(reg(spinnerRegion))){
Draw.rect(reg(spinnerRegion), tile.drawx(), tile.drawy(), entity.totalProgress * spinnerSpeed);
}
} }
@Override @Override