From ebfcc51eeb3a42b40ae9b5077719a8a1a963bd5a Mon Sep 17 00:00:00 2001 From: agp8x Date: Sat, 30 Apr 2022 18:26:33 +0200 Subject: [PATCH] remove local properties --- .gitignore | 1 + local.properties | 8 -------- src/main/java/satisfactory/Test.java | 23 +++++++++++------------ src/main/java/satisfactory/Utils.java | 3 +-- 4 files changed, 13 insertions(+), 22 deletions(-) delete mode 100644 local.properties diff --git a/.gitignore b/.gitignore index e959451..0dfc613 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ out/ build/ .gradle/ plots/ +local.properties diff --git a/local.properties b/local.properties deleted file mode 100644 index 0d3baa0..0000000 --- a/local.properties +++ /dev/null @@ -1,8 +0,0 @@ -## This file must *NOT* be checked into Version Control Systems, -# as it contains information specific to your local configuration. -# -# Location of the SDK. This is only used by Gradle. -# For customization when using a Version Control System, please read the -# header note. -#Thu Oct 14 18:38:37 CEST 2021 -sdk.dir=/home/agp8x/Android/Sdk diff --git a/src/main/java/satisfactory/Test.java b/src/main/java/satisfactory/Test.java index c648d2e..5f50eba 100644 --- a/src/main/java/satisfactory/Test.java +++ b/src/main/java/satisfactory/Test.java @@ -108,9 +108,7 @@ public class Test { //plot(Database.GasFilter, "rubber",1); plot(Database.AluminumCasing, "aluCase", 1); javaPlot("aluCase"); - SumResult ac = SumResult.sum(new Production(Database.AluminumCasing, 1)); - plot2(ac.getProduction(), "aluCase_sum"); - javaPlot("aluCase_sum"); + planFor(Database.AluminumCasing, 1, "aluCase_sum"); //System.exit(128); Item i = Database.AluminumIngot; //plot2(SumResult.sum(i, 1),"rubber_"); @@ -118,18 +116,19 @@ public class Test { SumResult s = SumResult.sum(new Production(Database.RadioControlUnit, 2)); plot2(s.getProduction(), "rcu"); - SumResult alclad = SumResult.sum(new Production(Database.AlcladAluminumSheet,100)); - plot2(alclad.getProduction(), "alclad"); - javaPlot("alclad"); + planFor(Database.AlcladAluminumSheet, 100, "alclad"); - SumResult fuelrod = SumResult.sum(new Production(Database.UraniumFuelRod,100)); - plot2(fuelrod.getProduction(), "fuelrod"); - javaPlot("fuelrod"); + planFor(Database.UraniumFuelRod, 1, "fuelrod"); - SumResult fusedFrame = SumResult.sum(new Production(Database.FusedModularFrame,100)); - plot2(fusedFrame.getProduction(), "fusedFrame"); - javaPlot("fusedFrame"); + planFor(Database.FusedModularFrame, 100, "fusedFrame"); + planFor(Database.SteelIngot, 100, "steelIngot"); + } + + private static void planFor(Item item, int amount, String name) { + SumResult plan = SumResult.sum(new Production(item, amount)); + plot2(plan.getProduction(), name); + javaPlot(name); } private static void plot(Item target, String name, int amount) { diff --git a/src/main/java/satisfactory/Utils.java b/src/main/java/satisfactory/Utils.java index 125f643..fa81cef 100644 --- a/src/main/java/satisfactory/Utils.java +++ b/src/main/java/satisfactory/Utils.java @@ -100,9 +100,8 @@ public class Utils { if (item.isRaw()) { m.put("peripheries", DefaultAttribute.createAttribute(2)); } + String label = item.getName(); - label = label.replace(".", "_"); - label = label.replace("#", "_"); m.put("label", DefaultAttribute.createAttribute(label)); return m; });