mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-13 17:27:35 +07:00
Merge branch '6.0' into crater
# Conflicts: # core/assets/icons/icons.properties # core/assets/sprites/block_colors.png # core/assets/sprites/sprites.atlas # core/assets/sprites/sprites.png # core/assets/sprites/sprites3.png # core/assets/sprites/sprites5.png # core/src/mindustry/content/Blocks.java # core/src/mindustry/ui/fragments/PlayerListFragment.java # core/src/mindustry/world/BlockStorage.java
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
package mindustry.content;
|
||||
|
||||
import arc.*;
|
||||
import arc.struct.*;
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
@ -10,7 +9,6 @@ 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.*;
|
||||
@ -19,6 +17,8 @@ import mindustry.world.blocks.*;
|
||||
import mindustry.world.blocks.defense.*;
|
||||
import mindustry.world.blocks.defense.turrets.*;
|
||||
import mindustry.world.blocks.distribution.*;
|
||||
import mindustry.world.blocks.environment.*;
|
||||
import mindustry.world.blocks.legacy.*;
|
||||
import mindustry.world.blocks.liquid.*;
|
||||
import mindustry.world.blocks.logic.*;
|
||||
import mindustry.world.blocks.power.*;
|
||||
@ -28,13 +28,12 @@ import mindustry.world.blocks.storage.*;
|
||||
import mindustry.world.blocks.units.*;
|
||||
import mindustry.world.consumers.*;
|
||||
import mindustry.world.meta.*;
|
||||
import mindustry.world.modules.*;
|
||||
|
||||
public class Blocks implements ContentList{
|
||||
public static Block
|
||||
|
||||
//environment
|
||||
air, spawn, deepwater, water, taintedWater, tar, stone, craters, charr, sand, darksand, ice, snow, darksandTaintedWater,
|
||||
air, spawn, cliff, deepwater, water, taintedWater, tar, slag, 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,
|
||||
metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor5, ignarock, magmarock, hotrock, snowrocks, rock, snowrock, saltRocks,
|
||||
@ -57,7 +56,8 @@ public class Blocks implements ContentList{
|
||||
scrapWall, scrapWallLarge, scrapWallHuge, scrapWallGigantic, thruster, //ok, these names are getting ridiculous, but at least I don't have humongous walls yet
|
||||
|
||||
//transport
|
||||
conveyor, titaniumConveyor, plastaniumConveyor, armoredConveyor, distributor, junction, itemBridge, phaseConveyor, sorter, invertedSorter, router, overflowGate, underflowGate, massDriver,
|
||||
conveyor, titaniumConveyor, plastaniumConveyor, armoredConveyor, distributor, junction, itemBridge, phaseConveyor, sorter, invertedSorter, router,
|
||||
overflowGate, underflowGate, massDriver, massConveyor,
|
||||
|
||||
//liquid
|
||||
mechanicalPump, rotaryPump, thermalPump, conduit, pulseConduit, platedConduit, liquidRouter, liquidTank, liquidJunction, bridgeConduit, phaseConduit,
|
||||
@ -76,11 +76,9 @@ public class Blocks implements ContentList{
|
||||
duo, scatter, scorch, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, spectre, meltdown,
|
||||
|
||||
//units
|
||||
commandCenter, draugFactory, spiritFactory, phantomFactory, wraithFactory, ghoulFactory, revenantFactory, daggerFactory, crawlerFactory, titanFactory,
|
||||
fortressFactory, repairPoint,
|
||||
groundFactory, repairPoint
|
||||
|
||||
//upgrades
|
||||
dartPad, deltaPad, tauPad, omegaPad, javelinPad, tridentPad, glaivePad;
|
||||
;
|
||||
|
||||
@Override
|
||||
public void load(){
|
||||
@ -92,7 +90,7 @@ public class Blocks implements ContentList{
|
||||
hasShadow = false;
|
||||
}
|
||||
|
||||
public void draw(Tile tile){}
|
||||
public void drawBase(Tile tile){}
|
||||
public void load(){}
|
||||
public void init(){}
|
||||
public boolean isHidden(){
|
||||
@ -107,23 +105,16 @@ public class Blocks implements ContentList{
|
||||
}
|
||||
};
|
||||
|
||||
//create special blockpart variants
|
||||
for(int dx = 0; dx < BlockPart.maxSize; dx++){
|
||||
for(int dy = 0; dy < BlockPart.maxSize; dy++){
|
||||
int fx = dx - BlockPart.maxSize/2, fy = dy - BlockPart.maxSize/2;
|
||||
if(fx != 0 || fy != 0){
|
||||
new BlockPart(fx, fy);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
spawn = new OverlayFloor("spawn"){
|
||||
{
|
||||
variants = 0;
|
||||
}
|
||||
public void draw(Tile tile){}
|
||||
@Override
|
||||
public void drawBase(Tile tile){}
|
||||
};
|
||||
|
||||
cliff = new Cliff("cliff");
|
||||
|
||||
//Registers build blocks
|
||||
//no reference is needed here since they can be looked up by name later
|
||||
for(int i = 1; i <= BuildBlock.maxSize; i++){
|
||||
@ -139,6 +130,7 @@ public class Blocks implements ContentList{
|
||||
statusDuration = 120f;
|
||||
drownTime = 140f;
|
||||
cacheLayer = CacheLayer.water;
|
||||
albedo = 0.5f;
|
||||
}};
|
||||
|
||||
water = new Floor("water"){{
|
||||
@ -149,6 +141,7 @@ public class Blocks implements ContentList{
|
||||
liquidDrop = Liquids.water;
|
||||
isLiquid = true;
|
||||
cacheLayer = CacheLayer.water;
|
||||
albedo = 0.5f;
|
||||
}};
|
||||
|
||||
taintedWater = new Floor("tainted-water"){{
|
||||
@ -160,36 +153,25 @@ public class Blocks implements ContentList{
|
||||
liquidDrop = Liquids.water;
|
||||
isLiquid = true;
|
||||
cacheLayer = CacheLayer.water;
|
||||
albedo = 0.5f;
|
||||
}};
|
||||
|
||||
darksandTaintedWater = new Floor("darksand-tainted-water"){{
|
||||
darksandTaintedWater = new ShallowLiquid("darksand-tainted-water"){{
|
||||
speedMultiplier = 0.75f;
|
||||
variants = 0;
|
||||
status = StatusEffects.wet;
|
||||
statusDuration = 60f;
|
||||
liquidDrop = Liquids.water;
|
||||
isLiquid = true;
|
||||
cacheLayer = CacheLayer.water;
|
||||
albedo = 0.5f;
|
||||
}};
|
||||
|
||||
sandWater = new Floor("sand-water"){{
|
||||
sandWater = new ShallowLiquid("sand-water"){{
|
||||
speedMultiplier = 0.8f;
|
||||
variants = 0;
|
||||
status = StatusEffects.wet;
|
||||
statusDuration = 50f;
|
||||
liquidDrop = Liquids.water;
|
||||
isLiquid = true;
|
||||
cacheLayer = CacheLayer.water;
|
||||
albedo = 0.5f;
|
||||
}};
|
||||
|
||||
darksandWater = new Floor("darksand-water"){{
|
||||
darksandWater = new ShallowLiquid("darksand-water"){{
|
||||
speedMultiplier = 0.8f;
|
||||
variants = 0;
|
||||
status = StatusEffects.wet;
|
||||
statusDuration = 50f;
|
||||
liquidDrop = Liquids.water;
|
||||
isLiquid = true;
|
||||
cacheLayer = CacheLayer.water;
|
||||
albedo = 0.5f;
|
||||
}};
|
||||
|
||||
tar = new Floor("tar"){{
|
||||
@ -203,6 +185,17 @@ public class Blocks implements ContentList{
|
||||
cacheLayer = CacheLayer.tar;
|
||||
}};
|
||||
|
||||
slag = new Floor("slag"){{
|
||||
drownTime = 150f;
|
||||
status = StatusEffects.melting;
|
||||
statusDuration = 240f;
|
||||
speedMultiplier = 0.19f;
|
||||
variants = 0;
|
||||
liquidDrop = Liquids.slag;
|
||||
isLiquid = true;
|
||||
cacheLayer = CacheLayer.slag;
|
||||
}};
|
||||
|
||||
stone = new Floor("stone"){{
|
||||
|
||||
}};
|
||||
@ -217,16 +210,18 @@ public class Blocks implements ContentList{
|
||||
}};
|
||||
|
||||
ignarock = new Floor("ignarock"){{
|
||||
|
||||
attributes.set(Attribute.water, -0.1f);
|
||||
}};
|
||||
|
||||
hotrock = new Floor("hotrock"){{
|
||||
attributes.set(Attribute.heat, 0.5f);
|
||||
attributes.set(Attribute.water, -0.2f);
|
||||
blendGroup = ignarock;
|
||||
}};
|
||||
|
||||
magmarock = new Floor("magmarock"){{
|
||||
attributes.set(Attribute.heat, 0.75f);
|
||||
attributes.set(Attribute.water, -0.5f);
|
||||
updateEffect = Fx.magmasmoke;
|
||||
blendGroup = ignarock;
|
||||
}};
|
||||
@ -241,6 +236,10 @@ public class Blocks implements ContentList{
|
||||
playerUnmineable = true;
|
||||
}};
|
||||
|
||||
((ShallowLiquid)darksandTaintedWater).set(Blocks.taintedWater, Blocks.darksand);
|
||||
((ShallowLiquid)sandWater).set(Blocks.water, Blocks.sand);
|
||||
((ShallowLiquid)darksandWater).set(Blocks.water, Blocks.darksand);
|
||||
|
||||
holostone = new Floor("holostone"){{
|
||||
|
||||
}};
|
||||
@ -251,6 +250,7 @@ public class Blocks implements ContentList{
|
||||
|
||||
salt = new Floor("salt"){{
|
||||
variants = 0;
|
||||
attributes.set(Attribute.water, -0.2f);
|
||||
}};
|
||||
|
||||
snow = new Floor("snow"){{
|
||||
@ -258,13 +258,13 @@ public class Blocks implements ContentList{
|
||||
}};
|
||||
|
||||
ice = new Floor("ice"){{
|
||||
//TODO fix drag/speed
|
||||
dragMultiplier = 1f;
|
||||
speedMultiplier = 1f;
|
||||
dragMultiplier = 0.35f;
|
||||
speedMultiplier = 0.9f;
|
||||
attributes.set(Attribute.water, 0.4f);
|
||||
}};
|
||||
|
||||
iceSnow = new Floor("ice-snow"){{
|
||||
dragMultiplier = 0.6f;
|
||||
variants = 3;
|
||||
attributes.set(Attribute.water, 0.3f);
|
||||
}};
|
||||
@ -292,6 +292,7 @@ public class Blocks implements ContentList{
|
||||
|
||||
icerocks = new StaticWall("icerocks"){{
|
||||
variants = 2;
|
||||
iceSnow.asFloor().wall = this;
|
||||
}};
|
||||
|
||||
snowrocks = new StaticWall("snowrocks"){{
|
||||
@ -355,11 +356,13 @@ public class Blocks implements ContentList{
|
||||
moss = new Floor("moss"){{
|
||||
variants = 3;
|
||||
attributes.set(Attribute.spores, 0.15f);
|
||||
wall = sporePine;
|
||||
}};
|
||||
|
||||
sporeMoss = new Floor("spore-moss"){{
|
||||
variants = 3;
|
||||
attributes.set(Attribute.spores, 0.3f);
|
||||
wall = sporerocks;
|
||||
}};
|
||||
|
||||
metalFloor = new Floor("metal-floor"){{
|
||||
@ -506,13 +509,10 @@ public class Blocks implements ContentList{
|
||||
|
||||
int topRegion = reg("-top");
|
||||
|
||||
drawer = tile -> {
|
||||
Draw.rect(region, tile.drawx(), tile.drawy());
|
||||
|
||||
GenericCrafterEntity entity = tile.ent();
|
||||
|
||||
drawer = entity -> {
|
||||
Draw.rect(region, entity.x(), entity.y());
|
||||
Draw.alpha(Mathf.absin(entity.totalProgress, 3f, 0.9f) * entity.warmup);
|
||||
Draw.rect(reg(topRegion), tile.drawx(), tile.drawy());
|
||||
Draw.rect(reg(topRegion), entity.x(), entity.y());
|
||||
Draw.reset();
|
||||
};
|
||||
}};
|
||||
@ -533,24 +533,22 @@ public class Blocks implements ContentList{
|
||||
|
||||
drawIcons = () -> new TextureRegion[]{Core.atlas.find(name + "-bottom"), Core.atlas.find(name), Core.atlas.find(name + "-weave")};
|
||||
|
||||
drawer = tile -> {
|
||||
GenericCrafterEntity entity = tile.ent();
|
||||
|
||||
Draw.rect(reg(bottomRegion), tile.drawx(), tile.drawy());
|
||||
Draw.rect(reg(weaveRegion), tile.drawx(), tile.drawy(), entity.totalProgress);
|
||||
drawer = entity -> {
|
||||
Draw.rect(reg(bottomRegion), entity.x(), entity.y());
|
||||
Draw.rect(reg(weaveRegion), entity.x(), entity.y(), entity.totalProgress);
|
||||
|
||||
Draw.color(Pal.accent);
|
||||
Draw.alpha(entity.warmup);
|
||||
|
||||
Lines.lineAngleCenter(
|
||||
tile.drawx() + Mathf.sin(entity.totalProgress, 6f, Vars.tilesize / 3f * size),
|
||||
tile.drawy(),
|
||||
entity.x() + Mathf.sin(entity.totalProgress, 6f, Vars.tilesize / 3f * size),
|
||||
entity.y(),
|
||||
90,
|
||||
size * Vars.tilesize / 2f);
|
||||
|
||||
Draw.reset();
|
||||
|
||||
Draw.rect(region, tile.drawx(), tile.drawy());
|
||||
Draw.rect(region, entity.x(), entity.y());
|
||||
};
|
||||
}};
|
||||
|
||||
@ -586,21 +584,19 @@ public class Blocks implements ContentList{
|
||||
|
||||
drawIcons = () -> new TextureRegion[]{Core.atlas.find(name + "-bottom"), Core.atlas.find(name + "-top")};
|
||||
|
||||
drawer = tile -> {
|
||||
LiquidModule mod = tile.entity.liquids;
|
||||
drawer = entity -> {
|
||||
int rotation = rotate ? entity.rotation() * 90 : 0;
|
||||
|
||||
int rotation = rotate ? tile.rotation() * 90 : 0;
|
||||
Draw.rect(reg(bottomRegion), entity.x(), entity.y(), rotation);
|
||||
|
||||
Draw.rect(reg(bottomRegion), tile.drawx(), tile.drawy(), rotation);
|
||||
|
||||
if(mod.total() > 0.001f){
|
||||
if(entity.liquids().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.alpha(entity.liquids().get(outputLiquid.liquid) / liquidCapacity);
|
||||
Draw.rect(reg(liquidRegion), entity.x(), entity.y(), rotation);
|
||||
Draw.color();
|
||||
}
|
||||
|
||||
Draw.rect(reg(topRegion), tile.drawx(), tile.drawy(), rotation);
|
||||
Draw.rect(reg(topRegion), entity.x(), entity.y(), rotation);
|
||||
};
|
||||
}};
|
||||
|
||||
@ -678,15 +674,13 @@ public class Blocks implements ContentList{
|
||||
int topRegion = reg("-top");
|
||||
|
||||
drawIcons = () -> new TextureRegion[]{Core.atlas.find(name), Core.atlas.find(name + "-top")};
|
||||
drawer = tile -> {
|
||||
GenericCrafterEntity entity = tile.ent();
|
||||
|
||||
Draw.rect(region, tile.drawx(), tile.drawy());
|
||||
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);
|
||||
Draw.rect(reg(liquidRegion), tile.drawx(), tile.drawy());
|
||||
drawer = entity -> {
|
||||
Draw.rect(region, entity.x(), entity.y());
|
||||
Draw.rect(reg(frameRegions[(int)Mathf.absin(entity.totalProgress, 5f, 2.999f)]), entity.x(), entity.y());
|
||||
Draw.color(Color.clear, entity.liquids().current().color, entity.liquids().total() / liquidCapacity);
|
||||
Draw.rect(reg(liquidRegion), entity.x(), entity.y());
|
||||
Draw.color();
|
||||
Draw.rect(reg(topRegion), tile.drawx(), tile.drawy());
|
||||
Draw.rect(reg(topRegion), entity.x(), entity.y());
|
||||
};
|
||||
}};
|
||||
|
||||
@ -705,11 +699,9 @@ public class Blocks implements ContentList{
|
||||
|
||||
drawIcons = () -> new TextureRegion[]{Core.atlas.find(name), Core.atlas.find(name + "-rotator")};
|
||||
|
||||
drawer = tile -> {
|
||||
GenericCrafterEntity entity = tile.ent();
|
||||
|
||||
Draw.rect(region, tile.drawx(), tile.drawy());
|
||||
Draw.rect(reg(rotatorRegion), tile.drawx(), tile.drawy(), entity.totalProgress * 2f);
|
||||
drawer = entity -> {
|
||||
Draw.rect(region, entity.x(), entity.y());
|
||||
Draw.rect(reg(rotatorRegion), entity.x(), entity.y(), entity.totalProgress * 2f);
|
||||
};
|
||||
}};
|
||||
|
||||
@ -990,6 +982,10 @@ public class Blocks implements ContentList{
|
||||
consumes.power(1.75f);
|
||||
}};
|
||||
|
||||
massConveyor = new MassConveyor("mass-conveyor"){{
|
||||
requirements(Category.distribution, ItemStack.with(Items.copper, 1));
|
||||
}};
|
||||
|
||||
//endregion
|
||||
//region liquid
|
||||
|
||||
@ -1040,7 +1036,7 @@ public class Blocks implements ContentList{
|
||||
liquidCapacity = 20f;
|
||||
}};
|
||||
|
||||
liquidTank = new LiquidTank("liquid-tank"){{
|
||||
liquidTank = new LiquidRouter("liquid-tank"){{
|
||||
requirements(Category.liquid, ItemStack.with(Items.titanium, 25, Items.metaglass, 25));
|
||||
size = 3;
|
||||
liquidCapacity = 1500f;
|
||||
@ -1297,13 +1293,13 @@ public class Blocks implements ContentList{
|
||||
size = 5;
|
||||
}};
|
||||
|
||||
vault = new Vault("vault"){{
|
||||
vault = new StorageBlock("vault"){{
|
||||
requirements(Category.effect, ItemStack.with(Items.titanium, 250, Items.thorium, 125));
|
||||
size = 3;
|
||||
itemCapacity = 1000;
|
||||
}};
|
||||
|
||||
container = new Vault("container"){{
|
||||
container = new StorageBlock("container"){{
|
||||
requirements(Category.effect, ItemStack.with(Items.titanium, 100));
|
||||
size = 2;
|
||||
itemCapacity = 300;
|
||||
@ -1336,7 +1332,7 @@ public class Blocks implements ContentList{
|
||||
//endregion
|
||||
//region turrets
|
||||
|
||||
duo = new DoubleTurret("duo"){{
|
||||
duo = new ItemTurret("duo"){{
|
||||
requirements(Category.turret, ItemStack.with(Items.copper, 35), true);
|
||||
ammo(
|
||||
Items.copper, Bullets.standardCopper,
|
||||
@ -1344,7 +1340,11 @@ public class Blocks implements ContentList{
|
||||
Items.pyratite, Bullets.standardIncendiary,
|
||||
Items.silicon, Bullets.standardHoming
|
||||
);
|
||||
reload = 20f;
|
||||
|
||||
spread = 4f;
|
||||
shots = 2;
|
||||
alternate = true;
|
||||
reloadTime = 20f;
|
||||
restitution = 0.03f;
|
||||
range = 100;
|
||||
shootCone = 15f;
|
||||
@ -1361,14 +1361,14 @@ public class Blocks implements ContentList{
|
||||
Items.lead, Bullets.flakLead,
|
||||
Items.metaglass, Bullets.flakGlass
|
||||
);
|
||||
reload = 18f;
|
||||
reloadTime = 18f;
|
||||
range = 170f;
|
||||
size = 2;
|
||||
burstSpacing = 5f;
|
||||
shots = 2;
|
||||
targetGround = false;
|
||||
|
||||
recoil = 2f;
|
||||
recoilAmount = 2f;
|
||||
rotatespeed = 15f;
|
||||
inaccuracy = 17f;
|
||||
shootCone = 35f;
|
||||
@ -1383,8 +1383,8 @@ public class Blocks implements ContentList{
|
||||
Items.coal, Bullets.basicFlame,
|
||||
Items.pyratite, Bullets.pyraFlame
|
||||
);
|
||||
recoil = 0f;
|
||||
reload = 5f;
|
||||
recoilAmount = 0f;
|
||||
reloadTime = 5f;
|
||||
coolantMultiplier = 2f;
|
||||
range = 60f;
|
||||
shootCone = 50f;
|
||||
@ -1401,8 +1401,8 @@ public class Blocks implements ContentList{
|
||||
Items.silicon, Bullets.artilleryHoming,
|
||||
Items.pyratite, Bullets.artilleryIncendiary
|
||||
);
|
||||
reload = 60f;
|
||||
recoil = 2f;
|
||||
reloadTime = 60f;
|
||||
recoilAmount = 2f;
|
||||
range = 230f;
|
||||
inaccuracy = 1f;
|
||||
shootCone = 10f;
|
||||
@ -1419,8 +1419,8 @@ public class Blocks implements ContentList{
|
||||
Liquids.oil, Bullets.oilShot
|
||||
);
|
||||
size = 2;
|
||||
recoil = 0f;
|
||||
reload = 2f;
|
||||
recoilAmount = 0f;
|
||||
reloadTime = 2f;
|
||||
inaccuracy = 5f;
|
||||
shootCone = 50f;
|
||||
shootEffect = Fx.shootLiquid;
|
||||
@ -1436,8 +1436,8 @@ public class Blocks implements ContentList{
|
||||
chargeMaxDelay = 30f;
|
||||
chargeEffects = 7;
|
||||
shootType = Bullets.lancerLaser;
|
||||
recoil = 2f;
|
||||
reload = 90f;
|
||||
recoilAmount = 2f;
|
||||
reloadTime = 90f;
|
||||
cooldown = 0.03f;
|
||||
powerUse = 2.5f;
|
||||
shootShake = 2f;
|
||||
@ -1455,7 +1455,7 @@ public class Blocks implements ContentList{
|
||||
arc = new PowerTurret("arc"){{
|
||||
requirements(Category.turret, ItemStack.with(Items.copper, 35, Items.lead, 50));
|
||||
shootType = Bullets.arc;
|
||||
reload = 35f;
|
||||
reloadTime = 35f;
|
||||
shootCone = 40f;
|
||||
rotatespeed = 8f;
|
||||
powerUse = 1.5f;
|
||||
@ -1463,7 +1463,7 @@ public class Blocks implements ContentList{
|
||||
range = 90f;
|
||||
shootEffect = Fx.lightningShoot;
|
||||
heatColor = Color.red;
|
||||
recoil = 1f;
|
||||
recoilAmount = 1f;
|
||||
size = 1;
|
||||
health = 260;
|
||||
shootSound = Sounds.spark;
|
||||
@ -1476,7 +1476,7 @@ public class Blocks implements ContentList{
|
||||
Items.pyratite, Bullets.missileIncendiary,
|
||||
Items.surgealloy, Bullets.missileSurge
|
||||
);
|
||||
reload = 40f;
|
||||
reloadTime = 40f;
|
||||
shots = 4;
|
||||
burstSpacing = 5;
|
||||
inaccuracy = 10f;
|
||||
@ -1499,11 +1499,11 @@ public class Blocks implements ContentList{
|
||||
|
||||
size = 2;
|
||||
range = 150f;
|
||||
reload = 38f;
|
||||
reloadTime = 38f;
|
||||
restitution = 0.03f;
|
||||
ammoEjectBack = 3f;
|
||||
cooldown = 0.03f;
|
||||
recoil = 3f;
|
||||
recoilAmount = 3f;
|
||||
shootShake = 2f;
|
||||
burstSpacing = 3f;
|
||||
shots = 4;
|
||||
@ -1515,10 +1515,10 @@ public class Blocks implements ContentList{
|
||||
fuse = new ItemTurret("fuse"){{
|
||||
requirements(Category.turret, ItemStack.with(Items.copper, 225, Items.graphite, 225, Items.thorium, 100));
|
||||
|
||||
reload = 35f;
|
||||
reloadTime = 35f;
|
||||
shootShake = 4f;
|
||||
range = 90f;
|
||||
recoil = 5f;
|
||||
recoilAmount = 5f;
|
||||
shots = 3;
|
||||
spread = 20f;
|
||||
restitution = 0.1f;
|
||||
@ -1541,25 +1541,25 @@ public class Blocks implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(mindustry.entities.type.Bullet b){
|
||||
public void init(Bulletc b){
|
||||
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);
|
||||
Damage.collideLine(b, b.team(), hitEffect, b.x(), b.y(), b.rotation(), rayLength - Math.abs(i - (rays / 2)) * 20f);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Bullet b){
|
||||
public void draw(Bulletc b){
|
||||
super.draw(b);
|
||||
Draw.color(Color.white, Pal.lancerLaser, b.fin());
|
||||
//Draw.alpha(b.fout());
|
||||
for(int i = 0; i < 7; i++){
|
||||
Tmp.v1.trns(b.rot(), i * 8f);
|
||||
Tmp.v1.trns(b.rotation(), i * 8f);
|
||||
float sl = Mathf.clamp(b.fout() - 0.5f) * (80f - i * 10);
|
||||
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);
|
||||
Drawf.tri(b.x() + Tmp.v1.x, b.y() + Tmp.v1.y, 4f, sl, b.rotation() + 90);
|
||||
Drawf.tri(b.x() + Tmp.v1.x, b.y() + Tmp.v1.y, 4f, sl, b.rotation() - 90);
|
||||
}
|
||||
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);
|
||||
Drawf.tri(b.x(), b.y(), 20f * b.fout(), (rayLength + 50), b.rotation());
|
||||
Drawf.tri(b.x(), b.y(), 20f * b.fout(), 10f, b.rotation() + 180f);
|
||||
Draw.reset();
|
||||
}
|
||||
});
|
||||
@ -1577,13 +1577,13 @@ public class Blocks implements ContentList{
|
||||
size = 3;
|
||||
shots = 4;
|
||||
inaccuracy = 12f;
|
||||
reload = 60f;
|
||||
reloadTime = 60f;
|
||||
ammoEjectBack = 5f;
|
||||
ammoUseEffect = Fx.shellEjectBig;
|
||||
cooldown = 0.03f;
|
||||
velocityInaccuracy = 0.2f;
|
||||
restitution = 0.02f;
|
||||
recoil = 6f;
|
||||
recoilAmount = 6f;
|
||||
shootShake = 2f;
|
||||
range = 290f;
|
||||
|
||||
@ -1600,10 +1600,10 @@ public class Blocks implements ContentList{
|
||||
Items.surgealloy, Bullets.flakSurge
|
||||
);
|
||||
xRand = 4f;
|
||||
reload = 6f;
|
||||
reloadTime = 6f;
|
||||
range = 200f;
|
||||
size = 3;
|
||||
recoil = 3f;
|
||||
recoilAmount = 3f;
|
||||
rotatespeed = 10f;
|
||||
inaccuracy = 10f;
|
||||
shootCone = 30f;
|
||||
@ -1612,22 +1612,22 @@ public class Blocks implements ContentList{
|
||||
health = 145 * size * size;
|
||||
}};
|
||||
|
||||
spectre = new DoubleTurret("spectre"){{
|
||||
spectre = new ItemTurret("spectre"){{
|
||||
requirements(Category.turret, ItemStack.with(Items.copper, 350, Items.graphite, 300, Items.surgealloy, 250, Items.plastanium, 175, Items.thorium, 250));
|
||||
ammo(
|
||||
Items.graphite, Bullets.standardDenseBig,
|
||||
Items.pyratite, Bullets.standardIncendiaryBig,
|
||||
Items.thorium, Bullets.standardThoriumBig
|
||||
);
|
||||
reload = 6f;
|
||||
reloadTime = 6f;
|
||||
coolantMultiplier = 0.5f;
|
||||
restitution = 0.1f;
|
||||
ammoUseEffect = Fx.shellEjectBig;
|
||||
range = 200f;
|
||||
inaccuracy = 3f;
|
||||
recoil = 3f;
|
||||
xRand = 3f;
|
||||
shotWidth = 4f;
|
||||
recoilAmount = 3f;
|
||||
spread = 8f;
|
||||
alternate = true;
|
||||
shootShake = 2f;
|
||||
shots = 2;
|
||||
size = 4;
|
||||
@ -1643,11 +1643,11 @@ public class Blocks implements ContentList{
|
||||
shootType = Bullets.meltdownLaser;
|
||||
shootEffect = Fx.shootBigSmoke2;
|
||||
shootCone = 40f;
|
||||
recoil = 4f;
|
||||
recoilAmount = 4f;
|
||||
size = 4;
|
||||
shootShake = 2f;
|
||||
range = 190f;
|
||||
reload = 80f;
|
||||
reloadTime = 80f;
|
||||
firingMoveFract = 0.5f;
|
||||
shootDuration = 220f;
|
||||
powerUse = 14f;
|
||||
@ -1662,106 +1662,16 @@ public class Blocks implements ContentList{
|
||||
//endregion
|
||||
//region units
|
||||
|
||||
draugFactory = new UnitFactory("draug-factory"){{
|
||||
//for testing only.
|
||||
groundFactory = new UnitFactory("ground-factory"){{
|
||||
requirements(Category.units, ItemStack.with(Items.copper, 30, Items.lead, 70));
|
||||
unitType = UnitTypes.draug;
|
||||
produceTime = 2500;
|
||||
size = 2;
|
||||
maxSpawn = 1;
|
||||
consumes.power(1.2f);
|
||||
consumes.items();
|
||||
}};
|
||||
|
||||
spiritFactory = new UnitFactory("spirit-factory"){{
|
||||
requirements(Category.units, ItemStack.with(Items.metaglass, 45, Items.lead, 55, Items.silicon, 45));
|
||||
unitType = UnitTypes.spirit;
|
||||
produceTime = 4000;
|
||||
size = 2;
|
||||
maxSpawn = 1;
|
||||
consumes.power(1.2f);
|
||||
consumes.items(new ItemStack(Items.silicon, 30), new ItemStack(Items.lead, 30));
|
||||
}};
|
||||
|
||||
phantomFactory = new UnitFactory("phantom-factory"){{
|
||||
requirements(Category.units, ItemStack.with(Items.titanium, 50, Items.thorium, 60, Items.lead, 65, Items.silicon, 105));
|
||||
unitType = UnitTypes.phantom;
|
||||
produceTime = 4400;
|
||||
size = 2;
|
||||
maxSpawn = 1;
|
||||
consumes.power(2.5f);
|
||||
consumes.items(new ItemStack(Items.silicon, 50), new ItemStack(Items.lead, 30), new ItemStack(Items.titanium, 20));
|
||||
}};
|
||||
|
||||
commandCenter = new CommandCenter("command-center"){{
|
||||
requirements(Category.units, ItemStack.with(Items.copper, 200, Items.lead, 250, Items.silicon, 250, Items.graphite, 100));
|
||||
flags = EnumSet.of(BlockFlag.rally, BlockFlag.comandCenter);
|
||||
size = 2;
|
||||
health = size * size * 55;
|
||||
}};
|
||||
|
||||
wraithFactory = new UnitFactory("wraith-factory"){{
|
||||
requirements(Category.units, ItemStack.with(Items.titanium, 30, Items.lead, 40, Items.silicon, 45));
|
||||
unitType = UnitTypes.wraith;
|
||||
produceTime = 700;
|
||||
size = 2;
|
||||
consumes.power(0.5f);
|
||||
consumes.items(new ItemStack(Items.silicon, 10), new ItemStack(Items.titanium, 5));
|
||||
}};
|
||||
|
||||
ghoulFactory = new UnitFactory("ghoul-factory"){{
|
||||
requirements(Category.units, ItemStack.with(Items.titanium, 75, Items.lead, 65, Items.silicon, 110));
|
||||
unitType = UnitTypes.ghoul;
|
||||
produceTime = 1150;
|
||||
plans = new UnitPlan[]{
|
||||
new UnitPlan(UnitTypes.dagger, 60f, ItemStack.with(Items.silicon, 10)),
|
||||
new UnitPlan(UnitTypes.wraith, 60f, ItemStack.with(Items.silicon, 10)),
|
||||
};
|
||||
size = 3;
|
||||
consumes.power(1.2f);
|
||||
consumes.items(new ItemStack(Items.silicon, 15), new ItemStack(Items.titanium, 10));
|
||||
}};
|
||||
|
||||
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;
|
||||
produceTime = 2000;
|
||||
size = 4;
|
||||
consumes.power(3f);
|
||||
consumes.items(new ItemStack(Items.silicon, 40), new ItemStack(Items.titanium, 30));
|
||||
}};
|
||||
|
||||
daggerFactory = new UnitFactory("dagger-factory"){{
|
||||
requirements(Category.units, ItemStack.with(Items.lead, 55, Items.silicon, 35));
|
||||
unitType = UnitTypes.dagger;
|
||||
produceTime = 850;
|
||||
size = 2;
|
||||
consumes.power(0.5f);
|
||||
consumes.items(new ItemStack(Items.silicon, 6));
|
||||
}};
|
||||
|
||||
crawlerFactory = new UnitFactory("crawler-factory"){{
|
||||
requirements(Category.units, ItemStack.with(Items.lead, 45, Items.silicon, 30));
|
||||
unitType = UnitTypes.crawler;
|
||||
produceTime = 300;
|
||||
size = 2;
|
||||
maxSpawn = 6;
|
||||
consumes.power(0.5f);
|
||||
consumes.items(new ItemStack(Items.coal, 10));
|
||||
}};
|
||||
|
||||
titanFactory = new UnitFactory("titan-factory"){{
|
||||
requirements(Category.units, ItemStack.with(Items.graphite, 50, Items.lead, 50, Items.silicon, 45));
|
||||
unitType = UnitTypes.titan;
|
||||
produceTime = 1050;
|
||||
size = 3;
|
||||
consumes.power(0.60f);
|
||||
consumes.items(new ItemStack(Items.silicon, 12));
|
||||
}};
|
||||
|
||||
fortressFactory = new UnitFactory("fortress-factory"){{
|
||||
requirements(Category.units, ItemStack.with(Items.thorium, 40, Items.lead, 110, Items.silicon, 75));
|
||||
unitType = UnitTypes.fortress;
|
||||
produceTime = 2000;
|
||||
size = 3;
|
||||
maxSpawn = 3;
|
||||
consumes.power(1.4f);
|
||||
consumes.items(new ItemStack(Items.silicon, 20), new ItemStack(Items.graphite, 10));
|
||||
consumes.items(new ItemStack(Items.silicon, 10));
|
||||
}};
|
||||
|
||||
repairPoint = new RepairPoint("repair-point"){{
|
||||
@ -1771,58 +1681,6 @@ public class Blocks implements ContentList{
|
||||
powerUse = 1f;
|
||||
}};
|
||||
|
||||
//endregion
|
||||
//region upgrades
|
||||
|
||||
dartPad = new MechPad("dart-mech-pad"){{
|
||||
requirements(Category.upgrade, ItemStack.with(Items.lead, 100, Items.graphite, 50, Items.copper, 75));
|
||||
mech = Mechs.alpha;
|
||||
size = 2;
|
||||
consumes.power(0.5f);
|
||||
}};
|
||||
|
||||
deltaPad = new MechPad("delta-mech-pad"){{
|
||||
requirements(Category.upgrade, ItemStack.with(Items.lead, 175, Items.titanium, 175, Items.copper, 200, Items.silicon, 225, Items.thorium, 150));
|
||||
mech = Mechs.delta;
|
||||
size = 2;
|
||||
consumes.power(0.7f);
|
||||
}};
|
||||
|
||||
tauPad = new MechPad("tau-mech-pad"){{
|
||||
requirements(Category.upgrade, ItemStack.with(Items.lead, 125, Items.titanium, 125, Items.copper, 125, Items.silicon, 125));
|
||||
mech = Mechs.tau;
|
||||
size = 2;
|
||||
consumes.power(1f);
|
||||
}};
|
||||
|
||||
omegaPad = new MechPad("omega-mech-pad"){{
|
||||
requirements(Category.upgrade, ItemStack.with(Items.lead, 225, Items.graphite, 275, Items.silicon, 325, Items.thorium, 300, Items.surgealloy, 120));
|
||||
mech = Mechs.omega;
|
||||
size = 3;
|
||||
consumes.power(1.2f);
|
||||
}};
|
||||
|
||||
javelinPad = new MechPad("javelin-ship-pad"){{
|
||||
requirements(Category.upgrade, ItemStack.with(Items.lead, 175, Items.silicon, 225, Items.titanium, 250, Items.plastanium, 200, Items.phasefabric, 100));
|
||||
mech = Mechs.javelin;
|
||||
size = 2;
|
||||
consumes.power(0.8f);
|
||||
}};
|
||||
|
||||
tridentPad = new MechPad("trident-ship-pad"){{
|
||||
requirements(Category.upgrade, ItemStack.with(Items.lead, 125, Items.copper, 125, Items.silicon, 125, Items.titanium, 150, Items.plastanium, 100));
|
||||
mech = Mechs.trident;
|
||||
size = 2;
|
||||
consumes.power(1f);
|
||||
}};
|
||||
|
||||
glaivePad = new MechPad("glaive-ship-pad"){{
|
||||
requirements(Category.upgrade, ItemStack.with(Items.lead, 225, Items.silicon, 325, Items.titanium, 350, Items.plastanium, 300, Items.surgealloy, 100));
|
||||
mech = Mechs.glaive;
|
||||
size = 3;
|
||||
consumes.power(1.2f);
|
||||
}};
|
||||
|
||||
//endregion
|
||||
//region sandbox
|
||||
|
||||
@ -1867,6 +1725,14 @@ public class Blocks implements ContentList{
|
||||
consumes.power(0.05f);
|
||||
}};
|
||||
|
||||
//endregion
|
||||
//region legacy
|
||||
|
||||
//looked up by name, no ref needed
|
||||
new LegacyMechPad("legacy-mech-pad");
|
||||
new LegacyUnitFactory("legacy-unit-factory");
|
||||
new LegacyCommandCenter("legacy-command-center");
|
||||
|
||||
//endregion
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user