This commit is contained in:
Anuken
2020-08-27 20:09:40 -04:00
parent 92aba83450
commit a575ad2d99
15 changed files with 36 additions and 34 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 794 B

After

Width:  |  Height:  |  Size: 795 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 KiB

After

Width:  |  Height:  |  Size: 406 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 KiB

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 KiB

After

Width:  |  Height:  |  Size: 416 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

-4
View File
@@ -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){
+1 -1
View File
@@ -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;
+5 -3
View File
@@ -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();
+5 -1
View File
@@ -89,10 +89,11 @@ 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", () -> {
try{
boolean[] cancel = {false}; boolean[] cancel = {false};
float[] progress = {0}; float[] progress = {0};
int[] length = {0}; int[] length = {0};
Fi file = bebuildDirectory.child("client-be-" + updateBuild + ".jar"); 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], () -> {
@@ -117,6 +118,9 @@ public class BeControl{
}).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 -1
View File
@@ -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