mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-07 00:38:26 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@ -25,7 +25,7 @@ allprojects{
|
|||||||
if(!project.hasProperty("versionType")) versionType = 'official'
|
if(!project.hasProperty("versionType")) versionType = 'official'
|
||||||
appName = 'Mindustry'
|
appName = 'Mindustry'
|
||||||
gdxVersion = '1.9.9'
|
gdxVersion = '1.9.9'
|
||||||
roboVMVersion = '2.3.0'
|
roboVMVersion = '2.3.6'
|
||||||
arcHash = null
|
arcHash = null
|
||||||
|
|
||||||
debugged = {
|
debugged = {
|
||||||
|
@ -411,7 +411,7 @@ bullet.knockback = [stat]{0}[lightgray] knockback
|
|||||||
bullet.freezing = [stat]freezing
|
bullet.freezing = [stat]freezing
|
||||||
bullet.tarred = [stat]tarred
|
bullet.tarred = [stat]tarred
|
||||||
bullet.multiplier = [stat]{0}[lightgray]x ammo multiplier
|
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.blocks = blocks
|
||||||
unit.powersecond = power units/second
|
unit.powersecond = power units/second
|
||||||
|
@ -155,7 +155,7 @@ public class PlacementFragment extends Fragment{
|
|||||||
|
|
||||||
button.update(() -> { //color unplacable things gray
|
button.update(() -> { //color unplacable things gray
|
||||||
TileEntity core = player.getClosestCore();
|
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.forEach(elem -> elem.setColor(color));
|
||||||
button.setChecked(input.block == block);
|
button.setChecked(input.block == block);
|
||||||
});
|
});
|
||||||
|
@ -50,6 +50,13 @@ public class ItemModule extends BlockModule{
|
|||||||
return true;
|
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.
|
* Returns true if this entity has at least one of each item in each stack.
|
||||||
*/
|
*/
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
{
|
{
|
||||||
"size" : "29x29",
|
"size" : "29x29",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "icon.png",
|
"filename" : "icon-58.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -33,7 +33,7 @@
|
|||||||
{
|
{
|
||||||
"size" : "40x40",
|
"size" : "40x40",
|
||||||
"idiom" : "iphone",
|
"idiom" : "iphone",
|
||||||
"filename" : "icon-121.png",
|
"filename" : "icon-120.png",
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -57,7 +57,7 @@
|
|||||||
{
|
{
|
||||||
"size" : "20x20",
|
"size" : "20x20",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "icon-42.png",
|
"filename" : "icon-40.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -75,19 +75,19 @@
|
|||||||
{
|
{
|
||||||
"size" : "40x40",
|
"size" : "40x40",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "icon-41.png",
|
"filename" : "icon-40.png",
|
||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "40x40",
|
"size" : "40x40",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "icon-81.png",
|
"filename" : "icon-80.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "76x76",
|
"size" : "76x76",
|
||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "icon-77.png",
|
"filename" : "icon-76.png",
|
||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user