Cleanup
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 794 B After Width: | Height: | Size: 795 B |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 184 KiB |
|
Before Width: | Height: | Size: 406 KiB After Width: | Height: | Size: 406 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 186 KiB |
|
Before Width: | Height: | Size: 416 KiB After Width: | Height: | Size: 416 KiB |
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
@@ -583,8 +583,6 @@ public class TechTree implements ContentList{
|
|||||||
public float time;
|
public float time;
|
||||||
/** Nodes that depend on this node. */
|
/** Nodes that depend on this node. */
|
||||||
public final Seq<TechNode> children = new Seq<>();
|
public final Seq<TechNode> children = new Seq<>();
|
||||||
/** Research progress, in seconds. */
|
|
||||||
public float progress;
|
|
||||||
|
|
||||||
TechNode(@Nullable TechNode ccontext, UnlockableContent content, ItemStack[] requirements, Runnable children){
|
TechNode(@Nullable TechNode ccontext, UnlockableContent content, ItemStack[] requirements, Runnable children){
|
||||||
if(ccontext != null){
|
if(ccontext != null){
|
||||||
@@ -595,7 +593,6 @@ public class TechTree implements ContentList{
|
|||||||
this.content = content;
|
this.content = content;
|
||||||
this.requirements = requirements;
|
this.requirements = requirements;
|
||||||
this.depth = parent == null ? 0 : parent.depth + 1;
|
this.depth = parent == null ? 0 : parent.depth + 1;
|
||||||
this.progress = Core.settings == null ? 0 : Core.settings.getFloat("research-" + content.name, 0f);
|
|
||||||
this.time = Seq.with(requirements).mapFloat(i -> i.item.cost * i.amount).sum() * 10;
|
this.time = Seq.with(requirements).mapFloat(i -> i.item.cost * i.amount).sum() * 10;
|
||||||
this.finishedRequirements = new ItemStack[requirements.length];
|
this.finishedRequirements = new ItemStack[requirements.length];
|
||||||
|
|
||||||
@@ -620,7 +617,6 @@ public class TechTree implements ContentList{
|
|||||||
|
|
||||||
/** Flushes research progress to settings. */
|
/** Flushes research progress to settings. */
|
||||||
public void save(){
|
public void save(){
|
||||||
Core.settings.put("research-" + content.name, progress);
|
|
||||||
|
|
||||||
//save finished requirements by item type
|
//save finished requirements by item type
|
||||||
for(ItemStack stack : finishedRequirements){
|
for(ItemStack stack : finishedRequirements){
|
||||||
|
|||||||
@@ -582,7 +582,7 @@ public class UnitTypes implements ContentList{
|
|||||||
armor = 9f;
|
armor = 9f;
|
||||||
engineOffset = 21;
|
engineOffset = 21;
|
||||||
engineSize = 5.3f;
|
engineSize = 5.3f;
|
||||||
hitsize = 58f;
|
hitsize = 56f;
|
||||||
|
|
||||||
BulletType missiles = new MissileBulletType(2.7f, 10){{
|
BulletType missiles = new MissileBulletType(2.7f, 10){{
|
||||||
width = 8f;
|
width = 8f;
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ public class DesktopInput extends InputHandler{
|
|||||||
public @Nullable BuildPlan sreq;
|
public @Nullable BuildPlan sreq;
|
||||||
/** Whether player is currently deleting removal requests. */
|
/** Whether player is currently deleting removal requests. */
|
||||||
public boolean deleting = false, shouldShoot = false, panning = false;
|
public boolean deleting = false, shouldShoot = false, panning = false;
|
||||||
|
/** Mouse pan speed. */
|
||||||
|
public float panScale = 0.005f, panSpeed = 4.5f, panBoostSpeed = 9f;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void buildUI(Group group){
|
public void buildUI(Group group){
|
||||||
@@ -179,7 +181,7 @@ public class DesktopInput extends InputHandler{
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean panCam = false;
|
boolean panCam = false;
|
||||||
float camSpeed = !Core.input.keyDown(Binding.boost) ? 3f : 8f;
|
float camSpeed = !Core.input.keyDown(Binding.boost) ? panSpeed : panBoostSpeed;
|
||||||
|
|
||||||
if(input.keyDown(Binding.pan)){
|
if(input.keyDown(Binding.pan)){
|
||||||
panCam = true;
|
panCam = true;
|
||||||
@@ -203,8 +205,8 @@ public class DesktopInput extends InputHandler{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(panCam){
|
if(panCam){
|
||||||
Core.camera.position.x += Mathf.clamp((Core.input.mouseX() - Core.graphics.getWidth() / 2f) * 0.005f, -1, 1) * camSpeed;
|
Core.camera.position.x += Mathf.clamp((Core.input.mouseX() - Core.graphics.getWidth() / 2f) * panScale, -1, 1) * camSpeed;
|
||||||
Core.camera.position.y += Mathf.clamp((Core.input.mouseY() - Core.graphics.getHeight() / 2f) * 0.005f, -1, 1) * camSpeed;
|
Core.camera.position.y += Mathf.clamp((Core.input.mouseY() - Core.graphics.getHeight() / 2f) * panScale, -1, 1) * camSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
shouldShoot = !scene.hasMouse();
|
shouldShoot = !scene.hasMouse();
|
||||||
|
|||||||
@@ -89,34 +89,38 @@ public class BeControl{
|
|||||||
if(!headless){
|
if(!headless){
|
||||||
checkUpdates = false;
|
checkUpdates = false;
|
||||||
ui.showCustomConfirm(Core.bundle.format("be.update", "") + " " + updateBuild, "@be.update.confirm", "@ok", "@be.ignore", () -> {
|
ui.showCustomConfirm(Core.bundle.format("be.update", "") + " " + updateBuild, "@be.update.confirm", "@ok", "@be.ignore", () -> {
|
||||||
boolean[] cancel = {false};
|
try{
|
||||||
float[] progress = {0};
|
boolean[] cancel = {false};
|
||||||
int[] length = {0};
|
float[] progress = {0};
|
||||||
Fi file = bebuildDirectory.child("client-be-" + updateBuild + ".jar");
|
int[] length = {0};
|
||||||
|
Fi file = Fi.get(BeControl.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath());
|
||||||
|
|
||||||
BaseDialog dialog = new BaseDialog("@be.updating");
|
BaseDialog dialog = new BaseDialog("@be.updating");
|
||||||
download(updateUrl, file, i -> length[0] = i, v -> progress[0] = v, () -> cancel[0], () -> {
|
download(updateUrl, file, i -> length[0] = i, v -> progress[0] = v, () -> cancel[0], () -> {
|
||||||
try{
|
try{
|
||||||
Runtime.getRuntime().exec(OS.isMac ?
|
Runtime.getRuntime().exec(OS.isMac ?
|
||||||
new String[]{"java", "-XstartOnFirstThread", "-DlastBuild=" + Version.build, "-Dberestart", "-jar", file.absolutePath()} :
|
new String[]{"java", "-XstartOnFirstThread", "-DlastBuild=" + Version.build, "-Dberestart", "-jar", file.absolutePath()} :
|
||||||
new String[]{"java", "-DlastBuild=" + Version.build, "-Dberestart", "-jar", file.absolutePath()}
|
new String[]{"java", "-DlastBuild=" + Version.build, "-Dberestart", "-jar", file.absolutePath()}
|
||||||
);
|
);
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}catch(IOException e){
|
}catch(IOException e){
|
||||||
|
ui.showException(e);
|
||||||
|
}
|
||||||
|
}, e -> {
|
||||||
|
dialog.hide();
|
||||||
ui.showException(e);
|
ui.showException(e);
|
||||||
}
|
});
|
||||||
}, e -> {
|
|
||||||
dialog.hide();
|
|
||||||
ui.showException(e);
|
|
||||||
});
|
|
||||||
|
|
||||||
dialog.cont.add(new Bar(() -> length[0] == 0 ? Core.bundle.get("be.updating") : (int)(progress[0] * length[0]) / 1024/ 1024 + "/" + length[0]/1024/1024 + " MB", () -> Pal.accent, () -> progress[0])).width(400f).height(70f);
|
dialog.cont.add(new Bar(() -> length[0] == 0 ? Core.bundle.get("be.updating") : (int)(progress[0] * length[0]) / 1024/ 1024 + "/" + length[0]/1024/1024 + " MB", () -> Pal.accent, () -> progress[0])).width(400f).height(70f);
|
||||||
dialog.buttons.button("@cancel", Icon.cancel, () -> {
|
dialog.buttons.button("@cancel", Icon.cancel, () -> {
|
||||||
cancel[0] = true;
|
cancel[0] = true;
|
||||||
dialog.hide();
|
dialog.hide();
|
||||||
}).size(210f, 64f);
|
}).size(210f, 64f);
|
||||||
dialog.setFillParent(false);
|
dialog.setFillParent(false);
|
||||||
dialog.show();
|
dialog.show();
|
||||||
|
}catch(Exception e){
|
||||||
|
ui.showException(e);
|
||||||
|
}
|
||||||
}, () -> checkUpdates = false);
|
}, () -> checkUpdates = false);
|
||||||
}else{
|
}else{
|
||||||
Log.info("&lcA new update is available: &lyBleeding Edge build @", updateBuild);
|
Log.info("&lcA new update is available: &lyBleeding Edge build @", updateBuild);
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||||
archash=98b2693ae19feedb72d577ef9bdae5cfa4315c68
|
archash=a72f08a6812107fdf4462b7c6955efc19a67715b
|
||||||
|
|||||||