🔥🔥🔥🔥🔥🔥maximum breakage
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package io.anuke.mindustry.game;
|
||||
|
||||
import io.anuke.ucore.util.Bundles;
|
||||
import io.anuke.arc.util.Bundles;
|
||||
|
||||
public enum Difficulty{
|
||||
training(3f, 3f),
|
||||
@@ -24,7 +24,7 @@ public enum Difficulty{
|
||||
@Override
|
||||
public String toString(){
|
||||
if(value == null){
|
||||
value = Bundles.get("setting.difficulty." + name());
|
||||
value = Core.bundle.get("setting.difficulty." + name());
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package io.anuke.mindustry.game;
|
||||
|
||||
import io.anuke.arc.Events.Event;
|
||||
import io.anuke.mindustry.core.GameState.State;
|
||||
import io.anuke.mindustry.entities.traits.BuilderTrait;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.ucore.core.Events.Event;
|
||||
|
||||
public class EventType{
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.anuke.mindustry.game;
|
||||
|
||||
import io.anuke.ucore.util.Bundles;
|
||||
import io.anuke.arc.util.Bundles;
|
||||
|
||||
public enum GameMode{
|
||||
waves,
|
||||
@@ -33,12 +33,12 @@ public enum GameMode{
|
||||
public float respawnTime = 60 * 4;
|
||||
|
||||
public String description(){
|
||||
return Bundles.get("mode." + name() + ".description");
|
||||
return Core.bundle.get("mode." + name() + ".description");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return Bundles.get("mode." + name() + ".name");
|
||||
return Core.bundle.get("mode." + name() + ".name");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,11 +10,11 @@ import io.anuke.mindustry.game.EventType.StateChangeEvent;
|
||||
import io.anuke.mindustry.io.SaveIO;
|
||||
import io.anuke.mindustry.io.SaveMeta;
|
||||
import io.anuke.mindustry.maps.Map;
|
||||
import io.anuke.ucore.core.Events;
|
||||
import io.anuke.ucore.core.Settings;
|
||||
import io.anuke.ucore.core.Timers;
|
||||
import io.anuke.ucore.util.Strings;
|
||||
import io.anuke.ucore.util.ThreadArray;
|
||||
import io.anuke.arc.core.Events;
|
||||
import io.anuke.arc.core.Settings;
|
||||
import io.anuke.arc.core.Timers;
|
||||
import io.anuke.arc.util.Strings;
|
||||
import io.anuke.arc.util.ThreadArray;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
@@ -47,7 +47,7 @@ public class Saves{
|
||||
|
||||
public void load(){
|
||||
saves.clear();
|
||||
IntArray slots = Settings.getObject("save-slots", IntArray.class, IntArray::new);
|
||||
IntArray slots = Core.settings.getObject("save-slots", IntArray.class, IntArray::new);
|
||||
|
||||
for(int i = 0; i < slots.size; i ++){
|
||||
int index = slots.get(i);
|
||||
@@ -77,11 +77,11 @@ public class Saves{
|
||||
}
|
||||
|
||||
if(!state.is(State.menu) && !state.gameOver && current != null && current.isAutosave()){
|
||||
time += Timers.delta();
|
||||
if(time > Settings.getInt("saveinterval") * 60){
|
||||
time += Time.delta();
|
||||
if(time > Core.settings.getInt("saveinterval") * 60){
|
||||
saving = true;
|
||||
|
||||
Timers.runTask(2f, () -> {
|
||||
Time.runTask(2f, () -> {
|
||||
try{
|
||||
current.save();
|
||||
}catch(Exception e){
|
||||
@@ -146,8 +146,8 @@ public class Saves{
|
||||
IntArray result = new IntArray(saves.size);
|
||||
for(int i = 0; i < saves.size; i++) result.add(saves.get(i).index);
|
||||
|
||||
Settings.putObject("save-slots", result);
|
||||
Settings.save();
|
||||
Core.settings.putObject("save-slots", result);
|
||||
Core.settings.save();
|
||||
}
|
||||
|
||||
public class SaveSlot{
|
||||
@@ -201,12 +201,12 @@ public class Saves{
|
||||
}
|
||||
|
||||
public String getName(){
|
||||
return Settings.getString("save-" + index + "-name", "untittled");
|
||||
return Core.settings.getString("save-" + index + "-name", "untittled");
|
||||
}
|
||||
|
||||
public void setName(String name){
|
||||
Settings.putString("save-" + index + "-name", name);
|
||||
Settings.save();
|
||||
Core.settings.putString("save-" + index + "-name", name);
|
||||
Core.settings.save();
|
||||
}
|
||||
|
||||
public int getBuild(){
|
||||
@@ -226,12 +226,12 @@ public class Saves{
|
||||
}
|
||||
|
||||
public boolean isAutosave(){
|
||||
return Settings.getBool("save-" + index + "-autosave", true);
|
||||
return Core.settings.getBool("save-" + index + "-autosave", true);
|
||||
}
|
||||
|
||||
public void setAutosave(boolean save){
|
||||
Settings.putBool("save-" + index + "-autosave", save);
|
||||
Settings.save();
|
||||
Core.settings.putBool("save-" + index + "-autosave", save);
|
||||
Core.settings.save();
|
||||
}
|
||||
|
||||
public void importFile(FileHandle file) throws IOException{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package io.anuke.mindustry.game;
|
||||
|
||||
import io.anuke.arc.graphics.Color;
|
||||
import io.anuke.ucore.util.Bundles;
|
||||
import io.anuke.arc.util.Bundles;
|
||||
|
||||
public enum Team{
|
||||
none(Color.valueOf("4d4e58")),
|
||||
@@ -21,6 +21,6 @@ public enum Team{
|
||||
}
|
||||
|
||||
public String localized(){
|
||||
return Bundles.get("team." + name() + ".name");
|
||||
return Core.bundle.get("team." + name() + ".name");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@ package io.anuke.mindustry.game;
|
||||
import io.anuke.arc.utils.ObjectSet;
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.ucore.util.EnumSet;
|
||||
import io.anuke.ucore.util.ThreadSet;
|
||||
import io.anuke.arc.util.EnumSet;
|
||||
import io.anuke.arc.util.ThreadSet;
|
||||
|
||||
/**
|
||||
* Class for various team-based utilities.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package io.anuke.mindustry.game;
|
||||
|
||||
import io.anuke.arc.graphics.g2d.TextureRegion;
|
||||
import io.anuke.ucore.scene.ui.layout.Table;
|
||||
import io.anuke.arc.scene.ui.layout.Table;
|
||||
|
||||
import static io.anuke.mindustry.Vars.control;
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ import io.anuke.arc.utils.ObjectMap;
|
||||
import io.anuke.arc.utils.ObjectSet;
|
||||
import io.anuke.mindustry.game.EventType.UnlockEvent;
|
||||
import io.anuke.mindustry.type.ContentType;
|
||||
import io.anuke.ucore.core.Events;
|
||||
import io.anuke.ucore.core.Settings;
|
||||
import io.anuke.arc.core.Events;
|
||||
import io.anuke.arc.core.Settings;
|
||||
|
||||
/**Stores player unlocks. Clientside only.*/
|
||||
public class Unlocks{
|
||||
@@ -13,7 +13,7 @@ public class Unlocks{
|
||||
private boolean dirty;
|
||||
|
||||
static{
|
||||
Settings.setSerializer(ContentType.class, (stream, t) -> stream.writeInt(t.ordinal()), stream -> ContentType.values()[stream.readInt()]);
|
||||
Core.settings.setSerializer(ContentType.class, (stream, t) -> stream.writeInt(t.ordinal()), stream -> ContentType.values()[stream.readInt()]);
|
||||
}
|
||||
|
||||
/** Returns whether or not this piece of content is unlocked yet.*/
|
||||
@@ -67,12 +67,12 @@ public class Unlocks{
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void load(){
|
||||
unlocked = Settings.getObject("unlockset", ObjectMap.class, ObjectMap::new);
|
||||
unlocked = Core.settings.getObject("unlockset", ObjectMap.class, ObjectMap::new);
|
||||
}
|
||||
|
||||
public void save(){
|
||||
Settings.putObject("unlockset", unlocked);
|
||||
Settings.save();
|
||||
Core.settings.putObject("unlockset", unlocked);
|
||||
Core.settings.save();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import io.anuke.arc.Core;
|
||||
import io.anuke.arc.files.FileHandle;
|
||||
import io.anuke.arc.utils.ObjectMap;
|
||||
import io.anuke.arc.utils.PropertiesUtils;
|
||||
import io.anuke.ucore.util.Strings;
|
||||
import io.anuke.arc.util.Strings;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user