Added phasewalls
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 290 B |
Binary file not shown.
|
After Width: | Height: | Size: 205 B |
Binary file not shown.
|
After Width: | Height: | Size: 365 B |
Binary file not shown.
|
After Width: | Height: | Size: 242 B |
+2196
-1314
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 116 KiB |
@@ -13,6 +13,7 @@ public class Recipes implements ContentList{
|
|||||||
@Override
|
@Override
|
||||||
public void load (){
|
public void load (){
|
||||||
new Recipe(defense, DefenseBlocks.ironwall, new ItemStack(Items.iron, 12));
|
new Recipe(defense, DefenseBlocks.ironwall, new ItemStack(Items.iron, 12));
|
||||||
|
new Recipe(defense, DefenseBlocks.ironwalllarge, new ItemStack(Items.iron, 12));
|
||||||
new Recipe(defense, DefenseBlocks.steelwall, new ItemStack(Items.steel, 12));
|
new Recipe(defense, DefenseBlocks.steelwall, new ItemStack(Items.steel, 12));
|
||||||
new Recipe(defense, DefenseBlocks.titaniumwall, new ItemStack(Items.titanium, 12));
|
new Recipe(defense, DefenseBlocks.titaniumwall, new ItemStack(Items.titanium, 12));
|
||||||
new Recipe(defense, DefenseBlocks.diriumwall, new ItemStack(Items.surgealloy, 12));
|
new Recipe(defense, DefenseBlocks.diriumwall, new ItemStack(Items.surgealloy, 12));
|
||||||
@@ -23,6 +24,8 @@ public class Recipes implements ContentList{
|
|||||||
new Recipe(defense, DefenseBlocks.largedoor, new ItemStack(Items.steel, 3 * 4), new ItemStack(Items.iron, 3 * 4 * 4));
|
new Recipe(defense, DefenseBlocks.largedoor, new ItemStack(Items.steel, 3 * 4), new ItemStack(Items.iron, 3 * 4 * 4));
|
||||||
new Recipe(defense, DefenseBlocks.deflectorwall, new ItemStack(Items.titanium, 1));
|
new Recipe(defense, DefenseBlocks.deflectorwall, new ItemStack(Items.titanium, 1));
|
||||||
new Recipe(defense, DefenseBlocks.deflectorwalllarge, new ItemStack(Items.titanium, 1));
|
new Recipe(defense, DefenseBlocks.deflectorwalllarge, new ItemStack(Items.titanium, 1));
|
||||||
|
new Recipe(defense, DefenseBlocks.phasewall, new ItemStack(Items.titanium, 1));
|
||||||
|
new Recipe(defense, DefenseBlocks.phasewalllarge, new ItemStack(Items.titanium, 1));
|
||||||
|
|
||||||
new Recipe(distribution, DistributionBlocks.conveyor, new ItemStack(Items.iron, 1));
|
new Recipe(distribution, DistributionBlocks.conveyor, new ItemStack(Items.iron, 1));
|
||||||
new Recipe(distribution, DistributionBlocks.steelconveyor, new ItemStack(Items.steel, 1));
|
new Recipe(distribution, DistributionBlocks.steelconveyor, new ItemStack(Items.steel, 1));
|
||||||
|
|||||||
@@ -6,19 +6,21 @@ import io.anuke.mindustry.world.Block;
|
|||||||
import io.anuke.mindustry.world.blocks.Wall;
|
import io.anuke.mindustry.world.blocks.Wall;
|
||||||
import io.anuke.mindustry.world.blocks.defense.DeflectorWall;
|
import io.anuke.mindustry.world.blocks.defense.DeflectorWall;
|
||||||
import io.anuke.mindustry.world.blocks.defense.Door;
|
import io.anuke.mindustry.world.blocks.defense.Door;
|
||||||
|
import io.anuke.mindustry.world.blocks.defense.PhaseWall;
|
||||||
|
|
||||||
public class DefenseBlocks extends BlockList implements ContentList {
|
public class DefenseBlocks extends BlockList implements ContentList {
|
||||||
public static Block stonewall, ironwall, steelwall, titaniumwall, diriumwall, steelwalllarge, titaniumwalllarge, diriumwalllarge, door, largedoor, deflectorwall, deflectorwalllarge;
|
public static Block ironwall, ironwalllarge, steelwall, titaniumwall, diriumwall, steelwalllarge, titaniumwalllarge, diriumwalllarge, door, largedoor, deflectorwall, deflectorwalllarge,
|
||||||
|
phasewall, phasewalllarge;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void load() {
|
public void load() {
|
||||||
int wallHealthMultiplier = 4;
|
int wallHealthMultiplier = 4;
|
||||||
|
|
||||||
stonewall = new Wall("stonewall") {{
|
ironwall = new Wall("ironwall") {{
|
||||||
health = 40 * wallHealthMultiplier;
|
health = 80 * wallHealthMultiplier;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
ironwall = new Wall("ironwall") {{
|
ironwalllarge = new Wall("ironwall-large") {{
|
||||||
health = 80 * wallHealthMultiplier;
|
health = 80 * wallHealthMultiplier;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
@@ -58,6 +60,16 @@ public class DefenseBlocks extends BlockList implements ContentList {
|
|||||||
size = 2;
|
size = 2;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
phasewall = new PhaseWall("phase-wall") {{
|
||||||
|
health = 150 * wallHealthMultiplier;
|
||||||
|
}};
|
||||||
|
|
||||||
|
phasewalllarge = new PhaseWall("phase-wall-large") {{
|
||||||
|
health = 150 * 4 * wallHealthMultiplier;
|
||||||
|
size = 2;
|
||||||
|
regenSpeed = 0.5f;
|
||||||
|
}};
|
||||||
|
|
||||||
door = new Door("door") {{
|
door = new Door("door") {{
|
||||||
health = 90 * wallHealthMultiplier;
|
health = 90 * wallHealthMultiplier;
|
||||||
}};
|
}};
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package io.anuke.mindustry.world.blocks.defense;
|
||||||
|
|
||||||
|
import io.anuke.mindustry.world.Tile;
|
||||||
|
import io.anuke.mindustry.world.blocks.Wall;
|
||||||
|
import io.anuke.ucore.core.Timers;
|
||||||
|
import io.anuke.ucore.util.Mathf;
|
||||||
|
|
||||||
|
public class PhaseWall extends Wall {
|
||||||
|
protected float regenSpeed = 0.25f;
|
||||||
|
|
||||||
|
public PhaseWall(String name) {
|
||||||
|
super(name);
|
||||||
|
update = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update(Tile tile) {
|
||||||
|
tile.entity.health = Mathf.clamp(tile.entity.health + regenSpeed * Timers.delta(), 0f, health);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user