Additional tests, inventory fixes
This commit is contained in:
@@ -106,7 +106,7 @@ public class TurretBlocks extends BlockList implements ContentList{
|
||||
|
||||
arc = new PowerTurret("arc"){{
|
||||
shootType = AmmoTypes.arc;
|
||||
reload = 80f;
|
||||
reload = 75f;
|
||||
shootShake = 1f;
|
||||
shootCone = 40f;
|
||||
rotatespeed = 8f;
|
||||
|
||||
@@ -304,7 +304,7 @@ public class TurretBullets extends BulletList implements ContentList{
|
||||
}
|
||||
};
|
||||
|
||||
arc = new BulletType(0.001f, 30){
|
||||
arc = new BulletType(0.001f, 26){
|
||||
{
|
||||
lifetime = 1;
|
||||
despawneffect = Fx.none;
|
||||
|
||||
@@ -193,7 +193,7 @@ public abstract class InputHandler extends InputAdapter{
|
||||
}
|
||||
|
||||
//call tapped event
|
||||
if(tile.getTeam() == player.getTeam()){
|
||||
if(!consumed && tile.getTeam() == player.getTeam()){
|
||||
Call.onTileTapped(player, tile);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,4 +32,13 @@ public class Map{
|
||||
public String getDisplayName(){
|
||||
return meta.tags.get("name", name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return "Map{" +
|
||||
"name='" + name + '\'' +
|
||||
", custom=" + custom +
|
||||
", meta=" + meta +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,4 +37,13 @@ public class MapMeta{
|
||||
public boolean hasOreGen(){
|
||||
return !tags.get("oregen", "0").equals("0");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return "MapMeta{" +
|
||||
"tags=" + tags +
|
||||
", width=" + width +
|
||||
", height=" + height +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package io.anuke.mindustry.type;
|
||||
|
||||
/**
|
||||
* Used to store ammo amounts in units and turrets.
|
||||
*/
|
||||
/**Used to store ammo amounts in turrets.*/
|
||||
public class AmmoEntry{
|
||||
public AmmoType type;
|
||||
public int amount;
|
||||
|
||||
@@ -43,7 +43,7 @@ public abstract class BaseBlock extends MappableContent{
|
||||
/**Returns the amount of items this block can accept.*/
|
||||
public int acceptStack(Item item, int amount, Tile tile, Unit source){
|
||||
if(acceptItem(item, tile, tile) && hasItems && (source == null || source.getTeam() == tile.getTeam())){
|
||||
return Math.min(getMaximumAccepted(tile, item), amount);
|
||||
return Math.min(getMaximumAccepted(tile, item) - tile.entity.items.get(item), amount);
|
||||
}else{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -152,11 +152,6 @@ public class Smelter extends Block{
|
||||
Effects.effect(craftEffect, flameColor, tile.drawx(), tile.drawy());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaximumAccepted(Tile tile, Item item){
|
||||
return itemCapacity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean acceptItem(Item item, Tile tile, Tile source){
|
||||
boolean isInput = false;
|
||||
|
||||
Reference in New Issue
Block a user