Closes Anuken/Mindustry-Suggestions/issues/4677
This commit is contained in:
@@ -1170,6 +1170,11 @@ keybind.command_mode.name = Command Mode
|
|||||||
keybind.command_queue.name = Queue Unit Command
|
keybind.command_queue.name = Queue Unit Command
|
||||||
keybind.create_control_group.name = Create Control Group
|
keybind.create_control_group.name = Create Control Group
|
||||||
keybind.cancel_orders.name = Cancel Orders
|
keybind.cancel_orders.name = Cancel Orders
|
||||||
|
keybind.unit_stance_1.name = Unit Stance 1
|
||||||
|
keybind.unit_stance_2.name = Unit Stance 2
|
||||||
|
keybind.unit_stance_3.name = Unit Stance 3
|
||||||
|
keybind.unit_stance_4.name = Unit Stance 4
|
||||||
|
keybind.unit_stance_5.name = Unit Stance 5
|
||||||
keybind.rebuild_select.name = Rebuild Region
|
keybind.rebuild_select.name = Rebuild Region
|
||||||
keybind.schematic_select.name = Select Region
|
keybind.schematic_select.name = Select Region
|
||||||
keybind.schematic_menu.name = Schematic Menu
|
keybind.schematic_menu.name = Schematic Menu
|
||||||
|
|||||||
@@ -1613,9 +1613,9 @@ public class LExecutor{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static class ExplosionI implements LInstruction{
|
public static class ExplosionI implements LInstruction{
|
||||||
public int team, x, y, radius, damage, air, ground, pierce;
|
public int team, x, y, radius, damage, air, ground, pierce, effect;
|
||||||
|
|
||||||
public ExplosionI(int team, int x, int y, int radius, int damage, int air, int ground, int pierce){
|
public ExplosionI(int team, int x, int y, int radius, int damage, int air, int ground, int pierce, int effect){
|
||||||
this.team = team;
|
this.team = team;
|
||||||
this.x = x;
|
this.x = x;
|
||||||
this.y = y;
|
this.y = y;
|
||||||
@@ -1635,19 +1635,21 @@ public class LExecutor{
|
|||||||
|
|
||||||
Team t = exec.team(team);
|
Team t = exec.team(team);
|
||||||
//note that there is a radius cap
|
//note that there is a radius cap
|
||||||
Call.logicExplosion(t, World.unconv(exec.numf(x)), World.unconv(exec.numf(y)), World.unconv(Math.min(exec.numf(radius), 100)), exec.numf(damage), exec.bool(air), exec.bool(ground), exec.bool(pierce));
|
Call.logicExplosion(t, World.unconv(exec.numf(x)), World.unconv(exec.numf(y)), World.unconv(Math.min(exec.numf(radius), 100)), exec.numf(damage), exec.bool(air), exec.bool(ground), exec.bool(pierce), exec.bool(effect));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Remote(called = Loc.server, unreliable = true)
|
@Remote(called = Loc.server, unreliable = true)
|
||||||
public static void logicExplosion(Team team, float x, float y, float radius, float damage, boolean air, boolean ground, boolean pierce){
|
public static void logicExplosion(Team team, float x, float y, float radius, float damage, boolean air, boolean ground, boolean pierce, boolean effect){
|
||||||
if(damage < 0f) return;
|
if(damage < 0f) return;
|
||||||
|
|
||||||
Damage.damage(team, x, y, radius, damage, pierce, air, ground);
|
Damage.damage(team, x, y, radius, damage, pierce, air, ground);
|
||||||
if(pierce){
|
if(effect){
|
||||||
Fx.spawnShockwave.at(x, y, World.conv(radius));
|
if(pierce){
|
||||||
}else{
|
Fx.spawnShockwave.at(x, y, World.conv(radius));
|
||||||
Fx.dynamicExplosion.at(x, y, World.conv(radius) / 8f);
|
}else{
|
||||||
|
Fx.dynamicExplosion.at(x, y, World.conv(radius) / 8f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1599,7 +1599,7 @@ public class LStatements{
|
|||||||
|
|
||||||
@RegisterStatement("explosion")
|
@RegisterStatement("explosion")
|
||||||
public static class ExplosionStatement extends LStatement{
|
public static class ExplosionStatement extends LStatement{
|
||||||
public String team = "@crux", x = "0", y = "0", radius = "5", damage = "50", air = "true", ground = "true", pierce = "false";
|
public String team = "@crux", x = "0", y = "0", radius = "5", damage = "50", air = "true", ground = "true", pierce = "false", effect = "true";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void build(Table table){
|
public void build(Table table){
|
||||||
@@ -1614,6 +1614,8 @@ public class LStatements{
|
|||||||
row(table);
|
row(table);
|
||||||
fields(table, "ground", ground, str -> ground = str);
|
fields(table, "ground", ground, str -> ground = str);
|
||||||
fields(table, "pierce", pierce, str -> pierce = str);
|
fields(table, "pierce", pierce, str -> pierce = str);
|
||||||
|
table.row();
|
||||||
|
fields(table, "effect", effect, str -> effect = str);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1623,7 +1625,7 @@ public class LStatements{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LInstruction build(LAssembler b){
|
public LInstruction build(LAssembler b){
|
||||||
return new ExplosionI(b.var(team), b.var(x), b.var(y), b.var(radius), b.var(damage), b.var(air), b.var(ground), b.var(pierce));
|
return new ExplosionI(b.var(team), b.var(x), b.var(y), b.var(radius), b.var(damage), b.var(air), b.var(ground), b.var(pierce), b.var(effect));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user