Erekir thorium + Minor visual tweaks

This commit is contained in:
Anuken
2021-11-27 13:10:10 -05:00
parent a24c15117d
commit bc296728f9
12 changed files with 29 additions and 14 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 712 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 B

View File

Before

Width:  |  Height:  |  Size: 197 B

After

Width:  |  Height:  |  Size: 197 B

View File

Before

Width:  |  Height:  |  Size: 356 B

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

View File

Before

Width:  |  Height:  |  Size: 366 B

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

View File

@ -72,13 +72,12 @@ public class Liquids implements ContentList{
}}; }};
//TODO combustion //TODO combustion
hydrogen = new Liquid("hydrogen", Color.valueOf("b8c2fc")){{ hydrogen = new Liquid("hydrogen", Color.valueOf("9eabf7")){{
gas = true; gas = true;
barColor = Color.valueOf("a3b0ff");
flammability = 1f; flammability = 1f;
}}; }};
nitrogen = new Liquid("nitrogen", Color.valueOf("e2cffa")){{ nitrogen = new Liquid("nitrogen", Color.valueOf("efe3ff")){{
gas = true; gas = true;
}}; }};

View File

@ -189,6 +189,11 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
if(empty && noise(x + 150, y + x*2 + 100, 4, 0.8f, 40f, 1f) > 0.71f/* && floor == Blocks.yellowStone*/){ if(empty && noise(x + 150, y + x*2 + 100, 4, 0.8f, 40f, 1f) > 0.71f/* && floor == Blocks.yellowStone*/){
ore = Blocks.oreTungsten; ore = Blocks.oreTungsten;
} }
//TODO design ore generation so it doesn't overlap
if(empty && noise(x + 999, y + 600, 4, 0.63f, 37f, 1f) < 0.25f/* && floor == Blocks.yellowStone*/){
ore = Blocks.oreThorium;
}
} }
}); });

View File

@ -37,7 +37,7 @@ public class LiquidBlock extends Block{
TextureRegion toDraw = Tmp.tr1; TextureRegion toDraw = Tmp.tr1;
float bounds = size/2f * tilesize - padding; float bounds = size/2f * tilesize - padding;
Color color = Tmp.c1.set(liquid.color).mul(liquid.gas ? 1f : 1f).a(1f); Color color = Tmp.c1.set(liquid.color).a(1f);
for(int sx = 0; sx < size; sx++){ for(int sx = 0; sx < size; sx++){
for(int sy = 0; sy < size; sy++){ for(int sy = 0; sy < size; sy++){

View File

@ -92,12 +92,6 @@ public class BurstDrill extends Drill{
Draw.rect(region, x, y); Draw.rect(region, x, y);
drawDefaultCracks(); drawDefaultCracks();
if(dominantItem != null && drawMineItem){
Draw.color(dominantItem.color);
Draw.rect(itemRegion, x, y);
Draw.color();
}
Draw.rect(topRegion, x, y); Draw.rect(topRegion, x, y);
if(invertTime > 0){ if(invertTime > 0){
Draw.alpha(Interp.pow3Out.apply(invertTime)); Draw.alpha(Interp.pow3Out.apply(invertTime));
@ -105,6 +99,12 @@ public class BurstDrill extends Drill{
Draw.color(); Draw.color();
} }
if(dominantItem != null && drawMineItem){
Draw.color(dominantItem.color);
Draw.rect(itemRegion, x, y);
Draw.color();
}
float fract = smoothProgress; float fract = smoothProgress;
int arrows = 3; int arrows = 3;
Draw.color(arrowColor); Draw.color(arrowColor);

View File

@ -4,16 +4,20 @@ import arc.graphics.g2d.*;
import arc.scene.ui.layout.*; import arc.scene.ui.layout.*;
import arc.util.*; import arc.util.*;
import arc.util.io.*; import arc.util.io.*;
import mindustry.annotations.Annotations.*;
import mindustry.entities.units.*; import mindustry.entities.units.*;
import mindustry.gen.*; import mindustry.gen.*;
import mindustry.type.*; import mindustry.type.*;
import mindustry.world.*; import mindustry.world.*;
import mindustry.world.blocks.*; import mindustry.world.blocks.*;
import mindustry.world.blocks.liquid.*;
import mindustry.world.meta.*; import mindustry.world.meta.*;
import static mindustry.Vars.*; import static mindustry.Vars.*;
public class LiquidSource extends Block{ public class LiquidSource extends Block{
public @Load("cross") TextureRegion crossRegion;
public @Load("source-bottom") TextureRegion bottomRegion;
public LiquidSource(String name){ public LiquidSource(String name){
super(name); super(name);
@ -45,6 +49,11 @@ public class LiquidSource extends Block{
drawRequestConfigCenter(plan, plan.config, "center", true); drawRequestConfigCenter(plan, plan.config, "center", true);
} }
@Override
public TextureRegion[] icons(){
return new TextureRegion[]{bottomRegion, region};
}
public class LiquidSourceBuild extends Building{ public class LiquidSourceBuild extends Building{
public @Nullable Liquid source = null; public @Nullable Liquid source = null;
@ -62,13 +71,15 @@ public class LiquidSource extends Block{
public void draw(){ public void draw(){
super.draw(); super.draw();
Draw.rect(bottomRegion, x, y);
if(source == null){ if(source == null){
Draw.rect("cross", x, y); Draw.rect(crossRegion, x, y);
}else{ }else{
Draw.color(source.color); LiquidBlock.drawTiledFrames(size, x, y, 0f, source, 1f);
Draw.rect("center", x, y);
Draw.color();
} }
Draw.rect(block.region, x, y);
} }
@Override @Override