This commit is contained in:
Anuken 2019-03-25 13:12:55 -04:00
parent 0b1e2bf19b
commit d0e026d597
5 changed files with 16 additions and 9 deletions

View File

@ -25,7 +25,7 @@ allprojects{
if(!project.hasProperty("versionType")) versionType = 'official'
appName = 'Mindustry'
gdxVersion = '1.9.9'
roboVMVersion = '2.3.0'
roboVMVersion = '2.3.6'
arcHash = null
debugged = {

View File

@ -409,7 +409,7 @@ bullet.knockback = [stat]{0}[lightgray] knockback
bullet.freezing = [stat]freezing
bullet.tarred = [stat]tarred
bullet.multiplier = [stat]{0}[lightgray]x ammo multiplier
bullet.reload = [stat]{0}[lightgray]x reload
bullet.reload = [stat]{0}[lightgray]x fire rate
unit.blocks = blocks
unit.powersecond = power units/second

View File

@ -155,7 +155,7 @@ public class PlacementFragment extends Fragment{
button.update(() -> { //color unplacable things gray
TileEntity core = player.getClosestCore();
Color color = core != null && (core.items.has(block.buildRequirements) || state.rules.infiniteResources) ? Color.WHITE : Color.GRAY;
Color color = core != null && (core.items.has(block.buildRequirements, state.rules.buildCostMultiplier) || state.rules.infiniteResources) ? Color.WHITE : Color.GRAY;
button.forEach(elem -> elem.setColor(color));
button.setChecked(input.block == block);
});

View File

@ -50,6 +50,13 @@ public class ItemModule extends BlockModule{
return true;
}
public boolean has(ItemStack[] stacks, float multiplier){
for(ItemStack stack : stacks){
if(!has(stack.item, Math.round(stack.amount * multiplier))) return false;
}
return true;
}
/**
* Returns true if this entity has at least one of each item in each stack.
*/

View File

@ -15,7 +15,7 @@
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "icon.png",
"filename" : "icon-58.png",
"scale" : "2x"
},
{
@ -33,7 +33,7 @@
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "icon-121.png",
"filename" : "icon-120.png",
"scale" : "3x"
},
{
@ -57,7 +57,7 @@
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "icon-42.png",
"filename" : "icon-40.png",
"scale" : "2x"
},
{
@ -75,19 +75,19 @@
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "icon-41.png",
"filename" : "icon-40.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "icon-81.png",
"filename" : "icon-80.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "icon-77.png",
"filename" : "icon-76.png",
"scale" : "1x"
},
{