Fixed (another) crash
This commit is contained in:
@@ -36,6 +36,7 @@ public class Recipes implements ContentList{
|
||||
//projectors
|
||||
new Recipe(defense, DefenseBlocks.mendProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 150), new ItemStack(Items.titanium, 150), new ItemStack(Items.silicon, 250));
|
||||
new Recipe(defense, DefenseBlocks.overdriveProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 150), new ItemStack(Items.titanium, 150), new ItemStack(Items.silicon, 250));
|
||||
new Recipe(defense, DefenseBlocks.forceProjector, new ItemStack(Items.lead, 200), new ItemStack(Items.densealloy, 150), new ItemStack(Items.titanium, 150), new ItemStack(Items.silicon, 250));
|
||||
|
||||
//extra blocks
|
||||
new Recipe(defense, DefenseBlocks.shockMine, new ItemStack(Items.lead, 50), new ItemStack(Items.silicon, 25))
|
||||
@@ -58,7 +59,7 @@ public class Recipes implements ContentList{
|
||||
new Recipe(distribution, DistributionBlocks.titaniumconveyor, new ItemStack(Items.copper, 2), new ItemStack(Items.titanium, 1));
|
||||
new Recipe(distribution, DistributionBlocks.phaseConveyor, new ItemStack(Items.phasematter, 10), new ItemStack(Items.silicon, 15), new ItemStack(Items.lead, 20), new ItemStack(Items.densealloy, 20));
|
||||
|
||||
//starter lead transporation
|
||||
//starter lead transportation
|
||||
new Recipe(distribution, DistributionBlocks.junction, new ItemStack(Items.copper, 2));
|
||||
new Recipe(distribution, DistributionBlocks.router, new ItemStack(Items.copper, 6));
|
||||
|
||||
|
||||
@@ -2,11 +2,14 @@ package io.anuke.mindustry.world.blocks.defense;
|
||||
|
||||
import io.anuke.mindustry.entities.TileEntity;
|
||||
import io.anuke.mindustry.entities.traits.SyncTrait;
|
||||
import io.anuke.mindustry.graphics.Palette;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.ucore.entities.EntityGroup;
|
||||
import io.anuke.ucore.entities.impl.BaseEntity;
|
||||
import io.anuke.ucore.entities.trait.DrawTrait;
|
||||
import io.anuke.ucore.graphics.Draw;
|
||||
import io.anuke.ucore.graphics.Fill;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
@@ -20,6 +23,7 @@ public class ForceProjector extends Block {
|
||||
super(name);
|
||||
update = true;
|
||||
solid = true;
|
||||
hasPower = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -48,11 +52,27 @@ public class ForceProjector extends Block {
|
||||
public ShieldEntity(Tile tile){
|
||||
this.tile = tile;
|
||||
this.block = (ForceProjector)tile.block();
|
||||
set(tile.drawx(), tile.drawy());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(){
|
||||
Draw.color(Palette.accent);
|
||||
Draw.alpha(0.5f);
|
||||
|
||||
int range = 3;
|
||||
float rad = 12f;
|
||||
float space = rad*2-2f;
|
||||
for (int y = -range; y <= range; y++) {
|
||||
for (int x = -range; x <= range; x++) {
|
||||
//if(Mathf.dst(x, y) > range) continue;
|
||||
float wx = tile.drawx() + x * space + ((y + range) % 2)*space/2f;
|
||||
float wy = tile.drawy() + y * (space-1);
|
||||
Fill.poly(wx, wy, 6, rad);
|
||||
}
|
||||
}
|
||||
|
||||
Draw.color();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -75,6 +75,8 @@ public class MechFactory extends Block{
|
||||
|
||||
@Remote(called = Loc.server)
|
||||
public static void onMechFactoryDone(Tile tile){
|
||||
if(!(tile.entity instanceof MechFactoryEntity)) return;
|
||||
|
||||
MechFactoryEntity entity = tile.entity();
|
||||
|
||||
Effects.effect(Fx.spawn, entity);
|
||||
|
||||
Reference in New Issue
Block a user