Visual tweaks
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 179 B |
BIN
core/assets-raw/sprites/blocks/production/separator-spinner.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 679 B |
Before Width: | Height: | Size: 749 B After Width: | Height: | Size: 748 B |
Before Width: | Height: | Size: 741 KiB After Width: | Height: | Size: 744 KiB |
Before Width: | Height: | Size: 261 KiB After Width: | Height: | Size: 261 KiB |
Before Width: | Height: | Size: 924 KiB After Width: | Height: | Size: 924 KiB |
@ -624,10 +624,6 @@ public class Blocks implements ContentList{
|
||||
);
|
||||
hasPower = true;
|
||||
craftTime = 35f;
|
||||
spinnerLength = 1.5f;
|
||||
spinnerRadius = 3.5f;
|
||||
spinnerThickness = 1.5f;
|
||||
spinnerSpeed = 3f;
|
||||
size = 2;
|
||||
|
||||
consumes.power(1f);
|
||||
|
@ -242,6 +242,10 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
|
||||
return tile == null ? (Floor)Blocks.air : tile.floor();
|
||||
}
|
||||
|
||||
public @Nullable Tile tileOn(){
|
||||
return world.tileWorld(x, y);
|
||||
}
|
||||
|
||||
public void onRespawn(Tile tile){
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ public class ItemImage extends Stack{
|
||||
|
||||
if(stack.amount != 0){
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -24,13 +24,13 @@ public class LiquidDisplay extends Table{
|
||||
|
||||
if(amount != 0){
|
||||
Table t = new Table().left().bottom();
|
||||
t.add(Strings.autoFixed(amount, 1));
|
||||
t.add(Strings.autoFixed(amount, 1)).style(Styles.outlineLabel);
|
||||
add(t);
|
||||
}
|
||||
}}).size(8 * 4).padRight(3 + (amount != 0 && Strings.autoFixed(amount, 1).length() > 2 ? 8 : 0));
|
||||
|
||||
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);
|
||||
|
@ -53,7 +53,7 @@ public class ScriptConsoleFragment extends Table{
|
||||
clearChatInput();
|
||||
}
|
||||
|
||||
return shown && Vars.net.active();
|
||||
return shown && !Vars.net.active();
|
||||
});
|
||||
|
||||
update(() -> {
|
||||
|
@ -1,6 +1,6 @@
|
||||
package mindustry.world.blocks.production;
|
||||
|
||||
import arc.graphics.*;
|
||||
import arc.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
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.
|
||||
*/
|
||||
public class Separator extends Block{
|
||||
protected @NonNull ItemStack[] results;
|
||||
protected float craftTime;
|
||||
protected float spinnerRadius = 2.5f;
|
||||
protected float spinnerLength = 1f;
|
||||
protected float spinnerThickness = 1f;
|
||||
protected float spinnerSpeed = 2f;
|
||||
public @NonNull ItemStack[] results;
|
||||
public float craftTime;
|
||||
|
||||
protected Color color = Color.valueOf("858585");
|
||||
protected int liquidRegion;
|
||||
public int liquidRegion, spinnerRegion;
|
||||
public float spinnerSpeed = 3f;
|
||||
|
||||
public Separator(String name){
|
||||
super(name);
|
||||
@ -33,6 +29,7 @@ public class Separator extends Block{
|
||||
hasLiquids = true;
|
||||
|
||||
liquidRegion = reg("-liquid");
|
||||
spinnerRegion = reg("-spinner");
|
||||
entityType = GenericCrafterEntity::new;
|
||||
}
|
||||
|
||||
@ -70,10 +67,10 @@ public class Separator extends Block{
|
||||
Draw.alpha(tile.entity.liquids.total() / liquidCapacity);
|
||||
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();
|
||||
if(Core.atlas.isFound(reg(spinnerRegion))){
|
||||
Draw.rect(reg(spinnerRegion), tile.drawx(), tile.drawy(), entity.totalProgress * spinnerSpeed);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|