diff --git a/android/src/mindustry/android/AndroidLauncher.java b/android/src/mindustry/android/AndroidLauncher.java index 6e3a05c11d..d558e2542b 100644 --- a/android/src/mindustry/android/AndroidLauncher.java +++ b/android/src/mindustry/android/AndroidLauncher.java @@ -145,7 +145,7 @@ public class AndroidLauncher extends AndroidApplication{ @Override public void showMultiFileChooser(Cons cons, String... extensions){ - showFileChooser(true, cons, extensions); + showFileChooser(true, "@open", cons, extensions); } @Override diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index 1ee30c7c21..c72baca84d 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -566,6 +566,7 @@ sector.saltFlats.name = Salt Flats sector.fungalPass.name = Fungal Pass sector.biomassFacility.name = Biomass Synthesis Facility sector.windsweptIslands.name = Windswept Islands +sector.extractionOutpost.name = Extraction Outpost #unused #sector.crags.name = Crags diff --git a/core/assets/maps/crags.msav b/core/assets/maps/crags.msav deleted file mode 100644 index 1fb64c01e7..0000000000 Binary files a/core/assets/maps/crags.msav and /dev/null differ diff --git a/core/assets/maps/extractionOutpost.msav b/core/assets/maps/extractionOutpost.msav new file mode 100644 index 0000000000..ce713aa014 Binary files /dev/null and b/core/assets/maps/extractionOutpost.msav differ diff --git a/core/src/mindustry/ai/BaseAI.java b/core/src/mindustry/ai/BaseAI.java index 2c1fb11617..a4fb6404e9 100644 --- a/core/src/mindustry/ai/BaseAI.java +++ b/core/src/mindustry/ai/BaseAI.java @@ -54,7 +54,7 @@ public class BaseAI{ } //only schedule when there's something to build. - if(data.blocks.isEmpty() && timer.get(timerStep, step)){ + if(data.blocks.isEmpty() && timer.get(timerStep, Mathf.lerp(20f, 4f, data.team.rules().aiTier))){ if(!triedWalls){ tryWalls(); triedWalls = true; diff --git a/core/src/mindustry/content/SectorPresets.java b/core/src/mindustry/content/SectorPresets.java index cacb98406c..52b96e66bf 100644 --- a/core/src/mindustry/content/SectorPresets.java +++ b/core/src/mindustry/content/SectorPresets.java @@ -8,8 +8,8 @@ import static mindustry.content.Planets.*; public class SectorPresets implements ContentList{ public static SectorPreset groundZero, - craters, biomassFacility, frozenForest, ruinousShores, windsweptIslands, stainedMountains, tarFields, fungalPass, - saltFlats, overgrowth, + craters, biomassFacility, frozenForest, ruinousShores, windsweptIslands, stainedMountains, tarFields, + fungalPass, extractionOutpost, saltFlats, overgrowth, impact0078, desolateRift, nuclearComplex; @Override @@ -56,6 +56,11 @@ public class SectorPresets implements ContentList{ difficulty = 3; }}; + extractionOutpost = new SectorPreset("extractionOutpost", serpulo, 165){{ + difficulty = 5; + useAI = false; + }}; + fungalPass = new SectorPreset("fungalPass", serpulo, 21){{ difficulty = 4; useAI = false; diff --git a/core/src/mindustry/content/TechTree.java b/core/src/mindustry/content/TechTree.java index e1873a4c6b..ad9603ecd5 100644 --- a/core/src/mindustry/content/TechTree.java +++ b/core/src/mindustry/content/TechTree.java @@ -29,7 +29,7 @@ public class TechTree implements ContentList{ node(junction, () -> { node(router, () -> { - node(launchPad, () -> { + node(launchPad, Seq.with(new SectorComplete(extractionOutpost)), () -> { }); node(distributor); @@ -473,6 +473,17 @@ public class TechTree implements ContentList{ }); }); + node(extractionOutpost, Seq.with( + new SectorComplete(stainedMountains), + new SectorComplete(windsweptIslands), + new Research(groundFactory), + new Research(nova), + new Research(airFactory), + new Research(mono) + ), () -> { + + }); + node(saltFlats, Seq.with( new SectorComplete(windsweptIslands), new Research(groundFactory), diff --git a/core/src/mindustry/game/Rules.java b/core/src/mindustry/game/Rules.java index 2a927cc59b..3f9e104a68 100644 --- a/core/src/mindustry/game/Rules.java +++ b/core/src/mindustry/game/Rules.java @@ -105,7 +105,7 @@ public class Rules{ /** Whether to use building AI. */ public boolean ai; /** TODO Tier of blocks/designs that the AI uses for building. [0, 1]*/ - public float aiTier = 0f; + public float aiTier = 1f; /** Whether, when AI is enabled, ships should be spawned from the core. */ public boolean aiCoreSpawn = true; /** If true, blocks don't require power or resources. */ diff --git a/core/src/mindustry/mod/ContentParser.java b/core/src/mindustry/mod/ContentParser.java index 472b5acdaa..153981ed98 100644 --- a/core/src/mindustry/mod/ContentParser.java +++ b/core/src/mindustry/mod/ContentParser.java @@ -43,6 +43,7 @@ public class ContentParser{ private static final boolean ignoreUnknownFields = true; ObjectMap, ContentType> contentTypes = new ObjectMap<>(); ObjectSet> implicitNullable = ObjectSet.with(TextureRegion.class, TextureRegion[].class, TextureRegion[][].class); + ObjectMap sounds = new ObjectMap<>(); ObjectMap, FieldParser> classParsers = new ObjectMap<>(){{ put(Effect.class, (type, data) -> { @@ -96,10 +97,11 @@ public class ContentParser{ String name = "sounds/" + data.asString(); String path = Vars.tree.get(name + ".ogg").exists() ? name + ".ogg" : name + ".mp3"; - if(Core.assets.contains(path, Sound.class)) return Core.assets.get(path, Sound.class); + if(sounds.containsKey(path)) return ((SoundParameter)sounds.get(path).params).sound; var sound = new Sound(); AssetDescriptor desc = Core.assets.load(path, Sound.class, new SoundParameter(sound)); desc.errored = Throwable::printStackTrace; + sounds.put(path, desc); return sound; }); put(Objectives.Objective.class, (type, data) -> { diff --git a/core/src/mindustry/ui/fragments/HudFragment.java b/core/src/mindustry/ui/fragments/HudFragment.java index 01589c3c37..3fe5148b45 100644 --- a/core/src/mindustry/ui/fragments/HudFragment.java +++ b/core/src/mindustry/ui/fragments/HudFragment.java @@ -181,7 +181,7 @@ public class HudFragment extends Fragment{ cont.update(() -> { if(Core.input.keyTap(Binding.toggle_menus) && !ui.chatfrag.shown() && !Core.scene.hasDialog() && !(Core.scene.getKeyboardFocus() instanceof TextField)){ Core.settings.getBoolOnce("ui-hidden", () -> { - ui.announce(Core.bundle.format("showui", Core.keybinds.get(Binding.toggle_menus).key.toString(), 10)); + ui.announce(Core.bundle.format("showui", Core.keybinds.get(Binding.toggle_menus).key.toString(), 11)); }); toggleMenus(); }