Fixed attribute check with placeableLiquid blocks
This commit is contained in:
@@ -72,10 +72,8 @@ public class Fonts{
|
|||||||
incremental = true;
|
incremental = true;
|
||||||
//most people will never see the monospace font, so don't pre-bake anything
|
//most people will never see the monospace font, so don't pre-bake anything
|
||||||
characters = "\u0000 ";
|
characters = "\u0000 ";
|
||||||
}})).loaded = f -> {
|
fallback.add(() -> Fonts.def);
|
||||||
Fonts.monospace = f;
|
}})).loaded = f -> Fonts.monospace = f;
|
||||||
f.addFallback(Fonts.def);
|
|
||||||
};
|
|
||||||
|
|
||||||
Core.assets.load("icon", Font.class, new FreeTypeFontLoaderParameter("fonts/icon.ttf", new FreeTypeFontParameter(){{
|
Core.assets.load("icon", Font.class, new FreeTypeFontLoaderParameter("fonts/icon.ttf", new FreeTypeFontParameter(){{
|
||||||
size = 30;
|
size = 30;
|
||||||
@@ -189,7 +187,7 @@ public class Fonts{
|
|||||||
|
|
||||||
stringIcons.put("alphachan", stringIcons.get("alphaaaa"));
|
stringIcons.put("alphachan", stringIcons.get("alphaaaa"));
|
||||||
|
|
||||||
//TODO: mod emojis can't work because most mod icons are not on the UI page!
|
//TODO: mod emojis can't work because most mod icons are not on the UI page!
|
||||||
/*
|
/*
|
||||||
if(Vars.mods.list().contains(m -> m.shouldBeEnabled())){
|
if(Vars.mods.list().contains(m -> m.shouldBeEnabled())){
|
||||||
ContentType[] types = {ContentType.liquid, ContentType.item, ContentType.block, ContentType.status, ContentType.unit};
|
ContentType[] types = {ContentType.liquid, ContentType.item, ContentType.block, ContentType.status, ContentType.unit};
|
||||||
|
|||||||
@@ -553,7 +553,7 @@ public class Block extends UnlockableContent implements Senseable{
|
|||||||
Tile tile = world.tile(x, y);
|
Tile tile = world.tile(x, y);
|
||||||
if(tile == null) return 0;
|
if(tile == null) return 0;
|
||||||
return tile.getLinkedTilesAs(this, tempTiles)
|
return tile.getLinkedTilesAs(this, tempTiles)
|
||||||
.sumf(other -> !floating && other.floor().isDeep() ? 0 : other.floor().attributes.get(attr));
|
.sumf(other -> !floating && !placeableLiquid && other.floor().isDeep() ? 0 : other.floor().attributes.get(attr));
|
||||||
}
|
}
|
||||||
|
|
||||||
public TextureRegion getDisplayIcon(Tile tile){
|
public TextureRegion getDisplayIcon(Tile tile){
|
||||||
|
|||||||
@@ -64,4 +64,20 @@ public class Attributes implements JsonSerializable{
|
|||||||
System.arraycopy(last, 0, arr, 0, Math.min(last.length, arr.length));
|
System.arraycopy(last, 0, arr, 0, Math.min(last.length, arr.length));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString(){
|
||||||
|
StringBuilder res = new StringBuilder();
|
||||||
|
res.append("Attributes{");
|
||||||
|
boolean any = false;
|
||||||
|
for(int i = 0; i < arr.length; i++){
|
||||||
|
if(arr[i] != 0){
|
||||||
|
res.append(Attribute.all[i]).append(": ").append(arr[i]).append(", ");
|
||||||
|
any = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(any) res.setLength(res.length() - 2);
|
||||||
|
res.append("}");
|
||||||
|
return res.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,4 +26,4 @@ org.gradle.caching=true
|
|||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
android.enableR8.fullMode=false
|
android.enableR8.fullMode=false
|
||||||
archash=cd9b89ef19
|
archash=8716bc86c1
|
||||||
|
|||||||
Reference in New Issue
Block a user