Cleanup
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
package mindustry.world.blocks.production;
|
||||
|
||||
import arc.util.ArcAnnotate.*;
|
||||
import arc.util.io.*;
|
||||
import mindustry.*;
|
||||
import mindustry.ctype.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.world.*;
|
||||
|
||||
public class ResearchBlock extends Block{
|
||||
|
||||
public ResearchBlock(String name){
|
||||
super(name);
|
||||
|
||||
update = true;
|
||||
solid = true;
|
||||
hasPower = true;
|
||||
hasItems = true;
|
||||
}
|
||||
|
||||
public class ResearchBlockEntity extends TileEntity{
|
||||
public @Nullable UnlockableContent researching;
|
||||
|
||||
@Override
|
||||
public void updateTile(){
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(Writes write){
|
||||
super.write(write);
|
||||
|
||||
if(researching != null){
|
||||
write.b(researching.getContentType().ordinal());
|
||||
write.s(researching.id);
|
||||
}else{
|
||||
write.b(-1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(Reads read, byte revision){
|
||||
super.read(read, revision);
|
||||
|
||||
byte type = read.b();
|
||||
if(type != -1){
|
||||
researching = Vars.content.getByID(ContentType.all[type], read.s());
|
||||
}else{
|
||||
researching = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -98,7 +98,7 @@ public class MessageBlock extends Block{
|
||||
accepted = str -> configure(str);
|
||||
}});
|
||||
}else{
|
||||
FloatingDialog dialog = new FloatingDialog("$editmessage");
|
||||
BaseDialog dialog = new BaseDialog("$editmessage");
|
||||
dialog.setFillParent(false);
|
||||
TextArea a = dialog.cont.add(new TextArea(message.replace("\n", "\r"))).size(380f, 160f).get();
|
||||
a.setFilter((textField, c) -> {
|
||||
|
||||
Reference in New Issue
Block a user