Extra legacy block substitution / iOS fixes

This commit is contained in:
Anuken
2020-10-31 16:11:51 -04:00
parent 05dcd7622b
commit b1b03a7503
8 changed files with 31 additions and 10 deletions

View File

@@ -617,7 +617,7 @@ public class Block extends UnlockableContent{
public ItemStack[] researchRequirements(){
ItemStack[] out = new ItemStack[requirements.length];
for(int i = 0; i < out.length; i++){
int quantity = 60 + Mathf.round(Mathf.pow(requirements[i].amount, 1.12f) * 20 * researchCostMultiplier, 10);
int quantity = 60 + Mathf.round(Mathf.pow(requirements[i].amount, 1.1f) * 20 * researchCostMultiplier, 10);
out[i] = new ItemStack(requirements[i].item, UI.roundAmount(quantity));
}

View File

@@ -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();
}
}

View File

@@ -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