New generators, projectors, status system, sprites renamed
This commit is contained in:
@@ -47,6 +47,7 @@ public class Items implements ContentList{
|
||||
type = ItemType.material;
|
||||
explosiveness = 0.1f;
|
||||
hardness = 4;
|
||||
radioactivity = 0.5f;
|
||||
}};
|
||||
|
||||
silicon = new Item("silicon", Color.valueOf("53565c")) {{
|
||||
|
||||
@@ -37,7 +37,7 @@ public class Liquids implements ContentList {
|
||||
flammability = 0.6f;
|
||||
explosiveness = 0.6f;
|
||||
tier = 1;
|
||||
effect = StatusEffects.oiled;
|
||||
effect = StatusEffects.tarred;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -89,22 +89,17 @@ public class Recipes implements ContentList{
|
||||
new Recipe(power, PowerBlocks.powernodelarge, new ItemStack(Items.steel, 3), new ItemStack(Items.iron, 3));
|
||||
new Recipe(power, PowerBlocks.battery, new ItemStack(Items.steel, 5), new ItemStack(Items.iron, 5));
|
||||
new Recipe(power, PowerBlocks.batteryLarge, new ItemStack(Items.steel, 5), new ItemStack(Items.iron, 5));
|
||||
new Recipe(power, PowerBlocks.combustiongenerator, new ItemStack(Items.iron, 30));
|
||||
new Recipe(power, PowerBlocks.liquidcombustiongenerator, new ItemStack(Items.iron, 30));
|
||||
new Recipe(power, PowerBlocks.thermalgenerator, new ItemStack(Items.steel, 30));
|
||||
new Recipe(power, PowerBlocks.rtgenerator, new ItemStack(Items.titanium, 20), new ItemStack(Items.steel, 20));
|
||||
new Recipe(power, PowerBlocks.combustiongenerator, new ItemStack(Items.iron, 1));
|
||||
new Recipe(power, PowerBlocks.turbinegenerator, new ItemStack(Items.iron, 1));
|
||||
new Recipe(power, PowerBlocks.thermalgenerator, new ItemStack(Items.steel, 1));
|
||||
new Recipe(power, PowerBlocks.rtgenerator, new ItemStack(Items.titanium, 1), new ItemStack(Items.steel, 1));
|
||||
new Recipe(power, PowerBlocks.solarpanel, new ItemStack(Items.iron, 30), new ItemStack(Items.silicon, 20));
|
||||
new Recipe(power, PowerBlocks.largesolarpanel, new ItemStack(Items.iron, 30), new ItemStack(Items.silicon, 20));
|
||||
new Recipe(power, PowerBlocks.nuclearReactor, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40), new ItemStack(Items.steel, 50));
|
||||
new Recipe(power, PowerBlocks.fusionReactor, new ItemStack(Items.titanium, 40), new ItemStack(Items.surgealloy, 40), new ItemStack(Items.steel, 50));
|
||||
|
||||
new Recipe(power, PowerBlocks.shieldgenerator, new ItemStack(Items.titanium, 30), new ItemStack(Items.surgealloy, 30));
|
||||
|
||||
new Recipe(distribution, PowerBlocks.warpgate, new ItemStack(Items.steel, 1));
|
||||
|
||||
new Recipe(power, PowerBlocks.repairturret, new ItemStack(Items.iron, 30));
|
||||
new Recipe(power, PowerBlocks.megarepairturret, new ItemStack(Items.iron, 20), new ItemStack(Items.steel, 30));
|
||||
|
||||
new Recipe(liquid, LiquidBlocks.conduit, new ItemStack(Items.steel, 1));
|
||||
new Recipe(liquid, LiquidBlocks.pulseconduit, new ItemStack(Items.titanium, 1), new ItemStack(Items.steel, 1));
|
||||
new Recipe(liquid, LiquidBlocks.liquidrouter, new ItemStack(Items.steel, 2));
|
||||
@@ -124,6 +119,9 @@ public class Recipes implements ContentList{
|
||||
new Recipe(units, UnitBlocks.droneFactory, new ItemStack(Items.iron, 50));
|
||||
new Recipe(units, UnitBlocks.reconstructor, new ItemStack(Items.iron, 1));
|
||||
|
||||
new Recipe(units, UnitBlocks.overdriveProjector, new ItemStack(Items.iron, 1));
|
||||
new Recipe(units, UnitBlocks.shieldProjector, new ItemStack(Items.iron, 1));
|
||||
|
||||
|
||||
//new Recipe(units, UnitBlocks.vtolFactory, new ItemStack(Items.steel, 10));
|
||||
//new Recipe(units, UnitBlocks.droneFactory, new ItemStack(Items.steel, 10));
|
||||
|
||||
@@ -2,7 +2,7 @@ package io.anuke.mindustry.content;
|
||||
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import io.anuke.mindustry.content.fx.EnvironmentFx;
|
||||
import io.anuke.mindustry.entities.StatusController.TransitionResult;
|
||||
import io.anuke.mindustry.entities.StatusController.StatusEntry;
|
||||
import io.anuke.mindustry.game.Content;
|
||||
import io.anuke.mindustry.type.StatusEffect;
|
||||
import io.anuke.mindustry.entities.Unit;
|
||||
@@ -12,7 +12,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, oiled;
|
||||
public static StatusEffect none, burning, freezing, wet, melting, tarred, overdrive, shielded;
|
||||
|
||||
@Override
|
||||
public void load() {
|
||||
@@ -25,11 +25,11 @@ public class StatusEffects implements ContentList {
|
||||
}
|
||||
|
||||
@Override
|
||||
public TransitionResult getTransition(Unit unit, StatusEffect to, float time, float newTime, TransitionResult result) {
|
||||
if (to == oiled) {
|
||||
public StatusEntry getTransition(Unit unit, StatusEffect to, float time, float newTime, StatusEntry result) {
|
||||
if (to == tarred) {
|
||||
unit.damage(1f);
|
||||
Effects.effect(EnvironmentFx.burning, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f));
|
||||
return result.set(this, Math.min(time + newTime, baseDuration + oiled.baseDuration));
|
||||
return result.set(this, Math.min(time + newTime, baseDuration + tarred.baseDuration));
|
||||
}
|
||||
|
||||
return super.getTransition(unit, to, time, newTime, result);
|
||||
@@ -49,11 +49,11 @@ public class StatusEffects implements ContentList {
|
||||
freezing = new StatusEffect(5 * 60f) {
|
||||
{
|
||||
oppositeScale = 0.4f;
|
||||
speedMultiplier = 0.7f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Unit unit, float time) {
|
||||
unit.getVelocity().scl(0.7f);
|
||||
|
||||
if (Mathf.chance(Timers.delta() * 0.15f)) {
|
||||
Effects.effect(EnvironmentFx.freezing, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f));
|
||||
@@ -64,6 +64,7 @@ public class StatusEffects implements ContentList {
|
||||
wet = new StatusEffect(3 * 60f) {
|
||||
{
|
||||
oppositeScale = 0.5f;
|
||||
speedMultiplier = 0.999f;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -71,19 +72,19 @@ public class StatusEffects implements ContentList {
|
||||
if (Mathf.chance(Timers.delta() * 0.15f)) {
|
||||
Effects.effect(EnvironmentFx.wet, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f));
|
||||
}
|
||||
|
||||
unit.getVelocity().scl(0.999f);
|
||||
}
|
||||
};
|
||||
|
||||
melting = new StatusEffect(5 * 60f) {
|
||||
{
|
||||
oppositeScale = 0.2f;
|
||||
speedMultiplier = 0.8f;
|
||||
armorMultiplier = 0.8f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TransitionResult getTransition(Unit unit, StatusEffect to, float time, float newTime, TransitionResult result) {
|
||||
if (to == oiled) {
|
||||
public StatusEntry getTransition(Unit unit, StatusEffect to, float time, float newTime, StatusEntry result) {
|
||||
if (to == tarred) {
|
||||
return result.set(this, Math.min(time + newTime / 2f, baseDuration));
|
||||
}
|
||||
|
||||
@@ -92,7 +93,6 @@ public class StatusEffects implements ContentList {
|
||||
|
||||
@Override
|
||||
public void update(Unit unit, float time) {
|
||||
unit.getVelocity().scl(0.8f);
|
||||
unit.damagePeriodic(0.1f);
|
||||
|
||||
if (Mathf.chance(Timers.delta() * 0.2f)) {
|
||||
@@ -101,18 +101,20 @@ public class StatusEffects implements ContentList {
|
||||
}
|
||||
};
|
||||
|
||||
oiled = new StatusEffect(4 * 60f) {
|
||||
tarred = new StatusEffect(4 * 60f) {
|
||||
{
|
||||
speedMultiplier = 0.6f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Unit unit, float time) {
|
||||
if (Mathf.chance(Timers.delta() * 0.15f)) {
|
||||
Effects.effect(EnvironmentFx.oily, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f));
|
||||
}
|
||||
|
||||
unit.getVelocity().scl(0.6f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TransitionResult getTransition(Unit unit, StatusEffect to, float time, float newTime, TransitionResult result) {
|
||||
public StatusEntry getTransition(Unit unit, StatusEffect to, float time, float newTime, StatusEntry result) {
|
||||
if (to == melting || to == burning) {
|
||||
return result.set(to, newTime + time);
|
||||
}
|
||||
@@ -121,6 +123,26 @@ public class StatusEffects implements ContentList {
|
||||
}
|
||||
};
|
||||
|
||||
overdrive = new StatusEffect(6f) {
|
||||
{
|
||||
armorMultiplier = 0.95f;
|
||||
speedMultiplier = 1.4f;
|
||||
damageMultiplier = 1.4f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Unit unit, float time) {
|
||||
//idle regen boosted
|
||||
unit.health += 0.01f * Timers.delta();
|
||||
}
|
||||
};
|
||||
|
||||
shielded = new StatusEffect(6f) {
|
||||
{
|
||||
armorMultiplier = 3f;
|
||||
}
|
||||
};
|
||||
|
||||
melting.setOpposites(wet, freezing);
|
||||
wet.setOpposites(burning);
|
||||
freezing.setOpposites(burning, melting);
|
||||
|
||||
@@ -86,7 +86,7 @@ public class Blocks extends BlockList implements ContentList{
|
||||
oil = new Floor("oil") {{
|
||||
placeableOn = false;
|
||||
liquidColor = Color.valueOf("292929");
|
||||
status = StatusEffects.oiled;
|
||||
status = StatusEffects.tarred;
|
||||
statusIntensity = 1f;
|
||||
speedMultiplier = 0.2f;
|
||||
variants = 0;
|
||||
|
||||
@@ -50,6 +50,9 @@ public class DebugBlocks extends BlockList implements ContentList{
|
||||
};
|
||||
|
||||
itemSource = new Sorter("itemsource") {
|
||||
{
|
||||
hasItems = true;
|
||||
}
|
||||
@Override
|
||||
public void update(Tile tile) {
|
||||
SorterEntity entity = tile.entity();
|
||||
|
||||
@@ -3,93 +3,73 @@ package io.anuke.mindustry.content.blocks;
|
||||
import io.anuke.mindustry.content.fx.BlockFx;
|
||||
import io.anuke.mindustry.type.ContentList;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
import io.anuke.mindustry.world.blocks.defense.RepairTurret;
|
||||
import io.anuke.mindustry.world.blocks.defense.ShieldBlock;
|
||||
import io.anuke.mindustry.world.blocks.distribution.WarpGate;
|
||||
import io.anuke.mindustry.world.blocks.power.*;
|
||||
|
||||
public class PowerBlocks extends BlockList implements ContentList {
|
||||
public static Block combustiongenerator, thermalgenerator, liquidcombustiongenerator, rtgenerator, solarpanel, largesolarpanel,
|
||||
nuclearReactor, fusionReactor, repairturret, megarepairturret, shieldgenerator, battery, batteryLarge, powernode, powernodelarge, warpgate;
|
||||
public static Block combustiongenerator, thermalgenerator, turbinegenerator, rtgenerator, solarpanel, largesolarpanel,
|
||||
nuclearReactor, fusionReactor, battery, batteryLarge, powernode, powernodelarge, warpgate;
|
||||
|
||||
@Override
|
||||
public void load() {
|
||||
combustiongenerator = new BurnerGenerator("combustiongenerator") {{
|
||||
combustiongenerator = new BurnerGenerator("combustion-generator") {{
|
||||
powerOutput = 0.04f;
|
||||
powerCapacity = 40f;
|
||||
}};
|
||||
|
||||
thermalgenerator = new LiquidHeatGenerator("thermalgenerator") {{
|
||||
thermalgenerator = new LiquidHeatGenerator("thermal-generator") {{
|
||||
maxLiquidGenerate = 0.5f;
|
||||
powerPerLiquid = 0.08f;
|
||||
powerCapacity = 40f;
|
||||
generateEffect = BlockFx.redgeneratespark;
|
||||
size = 2;
|
||||
}};
|
||||
|
||||
liquidcombustiongenerator = new LiquidBurnerGenerator("liquidcombustiongenerator") {{
|
||||
maxLiquidGenerate = 0.4f;
|
||||
powerPerLiquid = 0.12f;
|
||||
turbinegenerator = new TurbineGenerator("turbine-generator") {{
|
||||
powerOutput = 0.04f;
|
||||
powerCapacity = 40f;
|
||||
size = 2;
|
||||
}};
|
||||
|
||||
rtgenerator = new DecayGenerator("rtgenerator") {{
|
||||
rtgenerator = new DecayGenerator("rtg-generator") {{
|
||||
powerCapacity = 40f;
|
||||
powerOutput = 0.02f;
|
||||
itemDuration = 500f;
|
||||
}};
|
||||
|
||||
solarpanel = new SolarGenerator("solarpanel") {{
|
||||
solarpanel = new SolarGenerator("solar-panel") {{
|
||||
generation = 0.003f;
|
||||
}};
|
||||
|
||||
largesolarpanel = new SolarGenerator("largesolarpanel") {{
|
||||
largesolarpanel = new SolarGenerator("large-solar-panel") {{
|
||||
size = 3;
|
||||
generation = 0.012f;
|
||||
}};
|
||||
|
||||
nuclearReactor = new NuclearReactor("nuclearreactor") {{
|
||||
nuclearReactor = new NuclearReactor("nuclear-reactor") {{
|
||||
size = 3;
|
||||
health = 600;
|
||||
}};
|
||||
|
||||
fusionReactor = new FusionReactor("fusionreactor") {{
|
||||
fusionReactor = new FusionReactor("fusion-reactor") {{
|
||||
size = 4;
|
||||
health = 600;
|
||||
}};
|
||||
|
||||
repairturret = new RepairTurret("repairturret") {{
|
||||
range = 30;
|
||||
reload = 20f;
|
||||
health = 60;
|
||||
powerUsed = 0.08f;
|
||||
}};
|
||||
|
||||
megarepairturret = new RepairTurret("megarepairturret") {{
|
||||
range = 44;
|
||||
reload = 12f;
|
||||
health = 90;
|
||||
powerUsed = 0.13f;
|
||||
size = 2;
|
||||
}};
|
||||
|
||||
shieldgenerator = new ShieldBlock("shieldgenerator") {{
|
||||
health = 400;
|
||||
}};
|
||||
|
||||
battery = new PowerGenerator("battery") {{
|
||||
powerCapacity = 320f;
|
||||
}};
|
||||
|
||||
batteryLarge = new PowerGenerator("batterylarge") {{
|
||||
batteryLarge = new PowerGenerator("battery-large") {{
|
||||
size = 3;
|
||||
powerCapacity = 2000f;
|
||||
}};
|
||||
|
||||
powernode = new PowerDistributor("powernode") {{
|
||||
powernode = new PowerDistributor("power-node") {{
|
||||
shadow = "shadow-round-1";
|
||||
}};
|
||||
|
||||
powernodelarge = new PowerDistributor("powernodelarge") {{
|
||||
powernodelarge = new PowerDistributor("power-node-large") {{
|
||||
size = 2;
|
||||
powerSpeed = 1f;
|
||||
maxNodes = 5;
|
||||
|
||||
@@ -156,7 +156,7 @@ public class TurretBullets extends BulletList implements ContentList {
|
||||
{
|
||||
speed = 2f;
|
||||
drag = 0.03f;
|
||||
status = StatusEffects.oiled;
|
||||
status = StatusEffects.tarred;
|
||||
statusIntensity = 0.5f;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user