Many various fixes
This commit is contained in:
@@ -983,7 +983,6 @@ public class Blocks implements ContentList{
|
||||
pulseConduit = new Conduit("pulse-conduit"){{
|
||||
requirements(Category.liquid, ItemStack.with(Items.titanium, 1, Items.metaglass, 1));
|
||||
liquidCapacity = 16f;
|
||||
liquidFlowFactor = 4.9f;
|
||||
health = 90;
|
||||
}};
|
||||
|
||||
@@ -1406,7 +1405,7 @@ public class Blocks implements ContentList{
|
||||
}};
|
||||
|
||||
arc = new PowerTurret("arc"){{
|
||||
requirements(Category.turret, ItemStack.with(Items.copper, 35, Items.lead, 35));
|
||||
requirements(Category.turret, ItemStack.with(Items.copper, 35, Items.lead, 50));
|
||||
shootType = Bullets.arc;
|
||||
reload = 24f;
|
||||
shootCone = 40f;
|
||||
|
||||
@@ -186,7 +186,6 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
|
||||
clearChildren();
|
||||
margin(0);
|
||||
shown(this::build);
|
||||
|
||||
update(() -> {
|
||||
if(Core.scene.getKeyboardFocus() instanceof Dialog && Core.scene.getKeyboardFocus() != this){
|
||||
@@ -228,6 +227,8 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
||||
platform.updateRPC();
|
||||
if(!Core.settings.getBool("landscape")) platform.endForceLandscape();
|
||||
});
|
||||
|
||||
shown(this::build);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package io.anuke.mindustry.entities.traits;
|
||||
|
||||
import io.anuke.arc.math.geom.Position;
|
||||
import io.anuke.mindustry.entities.type.Player;
|
||||
import io.anuke.mindustry.entities.type.*;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
|
||||
public interface SpawnerTrait extends TargetTrait, Position{
|
||||
@@ -9,6 +9,8 @@ public interface SpawnerTrait extends TargetTrait, Position{
|
||||
|
||||
void updateSpawning(Player unit);
|
||||
|
||||
boolean hasUnit(Unit unit);
|
||||
|
||||
@Override
|
||||
default boolean isValid(){
|
||||
return getTile().entity instanceof SpawnerTrait;
|
||||
|
||||
@@ -919,7 +919,7 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
|
||||
buffer.writeInt(Color.rgba8888(color));
|
||||
buffer.writeByte(mech.id);
|
||||
buffer.writeInt(mining == null ? noSpawner : mining.pos());
|
||||
buffer.writeInt(spawner == null ? noSpawner : spawner.getTile().pos());
|
||||
buffer.writeInt(spawner == null || !spawner.hasUnit(this) ? noSpawner : spawner.getTile().pos());
|
||||
buffer.writeShort((short)(baseRotation * 2));
|
||||
|
||||
writeBuilding(buffer);
|
||||
|
||||
@@ -115,9 +115,7 @@ public class Tutorial{
|
||||
outline("blockinfo");
|
||||
}
|
||||
},
|
||||
conveyor(
|
||||
line -> Strings.format(line, Math.min(placed(Blocks.conveyor), 2), 2),
|
||||
() -> placed(Blocks.conveyor, 2) && event("lineconfirm") && event("coreitem")){
|
||||
conveyor(() -> placed(Blocks.conveyor, 2) && event("lineconfirm") && event("coreitem")){
|
||||
void draw(){
|
||||
outline("category-distribution");
|
||||
outline("block-conveyor");
|
||||
|
||||
@@ -28,7 +28,6 @@ public abstract class BlockStorage extends UnlockableContent{
|
||||
|
||||
public int itemCapacity = 10;
|
||||
public float liquidCapacity = 10f;
|
||||
public float liquidFlowFactor = 4.9f;
|
||||
|
||||
public final BlockStats stats = new BlockStats();
|
||||
public final BlockBars bars = new BlockBars();
|
||||
|
||||
@@ -11,6 +11,8 @@ import io.anuke.mindustry.world.*;
|
||||
public class RespawnBlock{
|
||||
|
||||
public static void drawRespawn(Tile tile, float heat, float progress, float time, Player player, Mech to){
|
||||
progress = Mathf.clamp(progress);
|
||||
|
||||
Draw.color(Pal.darkMetal);
|
||||
Lines.stroke(2f * heat);
|
||||
Fill.poly(tile.drawx(), tile.drawy(), 4, 10f * heat);
|
||||
|
||||
@@ -22,7 +22,6 @@ public class Pump extends LiquidBlock{
|
||||
public Pump(String name){
|
||||
super(name);
|
||||
layer = Layer.overlay;
|
||||
liquidFlowFactor = 3f;
|
||||
group = BlockGroup.liquids;
|
||||
floating = true;
|
||||
}
|
||||
|
||||
@@ -143,6 +143,11 @@ public class CoreBlock extends StorageBlock{
|
||||
float time;
|
||||
float heat;
|
||||
|
||||
@Override
|
||||
public boolean hasUnit(Unit unit){
|
||||
return unit == spawnPlayer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSpawning(Player player){
|
||||
if(!netServer.isWaitingForPlayers() && spawnPlayer == null){
|
||||
|
||||
@@ -142,6 +142,11 @@ public class MechPad extends Block{
|
||||
float time;
|
||||
float heat;
|
||||
|
||||
@Override
|
||||
public boolean hasUnit(Unit unit){
|
||||
return unit == player;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSpawning(Player unit){
|
||||
if(player == null){
|
||||
|
||||
Reference in New Issue
Block a user