Files
Mindustry/core/src/mindustry/content/Blocks.java

1873 lines
66 KiB
Java
Raw Normal View History

2019-12-25 01:39:38 -05:00
package mindustry.content;
import arc.*;
import arc.struct.*;
import arc.graphics.*;
import arc.graphics.g2d.*;
import arc.math.*;
import arc.util.*;
import mindustry.*;
import mindustry.ctype.*;
import mindustry.entities.*;
import mindustry.entities.bullet.*;
import mindustry.entities.type.*;
import mindustry.gen.*;
import mindustry.graphics.*;
import mindustry.type.*;
import mindustry.world.*;
import mindustry.world.blocks.*;
import mindustry.world.blocks.defense.*;
import mindustry.world.blocks.defense.turrets.*;
import mindustry.world.blocks.distribution.*;
import mindustry.world.blocks.liquid.*;
import mindustry.world.blocks.logic.*;
import mindustry.world.blocks.power.*;
import mindustry.world.blocks.production.*;
import mindustry.world.blocks.sandbox.*;
import mindustry.world.blocks.storage.*;
import mindustry.world.blocks.units.*;
import mindustry.world.consumers.*;
import mindustry.world.meta.*;
import mindustry.world.modules.*;
2019-01-07 18:39:06 -05:00
public class Blocks implements ContentList{
public static Block
2019-01-07 21:22:06 -05:00
//environment
2019-05-05 14:16:34 -04:00
air, spawn, deepwater, water, taintedWater, tar, stone, craters, charr, sand, darksand, ice, snow, darksandTaintedWater,
holostone, rocks, sporerocks, icerocks, cliffs, sporePine, snowPine, pine, shrubs, whiteTree, whiteTreeDead, sporeCluster,
iceSnow, sandWater, darksandWater, duneRocks, sandRocks, moss, sporeMoss, shale, shaleRocks, shaleBoulder, sandBoulder, grass, salt,
2019-04-12 23:03:34 -04:00
metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor5, ignarock, magmarock, hotrock, snowrocks, rock, snowrock, saltRocks,
2019-04-11 16:41:46 -04:00
darkPanel1, darkPanel2, darkPanel3, darkPanel4, darkPanel5, darkPanel6, darkMetal,
2019-04-20 19:57:20 -04:00
pebbles, tendrils,
2019-01-07 21:22:06 -05:00
2019-03-12 13:28:00 -04:00
//ores
oreCopper, oreLead, oreScrap, oreCoal, oreTitanium, oreThorium,
2019-01-07 21:22:06 -05:00
//crafting
siliconSmelter, kiln, graphitePress, plastaniumCompressor, multiPress, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, cryofluidMixer,
melter, separator, sporePress, pulverizer, incinerator, coalCentrifuge,
2019-01-07 21:22:06 -05:00
//sandbox
2019-12-12 21:11:14 +01:00
powerSource, powerVoid, itemSource, itemVoid, liquidSource, liquidVoid, message, illuminator,
2019-01-07 21:22:06 -05:00
//defense
copperWall, copperWallLarge, titaniumWall, titaniumWallLarge, plastaniumWall, plastaniumWallLarge, thoriumWall, thoriumWallLarge, door, doorLarge,
phaseWall, phaseWallLarge, surgeWall, surgeWallLarge, mender, mendProjector, overdriveProjector, forceProjector, shockMine,
scrapWall, scrapWallLarge, scrapWallHuge, scrapWallGigantic, thruster, //ok, these names are getting ridiculous, but at least I don't have humongous walls yet
2019-01-07 21:22:06 -05:00
2019-02-08 16:29:10 -05:00
//transport
conveyor, titaniumConveyor, plastaniumConveyor, armoredConveyor, distributor, junction, itemBridge, phaseConveyor, sorter, invertedSorter, router, overflowGate, underflowGate, massDriver,
2019-01-07 21:22:06 -05:00
//liquid
mechanicalPump, rotaryPump, thermalPump, conduit, pulseConduit, platedConduit, liquidRouter, liquidTank, liquidJunction, bridgeConduit, phaseConduit,
2019-01-07 21:22:06 -05:00
//power
combustionGenerator, thermalGenerator, turbineGenerator, differentialGenerator, rtgGenerator, solarPanel, largeSolarPanel, thoriumReactor,
impactReactor, battery, batteryLarge, powerNode, powerNodeLarge, surgeTower, diode,
2019-01-07 21:22:06 -05:00
//production
mechanicalDrill, pneumaticDrill, laserDrill, blastDrill, waterExtractor, oilExtractor, cultivator,
2019-01-07 21:22:06 -05:00
//storage
2019-03-27 22:13:40 -04:00
coreShard, coreFoundation, coreNucleus, vault, container, unloader, launchPad, launchPadLarge,
2019-01-07 21:22:06 -05:00
//turrets
duo, scatter, scorch, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, spectre, meltdown,
2019-01-07 21:22:06 -05:00
//units
commandCenter, draugFactory, spiritFactory, phantomFactory, wraithFactory, ghoulFactory, revenantFactory, daggerFactory, crawlerFactory, titanFactory,
fortressFactory, repairPoint,
2019-01-07 21:22:06 -05:00
//upgrades
dartPad, deltaPad, tauPad, omegaPad, javelinPad, tridentPad, glaivePad;
2019-01-07 18:39:06 -05:00
@Override
public void load(){
2019-01-07 21:22:06 -05:00
//region environment
2019-01-07 18:39:06 -05:00
2019-04-08 09:03:18 -04:00
air = new Floor("air"){
{
2019-01-07 18:39:06 -05:00
alwaysReplace = true;
hasShadow = false;
2019-01-07 18:39:06 -05:00
}
2019-05-05 22:09:02 -04:00
public void draw(Tile tile){}
public void load(){}
public void init(){}
2019-04-08 09:03:18 -04:00
public boolean isHidden(){
return true;
}
public TextureRegion[] variantRegions(){
if(variantRegions == null){
variantRegions = new TextureRegion[]{Core.atlas.find("clear")};
}
return variantRegions;
}
2019-01-07 18:39:06 -05:00
};
2019-05-05 14:16:34 -04:00
//create special blockpart variants
for(int dx = 0; dx < BlockPart.maxSize; dx++){
for(int dy = 0; dy < BlockPart.maxSize; dy++){
2019-05-05 19:05:46 -04:00
int fx = dx - BlockPart.maxSize/2, fy = dy - BlockPart.maxSize/2;
if(fx != 0 || fy != 0){
new BlockPart(fx, fy);
}
2019-05-05 14:16:34 -04:00
}
}
2019-01-07 18:39:06 -05:00
2019-05-05 22:09:02 -04:00
spawn = new OverlayFloor("spawn"){
2019-05-26 16:46:44 -04:00
{
variants = 0;
}
2019-05-05 22:09:02 -04:00
public void draw(Tile tile){}
};
2019-01-07 18:39:06 -05:00
2019-05-05 19:05:46 -04:00
//Registers build blocks
2019-01-07 18:39:06 -05:00
//no reference is needed here since they can be looked up by name later
2019-05-05 19:05:46 -04:00
for(int i = 1; i <= BuildBlock.maxSize; i++){
new BuildBlock(i);
2019-01-07 18:39:06 -05:00
}
deepwater = new Floor("deepwater"){{
speedMultiplier = 0.2f;
variants = 0;
liquidDrop = Liquids.water;
isLiquid = true;
status = StatusEffects.wet;
2019-01-08 20:32:22 -05:00
statusDuration = 120f;
2019-01-07 18:39:06 -05:00
drownTime = 140f;
cacheLayer = CacheLayer.water;
}};
water = new Floor("water"){{
speedMultiplier = 0.5f;
variants = 0;
status = StatusEffects.wet;
2019-01-08 20:32:22 -05:00
statusDuration = 90f;
2019-01-07 18:39:06 -05:00
liquidDrop = Liquids.water;
isLiquid = true;
cacheLayer = CacheLayer.water;
}};
2019-03-22 19:16:15 -04:00
taintedWater = new Floor("tainted-water"){{
speedMultiplier = 0.17f;
variants = 0;
status = StatusEffects.wet;
statusDuration = 140f;
drownTime = 120f;
liquidDrop = Liquids.water;
isLiquid = true;
cacheLayer = CacheLayer.water;
}};
darksandTaintedWater = new Floor("darksand-tainted-water"){{
speedMultiplier = 0.75f;
variants = 0;
status = StatusEffects.wet;
statusDuration = 60f;
liquidDrop = Liquids.water;
isLiquid = true;
cacheLayer = CacheLayer.water;
}};
sandWater = new Floor("sand-water"){{
speedMultiplier = 0.8f;
variants = 0;
status = StatusEffects.wet;
statusDuration = 50f;
liquidDrop = Liquids.water;
isLiquid = true;
cacheLayer = CacheLayer.water;
}};
darksandWater = new Floor("darksand-water"){{
speedMultiplier = 0.8f;
variants = 0;
status = StatusEffects.wet;
statusDuration = 50f;
liquidDrop = Liquids.water;
isLiquid = true;
cacheLayer = CacheLayer.water;
}};
2019-01-07 18:39:06 -05:00
tar = new Floor("tar"){{
drownTime = 150f;
status = StatusEffects.tarred;
2019-01-08 20:32:22 -05:00
statusDuration = 240f;
2019-01-07 18:39:06 -05:00
speedMultiplier = 0.19f;
variants = 0;
liquidDrop = Liquids.oil;
isLiquid = true;
cacheLayer = CacheLayer.tar;
2019-01-07 18:39:06 -05:00
}};
stone = new Floor("stone"){{
2019-03-12 13:28:00 -04:00
}};
craters = new Floor("craters"){{
2019-04-15 22:52:44 -04:00
variants = 3;
blendGroup = stone;
2019-01-07 18:39:06 -05:00
}};
charr = new Floor("char"){{
blendGroup = stone;
}};
ignarock = new Floor("ignarock"){{
}};
hotrock = new Floor("hotrock"){{
attributes.set(Attribute.heat, 0.5f);
blendGroup = ignarock;
}};
magmarock = new Floor("magmarock"){{
attributes.set(Attribute.heat, 0.75f);
updateEffect = Fx.magmasmoke;
blendGroup = ignarock;
}};
2019-01-07 18:39:06 -05:00
sand = new Floor("sand"){{
itemDrop = Items.sand;
2019-01-07 18:39:06 -05:00
playerUnmineable = true;
}};
darksand = new Floor("darksand"){{
itemDrop = Items.sand;
playerUnmineable = true;
}};
2019-01-29 22:26:02 -05:00
holostone = new Floor("holostone"){{
2019-03-22 19:16:15 -04:00
2019-01-29 22:26:02 -05:00
}};
grass = new Floor("grass"){{
}};
salt = new Floor("salt"){{
variants = 0;
}};
2019-01-29 22:26:02 -05:00
snow = new Floor("snow"){{
attributes.set(Attribute.water, 0.2f);
2019-01-29 22:26:02 -05:00
}};
2019-01-07 18:39:06 -05:00
ice = new Floor("ice"){{
//TODO fix drag/speed
2019-02-07 09:36:39 -05:00
dragMultiplier = 1f;
speedMultiplier = 1f;
attributes.set(Attribute.water, 0.4f);
2019-01-07 18:39:06 -05:00
}};
iceSnow = new Floor("ice-snow"){{
variants = 3;
attributes.set(Attribute.water, 0.3f);
}};
cliffs = new StaticWall("cliffs"){{
variants = 1;
fillsTile = false;
}};
2019-01-27 23:26:07 -05:00
rocks = new StaticWall("rocks"){{
2019-01-07 18:39:06 -05:00
variants = 2;
}};
sporerocks = new StaticWall("sporerocks"){{
variants = 2;
}};
rock = new Rock("rock"){{
variants = 2;
}};
snowrock = new Rock("snowrock"){{
variants = 2;
}};
2019-01-27 23:26:07 -05:00
icerocks = new StaticWall("icerocks"){{
2019-01-20 21:11:58 -05:00
variants = 2;
2019-01-12 16:55:24 -05:00
}};
2019-01-20 21:11:58 -05:00
2019-02-02 12:35:36 -05:00
snowrocks = new StaticWall("snowrocks"){{
variants = 2;
}};
2019-01-30 18:39:10 -05:00
duneRocks = new StaticWall("dunerocks"){{
variants = 2;
}};
sandRocks = new StaticWall("sandrocks"){{
variants = 2;
}};
2019-04-12 23:03:34 -04:00
saltRocks = new StaticWall("saltrocks"){{
}};
2019-07-03 23:36:51 -04:00
sporePine = new StaticTree("spore-pine"){{
2019-03-12 16:37:32 -04:00
variants = 0;
}};
snowPine = new StaticTree("snow-pine"){{
variants = 0;
}};
2019-07-03 23:36:51 -04:00
pine = new StaticTree("pine"){{
variants = 0;
}};
2019-04-16 00:49:14 -04:00
shrubs = new StaticWall("shrubs"){{
}};
whiteTreeDead = new TreeBlock("white-tree-dead"){{
2019-01-27 18:09:59 -05:00
}};
whiteTree = new TreeBlock("white-tree"){{
2019-01-27 23:26:07 -05:00
}};
sporeCluster = new Rock("spore-cluster"){{
variants = 3;
2019-01-27 23:26:07 -05:00
}};
shale = new Floor("shale"){{
variants = 3;
attributes.set(Attribute.oil, 0.15f);
}};
shaleRocks = new StaticWall("shalerocks"){{
variants = 2;
}};
shaleBoulder = new Rock("shale-boulder"){{
variants = 2;
}};
sandBoulder = new Rock("sand-boulder"){{
variants = 2;
}};
moss = new Floor("moss"){{
variants = 3;
attributes.set(Attribute.spores, 0.15f);
}};
sporeMoss = new Floor("spore-moss"){{
variants = 3;
attributes.set(Attribute.spores, 0.3f);
}};
2019-02-01 00:04:21 -05:00
metalFloor = new Floor("metal-floor"){{
variants = 0;
}};
metalFloorDamaged = new Floor("metal-floor-damaged"){{
2019-04-16 20:20:44 -04:00
variants = 3;
2019-02-01 00:04:21 -05:00
}};
metalFloor2 = new Floor("metal-floor-2"){{
variants = 0;
}};
metalFloor3 = new Floor("metal-floor-3"){{
variants = 0;
}};
metalFloor5 = new Floor("metal-floor-5"){{
2019-02-01 00:04:21 -05:00
variants = 0;
}};
2019-04-11 16:41:46 -04:00
darkPanel1 = new Floor("dark-panel-1"){{ variants = 0; }};
darkPanel2 = new Floor("dark-panel-2"){{ variants = 0; }};
darkPanel3 = new Floor("dark-panel-3"){{ variants = 0; }};
darkPanel4 = new Floor("dark-panel-4"){{ variants = 0; }};
darkPanel5 = new Floor("dark-panel-5"){{ variants = 0; }};
darkPanel6 = new Floor("dark-panel-6"){{ variants = 0; }};
2019-04-19 23:07:21 -04:00
darkMetal = new StaticWall("dark-metal");
2019-04-11 16:41:46 -04:00
2019-06-20 00:16:22 -04:00
pebbles = new DoubleOverlayFloor("pebbles");
2019-04-12 23:03:34 -04:00
2019-04-20 19:57:20 -04:00
tendrils = new OverlayFloor("tendrils");
2019-03-12 13:28:00 -04:00
//endregion
//region ore
oreCopper = new OreBlock(Items.copper){{
oreDefault = true;
oreThreshold = 0.81f;
oreScale = 23.47619f;
}};
oreLead = new OreBlock(Items.lead){{
oreDefault = true;
oreThreshold = 0.828f;
oreScale = 23.952381f;
}};
2019-03-12 13:28:00 -04:00
oreScrap = new OreBlock(Items.scrap);
oreCoal = new OreBlock(Items.coal){{
oreDefault = true;
oreThreshold = 0.846f;
oreScale = 24.428572f;
}};
oreTitanium = new OreBlock(Items.titanium){{
oreDefault = true;
oreThreshold = 0.864f;
oreScale = 24.904762f;
}};
oreThorium = new OreBlock(Items.thorium){{
oreDefault = true;
oreThreshold = 0.882f;
oreScale = 25.380953f;
}};
2019-03-12 13:28:00 -04:00
2019-01-07 18:39:06 -05:00
//endregion
//region crafting
graphitePress = new GenericCrafter("graphite-press"){{
2019-08-03 00:04:33 -04:00
requirements(Category.crafting, ItemStack.with(Items.copper, 75, Items.lead, 30));
craftEffect = Fx.pulverizeMedium;
2019-03-30 18:48:54 -04:00
outputItem = new ItemStack(Items.graphite, 1);
craftTime = 90f;
2019-01-07 18:39:06 -05:00
size = 2;
hasItems = true;
2019-01-07 18:39:06 -05:00
consumes.item(Items.coal, 2);
2019-01-07 18:39:06 -05:00
}};
multiPress = new GenericCrafter("multi-press"){{
2019-08-03 00:04:33 -04:00
requirements(Category.crafting, ItemStack.with(Items.titanium, 100, Items.silicon, 25, Items.lead, 100, Items.graphite, 50));
2019-01-23 23:43:31 -05:00
2019-01-26 11:32:39 -05:00
craftEffect = Fx.pulverizeMedium;
2019-03-30 18:48:54 -04:00
outputItem = new ItemStack(Items.graphite, 2);
craftTime = 30f;
2019-02-02 22:33:12 -05:00
size = 3;
2019-01-26 11:32:39 -05:00
hasItems = true;
hasLiquids = true;
hasPower = true;
2019-01-23 23:43:31 -05:00
consumes.power(1.8f);
consumes.item(Items.coal, 3);
consumes.liquid(Liquids.water, 0.1f);
}};
2019-03-30 18:48:54 -04:00
siliconSmelter = new GenericSmelter("silicon-smelter"){{
2019-08-03 00:04:33 -04:00
requirements(Category.crafting, ItemStack.with(Items.copper, 30, Items.lead, 25));
craftEffect = Fx.smeltsmoke;
2019-03-30 18:48:54 -04:00
outputItem = new ItemStack(Items.silicon, 1);
craftTime = 40f;
size = 2;
2019-04-01 11:57:43 -04:00
hasPower = true;
hasLiquids = false;
flameColor = Color.valueOf("ffef99");
consumes.items(new ItemStack(Items.coal, 1), new ItemStack(Items.sand, 2));
2019-01-26 17:33:20 -05:00
consumes.power(0.50f);
2019-01-23 23:43:31 -05:00
}};
2019-03-30 18:48:54 -04:00
kiln = new GenericSmelter("kiln"){{
2019-08-03 00:04:33 -04:00
requirements(Category.crafting, ItemStack.with(Items.copper, 60, Items.graphite, 30, Items.lead, 30));
craftEffect = Fx.smeltsmoke;
2019-03-30 18:48:54 -04:00
outputItem = new ItemStack(Items.metaglass, 1);
craftTime = 30f;
size = 2;
hasPower = hasItems = true;
flameColor = Color.valueOf("ffc099");
consumes.items(new ItemStack(Items.lead, 1), new ItemStack(Items.sand, 1));
consumes.power(0.60f);
}};
2019-03-30 23:23:57 -04:00
plastaniumCompressor = new GenericCrafter("plastanium-compressor"){{
2019-08-03 00:04:33 -04:00
requirements(Category.crafting, ItemStack.with(Items.silicon, 80, Items.lead, 115, Items.graphite, 60, Items.titanium, 80));
2019-01-07 18:39:06 -05:00
hasItems = true;
liquidCapacity = 60f;
craftTime = 60f;
2019-03-30 18:48:54 -04:00
outputItem = new ItemStack(Items.plastanium, 1);
2019-01-07 18:39:06 -05:00
size = 2;
health = 320;
hasPower = hasLiquids = true;
craftEffect = Fx.formsmoke;
updateEffect = Fx.plasticburn;
consumes.liquid(Liquids.oil, 0.25f);
2019-01-26 17:33:20 -05:00
consumes.power(3f);
2019-01-07 18:39:06 -05:00
consumes.item(Items.titanium, 2);
2019-03-30 23:23:57 -04:00
int topRegion = reg("-top");
drawer = tile -> {
2019-04-02 22:43:20 -04:00
Draw.rect(region, tile.drawx(), tile.drawy());
2019-03-30 23:23:57 -04:00
2019-12-08 18:34:23 -05:00
GenericCrafterEntity entity = tile.ent();
2019-03-30 23:23:57 -04:00
Draw.alpha(Mathf.absin(entity.totalProgress, 3f, 0.9f) * entity.warmup);
Draw.rect(reg(topRegion), tile.drawx(), tile.drawy());
Draw.reset();
};
2019-01-07 18:39:06 -05:00
}};
2019-03-30 18:48:54 -04:00
phaseWeaver = new GenericCrafter("phase-weaver"){{
2019-08-03 00:04:33 -04:00
requirements(Category.crafting, ItemStack.with(Items.silicon, 130, Items.lead, 120, Items.thorium, 75));
2019-01-07 18:39:06 -05:00
craftEffect = Fx.smeltsmoke;
2019-03-30 18:48:54 -04:00
outputItem = new ItemStack(Items.phasefabric, 1);
2019-01-07 18:39:06 -05:00
craftTime = 120f;
size = 2;
2019-04-01 11:57:43 -04:00
hasPower = true;
2019-01-07 18:39:06 -05:00
consumes.items(new ItemStack(Items.thorium, 4), new ItemStack(Items.sand, 10));
2019-01-26 17:33:20 -05:00
consumes.power(5f);
itemCapacity = 20;
2019-03-30 18:48:54 -04:00
2019-03-30 23:23:57 -04:00
int bottomRegion = reg("-bottom"), weaveRegion = reg("-weave");
2019-03-30 18:48:54 -04:00
drawIcons = () -> new TextureRegion[]{Core.atlas.find(name + "-bottom"), Core.atlas.find(name), Core.atlas.find(name + "-weave")};
2019-04-04 22:05:12 -04:00
2019-03-30 18:48:54 -04:00
drawer = tile -> {
2019-12-08 18:34:23 -05:00
GenericCrafterEntity entity = tile.ent();
2019-03-30 18:48:54 -04:00
Draw.rect(reg(bottomRegion), tile.drawx(), tile.drawy());
Draw.rect(reg(weaveRegion), tile.drawx(), tile.drawy(), entity.totalProgress);
Draw.color(Pal.accent);
Draw.alpha(entity.warmup);
Lines.lineAngleCenter(
2019-08-27 09:27:09 -04:00
tile.drawx() + Mathf.sin(entity.totalProgress, 6f, Vars.tilesize / 3f * size),
2019-03-30 18:48:54 -04:00
tile.drawy(),
90,
2019-08-27 09:27:09 -04:00
size * Vars.tilesize / 2f);
2019-03-30 18:48:54 -04:00
Draw.reset();
Draw.rect(region, tile.drawx(), tile.drawy());
};
2019-01-07 18:39:06 -05:00
}};
2019-03-30 18:48:54 -04:00
surgeSmelter = new GenericSmelter("alloy-smelter"){{
2019-08-03 00:04:33 -04:00
requirements(Category.crafting, ItemStack.with(Items.silicon, 80, Items.lead, 80, Items.thorium, 70));
2019-01-07 18:39:06 -05:00
craftEffect = Fx.smeltsmoke;
2019-03-30 18:48:54 -04:00
outputItem = new ItemStack(Items.surgealloy, 1);
2019-01-07 18:39:06 -05:00
craftTime = 75f;
size = 3;
2019-04-01 11:57:43 -04:00
hasPower = true;
2019-01-07 18:39:06 -05:00
2019-01-26 17:33:20 -05:00
consumes.power(4f);
consumes.items(new ItemStack(Items.copper, 3), new ItemStack(Items.lead, 4), new ItemStack(Items.titanium, 2), new ItemStack(Items.silicon, 3));
2019-01-07 18:39:06 -05:00
}};
2019-04-05 20:48:13 -04:00
cryofluidMixer = new LiquidConverter("cryofluidmixer"){{
2019-08-03 00:04:33 -04:00
requirements(Category.crafting, ItemStack.with(Items.lead, 65, Items.silicon, 40, Items.titanium, 60));
2019-08-02 18:37:06 -04:00
outputLiquid = new LiquidStack(Liquids.cryofluid, 0.2f);
craftTime = 120f;
2019-01-07 18:39:06 -05:00
size = 2;
hasPower = true;
2019-03-30 18:48:54 -04:00
hasItems = true;
2019-04-04 21:49:45 -04:00
hasLiquids = true;
2019-03-30 18:48:54 -04:00
rotate = false;
solid = true;
outputsLiquid = true;
2019-01-07 18:39:06 -05:00
2019-01-26 17:33:20 -05:00
consumes.power(1f);
2019-01-07 18:39:06 -05:00
consumes.item(Items.titanium);
2019-08-02 18:37:06 -04:00
consumes.liquid(Liquids.water, 0.2f);
2019-03-30 23:23:57 -04:00
int liquidRegion = reg("-liquid"), topRegion = reg("-top"), bottomRegion = reg("-bottom");
drawIcons = () -> new TextureRegion[]{Core.atlas.find(name + "-bottom"), Core.atlas.find(name + "-top")};
drawer = tile -> {
LiquidModule mod = tile.entity.liquids;
2019-05-05 19:05:46 -04:00
int rotation = rotate ? tile.rotation() * 90 : 0;
2019-03-30 23:23:57 -04:00
Draw.rect(reg(bottomRegion), tile.drawx(), tile.drawy(), rotation);
if(mod.total() > 0.001f){
Draw.color(outputLiquid.liquid.color);
Draw.alpha(mod.get(outputLiquid.liquid) / liquidCapacity);
Draw.rect(reg(liquidRegion), tile.drawx(), tile.drawy(), rotation);
Draw.color();
}
Draw.rect(reg(topRegion), tile.drawx(), tile.drawy(), rotation);
};
2019-01-07 18:39:06 -05:00
}};
blastMixer = new GenericCrafter("blast-mixer"){{
2019-08-03 00:04:33 -04:00
requirements(Category.crafting, ItemStack.with(Items.lead, 30, Items.titanium, 20));
2019-01-07 18:39:06 -05:00
hasItems = true;
hasPower = true;
2019-03-30 18:48:54 -04:00
outputItem = new ItemStack(Items.blastCompound, 1);
2019-01-07 18:39:06 -05:00
size = 2;
consumes.items(new ItemStack(Items.pyratite, 1), new ItemStack(Items.sporePod, 1));
2019-01-26 17:33:20 -05:00
consumes.power(0.40f);
2019-01-07 18:39:06 -05:00
}};
2019-03-30 18:48:54 -04:00
pyratiteMixer = new GenericSmelter("pyratite-mixer"){{
2019-08-03 00:04:33 -04:00
requirements(Category.crafting, ItemStack.with(Items.copper, 50, Items.lead, 25));
flameColor = Color.clear;
2019-01-07 18:39:06 -05:00
hasItems = true;
hasPower = true;
2019-03-30 18:48:54 -04:00
outputItem = new ItemStack(Items.pyratite, 1);
2019-01-07 18:39:06 -05:00
size = 2;
2019-01-26 17:33:20 -05:00
consumes.power(0.20f);
2019-01-07 18:39:06 -05:00
consumes.items(new ItemStack(Items.coal, 1), new ItemStack(Items.lead, 2), new ItemStack(Items.sand, 2));
}};
2019-03-30 18:48:54 -04:00
melter = new GenericCrafter("melter"){{
2019-08-03 00:04:33 -04:00
requirements(Category.crafting, ItemStack.with(Items.copper, 30, Items.lead, 35, Items.graphite, 45));
2019-01-07 18:39:06 -05:00
health = 200;
2019-03-30 18:48:54 -04:00
outputLiquid = new LiquidStack(Liquids.slag, 2f);
2019-01-07 18:39:06 -05:00
craftTime = 10f;
hasLiquids = hasPower = true;
2019-01-26 17:33:20 -05:00
consumes.power(1f);
2019-01-07 21:10:57 -05:00
consumes.item(Items.scrap, 1);
2019-01-07 18:39:06 -05:00
}};
separator = new Separator("separator"){{
2019-08-03 00:04:33 -04:00
requirements(Category.crafting, ItemStack.with(Items.copper, 30, Items.titanium, 25));
2019-02-10 12:32:33 -05:00
results = ItemStack.with(
2019-08-02 13:22:45 -04:00
Items.copper, 5,
Items.lead, 3,
Items.graphite, 2,
Items.titanium, 2
2019-02-10 12:32:33 -05:00
);
2019-01-07 18:39:06 -05:00
hasPower = true;
2019-03-31 17:49:15 -04:00
craftTime = 35f;
2019-01-07 18:39:06 -05:00
size = 2;
consumes.power(1f);
consumes.liquid(Liquids.slag, 0.07f);
2019-01-07 18:39:06 -05:00
}};
2019-03-30 23:23:57 -04:00
sporePress = new GenericCrafter("spore-press"){{
2019-08-03 00:04:33 -04:00
requirements(Category.crafting, ItemStack.with(Items.lead, 35, Items.silicon, 30));
2019-01-07 18:39:06 -05:00
liquidCapacity = 60f;
craftTime = 20f;
2019-04-05 14:10:01 -04:00
outputLiquid = new LiquidStack(Liquids.oil, 6f);
2019-01-07 18:39:06 -05:00
size = 2;
health = 320;
hasLiquids = true;
2019-04-01 11:57:43 -04:00
hasPower = true;
2019-04-04 21:49:45 -04:00
craftEffect = Fx.none;
2019-01-07 18:39:06 -05:00
consumes.item(Items.sporePod, 1);
2019-01-26 17:33:20 -05:00
consumes.power(0.60f);
2019-03-30 23:23:57 -04:00
int[] frameRegions = new int[3];
for(int i = 0; i < 3; i++){
frameRegions[i] = reg("-frame" + i);
}
int liquidRegion = reg("-liquid");
2019-04-08 09:03:18 -04:00
int topRegion = reg("-top");
2019-03-30 23:23:57 -04:00
2019-04-02 15:52:44 -04:00
drawIcons = () -> new TextureRegion[]{Core.atlas.find(name), Core.atlas.find(name + "-top")};
2019-03-30 23:23:57 -04:00
drawer = tile -> {
2019-12-08 18:34:23 -05:00
GenericCrafterEntity entity = tile.ent();
2019-03-30 23:23:57 -04:00
Draw.rect(region, tile.drawx(), tile.drawy());
2019-04-08 09:03:18 -04:00
Draw.rect(reg(frameRegions[(int)Mathf.absin(entity.totalProgress, 5f, 2.999f)]), tile.drawx(), tile.drawy());
Draw.color(Color.clear, tile.entity.liquids.current().color, tile.entity.liquids.total() / liquidCapacity);
2019-03-30 23:23:57 -04:00
Draw.rect(reg(liquidRegion), tile.drawx(), tile.drawy());
Draw.color();
Draw.rect(reg(topRegion), tile.drawx(), tile.drawy());
};
2019-01-07 18:39:06 -05:00
}};
2019-03-30 23:23:57 -04:00
pulverizer = new GenericCrafter("pulverizer"){{
2019-08-03 00:04:33 -04:00
requirements(Category.crafting, ItemStack.with(Items.copper, 30, Items.lead, 25));
2019-03-30 18:48:54 -04:00
outputItem = new ItemStack(Items.sand, 1);
2019-01-07 18:39:06 -05:00
craftEffect = Fx.pulverize;
craftTime = 40f;
updateEffect = Fx.pulverizeSmall;
hasItems = hasPower = true;
2019-01-07 21:10:57 -05:00
consumes.item(Items.scrap, 1);
2019-01-26 17:33:20 -05:00
consumes.power(0.50f);
2019-03-30 23:23:57 -04:00
int rotatorRegion = reg("-rotator");
2019-04-02 15:52:44 -04:00
drawIcons = () -> new TextureRegion[]{Core.atlas.find(name), Core.atlas.find(name + "-rotator")};
2019-03-30 23:23:57 -04:00
drawer = tile -> {
2019-12-08 18:34:23 -05:00
GenericCrafterEntity entity = tile.ent();
2019-03-30 23:23:57 -04:00
Draw.rect(region, tile.drawx(), tile.drawy());
Draw.rect(reg(rotatorRegion), tile.drawx(), tile.drawy(), entity.totalProgress * 2f);
};
2019-01-07 18:39:06 -05:00
}};
coalCentrifuge = new GenericCrafter("coal-centrifuge"){{
2019-08-03 00:04:33 -04:00
requirements(Category.crafting, ItemStack.with(Items.titanium, 20, Items.graphite, 40, Items.lead, 30));
craftEffect = Fx.smeltsmoke;
outputItem = new ItemStack(Items.coal, 1);
craftTime = 30f;
size = 2;
hasPower = hasItems = hasLiquids = true;
2019-04-09 13:19:55 -04:00
consumes.liquid(Liquids.oil, 0.09f);
consumes.power(0.5f);
}};
2019-01-07 18:39:06 -05:00
incinerator = new Incinerator("incinerator"){{
2019-08-03 00:04:33 -04:00
requirements(Category.crafting, ItemStack.with(Items.graphite, 5, Items.lead, 15));
2019-01-07 18:39:06 -05:00
health = 90;
2019-01-26 17:33:20 -05:00
consumes.power(0.50f);
2019-01-07 18:39:06 -05:00
}};
2019-01-20 21:11:58 -05:00
2019-01-07 18:39:06 -05:00
//endregion
//region defense
int wallHealthMultiplier = 4;
2019-01-07 18:39:06 -05:00
copperWall = new Wall("copper-wall"){{
2019-08-03 00:04:33 -04:00
requirements(Category.defense, ItemStack.with(Items.copper, 6));
2019-01-07 18:39:06 -05:00
health = 80 * wallHealthMultiplier;
}};
copperWallLarge = new Wall("copper-wall-large"){{
2019-10-01 21:33:51 -04:00
requirements(Category.defense, ItemStack.mult(copperWall.requirements, 4));
2019-01-07 18:39:06 -05:00
health = 80 * 4 * wallHealthMultiplier;
size = 2;
}};
2019-01-07 21:22:06 -05:00
titaniumWall = new Wall("titanium-wall"){{
2019-08-03 00:04:33 -04:00
requirements(Category.defense, ItemStack.with(Items.titanium, 6));
2019-01-07 18:39:06 -05:00
health = 110 * wallHealthMultiplier;
}};
2019-01-07 21:22:06 -05:00
titaniumWallLarge = new Wall("titanium-wall-large"){{
2019-10-01 21:33:51 -04:00
requirements(Category.defense, ItemStack.mult(titaniumWall.requirements, 4));
2019-01-07 18:39:06 -05:00
health = 110 * wallHealthMultiplier * 4;
size = 2;
}};
plastaniumWall = new Wall("plastanium-wall"){{
2019-10-27 18:16:41 -04:00
requirements(Category.defense, ItemStack.with(Items.plastanium, 5, Items.metaglass, 2));
health = 190 * wallHealthMultiplier;
insulated = true;
}};
plastaniumWallLarge = new Wall("plastanium-wall-large"){{
requirements(Category.defense, ItemStack.mult(plastaniumWall.requirements, 4));
health = 190 * wallHealthMultiplier * 4;
size = 2;
insulated = true;
}};
2019-01-07 18:39:06 -05:00
thoriumWall = new Wall("thorium-wall"){{
2019-08-03 00:04:33 -04:00
requirements(Category.defense, ItemStack.with(Items.thorium, 6));
2019-01-07 18:39:06 -05:00
health = 200 * wallHealthMultiplier;
}};
thoriumWallLarge = new Wall("thorium-wall-large"){{
2019-10-01 21:33:51 -04:00
requirements(Category.defense, ItemStack.mult(thoriumWall.requirements, 4));
2019-01-07 18:39:06 -05:00
health = 200 * wallHealthMultiplier * 4;
size = 2;
}};
phaseWall = new DeflectorWall("phase-wall"){{
2019-08-03 00:04:33 -04:00
requirements(Category.defense, ItemStack.with(Items.phasefabric, 6));
2019-01-07 18:39:06 -05:00
health = 150 * wallHealthMultiplier;
}};
phaseWallLarge = new DeflectorWall("phase-wall-large"){{
2019-10-01 21:33:51 -04:00
requirements(Category.defense, ItemStack.mult(phaseWall.requirements, 4));
2019-01-07 18:39:06 -05:00
health = 150 * 4 * wallHealthMultiplier;
size = 2;
}};
surgeWall = new SurgeWall("surge-wall"){{
2019-08-03 00:04:33 -04:00
requirements(Category.defense, ItemStack.with(Items.surgealloy, 6));
2019-01-07 18:39:06 -05:00
health = 230 * wallHealthMultiplier;
}};
surgeWallLarge = new SurgeWall("surge-wall-large"){{
2019-10-01 21:33:51 -04:00
requirements(Category.defense, ItemStack.mult(surgeWall.requirements, 4));
2019-01-07 18:39:06 -05:00
health = 230 * 4 * wallHealthMultiplier;
size = 2;
}};
door = new Door("door"){{
2019-08-03 11:29:37 -04:00
requirements(Category.defense, ItemStack.with(Items.graphite, 6, Items.silicon, 4));
2019-01-07 18:39:06 -05:00
health = 100 * wallHealthMultiplier;
}};
doorLarge = new Door("door-large"){{
2019-10-01 21:33:51 -04:00
requirements(Category.defense, ItemStack.mult(door.requirements, 4));
2019-01-07 18:39:06 -05:00
openfx = Fx.dooropenlarge;
closefx = Fx.doorcloselarge;
health = 100 * 4 * wallHealthMultiplier;
size = 2;
}};
scrapWall = new Wall("scrap-wall"){{
requirements(Category.defense, BuildVisibility.sandboxOnly, ItemStack.with());
health = 60 * wallHealthMultiplier;
variants = 5;
}};
scrapWallLarge = new Wall("scrap-wall-large"){{
requirements(Category.defense, BuildVisibility.sandboxOnly, ItemStack.with());
health = 60 * 4 * wallHealthMultiplier;
size = 2;
variants = 4;
}};
scrapWallHuge = new Wall("scrap-wall-huge"){{
requirements(Category.defense, BuildVisibility.sandboxOnly, ItemStack.with());
health = 60 * 9 * wallHealthMultiplier;
size = 3;
variants = 3;
}};
scrapWallGigantic = new Wall("scrap-wall-gigantic"){{
requirements(Category.defense, BuildVisibility.sandboxOnly, ItemStack.with());
health = 60 * 16 * wallHealthMultiplier;
size = 4;
}};
thruster = new Wall("thruster"){{
health = 55 * 16 * wallHealthMultiplier;
size = 4;
}};
mender = new MendProjector("mender"){{
2019-08-03 00:04:33 -04:00
requirements(Category.effect, ItemStack.with(Items.lead, 30, Items.copper, 25));
2019-04-02 22:43:20 -04:00
consumes.power(0.3f);
size = 1;
reload = 200f;
range = 40f;
2019-04-07 11:25:08 -04:00
healPercent = 4f;
2019-03-26 20:10:01 -04:00
phaseBoost = 4f;
phaseRangeBoost = 20f;
health = 80;
2019-04-07 14:09:34 -04:00
consumes.item(Items.silicon).boost();
}};
2019-01-07 18:39:06 -05:00
mendProjector = new MendProjector("mend-projector"){{
2019-08-03 00:04:33 -04:00
requirements(Category.effect, ItemStack.with(Items.lead, 100, Items.titanium, 25, Items.silicon, 40));
2019-04-02 22:43:20 -04:00
consumes.power(1.5f);
2019-01-07 18:39:06 -05:00
size = 2;
reload = 250f;
2019-03-26 20:10:01 -04:00
range = 85f;
healPercent = 14f;
health = 80 * size * size;
2019-04-07 14:09:34 -04:00
consumes.item(Items.phasefabric).boost();
2019-01-07 18:39:06 -05:00
}};
overdriveProjector = new OverdriveProjector("overdrive-projector"){{
2019-08-03 00:04:33 -04:00
requirements(Category.effect, ItemStack.with(Items.lead, 100, Items.titanium, 75, Items.silicon, 75, Items.plastanium, 30));
2019-01-26 17:33:20 -05:00
consumes.power(3.50f);
2019-01-07 18:39:06 -05:00
size = 2;
2019-04-07 14:09:34 -04:00
consumes.item(Items.phasefabric).boost();
2019-01-07 18:39:06 -05:00
}};
forceProjector = new ForceProjector("force-projector"){{
2019-08-03 00:04:33 -04:00
requirements(Category.effect, ItemStack.with(Items.lead, 100, Items.titanium, 75, Items.silicon, 125));
2019-01-07 18:39:06 -05:00
size = 3;
2019-04-07 14:09:34 -04:00
consumes.item(Items.phasefabric).boost();
consumes.power(3f);
2019-01-07 18:39:06 -05:00
}};
shockMine = new ShockMine("shock-mine"){{
2019-08-03 00:04:33 -04:00
requirements(Category.effect, ItemStack.with(Items.lead, 25, Items.silicon, 12));
hasShadow = false;
2019-01-07 18:39:06 -05:00
health = 40;
damage = 11;
tileDamage = 7f;
length = 10;
tendrils = 5;
}};
2019-01-20 21:11:58 -05:00
2019-01-07 18:39:06 -05:00
//endregion
//region distribution
conveyor = new Conveyor("conveyor"){{
2019-01-20 21:11:58 -05:00
requirements(Category.distribution, ItemStack.with(Items.copper, 1), true);
2019-01-07 18:39:06 -05:00
health = 45;
speed = 0.03f;
2020-01-11 12:47:54 -05:00
displayedSpeed = 4.2f;
2019-01-07 18:39:06 -05:00
}};
titaniumConveyor = new Conveyor("titanium-conveyor"){{
2019-08-02 13:22:45 -04:00
requirements(Category.distribution, ItemStack.with(Items.copper, 1, Items.lead, 1, Items.titanium, 1));
2019-01-07 18:39:06 -05:00
health = 65;
2019-03-27 22:13:40 -04:00
speed = 0.08f;
2020-01-11 12:47:54 -05:00
displayedSpeed = 10f;
2019-01-07 18:39:06 -05:00
}};
plastaniumConveyor = new CraterConveyor("plastanium-conveyor"){{
requirements(Category.distribution, ItemStack.with(Items.plastanium, 1, Items.silicon, 1, Items.graphite, 1));
health = 75;
2020-03-06 11:06:35 +01:00
speed = 0.04f;
}};
armoredConveyor = new ArmoredConveyor("armored-conveyor"){{
requirements(Category.distribution, ItemStack.with(Items.plastanium, 1, Items.thorium, 1, Items.metaglass, 1));
2019-09-22 15:12:15 -04:00
health = 180;
speed = 0.08f;
2020-01-11 12:47:54 -05:00
displayedSpeed = 10f;
2019-09-22 15:12:15 -04:00
}};
2019-01-07 18:39:06 -05:00
junction = new Junction("junction"){{
2019-12-30 12:55:35 -05:00
requirements(Category.distribution, ItemStack.with(Items.copper, 2), true);
2019-01-07 18:39:06 -05:00
speed = 26;
2019-09-24 19:16:12 -04:00
capacity = 12;
2019-04-22 23:56:46 -04:00
health = 30;
2019-12-30 12:55:35 -05:00
buildCostMultiplier = 6f;
2019-01-07 18:39:06 -05:00
}};
itemBridge = new BufferedItemBridge("bridge-conveyor"){{
2019-08-03 00:04:33 -04:00
requirements(Category.distribution, ItemStack.with(Items.lead, 4, Items.copper, 4));
2019-01-07 18:39:06 -05:00
range = 4;
2019-05-02 23:10:41 -04:00
speed = 70f;
2019-09-24 19:16:12 -04:00
bufferCapacity = 14;
2019-01-07 18:39:06 -05:00
}};
phaseConveyor = new ItemBridge("phase-conveyor"){{
2019-08-03 00:04:33 -04:00
requirements(Category.distribution, ItemStack.with(Items.phasefabric, 5, Items.silicon, 7, Items.lead, 10, Items.graphite, 10));
2019-01-07 18:39:06 -05:00
range = 12;
2019-12-07 11:37:13 -05:00
canOverdrive = false;
2019-01-07 18:39:06 -05:00
hasPower = true;
2019-01-26 17:33:20 -05:00
consumes.power(0.30f);
2019-01-07 18:39:06 -05:00
}};
2019-01-20 15:21:46 -05:00
sorter = new Sorter("sorter"){{
2019-08-03 00:04:33 -04:00
requirements(Category.distribution, ItemStack.with(Items.lead, 2, Items.copper, 2));
2019-12-30 12:55:35 -05:00
buildCostMultiplier = 3f;
2019-10-13 12:58:58 -04:00
}};
2019-01-20 21:11:58 -05:00
2019-10-13 12:58:58 -04:00
invertedSorter = new Sorter("inverted-sorter"){{
requirements(Category.distribution, ItemStack.with(Items.lead, 2, Items.copper, 2));
2019-12-30 12:55:35 -05:00
buildCostMultiplier = 3f;
2019-10-13 12:58:58 -04:00
invert = true;
2019-01-20 15:21:46 -05:00
}};
2019-01-07 18:39:06 -05:00
2019-01-20 15:21:46 -05:00
router = new Router("router"){{
2019-08-03 00:04:33 -04:00
requirements(Category.distribution, ItemStack.with(Items.copper, 3));
2019-12-30 12:55:35 -05:00
buildCostMultiplier = 2f;
2019-01-20 15:21:46 -05:00
}};
2019-01-07 18:39:06 -05:00
distributor = new Router("distributor"){{
2019-08-03 00:04:33 -04:00
requirements(Category.distribution, ItemStack.with(Items.lead, 4, Items.copper, 4));
2019-01-07 18:39:06 -05:00
size = 2;
}};
2019-01-20 21:11:58 -05:00
overflowGate = new OverflowGate("overflow-gate"){{
2019-08-03 00:04:33 -04:00
requirements(Category.distribution, ItemStack.with(Items.lead, 2, Items.copper, 4));
2019-12-30 12:55:35 -05:00
buildCostMultiplier = 3f;
2019-01-20 21:11:58 -05:00
}};
2019-01-07 18:39:06 -05:00
2020-01-20 18:54:25 -05:00
underflowGate = new OverflowGate("underflow-gate"){{
requirements(Category.distribution, ItemStack.with(Items.lead, 2, Items.copper, 4));
buildCostMultiplier = 3f;
invert = true;
}};
2019-01-07 18:39:06 -05:00
massDriver = new MassDriver("mass-driver"){{
2019-08-03 00:04:33 -04:00
requirements(Category.distribution, ItemStack.with(Items.titanium, 125, Items.silicon, 75, Items.lead, 125, Items.thorium, 50));
2019-01-07 18:39:06 -05:00
size = 3;
itemCapacity = 120;
reloadTime = 200f;
2019-01-07 18:39:06 -05:00
range = 440f;
2019-05-31 09:10:37 -04:00
consumes.power(1.75f);
2019-01-07 18:39:06 -05:00
}};
2019-01-20 21:11:58 -05:00
2019-01-07 18:39:06 -05:00
//endregion
//region liquid
mechanicalPump = new Pump("mechanical-pump"){{
2019-10-05 00:21:48 -04:00
requirements(Category.liquid, ItemStack.with(Items.copper, 15, Items.metaglass, 10));
2019-01-07 18:39:06 -05:00
pumpAmount = 0.1f;
}};
rotaryPump = new Pump("rotary-pump"){{
2019-10-05 00:21:48 -04:00
requirements(Category.liquid, ItemStack.with(Items.copper, 70, Items.metaglass, 50, Items.silicon, 20, Items.titanium, 35));
2019-03-02 23:06:14 -05:00
pumpAmount = 0.8f;
2019-03-08 19:07:23 -05:00
consumes.power(0.15f);
2019-01-07 18:39:06 -05:00
liquidCapacity = 30f;
hasPower = true;
size = 2;
}};
thermalPump = new Pump("thermal-pump"){{
2019-10-05 00:21:48 -04:00
requirements(Category.liquid, ItemStack.with(Items.copper, 80, Items.metaglass, 70, Items.silicon, 30, Items.titanium, 40, Items.thorium, 35));
2019-07-29 12:33:11 -04:00
pumpAmount = 1.5f;
2019-01-26 17:33:20 -05:00
consumes.power(0.30f);
2019-01-07 18:39:06 -05:00
liquidCapacity = 40f;
hasPower = true;
size = 3;
2019-01-07 18:39:06 -05:00
}};
2019-12-07 11:37:13 -05:00
conduit = new Conduit("conduit"){{
requirements(Category.liquid, ItemStack.with(Items.metaglass, 1));
2019-01-07 18:39:06 -05:00
health = 45;
}};
pulseConduit = new Conduit("pulse-conduit"){{
2019-10-05 00:21:48 -04:00
requirements(Category.liquid, ItemStack.with(Items.titanium, 2, Items.metaglass, 1));
2019-01-07 18:39:06 -05:00
liquidCapacity = 16f;
liquidPressure = 1.025f;
2019-01-07 18:39:06 -05:00
health = 90;
}};
2019-12-07 11:37:13 -05:00
platedConduit = new ArmoredConduit("plated-conduit"){{
requirements(Category.liquid, ItemStack.with(Items.thorium, 2, Items.metaglass, 1, Items.plastanium, 1));
liquidCapacity = 16f;
liquidPressure = 1.025f;
health = 220;
}};
2019-12-07 11:37:13 -05:00
liquidRouter = new LiquidRouter("liquid-router"){{
2019-10-05 00:21:48 -04:00
requirements(Category.liquid, ItemStack.with(Items.graphite, 4, Items.metaglass, 2));
2019-01-07 18:39:06 -05:00
liquidCapacity = 20f;
}};
2019-01-08 09:56:42 -05:00
liquidTank = new LiquidTank("liquid-tank"){{
2019-08-03 00:04:33 -04:00
requirements(Category.liquid, ItemStack.with(Items.titanium, 25, Items.metaglass, 25));
2019-01-07 18:39:06 -05:00
size = 3;
liquidCapacity = 1500f;
health = 500;
}};
2019-12-07 11:37:13 -05:00
liquidJunction = new LiquidJunction("liquid-junction"){{
2019-10-05 00:21:48 -04:00
requirements(Category.liquid, ItemStack.with(Items.graphite, 2, Items.metaglass, 2));
2019-01-20 21:11:58 -05:00
}};
2019-01-07 18:39:06 -05:00
2019-12-07 11:37:13 -05:00
bridgeConduit = new LiquidExtendingBridge("bridge-conduit"){{
2019-10-05 00:21:48 -04:00
requirements(Category.liquid, ItemStack.with(Items.graphite, 4, Items.metaglass, 8));
2019-01-07 18:39:06 -05:00
range = 4;
hasPower = false;
}};
2019-12-07 11:37:13 -05:00
phaseConduit = new LiquidBridge("phase-conduit"){{
2019-08-03 00:04:33 -04:00
requirements(Category.liquid, ItemStack.with(Items.phasefabric, 5, Items.silicon, 7, Items.metaglass, 20, Items.titanium, 10));
2019-01-07 18:39:06 -05:00
range = 12;
hasPower = true;
2019-12-07 11:37:13 -05:00
canOverdrive = false;
2019-01-26 17:33:20 -05:00
consumes.power(0.30f);
2019-01-07 18:39:06 -05:00
}};
2019-01-20 21:11:58 -05:00
2019-01-07 18:39:06 -05:00
//endregion
//region power
2019-01-20 15:21:46 -05:00
powerNode = new PowerNode("power-node"){{
2019-08-03 00:04:33 -04:00
requirements(Category.power, ItemStack.with(Items.copper, 1, Items.lead, 3));
2019-08-02 20:18:42 -04:00
maxNodes = 20;
2019-01-20 15:21:46 -05:00
laserRange = 6;
}};
powerNodeLarge = new PowerNode("power-node-large"){{
2019-08-03 00:04:33 -04:00
requirements(Category.power, ItemStack.with(Items.titanium, 5, Items.lead, 10, Items.silicon, 3));
2019-01-20 15:21:46 -05:00
size = 2;
2019-08-02 20:18:42 -04:00
maxNodes = 30;
2019-01-20 15:21:46 -05:00
laserRange = 9.5f;
}};
surgeTower = new PowerNode("surge-tower"){{
2019-08-03 00:04:33 -04:00
requirements(Category.power, ItemStack.with(Items.titanium, 7, Items.lead, 10, Items.silicon, 15, Items.surgealloy, 15));
size = 2;
maxNodes = 2;
2019-02-02 22:33:12 -05:00
laserRange = 30f;
}};
diode = new PowerDiode("diode"){{
2019-11-11 23:32:49 -05:00
requirements(Category.power, ItemStack.with(Items.silicon, 10, Items.plastanium, 5, Items.metaglass, 10));
}};
2019-01-20 15:21:46 -05:00
battery = new Battery("battery"){{
2019-08-03 00:04:33 -04:00
requirements(Category.power, ItemStack.with(Items.copper, 4, Items.lead, 20));
consumes.powerBuffered(4000f);
2019-01-20 15:21:46 -05:00
}};
batteryLarge = new Battery("battery-large"){{
2019-08-03 00:04:33 -04:00
requirements(Category.power, ItemStack.with(Items.titanium, 20, Items.lead, 40, Items.silicon, 20));
2019-01-20 15:21:46 -05:00
size = 3;
consumes.powerBuffered(50000f);
2019-01-20 15:21:46 -05:00
}};
2019-01-07 18:39:06 -05:00
combustionGenerator = new BurnerGenerator("combustion-generator"){{
2019-08-03 00:04:33 -04:00
requirements(Category.power, ItemStack.with(Items.copper, 25, Items.lead, 15));
2019-01-26 17:33:20 -05:00
powerProduction = 1f;
itemDuration = 120f;
2019-01-07 18:39:06 -05:00
}};
thermalGenerator = new ThermalGenerator("thermal-generator"){{
2019-08-03 00:04:33 -04:00
requirements(Category.power, ItemStack.with(Items.copper, 40, Items.graphite, 35, Items.lead, 50, Items.silicon, 35, Items.metaglass, 40));
2019-02-22 23:16:50 -05:00
powerProduction = 1.8f;
2019-01-07 18:39:06 -05:00
generateEffect = Fx.redgeneratespark;
size = 2;
}};
2019-03-31 17:49:15 -04:00
turbineGenerator = new BurnerGenerator("turbine-generator"){{
2019-08-03 00:04:33 -04:00
requirements(Category.power, ItemStack.with(Items.copper, 35, Items.graphite, 25, Items.lead, 40, Items.silicon, 30));
powerProduction = 6f;
itemDuration = 90f;
2019-01-07 18:39:06 -05:00
consumes.liquid(Liquids.water, 0.05f);
2019-02-22 23:16:50 -05:00
hasLiquids = true;
2019-01-07 18:39:06 -05:00
size = 2;
}};
differentialGenerator = new SingleTypeGenerator("differential-generator"){{
2019-08-03 00:04:33 -04:00
requirements(Category.power, ItemStack.with(Items.copper, 70, Items.titanium, 50, Items.lead, 100, Items.silicon, 65, Items.metaglass, 50));
2019-04-04 14:46:41 -04:00
powerProduction = 16f;
itemDuration = 140f;
2019-03-31 17:49:15 -04:00
hasLiquids = true;
hasItems = true;
2019-03-31 17:49:15 -04:00
size = 3;
2019-04-07 14:09:34 -04:00
consumes.item(Items.pyratite).optional(true, false);
consumes.liquid(Liquids.cryofluid, 0.15f);
}};
2019-01-07 18:39:06 -05:00
rtgGenerator = new DecayGenerator("rtg-generator"){{
2019-08-03 00:04:33 -04:00
requirements(Category.power, ItemStack.with(Items.lead, 100, Items.silicon, 75, Items.phasefabric, 25, Items.plastanium, 75, Items.thorium, 50));
2019-01-07 18:39:06 -05:00
size = 2;
2019-01-26 17:33:20 -05:00
powerProduction = 3f;
itemDuration = 440f;
2019-01-07 18:39:06 -05:00
}};
solarPanel = new SolarGenerator("solar-panel"){{
2019-08-03 00:04:33 -04:00
requirements(Category.power, ItemStack.with(Items.lead, 10, Items.silicon, 15));
2019-03-21 10:36:33 -04:00
powerProduction = 0.06f;
2019-01-07 18:39:06 -05:00
}};
largeSolarPanel = new SolarGenerator("solar-panel-large"){{
2019-08-03 00:04:33 -04:00
requirements(Category.power, ItemStack.with(Items.lead, 100, Items.silicon, 145, Items.phasefabric, 15));
2019-01-07 18:39:06 -05:00
size = 3;
2019-03-21 10:36:33 -04:00
powerProduction = 0.9f;
2019-01-07 18:39:06 -05:00
}};
thoriumReactor = new NuclearReactor("thorium-reactor"){{
2019-08-03 00:04:33 -04:00
requirements(Category.power, ItemStack.with(Items.lead, 300, Items.silicon, 200, Items.graphite, 150, Items.thorium, 150, Items.metaglass, 50));
2019-01-07 18:39:06 -05:00
size = 3;
health = 700;
itemDuration = 360f;
powerProduction = 14f;
consumes.item(Items.thorium);
2019-04-05 20:48:13 -04:00
heating = 0.02f;
2019-11-16 20:05:52 -05:00
consumes.liquid(Liquids.cryofluid, heating / coolantPower).update(false);
2019-01-07 18:39:06 -05:00
}};
2019-02-03 11:22:53 -05:00
impactReactor = new ImpactReactor("impact-reactor"){{
2019-08-03 00:04:33 -04:00
requirements(Category.power, ItemStack.with(Items.lead, 500, Items.silicon, 300, Items.graphite, 400, Items.thorium, 100, Items.surgealloy, 250, Items.metaglass, 250));
2019-01-07 18:39:06 -05:00
size = 4;
2019-02-02 22:33:12 -05:00
health = 900;
2019-05-17 18:10:03 -04:00
powerProduction = 130f;
itemDuration = 140f;
2019-04-04 14:46:41 -04:00
consumes.power(25f);
consumes.item(Items.blastCompound);
2019-05-17 18:10:03 -04:00
consumes.liquid(Liquids.cryofluid, 0.25f);
2019-01-07 18:39:06 -05:00
}};
2019-01-20 21:11:58 -05:00
2019-01-07 18:39:06 -05:00
//endregion power
//region production
mechanicalDrill = new Drill("mechanical-drill"){{
2019-08-03 00:04:33 -04:00
requirements(Category.production, ItemStack.with(Items.copper, 12), true);
2019-01-07 18:39:06 -05:00
tier = 2;
2019-01-17 13:03:06 -05:00
drillTime = 600;
2019-01-07 18:39:06 -05:00
size = 2;
drawMineItem = true;
2019-04-07 14:09:34 -04:00
consumes.liquid(Liquids.water, 0.05f).boost();
2019-01-07 18:39:06 -05:00
}};
pneumaticDrill = new Drill("pneumatic-drill"){{
2019-08-03 00:04:33 -04:00
requirements(Category.production, ItemStack.with(Items.copper, 18, Items.graphite, 10));
2019-01-07 18:39:06 -05:00
tier = 3;
2019-08-01 13:32:38 -04:00
drillTime = 400;
2019-01-07 18:39:06 -05:00
size = 2;
drawMineItem = true;
2019-04-07 14:09:34 -04:00
consumes.liquid(Liquids.water, 0.06f).boost();
2019-01-07 18:39:06 -05:00
}};
laserDrill = new Drill("laser-drill"){{
2019-08-03 00:04:33 -04:00
requirements(Category.production, ItemStack.with(Items.copper, 35, Items.graphite, 30, Items.silicon, 30, Items.titanium, 20));
2019-01-17 13:03:06 -05:00
drillTime = 280;
size = 3;
2019-01-07 18:39:06 -05:00
hasPower = true;
tier = 4;
updateEffect = Fx.pulverizeMedium;
drillEffect = Fx.mineBig;
2019-01-26 17:33:20 -05:00
consumes.power(1.10f);
2019-04-07 14:09:34 -04:00
consumes.liquid(Liquids.water, 0.08f).boost();
2019-01-07 18:39:06 -05:00
}};
blastDrill = new Drill("blast-drill"){{
2019-08-03 00:04:33 -04:00
requirements(Category.production, ItemStack.with(Items.copper, 65, Items.silicon, 60, Items.titanium, 50, Items.thorium, 75));
2019-08-01 13:32:38 -04:00
drillTime = 280;
size = 4;
2019-01-07 18:39:06 -05:00
drawRim = true;
hasPower = true;
tier = 5;
updateEffect = Fx.pulverizeRed;
updateEffectChance = 0.03f;
drillEffect = Fx.mineHuge;
rotateSpeed = 6f;
warmupSpeed = 0.01f;
2019-01-26 17:33:20 -05:00
consumes.power(3f);
2019-04-07 14:09:34 -04:00
consumes.liquid(Liquids.water, 0.1f).boost();
2019-01-07 18:39:06 -05:00
}};
waterExtractor = new SolidPump("water-extractor"){{
2019-08-03 00:04:33 -04:00
requirements(Category.production, ItemStack.with(Items.copper, 25, Items.graphite, 25, Items.lead, 20));
2019-01-07 18:39:06 -05:00
result = Liquids.water;
pumpAmount = 0.13f;
2019-01-07 18:39:06 -05:00
size = 2;
liquidCapacity = 30f;
rotateSpeed = 1.4f;
attribute = Attribute.water;
2019-01-07 18:39:06 -05:00
2019-09-27 16:04:34 -04:00
consumes.power(1f);
2019-01-07 18:39:06 -05:00
}};
2019-04-07 14:09:34 -04:00
cultivator = new Cultivator("cultivator"){{
2019-08-03 00:04:33 -04:00
requirements(Category.production, ItemStack.with(Items.copper, 10, Items.lead, 25, Items.silicon, 10));
2019-04-07 14:09:34 -04:00
outputItem = new ItemStack(Items.sporePod, 1);
2019-07-28 10:53:26 -04:00
craftTime = 140;
2019-04-07 14:09:34 -04:00
size = 2;
hasLiquids = true;
hasPower = true;
hasItems = true;
consumes.power(0.80f);
2019-07-28 10:53:26 -04:00
consumes.liquid(Liquids.water, 0.18f);
2019-04-07 14:09:34 -04:00
}};
2019-01-07 18:39:06 -05:00
oilExtractor = new Fracker("oil-extractor"){{
2019-08-03 00:04:33 -04:00
requirements(Category.production, ItemStack.with(Items.copper, 150, Items.graphite, 175, Items.lead, 115, Items.thorium, 115, Items.silicon, 75));
2019-01-07 18:39:06 -05:00
result = Liquids.oil;
updateEffect = Fx.pulverize;
liquidCapacity = 50f;
updateEffectChance = 0.05f;
pumpAmount = 0.25f;
2019-01-07 18:39:06 -05:00
size = 3;
liquidCapacity = 30f;
attribute = Attribute.oil;
2019-01-07 18:39:06 -05:00
consumes.item(Items.sand);
2019-01-26 17:33:20 -05:00
consumes.power(3f);
2019-01-07 18:39:06 -05:00
consumes.liquid(Liquids.water, 0.15f);
}};
//endregion
//region storage
2019-01-31 15:33:07 -05:00
coreShard = new CoreBlock("core-shard"){{
2019-12-29 11:40:52 -05:00
requirements(Category.effect, BuildVisibility.debugOnly, ItemStack.with());
2019-01-20 21:11:58 -05:00
alwaysUnlocked = true;
2019-01-07 18:39:06 -05:00
health = 1100;
2019-07-11 23:30:11 -04:00
itemCapacity = 4000;
2019-01-31 15:33:07 -05:00
size = 3;
}};
coreFoundation = new CoreBlock("core-foundation"){{
2019-12-29 11:40:52 -05:00
requirements(Category.effect, BuildVisibility.debugOnly, ItemStack.with());
2019-01-31 15:33:07 -05:00
health = 2000;
2019-03-11 08:29:18 -04:00
itemCapacity = 9000;
2019-01-31 15:33:07 -05:00
size = 4;
}};
coreNucleus = new CoreBlock("core-nucleus"){{
2019-12-29 11:40:52 -05:00
requirements(Category.effect, BuildVisibility.debugOnly, ItemStack.with());
2019-01-31 15:33:07 -05:00
health = 4000;
2019-03-11 08:29:18 -04:00
itemCapacity = 13000;
2019-01-31 15:33:07 -05:00
size = 5;
2019-01-07 18:39:06 -05:00
}};
vault = new Vault("vault"){{
2019-08-03 00:04:33 -04:00
requirements(Category.effect, ItemStack.with(Items.titanium, 250, Items.thorium, 125));
2019-01-07 18:39:06 -05:00
size = 3;
itemCapacity = 1000;
}};
container = new Vault("container"){{
2019-08-03 00:04:33 -04:00
requirements(Category.effect, ItemStack.with(Items.titanium, 100));
2019-01-07 18:39:06 -05:00
size = 2;
itemCapacity = 300;
}};
unloader = new Unloader("unloader"){{
2019-08-03 00:04:33 -04:00
requirements(Category.effect, ItemStack.with(Items.titanium, 25, Items.silicon, 30));
2019-01-07 18:39:06 -05:00
speed = 7f;
}};
2019-01-09 11:44:33 -05:00
launchPad = new LaunchPad("launch-pad"){{
2019-10-15 00:23:38 -04:00
requirements(Category.effect, BuildVisibility.campaignOnly, ItemStack.with(Items.copper, 250, Items.silicon, 75, Items.lead, 100));
2019-01-09 11:44:33 -05:00
size = 3;
itemCapacity = 100;
2019-06-08 17:34:29 -04:00
launchTime = 60f * 16;
2019-01-17 13:03:06 -05:00
hasPower = true;
2019-01-26 17:33:20 -05:00
consumes.power(1f);
2019-01-09 11:44:33 -05:00
}};
2019-01-20 21:11:58 -05:00
2019-03-27 22:13:40 -04:00
launchPadLarge = new LaunchPad("launch-pad-large"){{
2019-10-15 00:23:38 -04:00
requirements(Category.effect, BuildVisibility.campaignOnly, ItemStack.with(Items.titanium, 200, Items.silicon, 150, Items.lead, 250, Items.plastanium, 75));
2019-03-27 22:13:40 -04:00
size = 4;
itemCapacity = 250;
2019-06-08 17:34:29 -04:00
launchTime = 60f * 14;
2019-03-27 22:13:40 -04:00
hasPower = true;
consumes.power(2f);
}};
2019-01-07 18:39:06 -05:00
//endregion
//region turrets
duo = new DoubleTurret("duo"){{
2019-08-03 00:04:33 -04:00
requirements(Category.turret, ItemStack.with(Items.copper, 35), true);
2019-01-07 18:39:06 -05:00
ammo(
2019-08-02 13:22:45 -04:00
Items.copper, Bullets.standardCopper,
Items.graphite, Bullets.standardDense,
Items.pyratite, Bullets.standardIncendiary,
Items.silicon, Bullets.standardHoming
2019-01-07 18:39:06 -05:00
);
reload = 20f;
2019-01-07 18:39:06 -05:00
restitution = 0.03f;
2019-08-02 12:39:21 -04:00
range = 100;
2019-01-07 18:39:06 -05:00
shootCone = 15f;
ammoUseEffect = Fx.shellEjectSmall;
health = 250;
2019-01-07 18:39:06 -05:00
inaccuracy = 2f;
rotatespeed = 10f;
}};
scatter = new BurstTurret("scatter"){{
2019-08-03 00:04:33 -04:00
requirements(Category.turret, ItemStack.with(Items.copper, 85, Items.lead, 45));
ammo(
2019-08-02 13:22:45 -04:00
Items.scrap, Bullets.flakScrap,
Items.lead, Bullets.flakLead,
Items.metaglass, Bullets.flakGlass
);
2019-06-08 17:22:46 -04:00
reload = 18f;
2019-06-09 12:04:45 -04:00
range = 170f;
size = 2;
burstSpacing = 5f;
shots = 2;
targetGround = false;
recoil = 2f;
rotatespeed = 15f;
inaccuracy = 17f;
shootCone = 35f;
2019-07-06 18:42:05 -04:00
health = 200 * size * size;
2019-08-12 23:29:24 -04:00
shootSound = Sounds.shootSnap;
}};
scorch = new ItemTurret("scorch"){{
2019-08-03 00:04:33 -04:00
requirements(Category.turret, ItemStack.with(Items.copper, 25, Items.graphite, 22));
ammo(
2019-08-02 13:22:45 -04:00
Items.coal, Bullets.basicFlame,
Items.pyratite, Bullets.pyraFlame
);
recoil = 0f;
2019-10-18 19:31:01 -04:00
reload = 5f;
coolantMultiplier = 2f;
range = 60f;
shootCone = 50f;
targetAir = false;
ammoUseEffect = Fx.none;
health = 400;
shootSound = Sounds.flame;
}};
2019-01-07 18:39:06 -05:00
hail = new ArtilleryTurret("hail"){{
2019-08-03 00:04:33 -04:00
requirements(Category.turret, ItemStack.with(Items.copper, 40, Items.graphite, 17));
2019-01-07 18:39:06 -05:00
ammo(
2019-08-02 13:22:45 -04:00
Items.graphite, Bullets.artilleryDense,
Items.silicon, Bullets.artilleryHoming,
Items.pyratite, Bullets.artilleryIncendiary
2019-01-07 18:39:06 -05:00
);
reload = 60f;
recoil = 2f;
range = 230f;
inaccuracy = 1f;
shootCone = 10f;
health = 260;
shootSound = Sounds.artillery;
2019-01-07 18:39:06 -05:00
}};
wave = new LiquidTurret("wave"){{
2019-08-03 00:04:33 -04:00
requirements(Category.turret, ItemStack.with(Items.metaglass, 45, Items.lead, 75));
2019-01-07 18:39:06 -05:00
ammo(
2019-08-02 13:22:45 -04:00
Liquids.water, Bullets.waterShot,
Liquids.slag, Bullets.slagShot,
Liquids.cryofluid, Bullets.cryoShot,
Liquids.oil, Bullets.oilShot
2019-01-07 18:39:06 -05:00
);
size = 2;
recoil = 0f;
2019-03-27 19:21:15 -04:00
reload = 2f;
2019-01-07 18:39:06 -05:00
inaccuracy = 5f;
shootCone = 50f;
shootEffect = Fx.shootLiquid;
2019-03-27 19:21:15 -04:00
range = 110f;
2019-04-08 09:03:18 -04:00
health = 250 * size * size;
2019-08-13 11:42:01 -04:00
shootSound = Sounds.splash;
2019-01-07 18:39:06 -05:00
}};
lancer = new ChargeTurret("lancer"){{
2019-08-03 00:04:33 -04:00
requirements(Category.turret, ItemStack.with(Items.copper, 25, Items.lead, 50, Items.silicon, 45));
range = 155f;
chargeTime = 50f;
2019-01-07 18:39:06 -05:00
chargeMaxDelay = 30f;
chargeEffects = 7;
shootType = Bullets.lancerLaser;
recoil = 2f;
reload = 90f;
2019-01-07 18:39:06 -05:00
cooldown = 0.03f;
2019-05-03 22:58:06 -04:00
powerUse = 2.5f;
2019-01-07 18:39:06 -05:00
shootShake = 2f;
shootEffect = Fx.lancerLaserShoot;
smokeEffect = Fx.lancerLaserShootSmoke;
chargeEffect = Fx.lancerLaserCharge;
chargeBeginEffect = Fx.lancerLaserChargeBegin;
heatColor = Color.red;
2019-01-07 18:39:06 -05:00
size = 2;
2019-04-08 09:03:18 -04:00
health = 280 * size * size;
2019-01-07 18:39:06 -05:00
targetAir = false;
2019-08-13 11:42:01 -04:00
shootSound = Sounds.laser;
2019-01-07 18:39:06 -05:00
}};
arc = new PowerTurret("arc"){{
2019-09-04 23:16:26 -04:00
requirements(Category.turret, ItemStack.with(Items.copper, 35, Items.lead, 50));
2019-01-07 18:39:06 -05:00
shootType = Bullets.arc;
2019-09-05 21:44:49 -04:00
reload = 35f;
2019-01-07 18:39:06 -05:00
shootCone = 40f;
rotatespeed = 8f;
2019-09-04 10:00:16 -04:00
powerUse = 1.5f;
targetAir = false;
2019-09-04 10:00:16 -04:00
range = 90f;
2019-01-07 18:39:06 -05:00
shootEffect = Fx.lightningShoot;
heatColor = Color.red;
2019-01-07 18:39:06 -05:00
recoil = 1f;
size = 1;
health = 260;
2019-08-13 11:42:01 -04:00
shootSound = Sounds.spark;
2019-01-07 18:39:06 -05:00
}};
swarmer = new BurstTurret("swarmer"){{
2019-08-03 00:04:33 -04:00
requirements(Category.turret, ItemStack.with(Items.graphite, 35, Items.titanium, 35, Items.plastanium, 45, Items.silicon, 30));
2019-01-07 18:39:06 -05:00
ammo(
2019-08-02 13:22:45 -04:00
Items.blastCompound, Bullets.missileExplosive,
Items.pyratite, Bullets.missileIncendiary,
Items.surgealloy, Bullets.missileSurge
2019-01-07 18:39:06 -05:00
);
2019-06-09 12:04:45 -04:00
reload = 40f;
2019-01-07 18:39:06 -05:00
shots = 4;
burstSpacing = 5;
inaccuracy = 10f;
2019-06-09 12:04:45 -04:00
range = 185f;
2019-01-07 18:39:06 -05:00
xRand = 6f;
size = 2;
2019-04-08 09:03:18 -04:00
health = 300 * size * size;
shootSound = Sounds.missile;
2019-01-07 18:39:06 -05:00
}};
salvo = new BurstTurret("salvo"){{
2019-08-03 00:04:33 -04:00
requirements(Category.turret, ItemStack.with(Items.copper, 105, Items.graphite, 95, Items.titanium, 60));
2019-01-07 18:39:06 -05:00
ammo(
2019-08-02 13:22:45 -04:00
Items.copper, Bullets.standardCopper,
Items.graphite, Bullets.standardDense,
Items.pyratite, Bullets.standardIncendiary,
Items.silicon, Bullets.standardHoming,
Items.thorium, Bullets.standardThorium
2019-01-07 18:39:06 -05:00
);
size = 2;
range = 150f;
2019-08-10 18:56:20 -04:00
reload = 38f;
2019-01-07 18:39:06 -05:00
restitution = 0.03f;
ammoEjectBack = 3f;
cooldown = 0.03f;
recoil = 3f;
shootShake = 2f;
burstSpacing = 3f;
shots = 4;
2019-01-07 18:39:06 -05:00
ammoUseEffect = Fx.shellEjectBig;
2019-08-13 11:42:01 -04:00
health = 240 * size * size;
shootSound = Sounds.shootBig;
2019-01-07 18:39:06 -05:00
}};
2019-06-09 12:04:45 -04:00
fuse = new ItemTurret("fuse"){{
2019-08-03 00:04:33 -04:00
requirements(Category.turret, ItemStack.with(Items.copper, 225, Items.graphite, 225, Items.thorium, 100));
2019-06-09 12:04:45 -04:00
reload = 35f;
shootShake = 4f;
2019-06-09 14:46:48 -04:00
range = 90f;
2019-06-09 12:04:45 -04:00
recoil = 5f;
shots = 3;
spread = 20f;
restitution = 0.1f;
shootCone = 30;
size = 3;
health = 220 * size * size;
shootSound = Sounds.shotgun;
2019-06-09 12:04:45 -04:00
ammo(Items.graphite, new BulletType(0.01f, 105){
int rays = 1;
float rayLength = range + 10f;
{
hitEffect = Fx.hitLancer;
shootEffect = smokeEffect = Fx.lightningShoot;
lifetime = 10f;
despawnEffect = Fx.none;
pierce = true;
}
@Override
2019-12-25 01:39:38 -05:00
public void init(mindustry.entities.type.Bullet b){
2019-06-09 12:04:45 -04:00
for(int i = 0; i < rays; i++){
Damage.collideLine(b, b.getTeam(), hitEffect, b.x, b.y, b.rot(), rayLength - Math.abs(i - (rays / 2)) * 20f);
}
}
@Override
public void draw(Bullet b){
super.draw(b);
Draw.color(Color.white, Pal.lancerLaser, b.fin());
2019-06-09 12:04:45 -04:00
//Draw.alpha(b.fout());
for(int i = 0; i < 7; i++){
Tmp.v1.trns(b.rot(), i * 8f);
float sl = Mathf.clamp(b.fout() - 0.5f) * (80f - i * 10);
2019-08-01 20:49:03 -04:00
Drawf.tri(b.x + Tmp.v1.x, b.y + Tmp.v1.y, 4f, sl, b.rot() + 90);
Drawf.tri(b.x + Tmp.v1.x, b.y + Tmp.v1.y, 4f, sl, b.rot() - 90);
2019-06-09 12:04:45 -04:00
}
2019-08-01 20:49:03 -04:00
Drawf.tri(b.x, b.y, 20f * b.fout(), (rayLength + 50), b.rot());
Drawf.tri(b.x, b.y, 20f * b.fout(), 10f, b.rot() + 180f);
2019-06-09 12:04:45 -04:00
Draw.reset();
}
});
}};
2019-01-07 18:39:06 -05:00
ripple = new ArtilleryTurret("ripple"){{
2019-08-03 00:04:33 -04:00
requirements(Category.turret, ItemStack.with(Items.copper, 150, Items.graphite, 135, Items.titanium, 60));
2019-01-07 18:39:06 -05:00
ammo(
2019-08-02 13:22:45 -04:00
Items.graphite, Bullets.artilleryDense,
Items.silicon, Bullets.artilleryHoming,
Items.pyratite, Bullets.artilleryIncendiary,
2019-08-02 13:22:45 -04:00
Items.blastCompound, Bullets.artilleryExplosive,
Items.plastanium, Bullets.artilleryPlastic
2019-01-07 18:39:06 -05:00
);
size = 3;
shots = 4;
inaccuracy = 12f;
reload = 60f;
ammoEjectBack = 5f;
ammoUseEffect = Fx.shellEjectBig;
cooldown = 0.03f;
velocityInaccuracy = 0.2f;
restitution = 0.02f;
recoil = 6f;
shootShake = 2f;
range = 290f;
2019-01-07 18:39:06 -05:00
2019-07-06 18:42:05 -04:00
health = 130 * size * size;
shootSound = Sounds.artillery;
2019-01-07 18:39:06 -05:00
}};
cyclone = new ItemTurret("cyclone"){{
2019-08-03 00:04:33 -04:00
requirements(Category.turret, ItemStack.with(Items.copper, 200, Items.titanium, 125, Items.plastanium, 80));
2019-01-07 18:39:06 -05:00
ammo(
Items.metaglass, Bullets.flakGlass,
2019-08-02 13:22:45 -04:00
Items.blastCompound, Bullets.flakExplosive,
Items.plastanium, Bullets.flakPlastic,
Items.surgealloy, Bullets.flakSurge
2019-01-07 18:39:06 -05:00
);
xRand = 4f;
2019-04-05 09:26:31 -04:00
reload = 6f;
2019-04-05 14:10:01 -04:00
range = 200f;
2019-01-07 18:39:06 -05:00
size = 3;
recoil = 3f;
rotatespeed = 10f;
2019-04-05 09:26:31 -04:00
inaccuracy = 10f;
2019-01-07 18:39:06 -05:00
shootCone = 30f;
2019-08-13 11:42:01 -04:00
shootSound = Sounds.shootSnap;
2019-01-07 18:39:06 -05:00
health = 145 * size * size;
}};
spectre = new DoubleTurret("spectre"){{
2019-08-03 00:04:33 -04:00
requirements(Category.turret, ItemStack.with(Items.copper, 350, Items.graphite, 300, Items.surgealloy, 250, Items.plastanium, 175, Items.thorium, 250));
2019-01-07 18:39:06 -05:00
ammo(
2019-08-02 13:22:45 -04:00
Items.graphite, Bullets.standardDenseBig,
Items.pyratite, Bullets.standardIncendiaryBig,
Items.thorium, Bullets.standardThoriumBig
2019-01-07 18:39:06 -05:00
);
reload = 6f;
coolantMultiplier = 0.5f;
restitution = 0.1f;
ammoUseEffect = Fx.shellEjectBig;
range = 200f;
inaccuracy = 3f;
recoil = 3f;
xRand = 3f;
shotWidth = 4f;
shootShake = 2f;
shots = 2;
size = 4;
shootCone = 24f;
2019-08-13 11:42:01 -04:00
shootSound = Sounds.shootBig;
2019-01-07 18:39:06 -05:00
health = 155 * size * size;
consumes.add(new ConsumeLiquidFilter(liquid -> liquid.temperature <= 0.5f && liquid.flammability < 0.1f, 2f)).update(false).optional(true, true);
2019-01-07 18:39:06 -05:00
}};
meltdown = new LaserTurret("meltdown"){{
2019-08-03 00:04:33 -04:00
requirements(Category.turret, ItemStack.with(Items.copper, 250, Items.lead, 350, Items.graphite, 300, Items.surgealloy, 325, Items.silicon, 325));
2019-01-07 18:39:06 -05:00
shootType = Bullets.meltdownLaser;
shootEffect = Fx.shootBigSmoke2;
shootCone = 40f;
recoil = 4f;
size = 4;
shootShake = 2f;
2019-04-04 14:46:41 -04:00
range = 190f;
reload = 80f;
2019-04-04 23:34:09 -04:00
firingMoveFract = 0.5f;
2019-01-07 18:39:06 -05:00
shootDuration = 220f;
2019-05-31 19:55:09 -04:00
powerUse = 14f;
2019-08-13 11:42:01 -04:00
shootSound = Sounds.laserbig;
2019-08-15 13:32:36 -04:00
activeSound = Sounds.beam;
activeSoundVolume = 2f;
2019-01-07 18:39:06 -05:00
2019-04-04 14:46:41 -04:00
health = 200 * size * size;
2019-04-02 11:26:02 -04:00
consumes.add(new ConsumeLiquidFilter(liquid -> liquid.temperature <= 0.5f && liquid.flammability < 0.1f, 0.5f)).update(false);
2019-01-07 18:39:06 -05:00
}};
2019-01-20 21:11:58 -05:00
2019-01-07 18:39:06 -05:00
//endregion
//region units
2019-06-12 22:09:24 -04:00
draugFactory = new UnitFactory("draug-factory"){{
2019-08-03 00:04:33 -04:00
requirements(Category.units, ItemStack.with(Items.copper, 30, Items.lead, 70));
unitType = UnitTypes.draug;
2019-08-02 12:39:21 -04:00
produceTime = 2500;
2019-06-12 22:09:24 -04:00
size = 2;
maxSpawn = 1;
consumes.power(1.2f);
2019-06-12 22:09:24 -04:00
consumes.items();
}};
2019-01-07 18:39:06 -05:00
spiritFactory = new UnitFactory("spirit-factory"){{
2019-08-06 19:10:32 -04:00
requirements(Category.units, ItemStack.with(Items.metaglass, 45, Items.lead, 55, Items.silicon, 45));
unitType = UnitTypes.spirit;
produceTime = 4000;
2019-01-07 18:39:06 -05:00
size = 2;
maxSpawn = 1;
consumes.power(1.2f);
consumes.items(new ItemStack(Items.silicon, 30), new ItemStack(Items.lead, 30));
2019-01-07 18:39:06 -05:00
}};
phantomFactory = new UnitFactory("phantom-factory"){{
2019-09-30 21:08:56 -04:00
requirements(Category.units, ItemStack.with(Items.titanium, 50, Items.thorium, 60, Items.lead, 65, Items.silicon, 105));
unitType = UnitTypes.phantom;
2019-09-30 21:08:56 -04:00
produceTime = 4400;
2019-01-07 18:39:06 -05:00
size = 2;
2019-09-30 21:08:56 -04:00
maxSpawn = 1;
consumes.power(2.5f);
consumes.items(new ItemStack(Items.silicon, 50), new ItemStack(Items.lead, 30), new ItemStack(Items.titanium, 20));
2019-01-07 18:39:06 -05:00
}};
commandCenter = new CommandCenter("command-center"){{
requirements(Category.units, ItemStack.with(Items.copper, 200, Items.lead, 250, Items.silicon, 250, Items.graphite, 100));
2019-09-20 23:21:43 -04:00
flags = EnumSet.of(BlockFlag.rally, BlockFlag.comandCenter);
size = 2;
health = size * size * 55;
}};
2019-01-07 18:39:06 -05:00
wraithFactory = new UnitFactory("wraith-factory"){{
requirements(Category.units, ItemStack.with(Items.titanium, 30, Items.lead, 40, Items.silicon, 45));
unitType = UnitTypes.wraith;
produceTime = 700;
2019-01-07 18:39:06 -05:00
size = 2;
consumes.power(0.5f);
consumes.items(new ItemStack(Items.silicon, 10), new ItemStack(Items.titanium, 5));
2019-01-07 18:39:06 -05:00
}};
ghoulFactory = new UnitFactory("ghoul-factory"){{
requirements(Category.units, ItemStack.with(Items.titanium, 75, Items.lead, 65, Items.silicon, 110));
unitType = UnitTypes.ghoul;
2019-08-02 12:39:21 -04:00
produceTime = 1150;
2019-01-07 18:39:06 -05:00
size = 3;
2019-06-08 17:22:46 -04:00
consumes.power(1.2f);
consumes.items(new ItemStack(Items.silicon, 15), new ItemStack(Items.titanium, 10));
2019-01-07 18:39:06 -05:00
}};
revenantFactory = new UnitFactory("revenant-factory"){{
requirements(Category.units, ItemStack.with(Items.plastanium, 50, Items.titanium, 150, Items.lead, 150, Items.silicon, 200));
unitType = UnitTypes.revenant;
2019-08-02 12:39:21 -04:00
produceTime = 2000;
2019-01-07 18:39:06 -05:00
size = 4;
2019-01-26 17:33:20 -05:00
consumes.power(3f);
consumes.items(new ItemStack(Items.silicon, 40), new ItemStack(Items.titanium, 30));
2019-01-07 18:39:06 -05:00
}};
daggerFactory = new UnitFactory("dagger-factory"){{
requirements(Category.units, ItemStack.with(Items.lead, 55, Items.silicon, 35));
unitType = UnitTypes.dagger;
2019-08-02 12:39:21 -04:00
produceTime = 850;
2019-01-07 18:39:06 -05:00
size = 2;
2019-06-08 17:22:46 -04:00
consumes.power(0.5f);
consumes.items(new ItemStack(Items.silicon, 6));
2019-01-07 18:39:06 -05:00
}};
2019-03-08 19:07:23 -05:00
crawlerFactory = new UnitFactory("crawler-factory"){{
2019-08-25 14:23:43 -04:00
requirements(Category.units, ItemStack.with(Items.lead, 45, Items.silicon, 30));
unitType = UnitTypes.crawler;
2019-08-25 14:23:43 -04:00
produceTime = 300;
2019-03-08 19:07:23 -05:00
size = 2;
2019-08-25 22:12:11 -04:00
maxSpawn = 6;
consumes.power(0.5f);
2019-08-25 14:23:43 -04:00
consumes.items(new ItemStack(Items.coal, 10));
2019-03-08 19:07:23 -05:00
}};
2019-01-07 18:39:06 -05:00
titanFactory = new UnitFactory("titan-factory"){{
requirements(Category.units, ItemStack.with(Items.graphite, 50, Items.lead, 50, Items.silicon, 45));
unitType = UnitTypes.titan;
2019-08-02 12:39:21 -04:00
produceTime = 1050;
2019-01-07 18:39:06 -05:00
size = 3;
2019-06-08 17:22:46 -04:00
consumes.power(0.60f);
consumes.items(new ItemStack(Items.silicon, 12));
2019-01-07 18:39:06 -05:00
}};
fortressFactory = new UnitFactory("fortress-factory"){{
requirements(Category.units, ItemStack.with(Items.thorium, 40, Items.lead, 110, Items.silicon, 75));
unitType = UnitTypes.fortress;
2019-08-02 12:39:21 -04:00
produceTime = 2000;
2019-01-07 18:39:06 -05:00
size = 3;
2019-04-04 00:05:59 -04:00
maxSpawn = 3;
2019-06-08 17:22:46 -04:00
consumes.power(1.4f);
consumes.items(new ItemStack(Items.silicon, 20), new ItemStack(Items.graphite, 10));
2019-01-07 18:39:06 -05:00
}};
repairPoint = new RepairPoint("repair-point"){{
2019-08-03 00:04:33 -04:00
requirements(Category.units, ItemStack.with(Items.lead, 15, Items.copper, 15, Items.silicon, 15));
2019-08-06 18:05:17 -04:00
repairSpeed = 0.5f;
repairRadius = 65f;
powerUse = 1f;
2019-01-07 18:39:06 -05:00
}};
//endregion
//region upgrades
dartPad = new MechPad("dart-mech-pad"){{
2019-08-03 00:04:33 -04:00
requirements(Category.upgrade, ItemStack.with(Items.lead, 100, Items.graphite, 50, Items.copper, 75));
mech = Mechs.alpha;
2019-01-07 18:39:06 -05:00
size = 2;
consumes.power(0.5f);
2019-01-07 18:39:06 -05:00
}};
deltaPad = new MechPad("delta-mech-pad"){{
2019-08-03 00:04:33 -04:00
requirements(Category.upgrade, ItemStack.with(Items.lead, 175, Items.titanium, 175, Items.copper, 200, Items.silicon, 225, Items.thorium, 150));
2019-01-07 18:39:06 -05:00
mech = Mechs.delta;
size = 2;
consumes.power(0.7f);
2019-01-07 18:39:06 -05:00
}};
tauPad = new MechPad("tau-mech-pad"){{
2019-08-03 00:04:33 -04:00
requirements(Category.upgrade, ItemStack.with(Items.lead, 125, Items.titanium, 125, Items.copper, 125, Items.silicon, 125));
2019-01-07 18:39:06 -05:00
mech = Mechs.tau;
size = 2;
consumes.power(1f);
2019-01-07 18:39:06 -05:00
}};
omegaPad = new MechPad("omega-mech-pad"){{
2019-08-03 00:04:33 -04:00
requirements(Category.upgrade, ItemStack.with(Items.lead, 225, Items.graphite, 275, Items.silicon, 325, Items.thorium, 300, Items.surgealloy, 120));
2019-01-07 18:39:06 -05:00
mech = Mechs.omega;
size = 3;
consumes.power(1.2f);
2019-01-07 18:39:06 -05:00
}};
javelinPad = new MechPad("javelin-ship-pad"){{
2019-08-03 00:04:33 -04:00
requirements(Category.upgrade, ItemStack.with(Items.lead, 175, Items.silicon, 225, Items.titanium, 250, Items.plastanium, 200, Items.phasefabric, 100));
2019-01-07 18:39:06 -05:00
mech = Mechs.javelin;
size = 2;
consumes.power(0.8f);
2019-01-07 18:39:06 -05:00
}};
tridentPad = new MechPad("trident-ship-pad"){{
2019-08-03 00:04:33 -04:00
requirements(Category.upgrade, ItemStack.with(Items.lead, 125, Items.copper, 125, Items.silicon, 125, Items.titanium, 150, Items.plastanium, 100));
2019-01-07 18:39:06 -05:00
mech = Mechs.trident;
size = 2;
consumes.power(1f);
2019-01-07 18:39:06 -05:00
}};
glaivePad = new MechPad("glaive-ship-pad"){{
2019-08-03 00:04:33 -04:00
requirements(Category.upgrade, ItemStack.with(Items.lead, 225, Items.silicon, 325, Items.titanium, 350, Items.plastanium, 300, Items.surgealloy, 100));
2019-01-07 18:39:06 -05:00
mech = Mechs.glaive;
size = 3;
consumes.power(1.2f);
2019-01-07 18:39:06 -05:00
}};
2019-01-20 21:11:58 -05:00
//endregion
//region sandbox
powerSource = new PowerSource("power-source"){{
requirements(Category.power, BuildVisibility.sandboxOnly, ItemStack.with());
alwaysUnlocked = true;
}};
powerVoid = new PowerVoid("power-void"){{
requirements(Category.power, BuildVisibility.sandboxOnly, ItemStack.with());
alwaysUnlocked = true;
}};
itemSource = new ItemSource("item-source"){{
requirements(Category.distribution, BuildVisibility.sandboxOnly, ItemStack.with());
alwaysUnlocked = true;
}};
itemVoid = new ItemVoid("item-void"){{
requirements(Category.distribution, BuildVisibility.sandboxOnly, ItemStack.with());
alwaysUnlocked = true;
}};
liquidSource = new LiquidSource("liquid-source"){{
requirements(Category.liquid, BuildVisibility.sandboxOnly, ItemStack.with());
alwaysUnlocked = true;
}};
2019-12-12 21:11:14 +01:00
liquidVoid = new LiquidVoid("liquid-void"){{
requirements(Category.liquid, BuildVisibility.sandboxOnly, ItemStack.with());
alwaysUnlocked = true;
}};
message = new MessageBlock("message"){{
requirements(Category.effect, ItemStack.with(Items.graphite, 5));
}};
illuminator = new LightBlock("illuminator"){{
requirements(Category.effect, BuildVisibility.lightingOnly, ItemStack.with(Items.graphite, 4, Items.silicon, 2));
brightness = 0.67f;
radius = 120f;
consumes.power(0.05f);
}};
2019-01-07 18:48:55 -05:00
//endregion
2019-01-07 18:39:06 -05:00
}
2019-09-04 10:00:16 -04:00
}