Tutorial removed / Logic block group
This commit is contained in:
@@ -20,7 +20,7 @@ gameover = Game Over
|
|||||||
gameover.pvp = The[accent] {0}[] team is victorious!
|
gameover.pvp = The[accent] {0}[] team is victorious!
|
||||||
highscore = [accent]New highscore!
|
highscore = [accent]New highscore!
|
||||||
copied = Copied.
|
copied = Copied.
|
||||||
indev.popup = [accent]v6[] is currently in [accent]beta[].\n[lightgray]This means:[]\n[scarlet]- The campaign is unfinished[]\n- SFX and music are unfinished/missing\n- Everything you see is subject to change or removal.\n\nReport bugs or crashes on [accent]Github[].
|
indev.popup = [accent]v6[] is currently in [accent]beta[].\n[lightgray]This means:[]\n[scarlet]- The campaign is unfinished[]\n- Everything you see is subject to change or removal.\n\nReport bugs or crashes on [accent]Github[].
|
||||||
indev.notready = This part of the game isn't ready yet
|
indev.notready = This part of the game isn't ready yet
|
||||||
|
|
||||||
load.sound = Sounds
|
load.sound = Sounds
|
||||||
@@ -1252,7 +1252,7 @@ item.coal.description = Used for fuel and refined material production.
|
|||||||
item.coal.details = Appears to be fossilized plant matter, formed long before the seeding event.
|
item.coal.details = Appears to be fossilized plant matter, formed long before the seeding event.
|
||||||
item.titanium.description = Used in liquid transportation structures, drills and aircraft.
|
item.titanium.description = Used in liquid transportation structures, drills and aircraft.
|
||||||
item.thorium.description = Used in durable structures and as nuclear fuel.
|
item.thorium.description = Used in durable structures and as nuclear fuel.
|
||||||
item.scrap.description = Melted down and refined into other materials.
|
item.scrap.description = Used in Melters and Pulverizers for refining into other materials.
|
||||||
item.scrap.details = Leftover remnants of old structures and units.
|
item.scrap.details = Leftover remnants of old structures and units.
|
||||||
item.silicon.description = Used in solar panels, complex electronics and homing turret ammunition.
|
item.silicon.description = Used in solar panels, complex electronics and homing turret ammunition.
|
||||||
item.plastanium.description = Used in advanced units, insulation and fragmentation ammunition.
|
item.plastanium.description = Used in advanced units, insulation and fragmentation ammunition.
|
||||||
|
|||||||
@@ -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(){
|
public boolean isHighScore(){
|
||||||
return hiscore;
|
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
|
//display UI scale changed dialog
|
||||||
if(Core.settings.getBool("uiscalechanged", false)){
|
if(Core.settings.getBool("uiscalechanged", false)){
|
||||||
Core.app.post(() -> Core.app.post(() -> {
|
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 -> {
|
graphics.sliderPref("uiscale", 100, 25, 300, 25, s -> {
|
||||||
if(ui.settings != null){
|
if(ui.settings != null){
|
||||||
Core.settings.put("uiscalechanged", true);
|
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("@campaign", Icon.play, () -> checkPlay(ui.planet::show)),
|
||||||
new Buttoni("@joingame", Icon.add, () -> checkPlay(ui.join::show)),
|
new Buttoni("@joingame", Icon.add, () -> checkPlay(ui.join::show)),
|
||||||
new Buttoni("@customgame", Icon.terrain, () -> checkPlay(ui.custom::show)),
|
new Buttoni("@customgame", Icon.terrain, () -> checkPlay(ui.custom::show)),
|
||||||
new Buttoni("@loadgame", Icon.download, () -> checkPlay(ui.load::show)),
|
new Buttoni("@loadgame", Icon.download, () -> checkPlay(ui.load::show))
|
||||||
new Buttoni("@tutorial", Icon.info, () -> checkPlay(control::playTutorial))
|
|
||||||
),
|
),
|
||||||
new Buttoni("@editor", Icon.terrain, () -> checkPlay(ui.maps::show)), steam ? new Buttoni("@workshop", Icon.book, platform::openWorkshop) : null,
|
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),
|
new Buttoni("@mods", Icon.book, ui.mods::show),
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ public class LogicBlock extends Block{
|
|||||||
update = true;
|
update = true;
|
||||||
solid = true;
|
solid = true;
|
||||||
configurable = true;
|
configurable = true;
|
||||||
|
group = BlockGroup.logic;
|
||||||
|
|
||||||
config(byte[].class, (LogicBuild build, byte[] data) -> build.readCompressed(data, true));
|
config(byte[].class, (LogicBuild build, byte[] data) -> build.readCompressed(data, true));
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ public class LogicDisplay extends Block{
|
|||||||
super(name);
|
super(name);
|
||||||
update = true;
|
update = true;
|
||||||
solid = true;
|
solid = true;
|
||||||
|
group = BlockGroup.logic;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ public class MemoryBlock extends Block{
|
|||||||
super(name);
|
super(name);
|
||||||
destructible = true;
|
destructible = true;
|
||||||
solid = true;
|
solid = true;
|
||||||
|
group = BlockGroup.logic;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import mindustry.gen.*;
|
|||||||
import mindustry.ui.*;
|
import mindustry.ui.*;
|
||||||
import mindustry.ui.dialogs.*;
|
import mindustry.ui.dialogs.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
|
import mindustry.world.meta.*;
|
||||||
|
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
@@ -27,6 +28,7 @@ public class MessageBlock extends Block{
|
|||||||
configurable = true;
|
configurable = true;
|
||||||
solid = true;
|
solid = true;
|
||||||
destructible = true;
|
destructible = true;
|
||||||
|
group = BlockGroup.logic;
|
||||||
|
|
||||||
config(String.class, (MessageBuild tile, String text) -> {
|
config(String.class, (MessageBuild tile, String text) -> {
|
||||||
if(text.length() > maxTextLength){
|
if(text.length() > maxTextLength){
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import arc.util.io.*;
|
|||||||
import mindustry.annotations.Annotations.*;
|
import mindustry.annotations.Annotations.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
|
import mindustry.world.meta.*;
|
||||||
|
|
||||||
public class SwitchBlock extends Block{
|
public class SwitchBlock extends Block{
|
||||||
public @Load("@-on") TextureRegion onRegion;
|
public @Load("@-on") TextureRegion onRegion;
|
||||||
@@ -15,6 +16,7 @@ public class SwitchBlock extends Block{
|
|||||||
update = true;
|
update = true;
|
||||||
drawDisabled = false;
|
drawDisabled = false;
|
||||||
autoResetEnabled = false;
|
autoResetEnabled = false;
|
||||||
|
group = BlockGroup.logic;
|
||||||
|
|
||||||
config(Boolean.class, (SwitchBuild entity, Boolean b) -> entity.enabled = b);
|
config(Boolean.class, (SwitchBuild entity, Boolean b) -> entity.enabled = b);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
package mindustry.world.meta;
|
package mindustry.world.meta;
|
||||||
|
|
||||||
public enum BlockGroup{
|
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