Initial reconstructor impl

This commit is contained in:
Anuken
2020-05-23 18:49:28 -04:00
parent d8ee862125
commit 46bc2207ff
69 changed files with 1000 additions and 968 deletions

View File

@@ -25,7 +25,6 @@ import mindustry.world.blocks.power.*;
import mindustry.world.blocks.production.*;
import mindustry.world.blocks.sandbox.*;
import mindustry.world.blocks.storage.*;
import mindustry.world.blocks.storage.MessageBlock;
import mindustry.world.blocks.units.*;
import mindustry.world.consumers.*;
import mindustry.world.meta.*;
@@ -77,14 +76,12 @@ public class Blocks implements ContentList{
duo, scatter, scorch, hail, arc, wave, lancer, swarmer, salvo, fuse, ripple, cyclone, spectre, meltdown,
//units
groundFactory, airFactory, navalFactory, repairPoint,
groundFactory, airFactory, navalFactory, basicReconstructor, repairPoint,
//misc experimental
blockForge, blockLauncher;
;
@Override
public void load(){
//region environment
@@ -592,7 +589,7 @@ public class Blocks implements ContentList{
drawIcons = () -> new TextureRegion[]{Core.atlas.find(name + "-bottom"), Core.atlas.find(name + "-top")};
drawer = entity -> {
int rotation = rotate ? entity.rotation() * 90 : 0;
float rotation = rotate ? entity.rotdeg() : 0;
Draw.rect(re(bottomRegion), entity.x(), entity.y(), rotation);
@@ -1702,6 +1699,15 @@ public class Blocks implements ContentList{
consumes.power(1.2f);
}};
basicReconstructor = new Reconstructor("basic-reconstructor"){{
requirements(Category.units, ItemStack.with(Items.copper, 50, Items.lead, 120, Items.silicon, 230));
size = 3;
consumes.power(3f);
consumes.items(ItemStack.with(Items.silicon, 30, Items.graphite, 30));
itemCapacity = 30;
}};
repairPoint = new RepairPoint("repair-point"){{
requirements(Category.units, ItemStack.with(Items.lead, 15, Items.copper, 15, Items.silicon, 15));
repairSpeed = 0.5f;

View File

@@ -51,6 +51,9 @@ public class UnitTypes implements ContentList{
}};
titan = new UnitType("titan"){{
dagger.upgrade = this;
tier = 2;
speed = 0.4f;
mass = 3.5f;
hitsize = 9f;
@@ -94,6 +97,9 @@ public class UnitTypes implements ContentList{
}};
fortress = new UnitType("fortress"){{
titan.upgrade = this;
tier = 2;
speed = 0.38f;
mass = 5f;
hitsize = 13f;
@@ -114,6 +120,9 @@ public class UnitTypes implements ContentList{
}};
eruptor = new UnitType("eruptor"){{
crawler.upgrade = this;
tier = 2;
speed = 0.4f;
drag = 0.4f;
mass = 5f;
@@ -156,6 +165,9 @@ public class UnitTypes implements ContentList{
}};
ghoul = new UnitType("ghoul"){{
wraith.upgrade = this;
tier = 2;
health = 220;
speed = 2f;
mass = 3f;
@@ -298,6 +310,8 @@ public class UnitTypes implements ContentList{
}};
oculon = new UnitType("oculon"){{
tier = 2;
drillTier = -1;
speed = 0.6f;
hitsize = 9f;