@@ -182,7 +182,7 @@ public class NetServer implements ApplicationListener{
|
|||||||
return;
|
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);
|
con.kick(KickReason.idInUse);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ public enum Gamemode{
|
|||||||
rules.buildCostMultiplier = 1f;
|
rules.buildCostMultiplier = 1f;
|
||||||
rules.buildSpeedMultiplier = 1f;
|
rules.buildSpeedMultiplier = 1f;
|
||||||
rules.unitBuildSpeedMultiplier = 2f;
|
rules.unitBuildSpeedMultiplier = 2f;
|
||||||
rules.unitHealthMultiplier = 3f;
|
|
||||||
rules.attackMode = true;
|
rules.attackMode = true;
|
||||||
}, map -> map.teams.size > 1),
|
}, map -> map.teams.size > 1),
|
||||||
editor(true, rules -> {
|
editor(true, rules -> {
|
||||||
|
|||||||
@@ -46,8 +46,6 @@ public class Rules{
|
|||||||
public boolean unitAmmo = false;
|
public boolean unitAmmo = false;
|
||||||
/** How fast unit pads build units. */
|
/** How fast unit pads build units. */
|
||||||
public float unitBuildSpeedMultiplier = 1f;
|
public float unitBuildSpeedMultiplier = 1f;
|
||||||
/** How much health units start with. */
|
|
||||||
public float unitHealthMultiplier = 1f;
|
|
||||||
/** How much damage any other units deal. */
|
/** How much damage any other units deal. */
|
||||||
public float unitDamageMultiplier = 1f;
|
public float unitDamageMultiplier = 1f;
|
||||||
/** How much health blocks start with. */
|
/** How much health blocks start with. */
|
||||||
|
|||||||
@@ -161,7 +161,6 @@ public class CustomRulesDialog extends BaseDialog{
|
|||||||
|
|
||||||
title("@rules.title.unit");
|
title("@rules.title.unit");
|
||||||
check("@rules.unitammo", b -> rules.unitAmmo = b, () -> rules.unitAmmo);
|
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.unitdamagemultiplier", f -> rules.unitDamageMultiplier = f, () -> rules.unitDamageMultiplier);
|
||||||
number("@rules.unitbuildspeedmultiplier", f -> rules.unitBuildSpeedMultiplier = f, () -> rules.unitBuildSpeedMultiplier, 0.001f, 50f);
|
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.escape, sel::hide);
|
||||||
sel.keyDown(KeyCode.back, sel::hide);
|
sel.keyDown(KeyCode.back, sel::hide);
|
||||||
sel.show();
|
sel.show();
|
||||||
}).width(480f).growX().left().fillY();
|
}).width(460f).growX().left().fillY();
|
||||||
tablebrow.row();
|
tablebrow.row();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
rebuildBrowser[0].run();
|
rebuildBrowser[0].run();
|
||||||
});
|
}).get().setScrollingDisabled(true, false);
|
||||||
browser.addCloseButton();
|
browser.addCloseButton();
|
||||||
browser.show();
|
browser.show();
|
||||||
}).margin(12f);
|
}).margin(12f);
|
||||||
@@ -241,6 +241,7 @@ public class ModsDialog extends BaseDialog{
|
|||||||
if(!mobile){
|
if(!mobile){
|
||||||
buttons.button("@mods.openfolder", Icon.link, style, () -> Core.app.openFolder(modDirectory.absolutePath())).margin(margin);
|
buttons.button("@mods.openfolder", Icon.link, style, () -> Core.app.openFolder(modDirectory.absolutePath())).margin(margin);
|
||||||
}
|
}
|
||||||
|
Styles.clearPartiali
|
||||||
}).width(w);
|
}).width(w);
|
||||||
|
|
||||||
cont.row();
|
cont.row();
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ public class Turret extends ReloadTurret{
|
|||||||
super.setStats();
|
super.setStats();
|
||||||
|
|
||||||
stats.add(Stat.inaccuracy, (int)inaccuracy, StatUnit.degrees);
|
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.targetsAir, targetAir);
|
||||||
stats.add(Stat.targetsGround, targetGround);
|
stats.add(Stat.targetsGround, targetGround);
|
||||||
if(ammoPerShot != 1) stats.add(Stat.ammoUse, ammoPerShot, StatUnit.perShot);
|
if(ammoPerShot != 1) stats.add(Stat.ammoUse, ammoPerShot, StatUnit.perShot);
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ public class PowerGraph{
|
|||||||
lastPowerNeeded = powerNeeded;
|
lastPowerNeeded = powerNeeded;
|
||||||
lastPowerProduced = powerProduced;
|
lastPowerProduced = powerProduced;
|
||||||
|
|
||||||
lastScaledPowerIn = powerProduced / Time.delta;
|
lastScaledPowerIn = (powerProduced + energyDelta) / Time.delta;
|
||||||
lastScaledPowerOut = powerNeeded / Time.delta;
|
lastScaledPowerOut = powerNeeded / Time.delta;
|
||||||
lastCapacity = getTotalBatteryCapacity();
|
lastCapacity = getTotalBatteryCapacity();
|
||||||
lastPowerStored = getBatteryStored();
|
lastPowerStored = getBatteryStored();
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ public class PowerNode extends PowerBlock{
|
|||||||
for(Point2 point : (Point2[])req.config){
|
for(Point2 point : (Point2[])req.config){
|
||||||
otherReq = null;
|
otherReq = null;
|
||||||
list.each(other -> {
|
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;
|
otherReq = other;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user