Merge
This commit is contained in:
@@ -1,17 +1,15 @@
|
||||
package mindustry.world;
|
||||
|
||||
import mindustry.annotations.Annotations.Loc;
|
||||
import mindustry.annotations.Annotations.Remote;
|
||||
import arc.Core;
|
||||
import arc.Events;
|
||||
import arc.math.Mathf;
|
||||
import arc.*;
|
||||
import arc.math.*;
|
||||
import arc.math.geom.*;
|
||||
import mindustry.content.Blocks;
|
||||
import mindustry.entities.Units;
|
||||
import mindustry.game.EventType.BlockBuildBeginEvent;
|
||||
import mindustry.game.Team;
|
||||
import mindustry.world.blocks.BuildBlock;
|
||||
import mindustry.world.blocks.BuildBlock.BuildEntity;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.game.EventType.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.world.blocks.*;
|
||||
import mindustry.world.blocks.BuildBlock.*;
|
||||
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ public class MessageBlock extends Block{
|
||||
public void buildConfiguration(Tile tile, Table table){
|
||||
MessageBlockEntity entity = tile.ent();
|
||||
|
||||
table.addImageButton(Icon.pencilSmall, () -> {
|
||||
table.addImageButton(Icon.pencil, () -> {
|
||||
if(mobile){
|
||||
Core.input.getTextInput(new TextInput(){{
|
||||
text = entity.message;
|
||||
|
||||
@@ -52,7 +52,7 @@ public class LightBlock extends Block{
|
||||
public void buildConfiguration(Tile tile, Table table){
|
||||
LightEntity entity = tile.ent();
|
||||
|
||||
table.addImageButton(Icon.pencilSmall, () -> {
|
||||
table.addImageButton(Icon.pencil, () -> {
|
||||
ui.picker.show(Tmp.c1.set(entity.color).a(0.5f), false, res -> {
|
||||
entity.color = res.rgba();
|
||||
lastColor = entity.color;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -66,7 +66,7 @@ public class CommandCenter extends Block{
|
||||
super.load();
|
||||
|
||||
for(UnitCommand cmd : UnitCommand.all){
|
||||
commandRegions[cmd.ordinal()] = Core.atlas.find("icon-command-" + cmd.name() + "-small");
|
||||
commandRegions[cmd.ordinal()] = Core.atlas.find("Icon.command-" + cmd.name() + "-");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ public class CommandCenter extends Block{
|
||||
Table buttons = new Table();
|
||||
|
||||
for(UnitCommand cmd : UnitCommand.all){
|
||||
buttons.addImageButton(Core.atlas.drawable("icon-command-" + cmd.name() + "-small"), Styles.clearToggleTransi, () -> tile.configure(cmd.ordinal()))
|
||||
buttons.addImageButton(Core.atlas.drawable("Icon.command-" + cmd.name() + "-"), Styles.clearToggleTransi, () -> tile.configure(cmd.ordinal()))
|
||||
.size(44).group(group).update(b -> b.setChecked(entity.command == cmd));
|
||||
}
|
||||
table.add(buttons);
|
||||
|
||||
Reference in New Issue
Block a user