mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-10 02:37:12 +07:00
parent
0cc9b0b0a3
commit
75d2b0fb69
@ -182,7 +182,7 @@ public class NetServer implements ApplicationListener{
|
||||
return;
|
||||
}
|
||||
|
||||
if(Groups.player.contains(player -> player.uuid().equals(packet.uuid) || player.usid().equals(packet.usid) || player.ip().equals(con.address))){
|
||||
if(Groups.player.contains(player -> player.uuid().equals(packet.uuid) || player.usid().equals(packet.usid))){
|
||||
con.kick(KickReason.idInUse);
|
||||
return;
|
||||
}
|
||||
|
@ -31,7 +31,6 @@ public enum Gamemode{
|
||||
rules.buildCostMultiplier = 1f;
|
||||
rules.buildSpeedMultiplier = 1f;
|
||||
rules.unitBuildSpeedMultiplier = 2f;
|
||||
rules.unitHealthMultiplier = 3f;
|
||||
rules.attackMode = true;
|
||||
}, map -> map.teams.size > 1),
|
||||
editor(true, rules -> {
|
||||
|
@ -46,8 +46,6 @@ public class Rules{
|
||||
public boolean unitAmmo = false;
|
||||
/** How fast unit pads build units. */
|
||||
public float unitBuildSpeedMultiplier = 1f;
|
||||
/** How much health units start with. */
|
||||
public float unitHealthMultiplier = 1f;
|
||||
/** How much damage any other units deal. */
|
||||
public float unitDamageMultiplier = 1f;
|
||||
/** How much health blocks start with. */
|
||||
|
@ -161,7 +161,6 @@ public class CustomRulesDialog extends BaseDialog{
|
||||
|
||||
title("@rules.title.unit");
|
||||
check("@rules.unitammo", b -> rules.unitAmmo = b, () -> rules.unitAmmo);
|
||||
number("@rules.unithealthmultiplier", f -> rules.unitHealthMultiplier = f, () -> rules.unitHealthMultiplier);
|
||||
number("@rules.unitdamagemultiplier", f -> rules.unitDamageMultiplier = f, () -> rules.unitDamageMultiplier);
|
||||
number("@rules.unitbuildspeedmultiplier", f -> rules.unitBuildSpeedMultiplier = f, () -> rules.unitBuildSpeedMultiplier, 0.001f, 50f);
|
||||
|
||||
|
@ -221,13 +221,13 @@ public class ModsDialog extends BaseDialog{
|
||||
sel.keyDown(KeyCode.escape, sel::hide);
|
||||
sel.keyDown(KeyCode.back, sel::hide);
|
||||
sel.show();
|
||||
}).width(480f).growX().left().fillY();
|
||||
}).width(460f).growX().left().fillY();
|
||||
tablebrow.row();
|
||||
}
|
||||
});
|
||||
};
|
||||
rebuildBrowser[0].run();
|
||||
});
|
||||
}).get().setScrollingDisabled(true, false);
|
||||
browser.addCloseButton();
|
||||
browser.show();
|
||||
}).margin(12f);
|
||||
@ -241,6 +241,7 @@ public class ModsDialog extends BaseDialog{
|
||||
if(!mobile){
|
||||
buttons.button("@mods.openfolder", Icon.link, style, () -> Core.app.openFolder(modDirectory.absolutePath())).margin(margin);
|
||||
}
|
||||
Styles.clearPartiali
|
||||
}).width(w);
|
||||
|
||||
cont.row();
|
||||
|
@ -111,7 +111,7 @@ public class Turret extends ReloadTurret{
|
||||
super.setStats();
|
||||
|
||||
stats.add(Stat.inaccuracy, (int)inaccuracy, StatUnit.degrees);
|
||||
stats.add(Stat.reload, 60f / reloadTime * (alternate ? 1 : shots), StatUnit.none);
|
||||
stats.add(Stat.reload, 60f / (reloadTime + 1) * (alternate ? 1 : shots), StatUnit.none);
|
||||
stats.add(Stat.targetsAir, targetAir);
|
||||
stats.add(Stat.targetsGround, targetGround);
|
||||
if(ammoPerShot != 1) stats.add(Stat.ammoUse, ammoPerShot, StatUnit.perShot);
|
||||
|
@ -224,7 +224,7 @@ public class PowerGraph{
|
||||
lastPowerNeeded = powerNeeded;
|
||||
lastPowerProduced = powerProduced;
|
||||
|
||||
lastScaledPowerIn = powerProduced / Time.delta;
|
||||
lastScaledPowerIn = (powerProduced + energyDelta) / Time.delta;
|
||||
lastScaledPowerOut = powerNeeded / Time.delta;
|
||||
lastCapacity = getTotalBatteryCapacity();
|
||||
lastPowerStored = getBatteryStored();
|
||||
|
@ -226,7 +226,7 @@ public class PowerNode extends PowerBlock{
|
||||
for(Point2 point : (Point2[])req.config){
|
||||
otherReq = null;
|
||||
list.each(other -> {
|
||||
if((other.x == req.x + point.x && other.y == req.y + point.y) && other != req){
|
||||
if((other.x == req.x + point.x && other.y == req.y + point.y) && other != req && other.block != null && other.block.hasPower){
|
||||
otherReq = other;
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user