Customizable edge stencil / Reduced redundant sprites
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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()];
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user