Customizable edge stencil / Reduced redundant sprites

This commit is contained in:
Anuken
2019-01-28 23:30:11 -05:00
parent 54bade668e
commit 76af3e3077
19 changed files with 1874 additions and 2286 deletions

View File

@@ -165,6 +165,10 @@ public class Blocks implements ContentList{
playerUnmineable = true;
}};
iceSnow = new Floor("ice-snow"){{
variants = 3;
}};
ice = new Floor("ice"){{
dragMultiplier = 0.2f;
speedMultiplier = 0.4f;
@@ -173,6 +177,7 @@ public class Blocks implements ContentList{
holostone = new Floor("holostone"){{
hasOres = true;
edgeStyle = "blocky";
}};
snow = new Floor("snow"){{
@@ -212,10 +217,6 @@ public class Blocks implements ContentList{
variants = 3;
}};
iceSnow = new Floor("iceSnow"){{
variants = 3;
}};
//endregion
//region crafting

View File

@@ -486,7 +486,7 @@ public class Block extends BlockStorage{
public TextureRegion icon(Icon icon){
if(icons[icon.ordinal()] == null){
icons[icon.ordinal()] = Core.atlas.find(name + "-icon-" + icon.name());
icons[icon.ordinal()] = Core.atlas.find(name + "-icon-" + icon.name(), icon == Icon.full ? getGeneratedIcons()[0] : Core.atlas.find("__error"));
}
return icons[icon.ordinal()];
}

View File

@@ -53,6 +53,8 @@ public class Floor extends Block{
public float heat = 0f;
/** if true, this block cannot be mined by players. useful for annoying things like sand. */
public boolean playerUnmineable = false;
/**Style of the edge stencil. Loaded by looking up "edge-stencil-{name}".*/
public String edgeStyle = "smooth";
protected TextureRegion[][] edges;
protected byte eq = 0;