mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-11 03:08:38 +07:00
New campaign map / Fixed #3414
This commit is contained in:
parent
9928b0f788
commit
7bd05ad9ad
@ -145,7 +145,7 @@ public class AndroidLauncher extends AndroidApplication{
|
||||
|
||||
@Override
|
||||
public void showMultiFileChooser(Cons<Fi> cons, String... extensions){
|
||||
showFileChooser(true, cons, extensions);
|
||||
showFileChooser(true, "@open", cons, extensions);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -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
|
||||
|
Binary file not shown.
BIN
core/assets/maps/extractionOutpost.msav
Normal file
BIN
core/assets/maps/extractionOutpost.msav
Normal file
Binary file not shown.
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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),
|
||||
|
@ -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. */
|
||||
|
@ -43,6 +43,7 @@ public class ContentParser{
|
||||
private static final boolean ignoreUnknownFields = true;
|
||||
ObjectMap<Class<?>, ContentType> contentTypes = new ObjectMap<>();
|
||||
ObjectSet<Class<?>> implicitNullable = ObjectSet.with(TextureRegion.class, TextureRegion[].class, TextureRegion[][].class);
|
||||
ObjectMap<String, AssetDescriptor> sounds = new ObjectMap<>();
|
||||
|
||||
ObjectMap<Class<?>, 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) -> {
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user