Improved battery brightness display / Palette tweak / Diffgen buff

This commit is contained in:
Anuken
2020-02-11 17:27:33 -05:00
parent a4a3e7fc48
commit fb302d49c7
550 changed files with 3084 additions and 3110 deletions

View File

@@ -1122,13 +1122,13 @@ public class Blocks implements ContentList{
differentialGenerator = new SingleTypeGenerator("differential-generator"){{
requirements(Category.power, ItemStack.with(Items.copper, 70, Items.titanium, 50, Items.lead, 100, Items.silicon, 65, Items.metaglass, 50));
powerProduction = 16f;
itemDuration = 120f;
itemDuration = 140f;
hasLiquids = true;
hasItems = true;
size = 3;
consumes.item(Items.pyratite).optional(true, false);
consumes.liquid(Liquids.cryofluid, 0.18f);
consumes.liquid(Liquids.cryofluid, 0.15f);
}};
rtgGenerator = new DecayGenerator("rtg-generator"){{

View File

@@ -1,15 +1,15 @@
package mindustry.world.blocks.power;
import arc.*;
import arc.graphics.Color;
import arc.graphics.*;
import arc.graphics.g2d.*;
import mindustry.world.*;
import static mindustry.Vars.tilesize;
public class Battery extends PowerDistributor{
public int topRegion = reg("-top");
public TextureRegion baseRegion;
public Color emptyLightColor = Color.valueOf("6e7080");
public Color emptyLightColor = Color.valueOf("f8c266");
public Color fullLightColor = Color.valueOf("fb9567");
public Battery(String name){
@@ -18,24 +18,12 @@ public class Battery extends PowerDistributor{
consumesPower = true;
}
@Override
public void load(){
super.load();
baseRegion = Core.atlas.find(name + "-base");
}
@Override
public void draw(Tile tile){
Draw.color(emptyLightColor, fullLightColor, tile.entity.power.status);
Draw.rect(baseRegion, tile.drawx(), tile.drawy());
Draw.reset();
Fill.square(tile.drawx(), tile.drawy(), tilesize * size / 2f - 1);
Draw.color();
super.draw(tile);
}
@Override
public TextureRegion[] generateIcons(){
return new TextureRegion[]{Core.atlas.find(name + "-icon")};
Draw.rect(reg(topRegion), tile.drawx(), tile.drawy());
}
}