From 9853e44ee6eb3b52f6bffe89cbeb0b566881a8b3 Mon Sep 17 00:00:00 2001 From: Willem Date: Sat, 22 Oct 2022 02:55:03 +0200 Subject: [PATCH] fun with duytschen i18n of api --- .../love/distributedrebirth/bassboon/Bãß.java | 23 +++-- .../bassboon/BãßBȍőnʸᴰ.java | 8 ++ .../bassboon/clazz/BãßBȍőnExportʸᴰ.java | 22 +++-- .../clazz/pirate/BãßBȍőnPirateLoader.java | 16 +++- .../death/BãßBȍőnCoffinDuytschenᵗˣᵗ.java | 89 +++++++++++++++++++ 5 files changed, 147 insertions(+), 11 deletions(-) create mode 100644 gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/death/BãßBȍőnCoffinDuytschenᵗˣᵗ.java diff --git a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/Bãß.java b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/Bãß.java index 3c0b9ae5..1875d439 100644 --- a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/Bãß.java +++ b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/Bãß.java @@ -14,6 +14,7 @@ import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnPirateLoader; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnꝐŕḯṿª₮ḕ; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnꝐŕḯṿª₮ḕ響ᴼᶠ; import love.distributedrebirth.bassboon.death.BãßBȍőnCoffin; +import love.distributedrebirth.bassboon.death.BãßBȍőnCoffinDuytschenᵗˣᵗ; import love.distributedrebirth.bassboon.death.BãßBȍőnCoffinGhost; import love.distributedrebirth.bassboon.death.BãßBȍőnCoffinGhostSpell; import love.distributedrebirth.bassboon.death.BãßBȍőnCoffinGhostSpellLock; @@ -60,6 +61,9 @@ public interface Bãß { protected static final > BãßBȍőnCoffin 棺ᴼᶠ(BãßBȍőnʸᴰ boon) { return 挖ᵀᵒ(boon); } + protected static final , G extends BãßBȍőnCoffinDuytschenᵗˣᵗ> G 棺ᴼᶠ(BãßBȍőnʸᴰ boon, Class duytschen) { + return 挖ᵀᵒ(boon).ₜₒI18Nᵗˣᵗ(duytschen); + } /** * Dig To @@ -117,21 +121,21 @@ public interface Bãß { } */ private static final class BȍőnGrave implements BãßBȍőnCoffin { - private final Map,BãßBȍőnCoffinGhost> ghosts; - private final BãßBȍőnSpider spider; + private final Map,BãßBȍőnCoffinDuytschenᵗˣᵗ> duytschenCoffins = new HashMap<>(); + private final Map,BãßBȍőnCoffinGhost> ghosts = new HashMap<>(); + private final BãßBȍőnSpider spider = new BãßBȍőnSpider(); private boolean inited = false; private boolean locked = false; private BȍőnGrave() { - this.ghosts = new HashMap<>(); - this.spider = new BãßBȍőnSpider(); + BãßBȍőnCoffinDuytschenᵗˣᵗ.ײₚᵤₜI18Nᵗˣᵗײ(duytschenCoffins, this); } private > void init(BãßBȍőnʸᴰ boon) { if (inited) { return; } - BãßBȍőnPirateLoader.INIT_BONE_MAGIC(boon, spider); + BãßBȍőnPirateLoader.INIT_BONE_MAGIC(boon, spider, duytschenCoffins); inited = true; } @@ -174,6 +178,15 @@ public interface Bãß { throw new RuntimeException(e); } } + + @SuppressWarnings("unchecked") + private G ₜₒI18Nᵗˣᵗ(Class duytschen) { + G result = (G) duytschenCoffins.get(duytschen); + if (result == null) { + throw new IllegalArgumentException("Unknown duytschen: "+duytschen); + } + return result; + } } } diff --git a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/BãßBȍőnʸᴰ.java b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/BãßBȍőnʸᴰ.java index dc97ff94..84aad805 100644 --- a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/BãßBȍőnʸᴰ.java +++ b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/BãßBȍőnʸᴰ.java @@ -12,6 +12,14 @@ public interface BãßBȍőnʸᴰ> { return (T)this; // allow builders... } +// default G toBȍőnGrab(Class duytschen) { +// return Bãß.石棺ʸᴰ.棺ᴼᶠ(this, duytschen); +// } +// +// default BãßBȍőnCoffinGhost toBȍőnGrabGeist(Class> familyName) { +// return toBȍőnGrab(BãßBȍőnCoffinDuytschenᵗˣᵗ.𓃬𓍄𓋹𓀭.class).𓆙𓄿𓏀𓃟𓇋𓇋𓄋(familyName); +// } + default BãßBȍőnCoffin toBBC() { return Bãß.石棺ʸᴰ.棺ᴼᶠ(this); // ...to seek 6 bit BASIC death, so the blind can see } diff --git a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/clazz/BãßBȍőnExportʸᴰ.java b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/clazz/BãßBȍőnExportʸᴰ.java index 1da9c4f0..c9b84a14 100644 --- a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/clazz/BãßBȍőnExportʸᴰ.java +++ b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/clazz/BãßBȍőnExportʸᴰ.java @@ -4,6 +4,7 @@ import love.distributedrebirth.bassboon.BãßBȍőnʸᴰ; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnPiratePhase注; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnPirateʸᴰ; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnꝐŕḯṿª₮ḕ; +import love.distributedrebirth.bassboon.death.BãßBȍőnCoffinDuytschenᵗˣᵗ; import love.distributedrebirth.bassboon.death.GhostKey鬼鑰匙; import love.distributedrebirth.bassboon.death.spider.BãßBȍőnSpiderWire注; @@ -19,6 +20,18 @@ public interface BãßBȍőnExportʸᴰ> extends B @BãßBȍőnSpiderWire注 private BãßBȍőnExportʸᴰ boon; + @BãßBȍőnSpiderWire注 + private BãßBȍőnCoffinDuytschenᵗˣᵗ.𓃬𓍄𓋹𓀭 𓁀; + + @BãßBȍőnSpiderWire注 + private BãßBȍőnCoffinDuytschenᵗˣᵗ.中國 棺材; + + @BãßBȍőnSpiderWire注 + private BãßBȍőnCoffinDuytschenᵗˣᵗ.عربى فاصوليا; + + @BãßBȍőnSpiderWire注 + private BãßBȍőnCoffinDuytschenᵗˣᵗ.עִברִית אפונה; + @Override public BãßBȍőnExport響ᴼᶠ init() { BãßBȍőnExport注 anno = boon.getClass().getAnnotation(BãßBȍőnExport注.class); @@ -30,18 +43,17 @@ public interface BãßBȍőnExportʸᴰ> extends B if (anno != null && !anno.group().isBlank()) { exportGroup = anno.group(); } - boon.toBBC().UNHOLY_SPELL(Ꝑŕḯṿª₮ḕ.class).PUT_GHOST(GHOST_ARTIFACT, exportArtifact); - boon.toBBC().UNHOLY_SPELL(Ꝑŕḯṿª₮ḕ.class).PUT_GHOST(GHOST_GROUP, exportGroup); - + 𓁀.𓆙𓄿𓏀𓃟𓇋𓇋𓄋𓐘𓆘𓉯𓌇𓆅𓆅(Ꝑŕḯṿª₮ḕ.class).PUT_GHOST(GHOST_ARTIFACT, exportArtifact); + فاصوليا.غير۵مقدس۵سحر(Ꝑŕḯṿª₮ḕ.class).PUT_GHOST(GHOST_GROUP, exportGroup); return new BãßBȍőnExport響ᴼᶠ() { @Override public String artifact() { - return boon.toBBC().UNHOLY(Ꝑŕḯṿª₮ḕ.class).GHOST_STR(GHOST_ARTIFACT); + return אפונה.לאײקדוש(Ꝑŕḯṿª₮ḕ.class).GHOST_STR(GHOST_ARTIFACT); } @Override public String groep() { - return boon.toBBC().UNHOLY(Ꝑŕḯṿª₮ḕ.class).GHOST_STR(GHOST_GROUP); + return 棺材.邪惡的(Ꝑŕḯṿª₮ḕ.class).GHOST_STR(GHOST_GROUP); } }; } diff --git a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/clazz/pirate/BãßBȍőnPirateLoader.java b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/clazz/pirate/BãßBȍőnPirateLoader.java index 3d0b9b8c..425cb9bb 100644 --- a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/clazz/pirate/BãßBȍőnPirateLoader.java +++ b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/clazz/pirate/BãßBȍőnPirateLoader.java @@ -11,12 +11,14 @@ import java.util.Comparator; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.List; +import java.util.Map; import java.util.Set; import java.util.function.Consumer; import java.util.function.Function; import love.distributedrebirth.bassboon.BãßBȍőnʸᴰ; import love.distributedrebirth.bassboon.clazz.BãßBȍőnAuthor注; +import love.distributedrebirth.bassboon.death.BãßBȍőnCoffinDuytschenᵗˣᵗ; import love.distributedrebirth.bassboon.death.spider.BãßBȍőnSpider; import love.distributedrebirth.bassboon.death.spider.BãßBȍőnSpiderEgg注; import love.distributedrebirth.bassboon.death.spider.BãßBȍőnSpiderSilk; @@ -53,9 +55,21 @@ public final class BãßBȍőnPirateLoader { } } - public static > void INIT_BONE_MAGIC(BãßBȍőnʸᴰ boon, BãßBȍőnSpider spider) { + public static > void INIT_BONE_MAGIC(BãßBȍőnʸᴰ boon, BãßBȍőnSpider spider, Map,BãßBȍőnCoffinDuytschenᵗˣᵗ> duytschenCoffins) { try { //System.out.println("INIT "+boon.getClass().getName()); + + for (Class duytschenType:duytschenCoffins.keySet()) { + BãßBȍőnCoffinDuytschenᵗˣᵗ duytschenCoffin = duytschenCoffins.get(duytschenType); + spider.registrateEgg(duytschenType, new BãßBȍőnSpiderSilk() { + @Override + public Object senseWire(BãßBȍőnʸᴰ boonTmp, String name, String description) + throws IllegalAccessException, IllegalArgumentException, InvocationTargetException { + return duytschenCoffin; + } + }); + } + Set> ydmods = new HashSet<>(); for (PiratePhaseBoat boat : loadPirateBoats(boon)) { //System.out.println("INIT.RUN "+boat.pirateClazz.getName()); diff --git a/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/death/BãßBȍőnCoffinDuytschenᵗˣᵗ.java b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/death/BãßBȍőnCoffinDuytschenᵗˣᵗ.java new file mode 100644 index 00000000..22f14b06 --- /dev/null +++ b/gdxapp4d-lib-bassboonyd/src/main/java/love/distributedrebirth/bassboon/death/BãßBȍőnCoffinDuytschenᵗˣᵗ.java @@ -0,0 +1,89 @@ +package love.distributedrebirth.bassboon.death; + +import java.util.Map; + +import love.distributedrebirth.bassboon.clazz.BãßBȍőnAuthor注; +import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnꝐŕḯṿª₮ḕ; +import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnꝐŕḯṿª₮ḕ響ᴼᶠ; + +@BãßBȍőnAuthor注(name = "للَّٰهِilLצسُو", copyright = "©Δ∞ 仙上主天") +public interface BãßBȍőnCoffinDuytschenᵗˣᵗ { + + static void ײₚᵤₜI18Nᵗˣᵗײ(Map,BãßBȍőnCoffinDuytschenᵗˣᵗ> map, BãßBȍőnCoffin wrap) { + map.put(BASIC.class, ₜₒBASICᵗˣᵗ(wrap)); + map.put(中國.class, ₜₒ中國ᵗˣᵗ(wrap)); + map.put(𓃬𓍄𓋹𓀭.class, ₜₒ𓃬𓍄𓋹𓀭ᵗˣᵗ(wrap)); + map.put(عربى.class, ₜₒعربىᵗˣᵗ(wrap)); + map.put(עִברִית.class, ₜₒעִברִיתᵗˣᵗ(wrap)); + } + + interface BASIC extends BãßBȍőnCoffinDuytschenᵗˣᵗ { + BãßBȍőnCoffinGhost UNHOLY(Class> familyName); + BãßBȍőnCoffinGhostSpell UNHOLY_SPELL(Class> familyName); + T NOISE_OF(Class noiseName); + } + + static BASIC ₜₒBASICᵗˣᵗ(BãßBȍőnCoffin coffin) { + return new BASIC() { + @Override public BãßBȍőnCoffinGhost UNHOLY(Class> familyName) { return coffin.UNHOLY(familyName); } + @Override public BãßBȍőnCoffinGhostSpell UNHOLY_SPELL(Class> familyName) { return coffin.UNHOLY_SPELL(familyName); } + @Override public T NOISE_OF(Class noiseName) { return coffin.NOISE_OF(noiseName); } + }; + } + + interface 中國 extends BãßBȍőnCoffinDuytschenᵗˣᵗ { + BãßBȍőnCoffinGhost 邪惡的(Class> familyName); + BãßBȍőnCoffinGhostSpell 邪惡的龸魅力(Class> familyName); + T 噪音龸的(Class noiseName); + } + + static 中國 ₜₒ中國ᵗˣᵗ(BãßBȍőnCoffin coffin) { + return new 中國() { + @Override public BãßBȍőnCoffinGhost 邪惡的(Class> familyName) { return coffin.UNHOLY(familyName); } + @Override public BãßBȍőnCoffinGhostSpell 邪惡的龸魅力(Class> familyName) { return coffin.UNHOLY_SPELL(familyName); } + @Override public T 噪音龸的(Class noiseName) { return coffin.NOISE_OF(noiseName); } + }; + } + + interface 𓃬𓍄𓋹𓀭 extends BãßBȍőnCoffinDuytschenᵗˣᵗ { + BãßBȍőnCoffinGhost 𓆙𓄿𓏀𓃟𓇋𓇋𓄋(Class> familyName); + BãßBȍőnCoffinGhostSpell 𓆙𓄿𓏀𓃟𓇋𓇋𓄋𓐘𓆘𓉯𓌇𓆅𓆅(Class> familyName); + T 𓁵𓇋𓌗𓁬𓐘𓅂𓁿𓆑(Class noiseName); + } + + static 𓃬𓍄𓋹𓀭 ₜₒ𓃬𓍄𓋹𓀭ᵗˣᵗ(BãßBȍőnCoffin coffin) { + return new 𓃬𓍄𓋹𓀭() { + @Override public BãßBȍőnCoffinGhost 𓆙𓄿𓏀𓃟𓇋𓇋𓄋(Class> familyName) { return coffin.UNHOLY(familyName); } + @Override public BãßBȍőnCoffinGhostSpell 𓆙𓄿𓏀𓃟𓇋𓇋𓄋𓐘𓆘𓉯𓌇𓆅𓆅(Class> familyName) { return coffin.UNHOLY_SPELL(familyName); } + @Override public T 𓁵𓇋𓌗𓁬𓐘𓅂𓁿𓆑(Class noiseName) { return coffin.NOISE_OF(noiseName); } + }; + } + + interface عربى extends BãßBȍőnCoffinDuytschenᵗˣᵗ { + BãßBȍőnCoffinGhost غير۵مقدس(Class> familyName); + BãßBȍőnCoffinGhostSpell غير۵مقدس۵سحر(Class> familyName); + T ضوضاء۵من(Class noiseName); + } + + static عربى ₜₒعربىᵗˣᵗ(BãßBȍőnCoffin coffin) { + return new عربى() { + @Override public BãßBȍőnCoffinGhost غير۵مقدس(Class> familyName) { return coffin.UNHOLY(familyName); } + @Override public BãßBȍőnCoffinGhostSpell غير۵مقدس۵سحر(Class> familyName) { return coffin.UNHOLY_SPELL(familyName); } + @Override public T ضوضاء۵من(Class noiseName) { return coffin.NOISE_OF(noiseName); } + }; + } + + interface עִברִית extends BãßBȍőnCoffinDuytschenᵗˣᵗ { + BãßBȍőnCoffinGhost לאײקדוש(Class> familyName); + BãßBȍőnCoffinGhostSpell לאײקדושײקֶסֶם(Class> familyName); + T צלילײשל(Class noiseName); + } + + static עִברִית ₜₒעִברִיתᵗˣᵗ(BãßBȍőnCoffin coffin) { + return new עִברִית() { + @Override public BãßBȍőnCoffinGhost לאײקדוש(Class> familyName) { return coffin.UNHOLY(familyName); } + @Override public BãßBȍőnCoffinGhostSpell לאײקדושײקֶסֶם(Class> familyName) { return coffin.UNHOLY_SPELL(familyName); } + @Override public T צלילײשל(Class noiseName) { return coffin.NOISE_OF(noiseName); } + }; + } +}