Tutorial removed / Logic block group
This commit is contained in:
@@ -356,64 +356,6 @@ public class Control implements ApplicationListener, Loadable{
|
||||
});
|
||||
}
|
||||
|
||||
public void playTutorial(){
|
||||
ui.showInfo("@indev.notready");
|
||||
//TODO implement
|
||||
//ui.showInfo("death");
|
||||
/*
|
||||
Zone zone = Zones.groundZero;
|
||||
ui.loadAnd(() -> {
|
||||
logic.reset();
|
||||
net.reset();
|
||||
|
||||
world.beginMapLoad();
|
||||
|
||||
world.resize(zone.generator.width, zone.generator.height);
|
||||
zone.generator.generate(world.tiles);
|
||||
|
||||
Tile coreb = null;
|
||||
|
||||
out:
|
||||
for(int x = 0; x < world.width(); x++){
|
||||
for(int y = 0; y < world.height(); y++){
|
||||
if(world.rawTile(x, y).block() instanceof CoreBlock){
|
||||
coreb = world.rawTile(x, y);
|
||||
break out;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Geometry.circle(coreb.x, coreb.y, 10, (cx, cy) -> {
|
||||
Tile tile = world.ltile(cx, cy);
|
||||
if(tile != null && tile.team() == state.rules.defaultTeam && !(tile.block() instanceof CoreBlock)){
|
||||
tile.remove();
|
||||
}
|
||||
});
|
||||
|
||||
Geometry.circle(coreb.x, coreb.y, 5, (cx, cy) -> world.tile(cx, cy).clearOverlay());
|
||||
|
||||
world.endMapLoad();
|
||||
|
||||
zone.rules.get(state.rules);
|
||||
//TODO assign zone!!
|
||||
//state.rules.zone = zone;
|
||||
for(Building core : state.teams.playerCores()){
|
||||
for(ItemStack stack : zone.getStartingItems()){
|
||||
core.items.add(stack.item, stack.amount);
|
||||
}
|
||||
}
|
||||
Building core = state.teams.playerCores().first();
|
||||
core.items.clear();
|
||||
|
||||
logic.play();
|
||||
state.rules.waveTimer = false;
|
||||
state.rules.waveSpacing = 60f * 30;
|
||||
state.rules.buildCostMultiplier = 0.3f;
|
||||
state.rules.tutorial = true;
|
||||
Events.fire(Trigger.newGame);
|
||||
});*/
|
||||
}
|
||||
|
||||
public boolean isHighScore(){
|
||||
return hiscore;
|
||||
}
|
||||
@@ -467,12 +409,6 @@ public class Control implements ApplicationListener, Loadable{
|
||||
}));
|
||||
}
|
||||
|
||||
//play tutorial on start
|
||||
//TODO no tutorial right now
|
||||
if(!settings.getBool("playedtutorial", false)){
|
||||
//Core.app.post(() -> Core.app.post(this::playTutorial));
|
||||
}
|
||||
|
||||
//display UI scale changed dialog
|
||||
if(Core.settings.getBool("uiscalechanged", false)){
|
||||
Core.app.post(() -> Core.app.post(() -> {
|
||||
|
||||
@@ -341,19 +341,6 @@ public class SettingsMenuDialog extends SettingsDialog{
|
||||
}
|
||||
}
|
||||
|
||||
game.pref(new Setting(){
|
||||
@Override
|
||||
public void add(SettingsTable table){
|
||||
table.button("@tutorial.retake", () -> {
|
||||
hide();
|
||||
control.playTutorial();
|
||||
}).size(220f, 60f).pad(6).left();
|
||||
table.add();
|
||||
table.row();
|
||||
hide();
|
||||
}
|
||||
});
|
||||
|
||||
graphics.sliderPref("uiscale", 100, 25, 300, 25, s -> {
|
||||
if(ui.settings != null){
|
||||
Core.settings.put("uiscalechanged", true);
|
||||
|
||||
@@ -168,8 +168,7 @@ public class MenuFragment extends Fragment{
|
||||
new Buttoni("@campaign", Icon.play, () -> checkPlay(ui.planet::show)),
|
||||
new Buttoni("@joingame", Icon.add, () -> checkPlay(ui.join::show)),
|
||||
new Buttoni("@customgame", Icon.terrain, () -> checkPlay(ui.custom::show)),
|
||||
new Buttoni("@loadgame", Icon.download, () -> checkPlay(ui.load::show)),
|
||||
new Buttoni("@tutorial", Icon.info, () -> checkPlay(control::playTutorial))
|
||||
new Buttoni("@loadgame", Icon.download, () -> checkPlay(ui.load::show))
|
||||
),
|
||||
new Buttoni("@editor", Icon.terrain, () -> checkPlay(ui.maps::show)), steam ? new Buttoni("@workshop", Icon.book, platform::openWorkshop) : null,
|
||||
new Buttoni("@mods", Icon.book, ui.mods::show),
|
||||
|
||||
@@ -36,6 +36,7 @@ public class LogicBlock extends Block{
|
||||
update = true;
|
||||
solid = true;
|
||||
configurable = true;
|
||||
group = BlockGroup.logic;
|
||||
|
||||
config(byte[].class, (LogicBuild build, byte[] data) -> build.readCompressed(data, true));
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ public class LogicDisplay extends Block{
|
||||
super(name);
|
||||
update = true;
|
||||
solid = true;
|
||||
group = BlockGroup.logic;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,6 +12,7 @@ public class MemoryBlock extends Block{
|
||||
super(name);
|
||||
destructible = true;
|
||||
solid = true;
|
||||
group = BlockGroup.logic;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -14,6 +14,7 @@ import mindustry.gen.*;
|
||||
import mindustry.ui.*;
|
||||
import mindustry.ui.dialogs.*;
|
||||
import mindustry.world.*;
|
||||
import mindustry.world.meta.*;
|
||||
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
@@ -27,6 +28,7 @@ public class MessageBlock extends Block{
|
||||
configurable = true;
|
||||
solid = true;
|
||||
destructible = true;
|
||||
group = BlockGroup.logic;
|
||||
|
||||
config(String.class, (MessageBuild tile, String text) -> {
|
||||
if(text.length() > maxTextLength){
|
||||
|
||||
@@ -5,6 +5,7 @@ import arc.util.io.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.world.*;
|
||||
import mindustry.world.meta.*;
|
||||
|
||||
public class SwitchBlock extends Block{
|
||||
public @Load("@-on") TextureRegion onRegion;
|
||||
@@ -15,6 +16,7 @@ public class SwitchBlock extends Block{
|
||||
update = true;
|
||||
drawDisabled = false;
|
||||
autoResetEnabled = false;
|
||||
group = BlockGroup.logic;
|
||||
|
||||
config(Boolean.class, (SwitchBuild entity, Boolean b) -> entity.enabled = b);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package mindustry.world.meta;
|
||||
|
||||
public enum BlockGroup{
|
||||
none, walls, turrets, transportation, power, liquids, drills, storage, units
|
||||
none, walls, turrets, transportation, power, liquids, drills, storage, units, logic
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user