Added some alternative part indexes.

This commit is contained in:
Willem Cazander 2022-01-31 17:50:33 +01:00
parent 9793e70937
commit 8b6b4dbc3a
3 changed files with 57 additions and 35 deletions

View file

@ -84,19 +84,19 @@ public class BasePartRenderer extends ImGuiRendererMain {
} }
ImGui.tableNextColumn(); ImGui.tableNextColumn();
if (part instanceof BasePartAlt2) { if (part instanceof BasePartAlt2) {
ImGui.text(BasePartAlt2.class.cast(part).getAlt1Value()); ImGui.text(BasePartAlt2.class.cast(part).getAlt2Value());
} else { } else {
ImGui.text(""); ImGui.text("");
} }
ImGui.tableNextColumn(); ImGui.tableNextColumn();
if (part instanceof BasePartAlt3) { if (part instanceof BasePartAlt3) {
ImGui.text(BasePartAlt3.class.cast(part).getAlt1Value()); ImGui.text(BasePartAlt3.class.cast(part).getAlt3Value());
} else { } else {
ImGui.text(""); ImGui.text("");
} }
ImGui.tableNextColumn(); ImGui.tableNextColumn();
if (part instanceof BasePartAlt4) { if (part instanceof BasePartAlt4) {
ImGui.text(BasePartAlt4.class.cast(part).getAlt1Value()); ImGui.text(BasePartAlt4.class.cast(part).getAlt4Value());
} else { } else {
ImGui.text(""); ImGui.text("");
} }

View file

@ -8,6 +8,7 @@ import java.util.function.Consumer;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import love.distributedrebirth.numberxd.base2t.facet.BasePart; import love.distributedrebirth.numberxd.base2t.facet.BasePart;
import love.distributedrebirth.numberxd.base2t.facet.BasePartAlt2;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey;
/** /**
@ -15,27 +16,37 @@ import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey;
* *
* @author willemtsade ©Δ 仙上主天 * @author willemtsade ©Δ 仙上主天
*/ */
public enum T05PartPental implements BasePart { public enum T05PartPental implements BasePart,BasePartAlt2 {
PART_1("˥","0","","fire"), PART_1("˥","0","","fire", "EI","heile"),
PART_2("˦","1","","water"), PART_2("˦","1","","water","U", "hudor"),
PART_3("˧","2","","wood"), PART_3("˧","2","","wood" ,"I", "idea"),
PART_4("˨","3","","gold"), PART_4("˨","3","","gold", "A", "aer"),
PART_5("˩","4","","earth"), PART_5("˩","4","","earth","G", "gaia"),
; ;
public static int LENGTH = 5; 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<BaseFacetKey, Object> facetStore = new HashMap<>(); private final Map<BaseFacetKey, Object> facetStore = new HashMap<>();
private static final Map<String, T05PartPental> TONE_MAP = Collections.unmodifiableMap( private static final Map<String, T05PartPental> TONE_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v)));
private static final Map<String, T05PartPental> CHINA_MAP = Collections.unmodifiableMap( private static final Map<String, T05PartPental> CHINA_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); 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_TONE, idTone);
this.getFacetStore().put(BaseFacetKey.ID_LETTER, idLetter); this.getFacetStore().put(BaseFacetKey.ID_LETTER, idLetter);
this.getFacetStore().put(BaseFacetKey.CHINA_KEY, chinaKey); this.getFacetStore().put(BaseFacetKey.CHINA_KEY, chinaKey);
this.getFacetStore().put(BaseFacetKey.CHINA_VALUE, chinaValue); 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 @Override

View file

@ -9,47 +9,52 @@ import java.util.stream.Collectors;
import love.distributedrebirth.numberxd.base2t.facet.BasePart; import love.distributedrebirth.numberxd.base2t.facet.BasePart;
import love.distributedrebirth.numberxd.base2t.facet.BaseFacetKey; 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. * The distribution by 20.
* *
* @author willemtsade ©Δ 仙上主天 * @author willemtsade ©Δ 仙上主天
*/ */
public enum T20PartScore implements BasePart,BasePartAlt1 { public enum T20PartScore implements BasePart,BasePartAlt3 {
PART_1 ("˥","0","","yotta","2"), PART_1 ("˥","Y", "","yotta","0","0","2"),
PART_2 ("˦","1","","zetta","3"), PART_2 ("˦","Z", "","zetta","1","1","3"),
PART_3 ("˧","2","","exa", "4"), PART_3 ("˧","E", "","exa", "2","2","4"),
PART_4 ("˨","3","","peta", "5"), PART_4 ("˨","P", "","peta", "3","3","5"),
PART_5 ("˩","4","","tera", "6"), PART_5 ("˩","T", "","tera", "4","4","6"),
PART_6 ("","5","","giga", "7"), PART_6 ("","G", "","giga", "5","5","7"),
PART_7 ("","6","","mega", "8"), PART_7 ("","M", "","mega", "6","6","8"),
PART_8 ("","7","","kilo", "9"), PART_8 ("","k", "","kilo", "7","7","9"),
PART_9 ("","8","","hecto","C"), PART_9 ("","h", "","hecto","8","8","C"),
PART_10("","9","","deca", "F"), PART_10("","da","","deca", "9","9","F"),
PART_11("","A","","deci", "G"), PART_11("","d", "","deci", "A","A","G"),
PART_12("","B","","centi","H"), PART_12("","c", "","centi","B","B","H"),
PART_13("","C","","milli","J"), PART_13("","m", "","milli","C","C","J"),
PART_14("","D","","micro","M"), PART_14("","µ", "","micro","D","D","M"),
PART_15("","E","","nano", "P"), PART_15("","n", "","nano", "E","E","P"),
PART_16("","F","","pico", "Q"), PART_16("","p", "","pico", "F","F","Q"),
PART_17("","G","","femto","R"), PART_17("","f", "","femto","G","G","R"),
PART_18("","H","","atto", "V"), PART_18("","a", "","atto", "H","H","V"),
PART_19("","I","","zepto","W"), PART_19("","z", "","zepto","I","J","W"),
PART_20("","J","","yocto","X"), PART_20("","y", "","yocto","J","K","X"),
; ;
public static int LENGTH = 20; public static int LENGTH = 20;
private final Map<BaseFacetKey, Object> facetStore = new HashMap<>(); private final Map<BaseFacetKey, Object> facetStore = new HashMap<>();
private static final String ALT_1_NAME = "Open Location Code"; private static final String ALT_1_NAME = "Vigesimal";
private static final String ALT_1_WIKI = "https://en.wikipedia.org/wiki/Open_Location_Code"; 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<String, T20PartScore> TONE_MAP = Collections.unmodifiableMap( private static final Map<String, T20PartScore> TONE_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v))); Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getIdentifierTone(), v -> v)));
private static final Map<String, T20PartScore> CHINA_MAP = Collections.unmodifiableMap( private static final Map<String, T20PartScore> CHINA_MAP = Collections.unmodifiableMap(
Arrays.asList(values()).stream().collect(Collectors.toMap(v -> v.getChinaKey(), v -> v))); 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_TONE, idTone);
this.getFacetStore().put(BaseFacetKey.ID_LETTER, idLetter); this.getFacetStore().put(BaseFacetKey.ID_LETTER, idLetter);
this.getFacetStore().put(BaseFacetKey.CHINA_KEY, chinaKey); 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_VALUE, alt1Value);
this.getFacetStore().put(BaseFacetKey.ALT_1_NAME, ALT_1_NAME); 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_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 @Override