Added two more generators
|
Before Width: | Height: | Size: 313 B After Width: | Height: | Size: 300 B |
BIN
core/assets-raw/sprites/blocks/combustiongenerator.png
Normal file
|
After Width: | Height: | Size: 300 B |
|
Before Width: | Height: | Size: 380 B After Width: | Height: | Size: 427 B |
BIN
core/assets-raw/sprites/blocks/thermalgenerator.png
Normal file
|
After Width: | Height: | Size: 279 B |
@@ -60,6 +60,13 @@ blocks/coalgenerator
|
|||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
|
blocks/combustiongenerator
|
||||||
|
rotate: false
|
||||||
|
xy: 230, 52
|
||||||
|
size: 8, 8
|
||||||
|
orig: 8, 8
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
blocks/coalpurifier
|
blocks/coalpurifier
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 230, 42
|
xy: 230, 42
|
||||||
@@ -613,55 +620,62 @@ blocks/stonewall
|
|||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
blocks/titanium1
|
blocks/thermalgenerator
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 427, 298
|
xy: 427, 298
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
blocks/titanium2
|
blocks/titanium1
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 437, 308
|
xy: 437, 308
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
blocks/titanium3
|
blocks/titanium2
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 447, 318
|
xy: 447, 318
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
blocks/titaniumdrill
|
blocks/titanium3
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 427, 288
|
xy: 427, 288
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
blocks/titaniumpurifier
|
blocks/titaniumdrill
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 437, 298
|
xy: 437, 298
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
blocks/titaniumshieldwall
|
blocks/titaniumpurifier
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 447, 308
|
xy: 447, 308
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
blocks/titaniumwall
|
blocks/titaniumshieldwall
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 437, 288
|
xy: 437, 288
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
|
blocks/titaniumwall
|
||||||
|
rotate: false
|
||||||
|
xy: 447, 298
|
||||||
|
size: 8, 8
|
||||||
|
orig: 8, 8
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
blocks/turret
|
blocks/turret
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 397, 346
|
xy: 397, 346
|
||||||
@@ -671,35 +685,35 @@ blocks/turret
|
|||||||
index: -1
|
index: -1
|
||||||
blocks/uranium1
|
blocks/uranium1
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 447, 288
|
xy: 427, 278
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
blocks/uranium2
|
blocks/uranium2
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 427, 278
|
xy: 437, 278
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
blocks/uranium3
|
blocks/uranium3
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 437, 278
|
xy: 447, 278
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
blocks/uraniumdrill
|
blocks/uraniumdrill
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 447, 278
|
xy: 252, 173
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
blocks/water
|
blocks/water
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 252, 173
|
xy: 262, 173
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
@@ -1360,7 +1374,7 @@ weapons/railgun
|
|||||||
index: -1
|
index: -1
|
||||||
weapons/triblaster
|
weapons/triblaster
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 447, 298
|
xy: 447, 288
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
@@ -579,7 +579,9 @@ public class UI extends SceneModule{
|
|||||||
Draw.region(recipe.result.name() + "-icon") : Draw.region(recipe.result.name());
|
Draw.region(recipe.result.name() + "-icon") : Draw.region(recipe.result.name());
|
||||||
|
|
||||||
header.addImage(region).size(8*5).padTop(4).units(Unit.dp);
|
header.addImage(region).size(8*5).padTop(4).units(Unit.dp);
|
||||||
header.add(recipe.result.formalName).padLeft(4).units(Unit.dp);
|
Label nameLabel = new Label(recipe.result.formalName);
|
||||||
|
nameLabel.setWrap(true);
|
||||||
|
header.add(nameLabel).padLeft(4).width(160f).units(Unit.dp);
|
||||||
|
|
||||||
desctable.add().pad(2).units(Unit.dp);
|
desctable.add().pad(2).units(Unit.dp);
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ public enum Recipe{
|
|||||||
omnidrill(production, ProductionBlocks.omnidrill, stack(Item.titanium, 20), stack(Item.dirium, 20)),
|
omnidrill(production, ProductionBlocks.omnidrill, stack(Item.titanium, 20), stack(Item.dirium, 20)),
|
||||||
|
|
||||||
coalgenerator(power, ProductionBlocks.coalgenerator, stack(Item.titanium, 10), stack(Item.dirium, 10)),
|
coalgenerator(power, ProductionBlocks.coalgenerator, stack(Item.titanium, 10), stack(Item.dirium, 10)),
|
||||||
|
thermalgenerator(power, ProductionBlocks.thermalgenerator, stack(Item.titanium, 10), stack(Item.dirium, 10)),
|
||||||
|
combustiongenerator(power, ProductionBlocks.combustiongenerator, stack(Item.titanium, 10), stack(Item.dirium, 10)),
|
||||||
nuclearreactor(power, ProductionBlocks.nuclearReactor, stack(Item.titanium, 10), stack(Item.dirium, 10)),
|
nuclearreactor(power, ProductionBlocks.nuclearReactor, stack(Item.titanium, 10), stack(Item.dirium, 10)),
|
||||||
shieldgenerator(power, DefenseBlocks.shieldgenerator, stack(Item.titanium, 10), stack(Item.dirium, 10)),
|
shieldgenerator(power, DefenseBlocks.shieldgenerator, stack(Item.titanium, 10), stack(Item.dirium, 10)),
|
||||||
|
|
||||||
|
|||||||
@@ -61,6 +61,9 @@ public class DefenseBlocks{
|
|||||||
},
|
},
|
||||||
|
|
||||||
shieldgenerator = new ShieldBlock("shieldgenerator"){
|
shieldgenerator = new ShieldBlock("shieldgenerator"){
|
||||||
//TODO
|
{
|
||||||
|
//TODO
|
||||||
|
formalName = "shield generator";
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ public class ProductionBlocks{
|
|||||||
|
|
||||||
titaniumpurifier = new LiquidCrafter("titaniumpurifier"){
|
titaniumpurifier = new LiquidCrafter("titaniumpurifier"){
|
||||||
{
|
{
|
||||||
formalName = "titanium\nextractor";
|
formalName = "titanium extractor";
|
||||||
input = Item.iron;
|
input = Item.iron;
|
||||||
inputAmount = 6;
|
inputAmount = 6;
|
||||||
inputLiquid = Liquid.water;
|
inputLiquid = Liquid.water;
|
||||||
@@ -178,13 +178,46 @@ public class ProductionBlocks{
|
|||||||
coalgenerator = new ItemPowerGenerator("coalgenerator"){
|
coalgenerator = new ItemPowerGenerator("coalgenerator"){
|
||||||
{
|
{
|
||||||
//TODO
|
//TODO
|
||||||
|
formalName = "coal generator";
|
||||||
generateItem = Item.coal;
|
generateItem = Item.coal;
|
||||||
generateAmount = 4f;
|
generateAmount = 4f;
|
||||||
powerCapacity = 40f;
|
powerCapacity = 40f;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
thermalgenerator = new LiquidPowerGenerator("thermalgenerator"){
|
||||||
|
{
|
||||||
|
formalName = "thermal generator";
|
||||||
|
//TODO
|
||||||
|
generateLiquid = Liquid.lava;
|
||||||
|
inputLiquid = 2f;
|
||||||
|
generatePower = 1f;
|
||||||
|
powerCapacity = 40f;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String description(){
|
||||||
|
return "Generates power from lava.";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
combustiongenerator = new LiquidPowerGenerator("combustiongenerator"){
|
||||||
|
{
|
||||||
|
formalName = "combustion generator";
|
||||||
|
//TODO
|
||||||
|
generateLiquid = Liquid.oil;
|
||||||
|
inputLiquid = 2f;
|
||||||
|
generatePower = 1f;
|
||||||
|
powerCapacity = 40f;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String description(){
|
||||||
|
return "Generates power from oil.";
|
||||||
|
}
|
||||||
|
},
|
||||||
nuclearReactor = new LiquidItemPowerGenerator("nuclearreactor"){
|
nuclearReactor = new LiquidItemPowerGenerator("nuclearreactor"){
|
||||||
{
|
{
|
||||||
|
//TODO
|
||||||
|
formalName = "nuclear reactor";
|
||||||
width = 2;
|
width = 2;
|
||||||
height = 2;
|
height = 2;
|
||||||
generateLiquid = Liquid.water;
|
generateLiquid = Liquid.water;
|
||||||
@@ -196,5 +229,10 @@ public class ProductionBlocks{
|
|||||||
breaktime *= 2.2f;
|
breaktime *= 2.2f;
|
||||||
powerCapacity = 100f;
|
powerCapacity = 100f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String description(){
|
||||||
|
return "Generates power from uranium + water.";
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ public class LiquidItemPowerGenerator extends LiquidPowerGenerator{
|
|||||||
public void update(Tile tile){
|
public void update(Tile tile){
|
||||||
LiquidPowerEntity entity = tile.entity();
|
LiquidPowerEntity entity = tile.entity();
|
||||||
|
|
||||||
|
//TODO don't generate when full of energy
|
||||||
if(entity.liquidAmount >= inputLiquid && entity.hasItem(generateItem, itemInput)
|
if(entity.liquidAmount >= inputLiquid && entity.hasItem(generateItem, itemInput)
|
||||||
&& Timers.get(tile, "consume", generateTime)){
|
&& Timers.get(tile, "consume", generateTime)){
|
||||||
entity.liquidAmount -= inputLiquid;
|
entity.liquidAmount -= inputLiquid;
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ public class LiquidPowerGenerator extends Generator implements LiquidAcceptor{
|
|||||||
public void update(Tile tile){
|
public void update(Tile tile){
|
||||||
LiquidPowerEntity entity = tile.entity();
|
LiquidPowerEntity entity = tile.entity();
|
||||||
|
|
||||||
|
//TODO don't generate when full of energy
|
||||||
if(entity.liquidAmount >= inputLiquid && Timers.get(tile, "consume", generateTime)){
|
if(entity.liquidAmount >= inputLiquid && Timers.get(tile, "consume", generateTime)){
|
||||||
entity.liquidAmount -= inputLiquid;
|
entity.liquidAmount -= inputLiquid;
|
||||||
entity.power += generatePower;
|
entity.power += generatePower;
|
||||||
|
|||||||