mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-14 01:37:36 +07:00
New campaign map / Fixed #3414
This commit is contained in:
@ -145,7 +145,7 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void showMultiFileChooser(Cons<Fi> cons, String... extensions){
|
public void showMultiFileChooser(Cons<Fi> cons, String... extensions){
|
||||||
showFileChooser(true, cons, extensions);
|
showFileChooser(true, "@open", cons, extensions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -566,6 +566,7 @@ sector.saltFlats.name = Salt Flats
|
|||||||
sector.fungalPass.name = Fungal Pass
|
sector.fungalPass.name = Fungal Pass
|
||||||
sector.biomassFacility.name = Biomass Synthesis Facility
|
sector.biomassFacility.name = Biomass Synthesis Facility
|
||||||
sector.windsweptIslands.name = Windswept Islands
|
sector.windsweptIslands.name = Windswept Islands
|
||||||
|
sector.extractionOutpost.name = Extraction Outpost
|
||||||
|
|
||||||
#unused
|
#unused
|
||||||
#sector.crags.name = Crags
|
#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.
|
//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){
|
if(!triedWalls){
|
||||||
tryWalls();
|
tryWalls();
|
||||||
triedWalls = true;
|
triedWalls = true;
|
||||||
|
@ -8,8 +8,8 @@ import static mindustry.content.Planets.*;
|
|||||||
public class SectorPresets implements ContentList{
|
public class SectorPresets implements ContentList{
|
||||||
public static SectorPreset
|
public static SectorPreset
|
||||||
groundZero,
|
groundZero,
|
||||||
craters, biomassFacility, frozenForest, ruinousShores, windsweptIslands, stainedMountains, tarFields, fungalPass,
|
craters, biomassFacility, frozenForest, ruinousShores, windsweptIslands, stainedMountains, tarFields,
|
||||||
saltFlats, overgrowth,
|
fungalPass, extractionOutpost, saltFlats, overgrowth,
|
||||||
impact0078, desolateRift, nuclearComplex;
|
impact0078, desolateRift, nuclearComplex;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -56,6 +56,11 @@ public class SectorPresets implements ContentList{
|
|||||||
difficulty = 3;
|
difficulty = 3;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
extractionOutpost = new SectorPreset("extractionOutpost", serpulo, 165){{
|
||||||
|
difficulty = 5;
|
||||||
|
useAI = false;
|
||||||
|
}};
|
||||||
|
|
||||||
fungalPass = new SectorPreset("fungalPass", serpulo, 21){{
|
fungalPass = new SectorPreset("fungalPass", serpulo, 21){{
|
||||||
difficulty = 4;
|
difficulty = 4;
|
||||||
useAI = false;
|
useAI = false;
|
||||||
|
@ -29,7 +29,7 @@ public class TechTree implements ContentList{
|
|||||||
|
|
||||||
node(junction, () -> {
|
node(junction, () -> {
|
||||||
node(router, () -> {
|
node(router, () -> {
|
||||||
node(launchPad, () -> {
|
node(launchPad, Seq.with(new SectorComplete(extractionOutpost)), () -> {
|
||||||
});
|
});
|
||||||
|
|
||||||
node(distributor);
|
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(
|
node(saltFlats, Seq.with(
|
||||||
new SectorComplete(windsweptIslands),
|
new SectorComplete(windsweptIslands),
|
||||||
new Research(groundFactory),
|
new Research(groundFactory),
|
||||||
|
@ -105,7 +105,7 @@ public class Rules{
|
|||||||
/** Whether to use building AI. */
|
/** Whether to use building AI. */
|
||||||
public boolean ai;
|
public boolean ai;
|
||||||
/** TODO Tier of blocks/designs that the AI uses for building. [0, 1]*/
|
/** 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. */
|
/** Whether, when AI is enabled, ships should be spawned from the core. */
|
||||||
public boolean aiCoreSpawn = true;
|
public boolean aiCoreSpawn = true;
|
||||||
/** If true, blocks don't require power or resources. */
|
/** If true, blocks don't require power or resources. */
|
||||||
|
@ -43,6 +43,7 @@ public class ContentParser{
|
|||||||
private static final boolean ignoreUnknownFields = true;
|
private static final boolean ignoreUnknownFields = true;
|
||||||
ObjectMap<Class<?>, ContentType> contentTypes = new ObjectMap<>();
|
ObjectMap<Class<?>, ContentType> contentTypes = new ObjectMap<>();
|
||||||
ObjectSet<Class<?>> implicitNullable = ObjectSet.with(TextureRegion.class, TextureRegion[].class, TextureRegion[][].class);
|
ObjectSet<Class<?>> implicitNullable = ObjectSet.with(TextureRegion.class, TextureRegion[].class, TextureRegion[][].class);
|
||||||
|
ObjectMap<String, AssetDescriptor> sounds = new ObjectMap<>();
|
||||||
|
|
||||||
ObjectMap<Class<?>, FieldParser> classParsers = new ObjectMap<>(){{
|
ObjectMap<Class<?>, FieldParser> classParsers = new ObjectMap<>(){{
|
||||||
put(Effect.class, (type, data) -> {
|
put(Effect.class, (type, data) -> {
|
||||||
@ -96,10 +97,11 @@ public class ContentParser{
|
|||||||
String name = "sounds/" + data.asString();
|
String name = "sounds/" + data.asString();
|
||||||
String path = Vars.tree.get(name + ".ogg").exists() ? name + ".ogg" : name + ".mp3";
|
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();
|
var sound = new Sound();
|
||||||
AssetDescriptor<?> desc = Core.assets.load(path, Sound.class, new SoundParameter(sound));
|
AssetDescriptor<?> desc = Core.assets.load(path, Sound.class, new SoundParameter(sound));
|
||||||
desc.errored = Throwable::printStackTrace;
|
desc.errored = Throwable::printStackTrace;
|
||||||
|
sounds.put(path, desc);
|
||||||
return sound;
|
return sound;
|
||||||
});
|
});
|
||||||
put(Objectives.Objective.class, (type, data) -> {
|
put(Objectives.Objective.class, (type, data) -> {
|
||||||
|
@ -181,7 +181,7 @@ public class HudFragment extends Fragment{
|
|||||||
cont.update(() -> {
|
cont.update(() -> {
|
||||||
if(Core.input.keyTap(Binding.toggle_menus) && !ui.chatfrag.shown() && !Core.scene.hasDialog() && !(Core.scene.getKeyboardFocus() instanceof TextField)){
|
if(Core.input.keyTap(Binding.toggle_menus) && !ui.chatfrag.shown() && !Core.scene.hasDialog() && !(Core.scene.getKeyboardFocus() instanceof TextField)){
|
||||||
Core.settings.getBoolOnce("ui-hidden", () -> {
|
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();
|
toggleMenus();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user