Launch/map buttons for mobile campaign / Bugfixes
This commit is contained in:
@@ -136,6 +136,8 @@ mod.scripts.disable = Your device does not support mods with scripts. You must d
|
|||||||
about.button = About
|
about.button = About
|
||||||
name = Name:
|
name = Name:
|
||||||
noname = Pick a[accent] player name[] first.
|
noname = Pick a[accent] player name[] first.
|
||||||
|
planetmap = Planet Map
|
||||||
|
launchcore = Launch Core
|
||||||
filename = File Name:
|
filename = File Name:
|
||||||
unlocked = New content unlocked!
|
unlocked = New content unlocked!
|
||||||
completed = [accent]Completed
|
completed = [accent]Completed
|
||||||
@@ -170,7 +172,7 @@ host.info = The [accent]host[] button hosts a server on port [scarlet]6567[]. \n
|
|||||||
join.info = Here, you can enter a [accent]server IP[] to connect to, or discover [accent]local network[] or [accent]global[] servers to connect to.\nBoth LAN and WAN multiplayer is supported.\n\n[lightgray]If you want to connect to someone by IP, you would need to ask the host for their IP, which can be found by googling "my ip" from their device.
|
join.info = Here, you can enter a [accent]server IP[] to connect to, or discover [accent]local network[] or [accent]global[] servers to connect to.\nBoth LAN and WAN multiplayer is supported.\n\n[lightgray]If you want to connect to someone by IP, you would need to ask the host for their IP, which can be found by googling "my ip" from their device.
|
||||||
hostserver = Host Multiplayer Game
|
hostserver = Host Multiplayer Game
|
||||||
invitefriends = Invite Friends
|
invitefriends = Invite Friends
|
||||||
hostserver.mobile = Host\nGame
|
hostserver.mobile = Host Game
|
||||||
host = Host
|
host = Host
|
||||||
hosting = [accent]Opening server...
|
hosting = [accent]Opening server...
|
||||||
hosts.refresh = Refresh
|
hosts.refresh = Refresh
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import mindustry.gen.*;
|
|||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
import mindustry.world.meta.*;
|
import mindustry.world.meta.*;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
public class GroundAI extends AIController{
|
public class GroundAI extends AIController{
|
||||||
@@ -20,8 +22,9 @@ public class GroundAI extends AIController{
|
|||||||
|
|
||||||
Building core = unit.closestEnemyCore();
|
Building core = unit.closestEnemyCore();
|
||||||
|
|
||||||
if(core != null && unit.within(core, unit.range() / 1.1f)){
|
if(core != null && unit.within(core, unit.range() / 1.1f + core.block.size * tilesize / 2f)){
|
||||||
target = core;
|
target = core;
|
||||||
|
Arrays.fill(targets, core);
|
||||||
}
|
}
|
||||||
|
|
||||||
if((core == null || !unit.within(core, unit.range() * 0.5f)) && command() == UnitCommand.attack){
|
if((core == null || !unit.within(core, unit.range() * 0.5f)) && command() == UnitCommand.attack){
|
||||||
|
|||||||
@@ -72,7 +72,6 @@ public class UnitTypes implements ContentList{
|
|||||||
mace = new UnitType("mace"){{
|
mace = new UnitType("mace"){{
|
||||||
speed = 0.4f;
|
speed = 0.4f;
|
||||||
hitsize = 9f;
|
hitsize = 9f;
|
||||||
range = 10f;
|
|
||||||
health = 500;
|
health = 500;
|
||||||
armor = 4f;
|
armor = 4f;
|
||||||
|
|
||||||
@@ -84,12 +83,11 @@ public class UnitTypes implements ContentList{
|
|||||||
reload = 14f;
|
reload = 14f;
|
||||||
recoil = 1f;
|
recoil = 1f;
|
||||||
ejectEffect = Fx.none;
|
ejectEffect = Fx.none;
|
||||||
bullet = new BulletType(3f, 30f){{
|
bullet = new BulletType(3.9f, 30f){{
|
||||||
ammoMultiplier = 3f;
|
ammoMultiplier = 3f;
|
||||||
hitSize = 7f;
|
hitSize = 7f;
|
||||||
lifetime = 42f;
|
lifetime = 12f;
|
||||||
pierce = true;
|
pierce = true;
|
||||||
drag = 0.05f;
|
|
||||||
statusDuration = 60f * 4;
|
statusDuration = 60f * 4;
|
||||||
shootEffect = Fx.shootSmallFlame;
|
shootEffect = Fx.shootSmallFlame;
|
||||||
hitEffect = Fx.hitFlameSmall;
|
hitEffect = Fx.hitFlameSmall;
|
||||||
@@ -380,7 +378,7 @@ public class UnitTypes implements ContentList{
|
|||||||
drag = 0.1f;
|
drag = 0.1f;
|
||||||
speed = 0.5f;
|
speed = 0.5f;
|
||||||
hitsize = 21f;
|
hitsize = 21f;
|
||||||
health = 7600;
|
health = 8000;
|
||||||
armor = 6f;
|
armor = 6f;
|
||||||
|
|
||||||
legCount = 6;
|
legCount = 6;
|
||||||
|
|||||||
@@ -779,6 +779,10 @@ public class NetServer implements ApplicationListener{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(state.isGame() && net.server()){
|
if(state.isGame() && net.server()){
|
||||||
|
if(state.rules.pvp){
|
||||||
|
state.serverPaused = isWaitingForPlayers();
|
||||||
|
}
|
||||||
|
|
||||||
sync();
|
sync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -338,22 +338,24 @@ public class DesktopInput extends InputHandler{
|
|||||||
table.row();
|
table.row();
|
||||||
table.left().margin(0f).defaults().size(48f).left();
|
table.left().margin(0f).defaults().size(48f).left();
|
||||||
|
|
||||||
|
//TODO localize these
|
||||||
|
|
||||||
table.button(Icon.paste, Styles.clearPartiali, () -> {
|
table.button(Icon.paste, Styles.clearPartiali, () -> {
|
||||||
ui.schematics.show();
|
ui.schematics.show();
|
||||||
}).tooltip("Schematics");
|
}).tooltip("@schematics");
|
||||||
|
|
||||||
table.button(Icon.tree, Styles.clearPartiali, () -> {
|
table.button(Icon.tree, Styles.clearPartiali, () -> {
|
||||||
ui.research.show();
|
ui.research.show();
|
||||||
}).visible(() -> state.isCampaign()).tooltip("Research");
|
}).visible(() -> state.isCampaign()).tooltip("@research");
|
||||||
|
|
||||||
table.button(Icon.map, Styles.clearPartiali, () -> {
|
table.button(Icon.map, Styles.clearPartiali, () -> {
|
||||||
ui.planet.show();
|
ui.planet.show();
|
||||||
}).visible(() -> state.isCampaign()).tooltip("Planet Map");
|
}).visible(() -> state.isCampaign()).tooltip("@planetmap");
|
||||||
|
|
||||||
table.button(Icon.up, Styles.clearPartiali, () -> {
|
table.button(Icon.up, Styles.clearPartiali, () -> {
|
||||||
ui.planet.show(state.getSector(), player.team().core());
|
ui.planet.show(state.getSector(), player.team().core());
|
||||||
}).visible(() -> state.isCampaign())
|
}).visible(() -> state.isCampaign())
|
||||||
.disabled(b -> player.team().core() == null || !player.team().core().items.has(player.team().core().block.requirements)).tooltip("Launch Core");
|
.disabled(b -> player.team().core() == null || !player.team().core().items.has(player.team().core().block.requirements)).tooltip("@launchcore");
|
||||||
}
|
}
|
||||||
|
|
||||||
void pollInput(){
|
void pollInput(){
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class DatabaseDialog extends BaseDialog{
|
|||||||
for(int i = 0; i < array.size; i++){
|
for(int i = 0; i < array.size; i++){
|
||||||
UnlockableContent unlock = (UnlockableContent)array.get(i);
|
UnlockableContent unlock = (UnlockableContent)array.get(i);
|
||||||
|
|
||||||
Image image = unlocked(unlock) ? new Image(unlock.icon(Cicon.medium)) : new Image(Icon.lockOpen, Pal.gray);
|
Image image = unlocked(unlock) ? new Image(unlock.icon(Cicon.medium)) : new Image(Icon.lock, Pal.gray);
|
||||||
list.add(image).size(8*4).pad(3);
|
list.add(image).size(8*4).pad(3);
|
||||||
ClickListener listener = new ClickListener();
|
ClickListener listener = new ClickListener();
|
||||||
image.addListener(listener);
|
image.addListener(listener);
|
||||||
|
|||||||
@@ -93,6 +93,18 @@ public class PausedDialog extends BaseDialog{
|
|||||||
cont.row();
|
cont.row();
|
||||||
|
|
||||||
cont.buttonRow("@load", Icon.download, load::show).disabled(b -> net.active());
|
cont.buttonRow("@load", Icon.download, load::show).disabled(b -> net.active());
|
||||||
|
}else if(state.isCampaign()){
|
||||||
|
cont.buttonRow("@launchcore", Icon.up, () -> {
|
||||||
|
hide();
|
||||||
|
ui.planet.show(state.getSector(), player.team().core());
|
||||||
|
}).disabled(b -> player.team().core() == null || !player.team().core().items.has(player.team().core().block.requirements));
|
||||||
|
|
||||||
|
cont.row();
|
||||||
|
|
||||||
|
cont.buttonRow("@planetmap", Icon.map, () -> {
|
||||||
|
hide();
|
||||||
|
ui.planet.show();
|
||||||
|
});
|
||||||
}else{
|
}else{
|
||||||
cont.row();
|
cont.row();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import mindustry.ui.dialogs.*;
|
|||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
public class HudFragment extends Fragment{
|
public class HudFragment extends Fragment{
|
||||||
private static final float dsize = 47.2f;
|
private static final float dsize = 47f;
|
||||||
|
|
||||||
public final PlacementFragment blockfrag = new PlacementFragment();
|
public final PlacementFragment blockfrag = new PlacementFragment();
|
||||||
|
|
||||||
@@ -122,6 +122,8 @@ public class HudFragment extends Fragment{
|
|||||||
}).update(i -> {
|
}).update(i -> {
|
||||||
if(net.active() && mobile){
|
if(net.active() && mobile){
|
||||||
i.getStyle().imageUp = Icon.chat;
|
i.getStyle().imageUp = Icon.chat;
|
||||||
|
}else if(state.isCampaign()){
|
||||||
|
i.getStyle().imageUp = Icon.tree;
|
||||||
}else{
|
}else{
|
||||||
i.getStyle().imageUp = Icon.book;
|
i.getStyle().imageUp = Icon.book;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user