fun with duytschen i18n of api

This commit is contained in:
Willem Cazander 2022-10-22 02:55:03 +02:00
parent d26afc79c3
commit 9853e44ee6
5 changed files with 147 additions and 11 deletions

View file

@ -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.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ȍőnCoffin;
import love.distributedrebirth.bassboon.death.BãßBȍőnCoffinDuytschenᵗˣᵗ;
import love.distributedrebirth.bassboon.death.BãßBȍőnCoffinGhost; import love.distributedrebirth.bassboon.death.BãßBȍőnCoffinGhost;
import love.distributedrebirth.bassboon.death.BãßBȍőnCoffinGhostSpell; import love.distributedrebirth.bassboon.death.BãßBȍőnCoffinGhostSpell;
import love.distributedrebirth.bassboon.death.BãßBȍőnCoffinGhostSpellLock; import love.distributedrebirth.bassboon.death.BãßBȍőnCoffinGhostSpellLock;
@ -60,6 +61,9 @@ public interface Bãß {
protected static final <T extends BãßBȍőnʸᴰ<T>> BãßBȍőnCoffin 棺ᴼᶠ(BãßBȍőnʸᴰ<T> boon) { protected static final <T extends BãßBȍőnʸᴰ<T>> BãßBȍőnCoffin 棺ᴼᶠ(BãßBȍőnʸᴰ<T> boon) {
return 挖ᵀᵒ(boon); return 挖ᵀᵒ(boon);
} }
protected static final <T extends BãßBȍőnʸᴰ<T>, G extends BãßBȍőnCoffinDuytschenᵗˣᵗ> G 棺ᴼᶠ(BãßBȍőnʸᴰ<T> boon, Class<G> duytschen) {
return 挖ᵀᵒ(boon).ₜₒI18Nᵗˣᵗ(duytschen);
}
/** /**
* Dig To * Dig To
@ -117,21 +121,21 @@ public interface Bãß {
} }
*/ */
private static final class BȍőnGrave implements BãßBȍőnCoffin { private static final class BȍőnGrave implements BãßBȍőnCoffin {
private final Map<Class<?>,BãßBȍőnCoffinGhost> ghosts; private final Map<Class<? extends BãßBȍőnCoffinDuytschenᵗˣᵗ>,BãßBȍőnCoffinDuytschenᵗˣᵗ> duytschenCoffins = new HashMap<>();
private final BãßBȍőnSpider spider; private final Map<Class<?>,BãßBȍőnCoffinGhost> ghosts = new HashMap<>();
private final BãßBȍőnSpider spider = new BãßBȍőnSpider();
private boolean inited = false; private boolean inited = false;
private boolean locked = false; private boolean locked = false;
private BȍőnGrave() { private BȍőnGrave() {
this.ghosts = new HashMap<>(); BãßBȍőnCoffinDuytschenᵗˣᵗ.ײₚᵤₜI18Nᵗˣᵗײ(duytschenCoffins, this);
this.spider = new BãßBȍőnSpider();
} }
private <T extends BãßBȍőnʸᴰ<T>> void init(BãßBȍőnʸᴰ<T> boon) { private <T extends BãßBȍőnʸᴰ<T>> void init(BãßBȍőnʸᴰ<T> boon) {
if (inited) { if (inited) {
return; return;
} }
BãßBȍőnPirateLoader.INIT_BONE_MAGIC(boon, spider); BãßBȍőnPirateLoader.INIT_BONE_MAGIC(boon, spider, duytschenCoffins);
inited = true; inited = true;
} }
@ -174,6 +178,15 @@ public interface Bãß {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
} }
@SuppressWarnings("unchecked")
private <G extends BãßBȍőnCoffinDuytschenᵗˣᵗ> G ₜₒI18Nᵗˣᵗ(Class<G> duytschen) {
G result = (G) duytschenCoffins.get(duytschen);
if (result == null) {
throw new IllegalArgumentException("Unknown duytschen: "+duytschen);
}
return result;
}
} }
} }

View file

