Flying unit factory implementation, bugfixes
This commit is contained in:
@@ -3,7 +3,7 @@ package io.anuke.mindustry.content.blocks;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.world.blocks.types.PowerBlock;
|
||||
import io.anuke.mindustry.world.blocks.types.generation.PowerDistributor;
|
||||
import io.anuke.mindustry.world.blocks.types.power.PowerDistributor;
|
||||
|
||||
public class DebugBlocks {
|
||||
public static final Block
|
||||
|
||||
@@ -7,18 +7,18 @@ import io.anuke.mindustry.world.Block;
|
||||
import io.anuke.mindustry.world.blocks.types.defense.RepairTurret;
|
||||
import io.anuke.mindustry.world.blocks.types.defense.ShieldBlock;
|
||||
import io.anuke.mindustry.world.blocks.types.distribution.Teleporter;
|
||||
import io.anuke.mindustry.world.blocks.types.generation.*;
|
||||
import io.anuke.mindustry.world.blocks.types.power.ItemPowerGenerator;
|
||||
|
||||
public class PowerBlocks {
|
||||
public static final Block
|
||||
|
||||
coalgenerator = new ItemPowerGenerator("coalgenerator") {{
|
||||
coalgenerator = new io.anuke.mindustry.world.blocks.types.power.ItemPowerGenerator("coalgenerator") {{
|
||||
generateItem = Items.coal;
|
||||
powerOutput = 0.04f;
|
||||
powerCapacity = 40f;
|
||||
}},
|
||||
|
||||
thermalgenerator = new LiquidPowerGenerator("thermalgenerator") {{
|
||||
thermalgenerator = new io.anuke.mindustry.world.blocks.types.power.LiquidPowerGenerator("thermalgenerator") {{
|
||||
generateLiquid = Liquids.lava;
|
||||
maxLiquidGenerate = 0.5f;
|
||||
powerPerLiquid = 0.08f;
|
||||
@@ -26,7 +26,7 @@ public class PowerBlocks {
|
||||
generateEffect = Fx.redgeneratespark;
|
||||
}},
|
||||
|
||||
combustiongenerator = new LiquidPowerGenerator("combustiongenerator") {{
|
||||
combustiongenerator = new io.anuke.mindustry.world.blocks.types.power.LiquidPowerGenerator("combustiongenerator") {{
|
||||
generateLiquid = Liquids.oil;
|
||||
maxLiquidGenerate = 0.4f;
|
||||
powerPerLiquid = 0.12f;
|
||||
@@ -40,16 +40,16 @@ public class PowerBlocks {
|
||||
itemDuration = 240f;
|
||||
}},
|
||||
|
||||
solarpanel = new SolarGenerator("solarpanel") {{
|
||||
solarpanel = new io.anuke.mindustry.world.blocks.types.power.SolarGenerator("solarpanel") {{
|
||||
generation = 0.003f;
|
||||
}},
|
||||
|
||||
largesolarpanel = new SolarGenerator("largesolarpanel") {{
|
||||
largesolarpanel = new io.anuke.mindustry.world.blocks.types.power.SolarGenerator("largesolarpanel") {{
|
||||
size = 3;
|
||||
generation = 0.012f;
|
||||
}},
|
||||
|
||||
nuclearReactor = new NuclearReactor("nuclearreactor") {{
|
||||
nuclearReactor = new io.anuke.mindustry.world.blocks.types.power.NuclearReactor("nuclearreactor") {{
|
||||
size = 3;
|
||||
health = 600;
|
||||
breaktime *= 2.3f;
|
||||
@@ -74,16 +74,16 @@ public class PowerBlocks {
|
||||
health = 400;
|
||||
}},
|
||||
|
||||
battery = new PowerGenerator("battery") {{
|
||||
battery = new io.anuke.mindustry.world.blocks.types.power.PowerGenerator("battery") {{
|
||||
powerCapacity = 320f;
|
||||
}},
|
||||
|
||||
batteryLarge = new PowerGenerator("batterylarge") {{
|
||||
batteryLarge = new io.anuke.mindustry.world.blocks.types.power.PowerGenerator("batterylarge") {{
|
||||
size = 3;
|
||||
powerCapacity = 2000f;
|
||||
}},
|
||||
|
||||
powernode = new PowerDistributor("powernode"),
|
||||
powernode = new io.anuke.mindustry.world.blocks.types.power.PowerDistributor("powernode"),
|
||||
|
||||
teleporter = new Teleporter("teleporter");
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package io.anuke.mindustry.content.blocks;
|
||||
|
||||
import io.anuke.mindustry.content.Items;
|
||||
import io.anuke.mindustry.content.UnitTypes;
|
||||
import io.anuke.mindustry.resource.ItemStack;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
import io.anuke.mindustry.world.blocks.types.production.UnitFactory;
|
||||
|
||||
@@ -9,5 +11,10 @@ public class UnitBlocks {
|
||||
|
||||
flierFactory = new UnitFactory("flierfactory"){{
|
||||
type = UnitTypes.flier;
|
||||
produceTime = 400;
|
||||
size = 2;
|
||||
requirements = new ItemStack[]{
|
||||
new ItemStack(Items.stone, 5)
|
||||
};
|
||||
}};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user