Extra legacy block substitution / iOS fixes
This commit is contained in:
@@ -8,4 +8,9 @@ public class LegacyBlock extends Block{
|
||||
public LegacyBlock(String name){
|
||||
super(name);
|
||||
}
|
||||
|
||||
/** Removes this block from the world, or replaces it with something else. */
|
||||
public void removeSelf(Tile tile){
|
||||
tile.remove();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package mindustry.world.blocks.legacy;
|
||||
|
||||
import arc.util.io.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.world.*;
|
||||
|
||||
public class LegacyUnitFactory extends LegacyBlock{
|
||||
public Block replacement = Blocks.air;
|
||||
|
||||
public LegacyUnitFactory(String name){
|
||||
super(name);
|
||||
@@ -13,6 +16,12 @@ public class LegacyUnitFactory extends LegacyBlock{
|
||||
solid = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeSelf(Tile tile){
|
||||
int rot = tile.build == null ? 0 : tile.build.rotation;
|
||||
tile.setBlock(replacement, tile.team(), rot);
|
||||
}
|
||||
|
||||
public class LegacyUnitFactoryBuild extends Building{
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user