Random cleanup
This commit is contained in:
@@ -12,7 +12,6 @@ import io.anuke.mindustry.resource.Recipes;
|
|||||||
import io.anuke.mindustry.world.blocks.Blocks;
|
import io.anuke.mindustry.world.blocks.Blocks;
|
||||||
import io.anuke.mindustry.world.blocks.ProductionBlocks;
|
import io.anuke.mindustry.world.blocks.ProductionBlocks;
|
||||||
import io.anuke.ucore.core.Effects;
|
import io.anuke.ucore.core.Effects;
|
||||||
import io.anuke.ucore.core.Sounds;
|
|
||||||
import io.anuke.ucore.entities.Entities;
|
import io.anuke.ucore.entities.Entities;
|
||||||
import io.anuke.ucore.entities.SolidEntity;
|
import io.anuke.ucore.entities.SolidEntity;
|
||||||
|
|
||||||
@@ -40,7 +39,7 @@ public class Placement {
|
|||||||
state.inventory.addItem(tile.block().drops.item, tile.block().drops.amount);
|
state.inventory.addItem(tile.block().drops.item, tile.block().drops.amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(sound) threads.run(() -> Sounds.play("break"));
|
if(sound) threads.run(() -> Effects.sound("break", x * tilesize, y * tilesize));
|
||||||
|
|
||||||
if(!tile.block().isMultiblock() && !tile.isLinked()){
|
if(!tile.block().isMultiblock() && !tile.isLinked()){
|
||||||
tile.setBlock(Blocks.air);
|
tile.setBlock(Blocks.air);
|
||||||
@@ -85,7 +84,7 @@ public class Placement {
|
|||||||
}
|
}
|
||||||
}else if(effects) Effects.effect(Fx.place, x * tilesize, y * tilesize);
|
}else if(effects) Effects.effect(Fx.place, x * tilesize, y * tilesize);
|
||||||
|
|
||||||
if(effects && sound) threads.run(() -> Sounds.play("place"));
|
if(effects && sound) threads.run(() -> Effects.sound("place", x * tilesize, y * tilesize));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean validPlace(int x, int y, Block type){
|
public static boolean validPlace(int x, int y, Block type){
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package io.anuke.mindustry.world;
|
|||||||
import com.badlogic.gdx.graphics.Color;
|
import com.badlogic.gdx.graphics.Color;
|
||||||
import com.badlogic.gdx.graphics.Pixmap;
|
import com.badlogic.gdx.graphics.Pixmap;
|
||||||
import com.badlogic.gdx.utils.Array;
|
import com.badlogic.gdx.utils.Array;
|
||||||
import com.badlogic.gdx.utils.IntMap;
|
|
||||||
import com.badlogic.gdx.utils.ObjectMap;
|
import com.badlogic.gdx.utils.ObjectMap;
|
||||||
import io.anuke.mindustry.Vars;
|
import io.anuke.mindustry.Vars;
|
||||||
import io.anuke.mindustry.entities.enemies.Enemy;
|
import io.anuke.mindustry.entities.enemies.Enemy;
|
||||||
@@ -95,15 +94,4 @@ public class WorldGenerator {
|
|||||||
|
|
||||||
return core;
|
return core;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IntMap<Block> map(Object...objects){
|
|
||||||
|
|
||||||
IntMap<Block> out = new IntMap<>();
|
|
||||||
|
|
||||||
for(int i = 0; i < objects.length; i += 2){
|
|
||||||
out.put(Hue.rgb((Color)objects[i]), (Block)objects[i+1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user