@ -12,6 +12,14 @@ public interface BãßBȍőnʸᴰ<T extends BãßBȍőnʸᴰ<T>> {
return (T)this; // allow builders... return (T)this; // allow builders...
} }
// default <G extends BãßBȍőnCoffinDuytschenᵗˣᵗ> G toBȍőnGrab(Class<G> duytschen) {
// return Bãß.石棺ʸᴰ.棺ᴼᶠ(this, duytschen);
// }
//
// default BãßBȍőnCoffinGhost toBȍőnGrabGeist(Class<? extends BãßBȍőnꝐŕḯṿª<?>> familyName) {
// return toBȍőnGrab(BãßBȍőnCoffinDuytschenᵗˣᵗ.𓃬𓍄𓋹𓀭.class).𓆙𓄿𓏀𓃟𓇋𓇋𓄋(familyName);
// }
default BãßBȍőnCoffin toBBC() { default BãßBȍőnCoffin toBBC() {
return Bãß.石棺ʸᴰ.棺ᴼᶠ(this); // ...to seek 6 bit BASIC death, so the blind can see return Bãß.石棺ʸᴰ.棺ᴼᶠ(this); // ...to seek 6 bit BASIC death, so the blind can see
} }

View file

@ -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ȍőnPiratePhase注;
import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnPirateʸᴰ; import love.distributedrebirth.bassboon.clazz.pirate.BãßBȍőnPirateʸᴰ;
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ȍőnCoffinDuytschenᵗˣᵗ;
import love.distributedrebirth.bassboon.death.GhostKey鬼鑰匙; import love.distributedrebirth.bassboon.death.GhostKey鬼鑰匙;
import love.distributedrebirth.bassboon.death.spider.BãßBȍőnSpiderWire注; import love.distributedrebirth.bassboon.death.spider.BãßBȍőnSpiderWire注;
@ -19,6 +20,18 @@ public interface BãßBȍőnExportʸᴰ<T extends BãßBȍőnʸᴰ<T>> extends B
@BãßBȍőnSpiderWire注 @BãßBȍőnSpiderWire注
private BãßBȍőnExportʸᴰ<?> boon; 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 @Override
public BãßBȍőnExport響ᴼᶠ init() { public BãßBȍőnExport響ᴼᶠ init() {
BãßBȍőnExport注 anno = boon.getClass().getAnnotation(BãßBȍőnExport注.class); BãßBȍőnExport注 anno = boon.getClass().getAnnotation(BãßBȍőnExport注.class);
@ -30,18 +43,17 @@ public interface BãßBȍőnExportʸᴰ<T extends BãßBȍőnʸᴰ<T>> extends B
if (anno != null && !anno.group().isBlank()) { if (anno != null && !anno.group().isBlank()) {
exportGroup = anno.group(); exportGroup = anno.group();
} }
boon.toBBC().UNHOLY_SPELL(Ꝑŕḯṿª.class).PUT_GHOST(GHOST_ARTIFACT, exportArtifact); 𓁀.𓆙𓄿𓏀𓃟𓇋𓇋𓄋𓐘𓆘𓉯𓌇𓆅𓆅(Ꝑŕḯṿª.class).PUT_GHOST(GHOST_ARTIFACT, exportArtifact);
boon.toBBC().UNHOLY_SPELL(Ꝑŕḯṿª.class).PUT_GHOST(GHOST_GROUP, exportGroup); فاصوليا.غير۵مقدس۵سحر(Ꝑŕḯṿª.class).PUT_GHOST(GHOST_GROUP, exportGroup);
return new BãßBȍőnExport響ᴼᶠ() { return new BãßBȍőnExport響ᴼᶠ() {
@Override @Override
public String artifact() { public String artifact() {
return boon.toBBC().UNHOLY(Ꝑŕḯṿª.class).GHOST_STR(GHOST_ARTIFACT); return אפונה.לאײקדוש(Ꝑŕḯṿª.class).GHOST_STR(GHOST_ARTIFACT);
} }
@Override @Override
public String groep() { public String groep() {
return boon.toBBC().UNHOLY(Ꝑŕḯṿª.class).GHOST_STR(GHOST_GROUP); return 棺材.邪惡的(Ꝑŕḯṿª.class).GHOST_STR(GHOST_GROUP);
} }
}; };
} }

View file

