WIP crystal biome
BIN
core/assets-raw/sprites/blocks/environment/crystal-floor1.png
Normal file
|
After Width: | Height: | Size: 309 B |
BIN
core/assets-raw/sprites/blocks/environment/crystal-floor2.png
Normal file
|
After Width: | Height: | Size: 256 B |
BIN
core/assets-raw/sprites/blocks/environment/crystal-floor3.png
Normal file
|
After Width: | Height: | Size: 303 B |
BIN
core/assets-raw/sprites/blocks/environment/crystal-floor4.png
Normal file
|
After Width: | Height: | Size: 298 B |
|
After Width: | Height: | Size: 906 B |
|
After Width: | Height: | Size: 458 B |
|
After Width: | Height: | Size: 375 B |
|
After Width: | Height: | Size: 351 B |
|
After Width: | Height: | Size: 317 B |
|
After Width: | Height: | Size: 260 B |
|
After Width: | Height: | Size: 232 B |
|
After Width: | Height: | Size: 217 B |
|
After Width: | Height: | Size: 202 B |
|
After Width: | Height: | Size: 248 B |
|
Before Width: | Height: | Size: 312 B After Width: | Height: | Size: 232 B |
|
Before Width: | Height: | Size: 316 B After Width: | Height: | Size: 339 B |
|
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 312 B |
BIN
core/assets-raw/sprites/blocks/props/arkyic-boulder-shadow1.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
core/assets-raw/sprites/blocks/props/arkyic-boulder-shadow2.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
core/assets-raw/sprites/blocks/props/arkyic-boulder-shadow3.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
core/assets-raw/sprites/blocks/props/arkyic-boulder1.png
Normal file
|
After Width: | Height: | Size: 594 B |
BIN
core/assets-raw/sprites/blocks/props/arkyic-boulder2.png
Normal file
|
After Width: | Height: | Size: 535 B |
BIN
core/assets-raw/sprites/blocks/props/arkyic-boulder3.png
Normal file
|
After Width: | Height: | Size: 491 B |
BIN
core/assets-raw/sprites/blocks/props/crystal-cluster-shadow1.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
core/assets-raw/sprites/blocks/props/crystal-cluster-shadow2.png
Normal file
|
After Width: | Height: | Size: 9.3 KiB |
BIN
core/assets-raw/sprites/blocks/props/crystal-cluster-shadow3.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
core/assets-raw/sprites/blocks/props/crystal-cluster1.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
core/assets-raw/sprites/blocks/props/crystal-cluster2.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
core/assets-raw/sprites/blocks/props/crystal-cluster3.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
core/assets-raw/sprites/blocks/props/crystalline-boulder1.png
Normal file
|
After Width: | Height: | Size: 605 B |
BIN
core/assets-raw/sprites/blocks/props/crystalline-boulder2.png
Normal file
|
After Width: | Height: | Size: 689 B |
@@ -499,3 +499,9 @@
|
|||||||
63205=ore-crystal-thorium|block-ore-crystal-thorium-ui
|
63205=ore-crystal-thorium|block-ore-crystal-thorium-ui
|
||||||
63204=ore-wall-beryllium|block-ore-wall-beryllium-ui
|
63204=ore-wall-beryllium|block-ore-wall-beryllium-ui
|
||||||
63203=ore-wall-tungsten|block-ore-wall-tungsten-ui
|
63203=ore-wall-tungsten|block-ore-wall-tungsten-ui
|
||||||
|
63202=arkyic-boulder|block-arkyic-boulder-ui
|
||||||
|
63201=crystalline-stone|block-crystalline-stone-ui
|
||||||
|
63200=crystalline-stone-wall|block-crystalline-stone-wall-ui
|
||||||
|
63199=crystal-cluster|block-crystal-cluster-ui
|
||||||
|
63198=crystalline-boulder|block-crystalline-boulder-ui
|
||||||
|
63197=crystal-floor|block-crystal-floor-ui
|
||||||
|
|||||||
@@ -45,10 +45,11 @@ public class Blocks{
|
|||||||
redmat, bluemat,
|
redmat, bluemat,
|
||||||
stoneWall, dirtWall, sporeWall, iceWall, daciteWall, sporePine, snowPine, pine, shrubs, whiteTree, whiteTreeDead, sporeCluster,
|
stoneWall, dirtWall, sporeWall, iceWall, daciteWall, sporePine, snowPine, pine, shrubs, whiteTree, whiteTreeDead, sporeCluster,
|
||||||
redweed, purbush, coralChunk, yellowCoral,
|
redweed, purbush, coralChunk, yellowCoral,
|
||||||
regolithWall, yellowStoneWall, rhyoliteWall, steamVent, carbonWall, redIceWall, ferricStoneWall, beryllicStoneWall, arkyicWall,
|
regolithWall, yellowStoneWall, rhyoliteWall, steamVent, carbonWall, redIceWall, ferricStoneWall, beryllicStoneWall, arkyicWall, crystallineStoneWall,
|
||||||
ferricStone, ferricCraters, carbonStone, beryllicStone,
|
ferricStone, ferricCraters, carbonStone, beryllicStone, crystallineStone, crystalFloor,
|
||||||
iceSnow, sandWater, darksandWater, duneWall, sandWall, moss, sporeMoss, shale, shaleWall, grass, salt,
|
iceSnow, sandWater, darksandWater, duneWall, sandWall, moss, sporeMoss, shale, shaleWall, grass, salt,
|
||||||
shaleBoulder, sandBoulder, daciteBoulder, boulder, snowBoulder, basaltBoulder, carbonBoulder, ferricBoulder, beryllicBoulder, yellowStoneBoulder,
|
//boulders
|
||||||
|
shaleBoulder, sandBoulder, daciteBoulder, boulder, snowBoulder, basaltBoulder, carbonBoulder, ferricBoulder, beryllicBoulder, yellowStoneBoulder, arkyicBoulder, crystalCluster, crystallineBoulder,
|
||||||
metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor4, metalFloor5, basalt, magmarock, hotrock, snowWall, saltWall,
|
metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor4, metalFloor5, basalt, magmarock, hotrock, snowWall, saltWall,
|
||||||
darkPanel1, darkPanel2, darkPanel3, darkPanel4, darkPanel5, darkPanel6, darkMetal,
|
darkPanel1, darkPanel2, darkPanel3, darkPanel4, darkPanel5, darkPanel6, darkMetal,
|
||||||
pebbles, tendrils,
|
pebbles, tendrils,
|
||||||
@@ -398,6 +399,14 @@ public class Blocks{
|
|||||||
variants = 4;
|
variants = 4;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
crystallineStone = new Floor("crystalline-stone"){{
|
||||||
|
variants = 5;
|
||||||
|
}};
|
||||||
|
|
||||||
|
crystalFloor = new Floor("crystal-floor"){{
|
||||||
|
variants = 4;
|
||||||
|
}};
|
||||||
|
|
||||||
redIce = new Floor("red-ice"){{
|
redIce = new Floor("red-ice"){{
|
||||||
//TODO red ice boulder
|
//TODO red ice boulder
|
||||||
dragMultiplier = 0.4f;
|
dragMultiplier = 0.4f;
|
||||||
@@ -530,6 +539,11 @@ public class Blocks{
|
|||||||
arkyciteFloor.asFloor().wall = arkyicStone.asFloor().wall = this;
|
arkyciteFloor.asFloor().wall = arkyicStone.asFloor().wall = this;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
crystallineStoneWall = new StaticWall("crystalline-stone-wall"){{
|
||||||
|
variants = 4;
|
||||||
|
crystallineStone.asFloor().wall = crystalFloor.asFloor().wall = this;
|
||||||
|
}};
|
||||||
|
|
||||||
redIceWall = new StaticWall("red-ice-wall"){{
|
redIceWall = new StaticWall("red-ice-wall"){{
|
||||||
redIce.asFloor().wall = this;
|
redIce.asFloor().wall = this;
|
||||||
}};
|
}};
|
||||||
@@ -636,6 +650,24 @@ public class Blocks{
|
|||||||
yellowStone.asFloor().decoration = regolith.asFloor().decoration = this;
|
yellowStone.asFloor().decoration = regolith.asFloor().decoration = this;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
//1px outline + 4.50 gaussian shadow in gimp
|
||||||
|
arkyicBoulder = new Prop("arkyic-boulder"){{
|
||||||
|
variants = 3;
|
||||||
|
customShadow = true;
|
||||||
|
arkyicStone.asFloor().decoration = this;
|
||||||
|
}};
|
||||||
|
|
||||||
|
//TODO better visuals, maybe make tree
|
||||||
|
crystalCluster = new TallBlock("crystal-cluster"){{
|
||||||
|
variants = 3;
|
||||||
|
clipSize = 128f;
|
||||||
|
}};
|
||||||
|
|
||||||
|
crystallineBoulder = new Prop("crystalline-boulder"){{
|
||||||
|
variants = 2;
|
||||||
|
crystallineStone.asFloor().decoration = this;
|
||||||
|
}};
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
|
|||||||
@@ -1031,12 +1031,6 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawCustomShadow(){
|
|
||||||
Draw.color(0f, 0f, 0f, BlockRenderer.shadowColor.a);
|
|
||||||
Draw.rect(block.customShadowRegion, x, y, drawrot());
|
|
||||||
Draw.color();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void drawCracks(){
|
public void drawCracks(){
|
||||||
if(!damaged() || block.size > BlockRenderer.maxCrackSize) return;
|
if(!damaged() || block.size > BlockRenderer.maxCrackSize) return;
|
||||||
int id = pos();
|
int id = pos();
|
||||||
|
|||||||
@@ -368,12 +368,13 @@ public class BlockRenderer{
|
|||||||
Draw.reset();
|
Draw.reset();
|
||||||
Draw.z(Layer.block);
|
Draw.z(Layer.block);
|
||||||
|
|
||||||
|
if(block.customShadow){
|
||||||
|
Draw.z(Layer.block - 1);
|
||||||
|
block.drawShadow(tile);
|
||||||
|
Draw.z(Layer.block);
|
||||||
|
}
|
||||||
|
|
||||||
if(entity != null){
|
if(entity != null){
|
||||||
if(block.customShadow){
|
|
||||||
Draw.z(Layer.block - 1);
|
|
||||||
entity.drawCustomShadow();
|
|
||||||
Draw.z(Layer.block);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(entity.damaged()){
|
if(entity.damaged()){
|
||||||
entity.drawCracks();
|
entity.drawCracks();
|
||||||
|
|||||||
@@ -364,6 +364,21 @@ public abstract class BasicGenerator implements WorldGenerator{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean near(int cx, int cy, int rad, Block block){
|
||||||
|
for(int x = -rad; x <= rad; x++){
|
||||||
|
for(int y = -rad; y <= rad; y++){
|
||||||
|
int wx = cx + x, wy = cy + y;
|
||||||
|
if(Structs.inBounds(wx, wy, width, height) && Mathf.within(x, y, rad)){
|
||||||
|
Tile other = tiles.getn(wx, wy);
|
||||||
|
if(other.block() == block){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public void decoration(float chance){
|
public void decoration(float chance){
|
||||||
pass((x, y) -> {
|
pass((x, y) -> {
|
||||||
for(int i = 0; i < 4; i++){
|
for(int i = 0; i < 4; i++){
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
|
|||||||
public float heightScl = 0.9f, octaves = 8, persistence = 0.7f, heightPow = 3f, heightMult = 1.6f;
|
public float heightScl = 0.9f, octaves = 8, persistence = 0.7f, heightPow = 3f, heightMult = 1.6f;
|
||||||
|
|
||||||
Block[][] arr = {
|
Block[][] arr = {
|
||||||
{Blocks.regolith, Blocks.regolith, Blocks.yellowStone, Blocks.rhyolite, Blocks.basalt}
|
//{Blocks.regolith, Blocks.regolith, Blocks.yellowStone, Blocks.rhyolite, Blocks.basalt}
|
||||||
|
{Blocks.regolith, Blocks.regolith, Blocks.yellowStone, Blocks.crystallineStone, Blocks.basalt}
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -210,9 +211,17 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
|
|||||||
}
|
}
|
||||||
|
|
||||||
//TODO design ore generation so it doesn't overlap
|
//TODO design ore generation so it doesn't overlap
|
||||||
if(noise(x + 999, y + 600, 4, 0.63f, 50f, 1f) < 0.2f/* && floor == Blocks.yellowStone*/){
|
if(noise(x + 999, y + 600 - x, 4, 0.63f, 50f, 1f) < 0.25f && floor == Blocks.crystallineStone){
|
||||||
ore = Blocks.oreThorium;
|
ore = Blocks.oreCrystalThorium;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(noise(x + 999, y + 600 - x, 5, 0.8f, 50f, 1f) < 0.38f && floor == Blocks.crystallineStone){
|
||||||
|
floor = Blocks.crystalFloor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(block == Blocks.air && floor == Blocks.crystallineStone && rand.chance(0.08) && nearWall(x, y) && !near(x, y, 4, Blocks.crystalCluster)){
|
||||||
|
block = Blocks.crystalCluster;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ public class Block extends UnlockableContent{
|
|||||||
public TextureRegion region, editorIcon;
|
public TextureRegion region, editorIcon;
|
||||||
public @Load("@-shadow") TextureRegion customShadowRegion;
|
public @Load("@-shadow") TextureRegion customShadowRegion;
|
||||||
public @Load("@-team") TextureRegion teamRegion;
|
public @Load("@-team") TextureRegion teamRegion;
|
||||||
public TextureRegion[] teamRegions, variantRegions;
|
public TextureRegion[] teamRegions, variantRegions, variantShadowRegions;
|
||||||
|
|
||||||
protected static final Seq<Tile> tempTiles = new Seq<>();
|
protected static final Seq<Tile> tempTiles = new Seq<>();
|
||||||
protected static final Seq<Building> tempTileEnts = new Seq<>();
|
protected static final Seq<Building> tempTileEnts = new Seq<>();
|
||||||
@@ -314,14 +314,22 @@ public class Block extends UnlockableContent{
|
|||||||
if(tile.build != null){
|
if(tile.build != null){
|
||||||
tile.build.draw();
|
tile.build.draw();
|
||||||
}else{
|
}else{
|
||||||
if(variants == 0){
|
Draw.rect(
|
||||||
Draw.rect(region, tile.drawx(), tile.drawy());
|
variants == 0 ? region :
|
||||||
}else{
|
variantRegions[Mathf.randomSeed(tile.pos(), 0, Math.max(0, variantRegions.length - 1))],
|
||||||
Draw.rect(variantRegions[Mathf.randomSeed(tile.pos(), 0, Math.max(0, variantRegions.length - 1))], tile.drawx(), tile.drawy());
|
tile.drawx(), tile.drawy());
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void drawShadow(Tile tile){
|
||||||
|
Draw.color(0f, 0f, 0f, BlockRenderer.shadowColor.a);
|
||||||
|
Draw.rect(
|
||||||
|
variants == 0 ? customShadowRegion :
|
||||||
|
variantShadowRegions[Mathf.randomSeed(tile.pos(), 0, Math.max(0, variantShadowRegions.length - 1))],
|
||||||
|
tile.drawx(), tile.drawy(), tile.build == null ? 0f : tile.build.drawrot());
|
||||||
|
Draw.color();
|
||||||
|
}
|
||||||
|
|
||||||
public float percentSolid(int x, int y){
|
public float percentSolid(int x, int y){
|
||||||
Tile tile = world.tile(x, y);
|
Tile tile = world.tile(x, y);
|
||||||
if(tile == null) return 0;
|
if(tile == null) return 0;
|
||||||
@@ -1019,6 +1027,13 @@ public class Block extends UnlockableContent{
|
|||||||
variantRegions[i] = Core.atlas.find(name + (i + 1));
|
variantRegions[i] = Core.atlas.find(name + (i + 1));
|
||||||
}
|
}
|
||||||
region = variantRegions[0];
|
region = variantRegions[0];
|
||||||
|
|
||||||
|
if(customShadow){
|
||||||
|
variantShadowRegions = new TextureRegion[variants];
|
||||||
|
for(int i = 0; i < variants; i++){
|
||||||
|
variantShadowRegions[i] = Core.atlas.find(name + "-shadow" + (i + 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
53
core/src/mindustry/world/blocks/environment/TallBlock.java
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
package mindustry.world.blocks.environment;
|
||||||
|
|
||||||
|
import arc.*;
|
||||||
|
import arc.graphics.g2d.*;
|
||||||
|
import arc.math.*;
|
||||||
|
import mindustry.graphics.*;
|
||||||
|
import mindustry.world.*;
|
||||||
|
|
||||||
|
//I don't know what else to call this. It's not a prop, it's not a tree.
|
||||||
|
public class TallBlock extends Block{
|
||||||
|
public float shadowOffset = -3f;
|
||||||
|
public float layer = Layer.power + 1;
|
||||||
|
public float rotationRand = 20f;
|
||||||
|
|
||||||
|
public TallBlock(String name){
|
||||||
|
super(name);
|
||||||
|
solid = true;
|
||||||
|
clipSize = 90;
|
||||||
|
customShadow = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init(){
|
||||||
|
super.init();
|
||||||
|
hasShadow = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawBase(Tile tile){
|
||||||
|
float rot = Mathf.randomSeedRange(tile.pos() + 1, rotationRand);
|
||||||
|
|
||||||
|
Draw.z(Layer.power - 1);
|
||||||
|
Draw.color(0f, 0f, 0f, 0.6f);
|
||||||
|
Draw.rect(variants > 0 ? variantShadowRegions[Mathf.randomSeed(tile.pos(), 0, Math.max(0, variantShadowRegions.length - 1))] : customShadowRegion,
|
||||||
|
tile.worldx() + shadowOffset, tile.worldy() + shadowOffset, rot);
|
||||||
|
|
||||||
|
Draw.color();
|
||||||
|
|
||||||
|
Draw.z(Layer.power + 1);
|
||||||
|
Draw.rect(variants > 0 ? variantRegions[Mathf.randomSeed(tile.pos(), 0, Math.max(0, variantRegions.length - 1))] : region,
|
||||||
|
tile.worldx(), tile.worldy(), rot);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawShadow(Tile tile){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TextureRegion[] icons(){
|
||||||
|
return variants == 0 ? super.icons() : new TextureRegion[]{Core.atlas.find(name + "1")};
|
||||||
|
}
|
||||||
|
}
|
||||||