Renamed base2 factory
This commit is contained in:
parent
dc978272b4
commit
f26163e405
|
@ -25,9 +25,9 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinʸᴰ;
|
|||
import love.distributedrebirth.bassboonyd.BãßBȍőnPackageInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
@BãßBȍőnClassInfoʸᴰ(name = "BasePartFactory", purpose = "Factory to access the bases.")
|
||||
@BãßBȍőnClassInfoʸᴰ(name = "Base2PartsFactory", purpose = "Factory to access the bases.")
|
||||
@BãßBȍőnPackageInfoʸᴰ(name = "love.distributedrebirth.numberxd")
|
||||
public enum BasePartFactory implements DefaultEnumInstanceᴶᴹˣ<BasePartFactory, MBeanStoreKeyᴶᴹˣ> {
|
||||
public enum Base2PartsFactory implements DefaultEnumInstanceᴶᴹˣ<Base2PartsFactory, MBeanStoreKeyᴶᴹˣ> {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
|
@ -49,7 +49,7 @@ public enum BasePartFactory implements DefaultEnumInstanceᴶᴹˣ<BasePartFacto
|
|||
private final BãßBȍőnCoffinOpenʸᴰ<MBeanStoreKeyᴶᴹˣ> BBC = BãßBȍőnCoffinOpenʸᴰ.newInstance();
|
||||
public BãßBȍőnCoffinʸᴰ<MBeanStoreKeyᴶᴹˣ> GET_BBC() { return BBC; }
|
||||
|
||||
private BasePartFactory() {
|
||||
private Base2PartsFactory() {
|
||||
BBC.BOON_INIT(this);
|
||||
BȍőnJmxInit(MBeanStoreKeyᴶᴹˣ.JMX);
|
||||
baseT02Reads = BȍőnJmxInitGuageCounter(MBeanStoreKeyᴶᴹˣ.JMX, "baseT02Reads");
|
|
@ -13,7 +13,7 @@ import love.distributedrebirth.bassboonyd.jmx.MBeanStoreKeyᴶᴹˣ;
|
|||
import love.distributedrebirth.bassboonyd.jmx.DefaultEnumInstanceᴶᴹˣ;
|
||||
import love.distributedrebirth.bassboonyd.jmx.GuageCounterᴶᴹˣ;
|
||||
import love.distributedrebirth.bassboonyd.jmx.StringAttributeᴶᴹˣ;
|
||||
import love.distributedrebirth.numberxd.base2t.BasePartFactory;
|
||||
import love.distributedrebirth.numberxd.base2t.Base2PartsFactory;
|
||||
import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartKeyʸᴰ;
|
||||
import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartʸᴰ;
|
||||
|
||||
|
@ -49,8 +49,8 @@ public enum TOSWarpCore implements DefaultEnumInstanceᴶᴹˣ<TOSWarpCore,MBean
|
|||
|
||||
public void BãßLockWarpCipher() {
|
||||
armedWarpCipherLock.setValueBoolean(true);
|
||||
for (int base:BasePartFactory.INSTANCE.BãßBases()) {
|
||||
for (BãßBȍőnPartʸᴰ<?> part:BasePartFactory.INSTANCE.BãßBuildPartsByBase(base)) {
|
||||
for (int base:Base2PartsFactory.INSTANCE.BãßBases()) {
|
||||
for (BãßBȍőnPartʸᴰ<?> part:Base2PartsFactory.INSTANCE.BãßBuildPartsByBase(base)) {
|
||||
BãßBȍőnCoffinOpenʸᴰ.class.cast(part.GET_BBC()).LOCK_COFFIN();
|
||||
}
|
||||
}
|
||||
|
@ -61,9 +61,9 @@ public enum TOSWarpCore implements DefaultEnumInstanceᴶᴹˣ<TOSWarpCore,MBean
|
|||
WaterCipher warpCipher = new WaterCipher();
|
||||
warpCipher.setName(armedWarpWaterName.getValueString());
|
||||
warpCipher.setDescription(armedWarpWaterDesc.getValueString());
|
||||
for (int base:BasePartFactory.INSTANCE.BãßBases()) {
|
||||
for (int base:Base2PartsFactory.INSTANCE.BãßBases()) {
|
||||
WaterCipherHeart heart = new WaterCipherHeart();
|
||||
BãßBȍőnPartʸᴰ<?>[] bases = BasePartFactory.INSTANCE.BãßBuildPartsByBase(base);
|
||||
BãßBȍőnPartʸᴰ<?>[] bases = Base2PartsFactory.INSTANCE.BãßBuildPartsByBase(base);
|
||||
heart.setBass(bases[0].BãßInstances().length);
|
||||
for (BãßBȍőnPartʸᴰ<?> part:bases) {
|
||||
WaterCipherHeartTone tone = new WaterCipherHeartTone();
|
||||
|
@ -85,7 +85,7 @@ public enum TOSWarpCore implements DefaultEnumInstanceᴶᴹˣ<TOSWarpCore,MBean
|
|||
Map<String,String> chinaKey = new HashMap<>();
|
||||
Map<String,String> chinaValue = new HashMap<>();
|
||||
for (WaterCipherHeart heart:warpBucket.theWater().getCipherHearts()) {
|
||||
BãßBȍőnPartʸᴰ<?>[] bases = BasePartFactory.INSTANCE.BãßBuildPartsByBase(heart.getBass());
|
||||
BãßBȍőnPartʸᴰ<?>[] bases = Base2PartsFactory.INSTANCE.BãßBuildPartsByBase(heart.getBass());
|
||||
Map<String, BãßBȍőnPartʸᴰ<?>> baseParts = new HashMap<>();
|
||||
for (BãßBȍőnPartʸᴰ<?> base:bases) {
|
||||
baseParts.put(base.BȍőnNaam(), base);
|
||||
|
@ -109,7 +109,7 @@ public enum TOSWarpCore implements DefaultEnumInstanceᴶᴹˣ<TOSWarpCore,MBean
|
|||
armedWarpWaterName.setValueString(warpBucket.theWater().getName());
|
||||
armedWarpWaterDesc.setValueString(warpBucket.theWater().getDescription());
|
||||
for (WaterCipherHeart heart:warpBucket.theWater().getCipherHearts()) {
|
||||
BãßBȍőnPartʸᴰ<?>[] bases = BasePartFactory.INSTANCE.BãßBuildPartsByBase(heart.getBass());
|
||||
BãßBȍőnPartʸᴰ<?>[] bases = Base2PartsFactory.INSTANCE.BãßBuildPartsByBase(heart.getBass());
|
||||
Map<String, BãßBȍőnPartʸᴰ<?>> baseParts = new HashMap<>();
|
||||
for (BãßBȍőnPartʸᴰ<?> base:bases) {
|
||||
baseParts.put(base.BȍőnNaam(), base);
|
||||
|
|
|
@ -14,7 +14,7 @@ public class BasePartFactoryTest {
|
|||
|
||||
@Test
|
||||
public void testSupportedBases() {
|
||||
int[] bases = BasePartFactory.INSTANCE.BãßBases();
|
||||
int[] bases = Base2PartsFactory.INSTANCE.BãßBases();
|
||||
Assertions.assertNotNull(bases);
|
||||
Assertions.assertTrue(bases.length > 1);
|
||||
Assertions.assertTrue(bases.length < 100);
|
||||
|
@ -23,8 +23,8 @@ public class BasePartFactoryTest {
|
|||
@Test
|
||||
public void testGlobalChinaKeyMap() {
|
||||
Map<String,String> global = new HashMap<>();
|
||||
for (int base:BasePartFactory.INSTANCE.BãßBases()) {
|
||||
for (BãßBȍőnPartʸᴰ<?> part:BasePartFactory.INSTANCE.BãßBuildPartsByBase(base)) {
|
||||
for (int base:Base2PartsFactory.INSTANCE.BãßBases()) {
|
||||
for (BãßBȍőnPartʸᴰ<?> part:Base2PartsFactory.INSTANCE.BãßBuildPartsByBase(base)) {
|
||||
Assertions.assertFalse(global.containsKey(part.BȍőnChinaKey()), "key: "+part.BȍőnChinaKey());
|
||||
global.put(part.BȍőnChinaKey(), part.BȍőnChinaValue());
|
||||
}
|
||||
|
@ -35,8 +35,8 @@ public class BasePartFactoryTest {
|
|||
@Test
|
||||
public void testGlobalChinaValueMap() {
|
||||
Map<String,String> global = new HashMap<>();
|
||||
for (int base:BasePartFactory.INSTANCE.BãßBases()) {
|
||||
for (BãßBȍőnPartʸᴰ<?> part:BasePartFactory.INSTANCE.BãßBuildPartsByBase(base)) {
|
||||
for (int base:Base2PartsFactory.INSTANCE.BãßBases()) {
|
||||
for (BãßBȍőnPartʸᴰ<?> part:Base2PartsFactory.INSTANCE.BãßBuildPartsByBase(base)) {
|
||||
Assertions.assertFalse(global.containsKey(part.BȍőnChinaValue()));
|
||||
global.put(part.BȍőnChinaValue(), part.BȍőnChinaValue());
|
||||
}
|
||||
|
@ -48,8 +48,8 @@ public class BasePartFactoryTest {
|
|||
public void testGlobalToneMap() {
|
||||
boolean duplicate = false;
|
||||
Map<String,String> global = new HashMap<>();
|
||||
for (int base:BasePartFactory.INSTANCE.BãßBases()) {
|
||||
for (BãßBȍőnPartʸᴰ<?> part:BasePartFactory.INSTANCE.BãßBuildPartsByBase(base)) {
|
||||
for (int base:Base2PartsFactory.INSTANCE.BãßBases()) {
|
||||
for (BãßBȍőnPartʸᴰ<?> part:Base2PartsFactory.INSTANCE.BãßBuildPartsByBase(base)) {
|
||||
if (global.containsKey(part.BȍőnDialTone())) {
|
||||
duplicate = true;
|
||||
break;
|
||||
|
|
|
@ -11,7 +11,7 @@ import imgui.type.ImInt;
|
|||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.gdxapp.GDXAppMain;
|
||||
import love.distributedrebirth.gdxapp.ImGuiRendererMain;
|
||||
import love.distributedrebirth.numberxd.base2t.BasePartFactory;
|
||||
import love.distributedrebirth.numberxd.base2t.Base2PartsFactory;
|
||||
import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartAlt1ʸᴰ;
|
||||
import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartAlt2ʸᴰ;
|
||||
import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartAlt3ʸᴰ;
|
||||
|
@ -35,14 +35,14 @@ public class SystemBasePartRenderer extends ImGuiRendererMain {
|
|||
if (ImGui.begin("Base part", widgetOpen)) {
|
||||
|
||||
List<String> bases = new ArrayList<>();
|
||||
for (int base:BasePartFactory.INSTANCE.BãßBases()) {
|
||||
for (int base:Base2PartsFactory.INSTANCE.BãßBases()) {
|
||||
bases.add(Integer.toString(base));
|
||||
}
|
||||
String[] items = new String[bases.size()];
|
||||
items = bases.toArray(items);
|
||||
String selectedItem = items[selectedBasePart.get()];
|
||||
Integer baseNumber = Integer.valueOf(selectedItem);
|
||||
BãßBȍőnPartʸᴰ<?>[] baseParts = BasePartFactory.INSTANCE.BãßBuildPartsByBase(baseNumber);
|
||||
BãßBȍőnPartʸᴰ<?>[] baseParts = Base2PartsFactory.INSTANCE.BãßBuildPartsByBase(baseNumber);
|
||||
|
||||
ImGui.combo("Base", selectedBasePart, items);
|
||||
|
||||
|
|
Loading…
Reference in a new issue