Fixed attribute check with placeableLiquid blocks
This commit is contained in:
@@ -72,10 +72,8 @@ public class Fonts{
|
||||
incremental = true;
|
||||
//most people will never see the monospace font, so don't pre-bake anything
|
||||
characters = "\u0000 ";
|
||||
}})).loaded = f -> {
|
||||
Fonts.monospace = f;
|
||||
f.addFallback(Fonts.def);
|
||||
};
|
||||
fallback.add(() -> Fonts.def);
|
||||
}})).loaded = f -> Fonts.monospace = f;
|
||||
|
||||
Core.assets.load("icon", Font.class, new FreeTypeFontLoaderParameter("fonts/icon.ttf", new FreeTypeFontParameter(){{
|
||||
size = 30;
|
||||
@@ -189,7 +187,7 @@ public class Fonts{
|
||||
|
||||
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())){
|
||||
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);
|
||||
if(tile == null) return 0;
|
||||
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){
|
||||
|
||||
@@ -64,4 +64,20 @@ public class Attributes implements JsonSerializable{
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user