From 8b6b4dbc3a5a93925dd38e02b78924546a59ff62 Mon Sep 17 00:00:00 2001 From: Willem Cazander Date: Mon, 31 Jan 2022 17:50:33 +0100 Subject: [PATCH] Added some alternative part indexes. --- .../demo4d/screen/BasePartRenderer.java | 6 +- .../numberxd/base2t/T05PartPental.java | 25 +++++--- .../numberxd/base2t/T20PartScore.java | 61 +++++++++++-------- 3 files changed, 57 insertions(+), 35 deletions(-) diff --git a/core/src/love/distributedrebirth/demo4d/screen/BasePartRenderer.java b/core/src/love/distributedrebirth/demo4d/screen/BasePartRenderer.java index 5ed5188e..f3026188 100644 --- a/core/src/love/distributedrebirth/demo4d/screen/BasePartRenderer.java +++ b/core/src/love/distributedrebirth/demo4d/screen/BasePartRenderer.java @@ -84,19 +84,19 @@ public class BasePartRenderer extends ImGuiRendererMain { } ImGui.tableNextColumn(); if (part instanceof BasePartAlt2) { - ImGui.text(BasePartAlt2.class.cast(part).getAlt1Value()); + ImGui.text(BasePartAlt2.class.cast(part).getAlt2Value()); } else { ImGui.text(""); } ImGui.tableNextColumn(); if (part instanceof BasePartAlt3) { - ImGui.text(BasePartAlt3.class.cast(part).getAlt1Value()); + ImGui.text(BasePartAlt3.class.cast(part).getAlt3Value()); } else { ImGui.text(""); } ImGui.tableNextColumn(); if (part instanceof BasePartAlt4) { - ImGui.text(BasePartAlt4.class.cast(part).getAlt1Value()); + ImGui.text(BasePartAlt4.class.cast(part).getAlt4Value()); } else { ImGui.text(""); } diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T05PartPental.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T05PartPental.java index 0e472291..22383bf2 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T05PartPental.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T05PartPental.java @@ -8,6 +8,7 @@ import java.util.function.Consumer; import java.util.stream.Collectors; import love.distributedrebirth.numberxd.base2t.facet.BasePart; +import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt2; import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; /** @@ -15,27 +16,37 @@ import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; * * @author willemtsade ©Δ∞ 仙上主天 */ -public enum T05PartPental implements BasePart { +public enum T05PartPental implements BasePart,BasePartAlt2 { - PART_1("˥","0","火","fire"), - PART_2("˦","1","水","water"), - PART_3("˧","2","木","wood"), - PART_4("˨","3","金","gold"), - PART_5("˩","4","土","earth"), + PART_1("˥","0","火","fire", "EI","heile"), + PART_2("˦","1","水","water","U", "hudor"), + PART_3("˧","2","木","wood" ,"I", "idea"), + PART_4("˨","3","金","gold", "A", "aer"), + PART_5("˩","4","土","earth","G", "gaia"), ; public static int LENGTH = 5; + private static final String ALT_1_NAME = "Pentagram"; + private static final String ALT_1_WIKI = "https://en.wikipedia.org/wiki/Pentagram"; + private static final String ALT_2_NAME = "Pythagorean Interpretations"; + private static final String ALT_2_WIKI = "http://wisdomofhypatia.com/OM/BA/PP.html"; private final Map facetStore = new HashMap<>(); private static final Map TONE_MAP = Collections.unmodifiableMap( Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); private static final Map CHINA_MAP = Collections.unmodifiableMap( Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); - private T05PartPental(String idTone, String idLetter, String chinaKey, String chinaValue) { + private T05PartPental(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value, String alt2Value) { this.getFacetStore().put(BaseFacetKey.ID_TONE, idTone); this.getFacetStore().put(BaseFacetKey.ID_LETTER, idLetter); this.getFacetStore().put(BaseFacetKey.CHINA_KEY, chinaKey); this.getFacetStore().put(BaseFacetKey.CHINA_VALUE, chinaValue); + this.getFacetStore().put(BaseFacetKey.ALT_1_VALUE, alt1Value); + this.getFacetStore().put(BaseFacetKey.ALT_1_NAME, ALT_1_NAME); + this.getFacetStore().put(BaseFacetKey.ALT_1_WIKI, ALT_1_WIKI); + this.getFacetStore().put(BaseFacetKey.ALT_2_VALUE, alt2Value); + this.getFacetStore().put(BaseFacetKey.ALT_2_NAME, ALT_2_NAME); + this.getFacetStore().put(BaseFacetKey.ALT_2_WIKI, ALT_2_WIKI); } @Override diff --git a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T20PartScore.java b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T20PartScore.java index b31dbbc1..76cce12e 100644 --- a/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T20PartScore.java +++ b/numberxd/src/main/love/distributedrebirth/numberxd/base2t/T20PartScore.java @@ -9,47 +9,52 @@ import java.util.stream.Collectors; import love.distributedrebirth.numberxd.base2t.facet.BasePart; import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; -import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt1; +import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt3; /** * The distribution by 20. * * @author willemtsade ©Δ∞ 仙上主天 */ -public enum T20PartScore implements BasePart,BasePartAlt1 { +public enum T20PartScore implements BasePart,BasePartAlt3 { - PART_1 ("˥","0","尧","yotta","2"), - PART_2 ("˦","1","泽","zetta","3"), - PART_3 ("˧","2","艾","exa", "4"), - PART_4 ("˨","3","拍","peta", "5"), - PART_5 ("˩","4","太","tera", "6"), - PART_6 ("꜒","5","吉","giga", "7"), - PART_7 ("꜓","6","兆","mega", "8"), - PART_8 ("꜔","7","千","kilo", "9"), - PART_9 ("꜕","8","百","hecto","C"), - PART_10("꜖","9","十","deca", "F"), - PART_11("꜈","A","分","deci", "G"), - PART_12("꜉","B","厘","centi","H"), - PART_13("꜊","C","毫","milli","J"), - PART_14("꜋","D","微","micro","M"), - PART_15("꜌","E","纳","nano", "P"), - PART_16("꜍","F","皮","pico", "Q"), - PART_17("꜎","G","飞","femto","R"), - PART_18("꜏","H","阿","atto", "V"), - PART_19("꜐","I","仄","zepto","W"), - PART_20("꜑","J","幺","yocto","X"), + PART_1 ("˥","Y", "尧","yotta","0","0","2"), + PART_2 ("˦","Z", "泽","zetta","1","1","3"), + PART_3 ("˧","E", "艾","exa", "2","2","4"), + PART_4 ("˨","P", "拍","peta", "3","3","5"), + PART_5 ("˩","T", "太","tera", "4","4","6"), + PART_6 ("꜒","G", "吉","giga", "5","5","7"), + PART_7 ("꜓","M", "兆","mega", "6","6","8"), + PART_8 ("꜔","k", "千","kilo", "7","7","9"), + PART_9 ("꜕","h", "百","hecto","8","8","C"), + PART_10("꜖","da","十","deca", "9","9","F"), + PART_11("꜈","d", "分","deci", "A","A","G"), + PART_12("꜉","c", "厘","centi","B","B","H"), + PART_13("꜊","m", "毫","milli","C","C","J"), + PART_14("꜋","µ", "微","micro","D","D","M"), + PART_15("꜌","n", "纳","nano", "E","E","P"), + PART_16("꜍","p", "皮","pico", "F","F","Q"), + PART_17("꜎","f", "飞","femto","G","G","R"), + PART_18("꜏","a", "阿","atto", "H","H","V"), + PART_19("꜐","z", "仄","zepto","I","J","W"), + PART_20("꜑","y", "幺","yocto","J","K","X"), ; public static int LENGTH = 20; private final Map facetStore = new HashMap<>(); - private static final String ALT_1_NAME = "Open Location Code"; - private static final String ALT_1_WIKI = "https://en.wikipedia.org/wiki/Open_Location_Code"; + private static final String ALT_1_NAME = "Vigesimal"; + private static final String ALT_1_WIKI = "https://en.wikipedia.org/wiki/Vigesimal#Places"; + private static final String ALT_2_NAME = "Vigesimal Alternative"; + private static final String ALT_2_WIKI = "https://en.wikipedia.org/wiki/Vigesimal#Places"; + private static final String ALT_3_NAME = "Open Location Code"; + private static final String ALT_3_WIKI = "https://en.wikipedia.org/wiki/Open_Location_Code"; private static final Map TONE_MAP = Collections.unmodifiableMap( Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); private static final Map CHINA_MAP = Collections.unmodifiableMap( Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); - private T20PartScore(String idTone, String idLetter, String chinaKey, String chinaValue, String alt1Value) { + private T20PartScore(String idTone, String idLetter, String chinaKey, String chinaValue, + String alt1Value, String alt2Value, String alt3Value) { this.getFacetStore().put(BaseFacetKey.ID_TONE, idTone); this.getFacetStore().put(BaseFacetKey.ID_LETTER, idLetter); this.getFacetStore().put(BaseFacetKey.CHINA_KEY, chinaKey); @@ -57,6 +62,12 @@ public enum T20PartScore implements BasePart,BasePartAlt1 { this.getFacetStore().put(BaseFacetKey.ALT_1_VALUE, alt1Value); this.getFacetStore().put(BaseFacetKey.ALT_1_NAME, ALT_1_NAME); this.getFacetStore().put(BaseFacetKey.ALT_1_WIKI, ALT_1_WIKI); + this.getFacetStore().put(BaseFacetKey.ALT_2_VALUE, alt2Value); + this.getFacetStore().put(BaseFacetKey.ALT_2_NAME, ALT_2_NAME); + this.getFacetStore().put(BaseFacetKey.ALT_2_WIKI, ALT_2_WIKI); + this.getFacetStore().put(BaseFacetKey.ALT_3_VALUE, alt3Value); + this.getFacetStore().put(BaseFacetKey.ALT_3_NAME, ALT_3_NAME); + this.getFacetStore().put(BaseFacetKey.ALT_3_WIKI, ALT_3_WIKI); } @Override