Merge
This commit is contained in:
@@ -33,6 +33,8 @@ public abstract class ClientLauncher extends ApplicationCore implements Platform
|
||||
|
||||
@Override
|
||||
public void setup(){
|
||||
Events.fire(new ClientCreateEvent());
|
||||
|
||||
Vars.loadLogger();
|
||||
Vars.loadFileLogger();
|
||||
Vars.platform = this;
|
||||
|
||||
@@ -207,7 +207,7 @@ public class Renderer implements ApplicationListener{
|
||||
Groups.drawFlying();
|
||||
|
||||
Draw.flush();
|
||||
if(bloom != null && !pixelator.enabled()){
|
||||
if(bloom != null){
|
||||
bloom.capture();
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ public class Renderer implements ApplicationListener{
|
||||
Groups.drawEffects();
|
||||
|
||||
Draw.flush();
|
||||
if(bloom != null && !pixelator.enabled()){
|
||||
if(bloom != null){
|
||||
bloom.render();
|
||||
}
|
||||
|
||||
@@ -300,11 +300,6 @@ public class Renderer implements ApplicationListener{
|
||||
return;
|
||||
}
|
||||
|
||||
boolean hadShields = Core.settings.getBool("animatedshields");
|
||||
boolean hadWater = Core.settings.getBool("animatedwater");
|
||||
Core.settings.put("animatedwater", false);
|
||||
Core.settings.put("animatedshields", false);
|
||||
|
||||
FrameBuffer buffer = new FrameBuffer(w, h);
|
||||
|
||||
float vpW = camera.width, vpH = camera.height, px = camera.position.x, py = camera.position.y;
|
||||
@@ -336,9 +331,6 @@ public class Renderer implements ApplicationListener{
|
||||
ui.showInfoFade(Core.bundle.format("screenshot", file.toString()));
|
||||
|
||||
buffer.dispose();
|
||||
|
||||
Core.settings.put("animatedwater", hadWater);
|
||||
Core.settings.put("animatedshields", hadShields);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -92,6 +92,10 @@ public class EventType{
|
||||
}
|
||||
}
|
||||
|
||||
public static class ClientCreateEvent{
|
||||
|
||||
}
|
||||
|
||||
/** Called when the client game is first loaded. */
|
||||
public static class ClientLoadEvent{
|
||||
|
||||
|
||||
@@ -98,6 +98,7 @@ public class Teams{
|
||||
|
||||
/** Do not modify. */
|
||||
public Array<TeamData> getActive(){
|
||||
active.removeAll(t -> !t.active());
|
||||
return active;
|
||||
}
|
||||
|
||||
@@ -167,6 +168,14 @@ public class Teams{
|
||||
public CoreEntity core(){
|
||||
return cores.first();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return "TeamData{" +
|
||||
"cores=" + cores +
|
||||
", team=" + team +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
/** Represents a block made by this team that was destroyed somewhere on the map.
|
||||
|
||||
@@ -168,7 +168,6 @@ public class BlockRenderer implements Disposable{
|
||||
shadowEvents.clear();
|
||||
|
||||
Draw.proj(camera.projection());
|
||||
renderer.pixelator.rebind();
|
||||
}
|
||||
|
||||
float ww = world.width() * tilesize, wh = world.height() * tilesize;
|
||||
|
||||
@@ -26,10 +26,6 @@ public class Pixelator implements Disposable{
|
||||
camera.width = (int)camera.width;
|
||||
camera.height = (int)camera.height;
|
||||
|
||||
boolean hadShields = Core.settings.getBool("animatedshields");
|
||||
boolean hadWater = Core.settings.getBool("animatedwater");
|
||||
Core.settings.put("animatedwater", false);
|
||||
Core.settings.put("animatedshields", false);
|
||||
graphics.clear(0f, 0f, 0f, 1f);
|
||||
|
||||
float px = Core.camera.position.x, py = Core.camera.position.y;
|
||||
@@ -56,17 +52,9 @@ public class Pixelator implements Disposable{
|
||||
Groups.drawNames();
|
||||
|
||||
Core.camera.position.set(px, py);
|
||||
Core.settings.put("animatedwater", hadWater);
|
||||
Core.settings.put("animatedshields", hadShields);
|
||||
renderer.setScale(pre);
|
||||
}
|
||||
|
||||
public void rebind(){
|
||||
if(enabled()){
|
||||
buffer.begin();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean enabled(){
|
||||
return Core.settings.getBool("pixelate");
|
||||
}
|
||||
|
||||
@@ -242,6 +242,9 @@ public class JoinDialog extends FloatingDialog{
|
||||
}
|
||||
|
||||
void setup(){
|
||||
local.clear();
|
||||
remote.clear();
|
||||
global.clear();
|
||||
float w = targetWidth();
|
||||
|
||||
hosts.clear();
|
||||
@@ -255,7 +258,6 @@ public class JoinDialog extends FloatingDialog{
|
||||
pane.setScrollingDisabled(true, false);
|
||||
|
||||
setupRemote();
|
||||
refreshRemote();
|
||||
|
||||
cont.clear();
|
||||
cont.table(t -> {
|
||||
|
||||
@@ -263,6 +263,7 @@ public class Conveyor extends Block implements Autotiler{
|
||||
@Override
|
||||
public void handleStack(Item item, int amount, Tile tile, Teamc source){
|
||||
ConveyorEntity e = tile.ent();
|
||||
amount = Math.min(amount, itemCapacity - e.len);
|
||||
|
||||
for(int i = amount - 1; i >= 0; i--){
|
||||
e.add(0);
|
||||
|
||||
@@ -26,6 +26,11 @@ public class OverflowGate extends Block{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int acceptStack(Item item, int amount, Tile tile, Teamc source){
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int removeStack(Tile tile, Item item, int amount){
|
||||
OverflowGateEntity entity = tile.ent();
|
||||
|
||||
@@ -14,7 +14,7 @@ import mindustry.world.meta.*;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
import static mindustry.Vars.content;
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
public class Sorter extends Block{
|
||||
private static Item lastItem;
|
||||
@@ -46,6 +46,9 @@ public class Sorter extends Block{
|
||||
@Override
|
||||
public void configured(Tile tile, Playerc player, int value){
|
||||
tile.<SorterEntity>ent().sortItem = content.item(value);
|
||||
if(!headless){
|
||||
renderer.minimap.update(tile);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user