Extra legacy block substitution / iOS fixes
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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