Fixed web version bugs
This commit is contained in:
@@ -27,7 +27,7 @@ allprojects {
|
|||||||
gdxVersion = '1.9.8'
|
gdxVersion = '1.9.8'
|
||||||
roboVMVersion = '2.3.0'
|
roboVMVersion = '2.3.0'
|
||||||
aiVersion = '1.8.1'
|
aiVersion = '1.8.1'
|
||||||
uCoreVersion = '05f51b183e'
|
uCoreVersion = 'c502931313'
|
||||||
|
|
||||||
getVersionString = {
|
getVersionString = {
|
||||||
String buildVersion = getBuildVersion()
|
String buildVersion = getBuildVersion()
|
||||||
|
|||||||
@@ -121,7 +121,6 @@ public class MinimapRenderer implements Disposable{
|
|||||||
int color = colorFor(world.tile(tile.x, tile.y));
|
int color = colorFor(world.tile(tile.x, tile.y));
|
||||||
pixmap.drawPixel(tile.x, pixmap.getHeight() - 1 - tile.y, color);
|
pixmap.drawPixel(tile.x, pixmap.getHeight() - 1 - tile.y, color);
|
||||||
|
|
||||||
texture.bind();
|
|
||||||
Pixmaps.drawPixel(texture, tile.x, pixmap.getHeight() - 1 - tile.y, color);
|
Pixmaps.drawPixel(texture, tile.x, pixmap.getHeight() - 1 - tile.y, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ public class Maps implements Disposable{
|
|||||||
|
|
||||||
for(String name : customMapNames){
|
for(String name : customMapNames){
|
||||||
try{
|
try{
|
||||||
String data = Settings.getString("map-data-" + name);
|
String data = Settings.getString("map-data-" + name, "");
|
||||||
byte[] bytes = Base64Coder.decode(data);
|
byte[] bytes = Base64Coder.decode(data);
|
||||||
loadMap(name, () -> new ByteArrayInputStream(bytes), true);
|
loadMap(name, () -> new ByteArrayInputStream(bytes), true);
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
@@ -182,7 +182,7 @@ public class Maps implements Disposable{
|
|||||||
if(!gwt){
|
if(!gwt){
|
||||||
return customMapDirectory.child(name + "." + mapExtension)::read;
|
return customMapDirectory.child(name + "." + mapExtension)::read;
|
||||||
}else{
|
}else{
|
||||||
String data = Settings.getString("map-data-" + name);
|
String data = Settings.getString("map-data-" + name, "");
|
||||||
byte[] bytes = Base64Coder.decode(data);
|
byte[] bytes = Base64Coder.decode(data);
|
||||||
return () -> new ByteArrayInputStream(bytes);
|
return () -> new ByteArrayInputStream(bytes);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class BuildBlock extends Block {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setBars(){
|
public void setBars(){
|
||||||
bars.replace(new BlockBar(BarType.health, true, tile -> (float)tile.<BuildEntity>entity().progress));
|
bars.replace(new BlockBar(BarType.health, true, tile -> tile.<BuildEntity>entity().progress));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -218,6 +218,16 @@ public class HtmlLauncher extends GwtApplication {
|
|||||||
public InputStream read() {
|
public InputStream read() {
|
||||||
return stream;
|
return stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String nameWithoutExtension() {
|
||||||
|
return "unknown";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String name() {
|
||||||
|
return "unknown";
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user