Save last github mod imported
This commit is contained in:
@@ -93,7 +93,9 @@ public class ModsDialog extends BaseDialog{
|
||||
t.button("$mod.import.github", Icon.github, bstyle, () -> {
|
||||
dialog.hide();
|
||||
|
||||
ui.showTextInput("$mod.import.github", "", 64, "Anuken/ExampleMod", text -> {
|
||||
ui.showTextInput("$mod.import.github", "", 64, Core.settings.getString("lastmod", "Anuken/ExampleMod"), text -> {
|
||||
Core.settings.put("lastmod", text);
|
||||
|
||||
ui.loadfrag.show();
|
||||
Core.net.httpGet("http://api.github.com/repos/" + text + "/zipball/master", loc -> {
|
||||
Core.net.httpGet(loc.getHeader("Location"), result -> {
|
||||
|
||||
@@ -118,7 +118,7 @@ public class PayloadConveyor extends Block{
|
||||
|
||||
@Override
|
||||
public void draw(){
|
||||
drawBottom();
|
||||
super.draw();
|
||||
|
||||
float dst = 0.8f;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package mindustry.world.blocks.distribution;
|
||||
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
import arc.util.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.entities.units.*;
|
||||
@@ -24,6 +25,13 @@ public class PayloadRouter extends PayloadConveyor{
|
||||
}
|
||||
|
||||
public class PayloadRouterEntity extends PayloadConveyorEntity{
|
||||
public float smoothRot;
|
||||
|
||||
@Override
|
||||
public void add(){
|
||||
super.add();
|
||||
smoothRot = rotdeg();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void moved(){
|
||||
@@ -35,12 +43,29 @@ public class PayloadRouter extends PayloadConveyor{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(){
|
||||
super.draw();
|
||||
public void updateTile(){
|
||||
super.updateTile();
|
||||
|
||||
Draw.z(Layer.block);
|
||||
smoothRot = Mathf.slerpDelta(smoothRot, rotdeg(), 0.2f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(){
|
||||
Draw.rect(region, x, y);
|
||||
|
||||
float dst = 0.8f;
|
||||
|
||||
Draw.mixcol(Pal.accent, Math.max((dst - (Math.abs(fract() - 0.5f) * 2)) / dst, 0));
|
||||
Draw.rect(topRegion, x, y, smoothRot);
|
||||
Draw.reset();
|
||||
|
||||
Draw.rect(overRegion, x, y);
|
||||
|
||||
Draw.z(Layer.blockOver);
|
||||
|
||||
if(item != null){
|
||||
item.draw();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user