diff --git a/core/src/mindustry/service/GameService.java b/core/src/mindustry/service/GameService.java index 2ba3140e54..10bb516951 100644 --- a/core/src/mindustry/service/GameService.java +++ b/core/src/mindustry/service/GameService.java @@ -109,6 +109,10 @@ public class GameService{ routerLanguage.complete(); } + if(!Planets.serpulo.sectors.contains(s -> !s.isCaptured())){ + captureAllSectors.complete(); + } + Events.on(UnitDestroyEvent.class, e -> { if(campaign()){ if(e.unit.team != Vars.player.team()){ @@ -477,7 +481,9 @@ public class GameService{ allPresetsErekir.complete(); } - SStat.sectorsControlled.set(e.sector.planet.sectors.count(Sector::hasBase)); + if(e.sector.planet == Planets.serpulo){ + SStat.sectorsControlled.set(e.sector.planet.sectors.count(Sector::hasBase)); + } }); Events.on(PayloadDropEvent.class, e -> { diff --git a/core/src/mindustry/ui/Fonts.java b/core/src/mindustry/ui/Fonts.java index c8c5547231..5cbfce3f42 100644 --- a/core/src/mindustry/ui/Fonts.java +++ b/core/src/mindustry/ui/Fonts.java @@ -140,6 +140,8 @@ public class Fonts{ } } + stringIcons.put("alphachan", stringIcons.get("alphaaaa")); + iconTable = new TextureRegion[512]; iconTable[0] = Core.atlas.find("error"); lastCid = 1; diff --git a/core/src/mindustry/ui/fragments/ChatFragment.java b/core/src/mindustry/ui/fragments/ChatFragment.java index 85f3c95e26..4bd3d4a641 100644 --- a/core/src/mindustry/ui/fragments/ChatFragment.java +++ b/core/src/mindustry/ui/fragments/ChatFragment.java @@ -105,6 +105,8 @@ public class ChatFragment extends Table{ chatfield.getStyle().fontColor = Color.white; chatfield.setStyle(chatfield.getStyle()); + chatfield.typed(this::handleType); + bottom().left().marginBottom(offsety).marginLeft(offsetx * 2).add(fieldlabel).padBottom(6f); add(chatfield).padBottom(offsety).padLeft(offsetx).growX().padRight(offsetx).height(28); @@ -115,6 +117,22 @@ public class ChatFragment extends Table{ } } + //no mobile support. + private void handleType(char c){ + int cursor = chatfield.getCursorPosition(); + if(c == ':'){ + int index = chatfield.getText().lastIndexOf(':', cursor - 2); + if(index >= 0 && index < cursor){ + String text = chatfield.getText().substring(index + 1, cursor - 1); + String uni = Fonts.getUnicodeStr(text); + if(uni != null && uni.length() > 0){ + chatfield.setText(chatfield.getText().substring(0, index) + uni + chatfield.getText().substring(cursor)); + chatfield.setCursorPosition(index + uni.length()); + } + } + } + } + protected void rect(float x, float y, float w, float h){ //prevents texture bindings; the string lookup is irrelevant as it is only called <10 times per frame, and maps are very fast anyway Draw.rect("whiteui", x + w/2f, y + h/2f, w, h); diff --git a/gradle.properties b/gradle.properties index 2c5768409d..443cbf281e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,4 +25,4 @@ org.gradle.caching=true #used for slow jitpack builds; TODO see if this actually works org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.connectionTimeout=100000 -archash=8793e01874 +archash=5a1cbb8b59