@ -11,12 +11,14 @@ import java.util.Comparator;
import java.util.HashSet; import java.util.HashSet;
import java.util.LinkedHashSet; import java.util.LinkedHashSet;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.function.Function; import java.util.function.Function;
import love.distributedrebirth.bassboon.BãßBȍőnʸᴰ; import love.distributedrebirth.bassboon.BãßBȍőnʸᴰ;
import love.distributedrebirth.bassboon.clazz.BãßBȍőnAuthor注; 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ȍőnSpider;
import love.distributedrebirth.bassboon.death.spider.BãßBȍőnSpiderEgg注; import love.distributedrebirth.bassboon.death.spider.BãßBȍőnSpiderEgg注;
import love.distributedrebirth.bassboon.death.spider.BãßBȍőnSpiderSilk; import love.distributedrebirth.bassboon.death.spider.BãßBȍőnSpiderSilk;
@ -53,9 +55,21 @@ public final class BãßBȍőnPirateLoader {
} }
} }
public static <T extends BãßBȍőnʸᴰ<T>> void INIT_BONE_MAGIC(BãßBȍőnʸᴰ<T> boon, BãßBȍőnSpider spider) { public static <T extends BãßBȍőnʸᴰ<T>> void INIT_BONE_MAGIC(BãßBȍőnʸᴰ<T> boon, BãßBȍőnSpider spider, Map<Class<? extends BãßBȍőnCoffinDuytschenᵗˣᵗ>,BãßBȍőnCoffinDuytschenᵗˣᵗ> duytschenCoffins) {
try { try {
//System.out.println("INIT "+boon.getClass().getName()); //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<Class<?>> ydmods = new HashSet<>(); Set<Class<?>> ydmods = new HashSet<>();
for (PiratePhaseBoat<T> boat : loadPirateBoats(boon)) { for (PiratePhaseBoat<T> boat : loadPirateBoats(boon)) {
//System.out.println("INIT.RUN "+boat.pirateClazz.getName()); //System.out.println("INIT.RUN "+boat.pirateClazz.getName());

View file

@ -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<Class<? extends BãßBȍőnCoffinDuytschenᵗˣᵗ>,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<? extends BãßBȍőnꝐŕḯṿª<?>> familyName);
BãßBȍőnCoffinGhostSpell UNHOLY_SPELL(Class<? extends BãßBȍőnꝐŕḯṿª<?>> familyName);
<T extends BãßBȍőnꝐŕḯṿªḕ響ᴼᶠ> T NOISE_OF(Class<T> noiseName);
}
static BASIC ₜₒBASICᵗˣᵗ(BãßBȍőnCoffin coffin) {
return new BASIC() {
@Override public BãßBȍőnCoffinGhost UNHOLY(Class<? extends BãßBȍőnꝐŕḯṿª<?>> familyName) { return coffin.UNHOLY(familyName); }
@Override public BãßBȍőnCoffinGhostSpell UNHOLY_SPELL(Class<? extends BãßBȍőnꝐŕḯṿª<?>> familyName) { return coffin.UNHOLY_SPELL(familyName); }
@Override public <T extends BãßBȍőnꝐŕḯṿªḕ響ᴼᶠ> T NOISE_OF(Class<T> noiseName) { return coffin.NOISE_OF(noiseName); }
};
}
interface 中國 extends BãßBȍőnCoffinDuytschenᵗˣᵗ {
BãßBȍőnCoffinGhost 邪惡的(Class<? extends BãßBȍőnꝐŕḯṿª<?>> familyName);
BãßBȍőnCoffinGhostSpell 邪惡的龸魅力(Class<? extends BãßBȍőnꝐŕḯṿª<?>> familyName);
<T extends BãßBȍőnꝐŕḯṿªḕ響ᴼᶠ> T 噪音龸的(Class<T> noiseName);
}
static 中國 ₜₒ中國ᵗˣᵗ(BãßBȍőnCoffin coffin) {
return new 中國() {
@Override public BãßBȍőnCoffinGhost 邪惡的(Class<? extends BãßBȍőnꝐŕḯṿª<?>> familyName) { return coffin.UNHOLY(familyName); }
@Override public BãßBȍőnCoffinGhostSpell 邪惡的龸魅力(Class<? extends BãßBȍőnꝐŕḯṿª<?>> familyName) { return coffin.UNHOLY_SPELL(familyName); }
@Override public <T extends BãßBȍőnꝐŕḯṿªḕ響ᴼᶠ> T 噪音龸的(Class<T> noiseName) { return coffin.NOISE_OF(noiseName); }
};
}
interface 𓃬𓍄𓋹𓀭 extends BãßBȍőnCoffinDuytschenᵗˣᵗ {
BãßBȍőnCoffinGhost 𓆙𓄿𓏀𓃟𓇋𓇋𓄋(Class<? extends BãßBȍőnꝐŕḯṿª<?>> familyName);
BãßBȍőnCoffinGhostSpell 𓆙𓄿𓏀𓃟𓇋𓇋𓄋𓐘𓆘𓉯𓌇𓆅𓆅(Class<? extends BãßBȍőnꝐŕḯṿª<?>> familyName);
<T extends BãßBȍőnꝐŕḯṿªḕ響ᴼᶠ> T 𓁵𓇋𓌗𓁬𓐘𓅂𓁿𓆑(Class<T> noiseName);
}
static 𓃬𓍄𓋹𓀭 ₜₒ𓃬𓍄𓋹𓀭ᵗˣᵗ(BãßBȍőnCoffin coffin) {
return new 𓃬𓍄𓋹𓀭() {
@Override public BãßBȍőnCoffinGhost 𓆙𓄿𓏀𓃟𓇋𓇋𓄋(Class<? extends BãßBȍőnꝐŕḯṿª<?>> familyName) { return coffin.UNHOLY(familyName); }
@Override public BãßBȍőnCoffinGhostSpell 𓆙𓄿𓏀𓃟𓇋𓇋𓄋𓐘𓆘𓉯𓌇𓆅𓆅(Class<? extends BãßBȍőnꝐŕḯṿª<?>> familyName) { return coffin.UNHOLY_SPELL(familyName); }
@Override public <T extends BãßBȍőnꝐŕḯṿªḕ響ᴼᶠ> T 𓁵𓇋𓌗𓁬𓐘𓅂𓁿𓆑(Class<T> noiseName) { return coffin.NOISE_OF(noiseName); }
};
}
interface عربى extends BãßBȍőnCoffinDuytschenᵗˣᵗ {
BãßBȍőnCoffinGhost غير۵مقدس(Class<? extends BãßBȍőnꝐŕḯṿª<?>> familyName);
BãßBȍőnCoffinGhostSpell غير۵مقدس۵سحر(Class<? extends BãßBȍőnꝐŕḯṿª<?>> familyName);
<T extends BãßBȍőnꝐŕḯṿªḕ響ᴼᶠ> T ضوضاء۵من(Class<T> noiseName);
}
static عربى ₜₒعربىᵗˣᵗ(BãßBȍőnCoffin coffin) {
return new عربى() {
@Override public BãßBȍőnCoffinGhost غير۵مقدس(Class<? extends BãßBȍőnꝐŕḯṿª<?>> familyName) { return coffin.UNHOLY(familyName); }
@Override public BãßBȍőnCoffinGhostSpell غير۵مقدس۵سحر(Class<? extends BãßBȍőnꝐŕḯṿª<?>> familyName) { return coffin.UNHOLY_SPELL(familyName); }
@Override public <T extends BãßBȍőnꝐŕḯṿªḕ響ᴼᶠ> T ضوضاء۵من(Class<T> noiseName) { return coffin.NOISE_OF(noiseName); }
};
}
interface עִברִית extends BãßBȍőnCoffinDuytschenᵗˣᵗ {
BãßBȍőnCoffinGhost לאײקדוש(Class<? extends BãßBȍőnꝐŕḯṿª<?>> familyName);
BãßBȍőnCoffinGhostSpell לאײקדושײקֶסֶם(Class<? extends BãßBȍőnꝐŕḯṿª<?>> familyName);
<T extends BãßBȍőnꝐŕḯṿªḕ響ᴼᶠ> T צלילײשל(Class<T> noiseName);
}
static עִברִית ₜₒעִברִיתᵗˣᵗ(BãßBȍőnCoffin coffin) {
return new עִברִית() {
@Override public BãßBȍőnCoffinGhost לאײקדוש(Class<? extends BãßBȍőnꝐŕḯṿª<?>> familyName) { return coffin.UNHOLY(familyName); }
@Override public BãßBȍőnCoffinGhostSpell לאײקדושײקֶסֶם(Class<? extends BãßBȍőnꝐŕḯṿª<?>> familyName) { return coffin.UNHOLY_SPELL(familyName); }
@Override public <T extends BãßBȍőnꝐŕḯṿªḕ響ᴼᶠ> T צלילײשל(Class<T> noiseName) { return coffin.NOISE_OF(noiseName); }
};
}
}