Decorations no longer depend on color

This commit is contained in:
Anuken
2021-07-05 09:47:19 -04:00
parent dfcc9a595f
commit a7d465439b
3 changed files with 23 additions and 19 deletions

View File

@@ -324,6 +324,7 @@ public class Blocks implements ContentList{
}}; }};
redIce = new Floor("red-ice"){{ redIce = new Floor("red-ice"){{
//TODO red ice boulder
dragMultiplier = 0.4f; dragMultiplier = 0.4f;
speedMultiplier = 0.9f; speedMultiplier = 0.9f;
attributes.set(Attribute.water, 0.4f); attributes.set(Attribute.water, 0.4f);
@@ -333,6 +334,7 @@ public class Blocks implements ContentList{
bluemat = new Floor("bluemat"); bluemat = new Floor("bluemat");
grass = new Floor("grass"){{ grass = new Floor("grass"){{
//TODO grass needs a bush? classic had grass bushes.
attributes.set(Attribute.water, 0.1f); attributes.set(Attribute.water, 0.1f);
}}; }};
@@ -363,6 +365,18 @@ public class Blocks implements ContentList{
attributes.set(Attribute.oil, 1.2f); attributes.set(Attribute.oil, 1.2f);
}}; }};
moss = new Floor("moss"){{
variants = 3;
attributes.set(Attribute.spores, 0.15f);
wall = sporePine;
}};
sporeMoss = new Floor("spore-moss"){{
variants = 3;
attributes.set(Attribute.spores, 0.3f);
wall = sporeWall;
}};
stoneWall = new StaticWall("stone-wall"); stoneWall = new StaticWall("stone-wall");
sporeWall = new StaticWall("spore-wall"); sporeWall = new StaticWall("spore-wall");
@@ -435,10 +449,11 @@ public class Blocks implements ContentList{
redweed = new Seaweed("redweed"){{ redweed = new Seaweed("redweed"){{
variants = 3; variants = 3;
redmat.asFloor().decoration = this;
}}; }};
purbush = new SeaBush("pur-bush"){{ purbush = new SeaBush("pur-bush"){{
bluemat.asFloor().decoration = this;
}}; }};
yellowCoral = new SeaBush("yellowcoral"){{ yellowCoral = new SeaBush("yellowcoral"){{
@@ -458,7 +473,7 @@ public class Blocks implements ContentList{
boulder = new Prop("boulder"){{ boulder = new Prop("boulder"){{
variants = 2; variants = 2;
stone.asFloor().decoration = this; stone.asFloor().decoration = craters.asFloor().decoration = charr.asFloor().decoration = this;
}}; }};
snowBoulder = new Prop("snow-boulder"){{ snowBoulder = new Prop("snow-boulder"){{
@@ -468,18 +483,22 @@ public class Blocks implements ContentList{
shaleBoulder = new Prop("shale-boulder"){{ shaleBoulder = new Prop("shale-boulder"){{
variants = 2; variants = 2;
shale.asFloor().decoration = this;
}}; }};
sandBoulder = new Prop("sand-boulder"){{ sandBoulder = new Prop("sand-boulder"){{
variants = 2; variants = 2;
sand.asFloor().decoration = this;
}}; }};
daciteBoulder = new Prop("dacite-boulder"){{ daciteBoulder = new Prop("dacite-boulder"){{
variants = 2; variants = 2;
dacite.asFloor().decoration = this;
}}; }};
basaltBoulder = new Prop("basalt-boulder"){{ basaltBoulder = new Prop("basalt-boulder"){{
variants = 2; variants = 2;
basalt.asFloor().decoration = hotrock.asFloor().decoration = darksand.asFloor().decoration = magmarock.asFloor().decoration = this;
}}; }};
carbonBoulder = new Prop("carbon-boulder"){{ carbonBoulder = new Prop("carbon-boulder"){{
@@ -489,7 +508,7 @@ public class Blocks implements ContentList{
ferricBoulder = new Prop("ferric-boulder"){{ ferricBoulder = new Prop("ferric-boulder"){{
variants = 2; variants = 2;
ferricStone.asFloor().decoration = this; ferricStone.asFloor().decoration = ferricCraters.asFloor().decoration = this;
}}; }};
beryllicBoulder = new Prop("beryllic-boulder"){{ beryllicBoulder = new Prop("beryllic-boulder"){{
@@ -497,18 +516,6 @@ public class Blocks implements ContentList{
beryllicStone.asFloor().decoration = this; beryllicStone.asFloor().decoration = this;
}}; }};
moss = new Floor("moss"){{
variants = 3;
attributes.set(Attribute.spores, 0.15f);
wall = sporePine;
}};
sporeMoss = new Floor("spore-moss"){{
variants = 3;
attributes.set(Attribute.spores, 0.3f);
wall = sporeWall;
}};
metalFloor = new Floor("metal-floor", 0); metalFloor = new Floor("metal-floor", 0);
metalFloorDamaged = new Floor("metal-floor-damaged", 3); metalFloorDamaged = new Floor("metal-floor-damaged", 3);

View File

@@ -116,10 +116,6 @@ public class Floor extends Block{
//keep default value if not found... //keep default value if not found...
if(wall == null) wall = Blocks.air; if(wall == null) wall = Blocks.air;
if(decoration == Blocks.air){
decoration = content.blocks().min(b -> b instanceof Prop && b.minfo.mod == null && b.breakable ? mapColor.diff(b.mapColor) : Float.POSITIVE_INFINITY);
}
if(isLiquid && walkEffect == Fx.none){ if(isLiquid && walkEffect == Fx.none){
walkEffect = Fx.ripple; walkEffect = Fx.ripple;
} }

View File

@@ -21,6 +21,7 @@ public class PayloadDeconstructor extends PayloadBlock{
acceptsPayload = true; acceptsPayload = true;
update = true; update = true;
rotate = false; rotate = false;
solid = true;
size = 5; size = 5;
payloadSpeed = 1f; payloadSpeed = 1f;
//make sure to display large units. //make sure to display large units.