Merge branch 'master' of https://github.com/Anuken/Mindustry into crafting-rework

This commit is contained in:
Anuken
2018-12-09 11:16:39 -05:00
111 changed files with 1847 additions and 1998 deletions

View File

@@ -83,7 +83,7 @@ public class Items implements ContentList{
}};
biomatter = new Item("biomatter", Color.valueOf("648b55")){{
flammability = 0.4f;
flammability = 0.55f;
fluxiness = 0.3f;
}};

View File

@@ -26,7 +26,7 @@ public class Liquids implements ContentList{
lava = new Liquid("lava", Color.valueOf("e37341")){
{
temperature = 0.8f;
temperature = 1f;
viscosity = 0.8f;
tier = 2;
effect = StatusEffects.melting;

View File

@@ -123,6 +123,7 @@ public class Mechs implements ContentList{
speed = 0.44f;
drag = 0.35f;
boostSpeed = 0.8f;
canHeal = true;
weapon = Weapons.healBlaster;
armor = 15f;
trailColorTo = Palette.heal;
@@ -287,8 +288,8 @@ public class Mechs implements ContentList{
trident = new Mech("trident-ship", true){
{
drillPower = 2;
speed = 0.12f;
drag = 0.035f;
speed = 0.14f;
drag = 0.034f;
mass = 2.5f;
turnCursor = false;
armor = 20f;

View File

@@ -42,17 +42,23 @@ public class Recipes implements ContentList{
new Recipe(defense, DefenseBlocks.surgeWall, new ItemStack(Items.surgealloy, 12));
new Recipe(defense, DefenseBlocks.surgeWallLarge, new ItemStack(Items.surgealloy, 12 * 4));
new Recipe(effect, StorageBlocks.container, new ItemStack(Items.densealloy, 200));
new Recipe(effect, StorageBlocks.vault, new ItemStack(Items.densealloy, 500), new ItemStack(Items.thorium, 250));
//core disabled due to being broken
new Recipe(effect, StorageBlocks.core,
new ItemStack(Items.copper, 2000), new ItemStack(Items.densealloy, 1500),
new ItemStack(Items.silicon, 1500), new ItemStack(Items.thorium, 500),
new ItemStack(Items.surgealloy, 500), new ItemStack(Items.phasefabric, 750)
);
//projectors
new Recipe(effect, DefenseBlocks.mendProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 150), new ItemStack(Items.titanium, 50), new ItemStack(Items.silicon, 180));
new Recipe(effect, DefenseBlocks.overdriveProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 150), new ItemStack(Items.titanium, 150), new ItemStack(Items.silicon, 250));
new Recipe(effect, DefenseBlocks.forceProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 150), new ItemStack(Items.titanium, 150), new ItemStack(Items.silicon, 250));
new Recipe(effect, StorageBlocks.unloader, new ItemStack(Items.densealloy, 50), new ItemStack(Items.silicon, 60));
new Recipe(effect, StorageBlocks.container, new ItemStack(Items.densealloy, 200));
new Recipe(effect, StorageBlocks.vault, new ItemStack(Items.densealloy, 500), new ItemStack(Items.thorium, 250));
new Recipe(effect, DefenseBlocks.shockMine, new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 25))
.setDependencies(Items.blastCompound);
.setDependencies(Items.blastCompound);
//TURRETS
new Recipe(turret, TurretBlocks.duo, new ItemStack(Items.copper, 40)).setAlwaysUnlocked(true);
@@ -82,6 +88,7 @@ public class Recipes implements ContentList{
new Recipe(distribution, DistributionBlocks.sorter, new ItemStack(Items.densealloy, 4), new ItemStack(Items.copper, 4));
new Recipe(distribution, DistributionBlocks.overflowGate, new ItemStack(Items.densealloy, 4), new ItemStack(Items.copper, 8));
new Recipe(distribution, DistributionBlocks.itemBridge, new ItemStack(Items.densealloy, 8), new ItemStack(Items.copper, 8));
new Recipe(distribution, StorageBlocks.unloader, new ItemStack(Items.densealloy, 50), new ItemStack(Items.silicon, 60));
new Recipe(distribution, DistributionBlocks.massDriver, new ItemStack(Items.densealloy, 250), new ItemStack(Items.silicon, 150), new ItemStack(Items.lead, 250), new ItemStack(Items.thorium, 100));
//CRAFTING
@@ -133,13 +140,6 @@ public class Recipes implements ContentList{
new Recipe(power, PowerBlocks.thoriumReactor, new ItemStack(Items.lead, 600), new ItemStack(Items.silicon, 400), new ItemStack(Items.densealloy, 300), new ItemStack(Items.thorium, 300));
new Recipe(power, PowerBlocks.rtgGenerator, new ItemStack(Items.lead, 200), new ItemStack(Items.silicon, 150), new ItemStack(Items.phasefabric, 50), new ItemStack(Items.plastanium, 150), new ItemStack(Items.thorium, 100));
//core disabled due to being broken
/*new Recipe(distribution, StorageBlocks.core,
new ItemStack(Items.copper, 2000), new ItemStack(Items.densealloy, 1500),
new ItemStack(Items.silicon, 1500), new ItemStack(Items.thorium, 500),
new ItemStack(Items.surgealloy, 500), new ItemStack(Items.phasefabric, 750)
);*/
//DRILLS, PRODUCERS
new Recipe(production, ProductionBlocks.mechanicalDrill, new ItemStack(Items.copper, 45)).setAlwaysUnlocked(true);
new Recipe(production, ProductionBlocks.pneumaticDrill, new ItemStack(Items.copper, 60), new ItemStack(Items.densealloy, 50));

View File

@@ -11,7 +11,7 @@ import io.anuke.ucore.core.Timers;
import io.anuke.ucore.util.Mathf;
public class StatusEffects implements ContentList{
public static StatusEffect none, burning, freezing, wet, melting, tarred, overdrive, shielded;
public static StatusEffect none, burning, freezing, wet, melting, tarred, overdrive, shielded, shocked;
@Override
public void load(){
@@ -47,7 +47,8 @@ public class StatusEffects implements ContentList{
freezing = new StatusEffect(5 * 60f){
{
oppositeScale = 0.4f;
speedMultiplier = 0.5f;
speedMultiplier = 0.6f;
armorMultiplier = 0.8f;
}
@Override
@@ -65,6 +66,17 @@ public class StatusEffects implements ContentList{
speedMultiplier = 0.9f;
}
@Override
public StatusEntry getTransition(Unit unit, StatusEffect to, float time, float newTime, StatusEntry result){
if(to == shocked){
//get shocked when wet
unit.damage(15f);
return result.set(this, time);
}
return super.getTransition(unit, to, time, newTime, result);
}
@Override
public void update(Unit unit, float time){
if(Mathf.chance(Timers.delta() * 0.15f)){
@@ -145,6 +157,13 @@ public class StatusEffects implements ContentList{
}
};
shocked = new StatusEffect(1f){
{
armorMultiplier = 3f;
}
};
wet.setOpposites(shocked);
melting.setOpposites(wet, freezing);
wet.setOpposites(burning);
freezing.setOpposites(burning, melting);

View File

@@ -152,7 +152,7 @@ public class Weapons implements ContentList{
bomberTrident = new Weapon("bomber"){{
length = 0f;
width = 2f;
reload = 9f;
reload = 8f;
shots = 2;
roundrobin = true;
ejectEffect = Fx.none;

View File

@@ -185,9 +185,9 @@ public class CraftingBlocks extends BlockList implements ContentList{
biomatterCompressor = new Compressor("biomattercompressor"){{
liquidCapacity = 60f;
itemCapacity = 50;
craftTime = 25f;
craftTime = 20f;
outputLiquid = Liquids.oil;
outputLiquidAmount = 1.5f;
outputLiquidAmount = 2.5f;
size = 2;
health = 320;
hasLiquids = true;

View File

@@ -92,8 +92,11 @@ public class DebugBlocks extends BlockList implements ContentList{
@Override
public void update(Tile tile){
SorterEntity entity = tile.entity();
if(entity.sortItem == null) return;
entity.items.set(entity.sortItem, 1);
tryDump(tile, entity.sortItem);
entity.items.set(entity.sortItem, 0);
}
@Override

View File

@@ -50,10 +50,10 @@ public class LiquidBlocks extends BlockList implements ContentList{
}};
liquidRouter = new LiquidRouter("liquid-router"){{
liquidCapacity = 40f;
liquidCapacity = 20f;
}};
liquidtank = new LiquidRouter("liquid-tank"){{
liquidtank = new LiquidTank("liquid-tank"){{
size = 3;
liquidCapacity = 1500f;
health = 500;

View File

@@ -21,7 +21,7 @@ public class PowerBlocks extends BlockList implements ContentList{
thermalGenerator = new LiquidHeatGenerator("thermal-generator"){{
maxLiquidGenerate = 2f;
powerCapacity = 40f;
powerPerLiquid = 0.3f;
powerPerLiquid = 0.35f;
generateEffect = BlockFx.redgeneratespark;
size = 2;
}};

View File

@@ -99,13 +99,13 @@ public class ProductionBlocks extends BlockList implements ContentList{
cultivator = new Cultivator("cultivator"){{
result = Items.biomatter;
drillTime = 260;
drillTime = 200;
size = 2;
hasLiquids = true;
hasPower = true;
consumes.power(0.08f);
consumes.liquid(Liquids.water, 0.2f);
consumes.liquid(Liquids.water, 0.15f);
}};
}

View File

@@ -13,20 +13,21 @@ public class StorageBlocks extends BlockList implements ContentList{
public void load(){
core = new CoreBlock("core"){{
health = 1100;
itemCapacity = 3000;
}};
vault = new Vault("vault"){{
size = 3;
itemCapacity = 900;
itemCapacity = 1000;
}};
container = new Vault("container"){{
size = 2;
itemCapacity = 200;
itemCapacity = 300;
}};
unloader = new SortedUnloader("unloader"){{
speed = 12f;
speed = 7f;
}};
}
}

View File

@@ -69,7 +69,7 @@ public class TurretBlocks extends BlockList implements ContentList{
inaccuracy = 5f;
shootCone = 50f;
shootEffect = ShootFx.shootLiquid;
range = 70f;
range = 90f;
health = 360;
drawer = (tile, entity) -> {

View File

@@ -39,6 +39,8 @@ public class TurretBullets extends BulletList implements ContentList{
lifetime = Lightning.lifetime;
hiteffect = BulletFx.hitLancer;
despawneffect = Fx.none;
status = StatusEffects.shocked;
statusIntensity = 1f;
}
};
@@ -71,7 +73,7 @@ public class TurretBullets extends BulletList implements ContentList{
super.hit(b);
tile = tile.target();
if(tile.getTeam() == b.getTeam() && !(tile.block() instanceof BuildBlock)){
if(tile != null && tile.getTeam() == b.getTeam() && !(tile.block() instanceof BuildBlock)){
Effects.effect(BlockFx.healBlockFull, Palette.heal, tile.drawx(), tile.drawy(), tile.block().size);
tile.entity.healBy(healPercent / 100f * tile.entity.maxHealth());
}
@@ -332,7 +334,7 @@ public class TurretBullets extends BulletList implements ContentList{
lifetime = 200f;
despawneffect = BlockFx.smeltsmoke;
hiteffect = BulletFx.hitBulletBig;
drag = 0.01f;
drag = 0.005f;
}
@Override