Added warpcore driver
This commit is contained in:
parent
19e7cc3886
commit
71e4719cdf
12 changed files with 261 additions and 107 deletions
|
|
@ -1,9 +1,13 @@
|
|||
package love.distributedrebirth.numberxd.base2t.part.warp;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnCoffinOpenʸᴰ;
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnEnumInstanceʸᴰ;
|
||||
import love.distributedrebirth.numberxd.base2t.BasePartFactory;
|
||||
import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartKeyʸᴰ;
|
||||
import love.distributedrebirth.numberxd.base2t.part.BãßBȍőnPartʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
|
|
@ -22,37 +26,54 @@ public enum TOSWarpCore implements BãßBȍőnEnumInstanceʸᴰ<TOSWarpCore> {
|
|||
}
|
||||
}
|
||||
|
||||
public WarpCipher BãßSaveWarpCipher() {
|
||||
WarpCipher warpCore = new WarpCipher();
|
||||
public WaterBucket BãßCurrentWarpCore() {
|
||||
WaterCipher warpCipher = new WaterCipher();
|
||||
if (armedWarpCipherName == null) {
|
||||
warpCore.setCipherName("default");
|
||||
warpCipher.setName("default");
|
||||
} else {
|
||||
warpCore.setCipherName(armedWarpCipherName);
|
||||
warpCipher.setName(armedWarpCipherName);
|
||||
}
|
||||
if (armedWarpCipherDescription == null) {
|
||||
warpCore.setCipherName("Current active cipher.");
|
||||
warpCipher.setName("Current active cipher.");
|
||||
} else {
|
||||
warpCore.setCipherDescription(armedWarpCipherDescription);
|
||||
warpCipher.setDescription(armedWarpCipherDescription);
|
||||
}
|
||||
for (int base:BasePartFactory.INSTANCE.BãßBases()) {
|
||||
WarpCipherHeart heart = new WarpCipherHeart();
|
||||
WaterCipherHeart heart = new WaterCipherHeart();
|
||||
BãßBȍőnPartʸᴰ<?>[] bases = BasePartFactory.INSTANCE.BãßBuildPartsByBase(base);
|
||||
heart.setPartKey(bases[0].BȍőnNaamI18N());
|
||||
heart.setBass(bases[0].BãßInstances().length);
|
||||
for (BãßBȍőnPartʸᴰ<?> part:bases) {
|
||||
WarpCipherHeartCore core = new WarpCipherHeartCore();
|
||||
core.setIdentifierTone(part.BȍőnIdentifierTone());
|
||||
core.setChinaKey(part.BȍőnChinaKey());
|
||||
core.setChinaValue(part.BȍőnChinaValue());
|
||||
heart.getHeartCores().add(core);
|
||||
WaterCipherHeartTone tone = new WaterCipherHeartTone();
|
||||
tone.setPart(part.BȍőnNaam());
|
||||
tone.setDialTone(part.BȍőnDialTone());
|
||||
tone.setChinaKey(part.BȍőnChinaKey());
|
||||
tone.setChinaValue(part.BȍőnChinaValue());
|
||||
heart.addHeartTone(tone);
|
||||
}
|
||||
warpCore.getCipherHearts().add(heart);
|
||||
warpCipher.getCipherHearts().add(heart);
|
||||
}
|
||||
return warpCore;
|
||||
WaterBucket bucket = new WaterBucket();
|
||||
bucket.fillWater(warpCipher);
|
||||
return bucket;
|
||||
}
|
||||
|
||||
public void BãßLoadWarpCipher(WarpCipher warpCore) {
|
||||
armedWarpCipherName = warpCore.getCipherName();
|
||||
armedWarpCipherDescription = warpCore.getCipherDescription();
|
||||
// TODO: load warpcore
|
||||
public void BãßArmWarpCore(WaterBucket warpBucket) {
|
||||
armedWarpCipherName = warpBucket.theWater().getName();
|
||||
armedWarpCipherDescription = warpBucket.theWater().getDescription();
|
||||
for (WaterCipherHeart heart:warpBucket.theWater().getCipherHearts()) {
|
||||
BãßBȍőnPartʸᴰ<?>[] bases = BasePartFactory.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);
|
||||
}
|
||||
for (WaterCipherHeartTone tone:heart.getHeartTones()) {
|
||||
BãßBȍőnPartʸᴰ<?> bassTone = baseParts.get(tone.getPart());
|
||||
@SuppressWarnings("unchecked")
|
||||
BãßBȍőnCoffinOpenʸᴰ<BãßBȍőnPartKeyʸᴰ> coffin = BãßBȍőnCoffinOpenʸᴰ.class.cast(bassTone.GET_BBC());
|
||||
coffin.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.DIAL_TONE, tone.getDialTone());
|
||||
coffin.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_KEY, tone.getChinaKey());
|
||||
coffin.PUT_OBJ(BãßBȍőnPartKeyʸᴰ.CHINA_VALUE, tone.getChinaValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,24 @@
|
|||
package love.distributedrebirth.numberxd.base2t.part.warp;
|
||||
|
||||
public class TOSWarpCoreDriver {
|
||||
import org.x4o.xml.X4ODriver;
|
||||
import org.x4o.xml.X4ODriverManager;
|
||||
|
||||
public class TOSWarpCoreDriver extends X4ODriver<WaterBucket> {
|
||||
|
||||
static final public String LANGUAGE_NAME = "warpcore";
|
||||
static final public String[] LANGUAGE_VERSIONS = new String[]{X4ODriver.DEFAULT_LANGUAGE_VERSION};
|
||||
|
||||
@Override
|
||||
public String getLanguageName() {
|
||||
return LANGUAGE_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getLanguageVersions() {
|
||||
return LANGUAGE_VERSIONS;
|
||||
}
|
||||
|
||||
static public TOSWarpCoreDriver getInstance() {
|
||||
return (TOSWarpCoreDriver)X4ODriverManager.getX4ODriver(LANGUAGE_NAME);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,42 +0,0 @@
|
|||
package love.distributedrebirth.numberxd.base2t.part.warp;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WarpCipher {
|
||||
|
||||
private String cipherName;
|
||||
private String cipherDescription;
|
||||
private List<WarpCipherHeart> cipherHearts;
|
||||
|
||||
public WarpCipher() {
|
||||
cipherHearts = new ArrayList<>();
|
||||
}
|
||||
|
||||
public String getCipherName() {
|
||||
return cipherName;
|
||||
}
|
||||
|
||||
public void setCipherName(String cipherName) {
|
||||
this.cipherName = cipherName;
|
||||
}
|
||||
|
||||
public String getCipherDescription() {
|
||||
return cipherDescription;
|
||||
}
|
||||
|
||||
public void setCipherDescription(String cipherDescription) {
|
||||
this.cipherDescription = cipherDescription;
|
||||
}
|
||||
|
||||
public List<WarpCipherHeart> getCipherHearts() {
|
||||
return cipherHearts;
|
||||
}
|
||||
|
||||
public void setCipherHearts(List<WarpCipherHeart> cipherHearts) {
|
||||
this.cipherHearts = cipherHearts;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
package love.distributedrebirth.numberxd.base2t.part.warp;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WarpCipherHeart {
|
||||
|
||||
private String partKey;
|
||||
private List<WarpCipherHeartCore> heartCores;
|
||||
|
||||
public WarpCipherHeart() {
|
||||
heartCores = new ArrayList<>();
|
||||
}
|
||||
|
||||
public String getPartKey() {
|
||||
return partKey;
|
||||
}
|
||||
|
||||
public void setPartKey(String partKey) {
|
||||
this.partKey = partKey;
|
||||
}
|
||||
|
||||
public List<WarpCipherHeartCore> getHeartCores() {
|
||||
return heartCores;
|
||||
}
|
||||
|
||||
public void setHeartCores(List<WarpCipherHeartCore> heartCores) {
|
||||
this.heartCores = heartCores;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package love.distributedrebirth.numberxd.base2t.part.warp;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterBucket {
|
||||
|
||||
private WaterCipher water;
|
||||
|
||||
public WaterCipher theWater() {
|
||||
return water;
|
||||
}
|
||||
|
||||
public void fillWater(WaterCipher water) {
|
||||
this.water = water;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
package love.distributedrebirth.numberxd.base2t.part.warp;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterCipher {
|
||||
|
||||
private String name;
|
||||
private String description;
|
||||
private List<WaterCipherHeart> cipherHearts;
|
||||
|
||||
public WaterCipher() {
|
||||
cipherHearts = new ArrayList<>();
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public List<WaterCipherHeart> getCipherHearts() {
|
||||
return cipherHearts;
|
||||
}
|
||||
|
||||
public void addCipherHeart(WaterCipherHeart cipherHeart) {
|
||||
this.cipherHearts.add(cipherHeart);
|
||||
}
|
||||
|
||||
public void setCipherHearts(List<WaterCipherHeart> cipherHearts) {
|
||||
this.cipherHearts = cipherHearts;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package love.distributedrebirth.numberxd.base2t.part.warp;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WaterCipherHeart {
|
||||
|
||||
private Integer bass;
|
||||
private List<WaterCipherHeartTone> heartTones;
|
||||
|
||||
public WaterCipherHeart() {
|
||||
heartTones = new ArrayList<>();
|
||||
}
|
||||
|
||||
public Integer getBass() {
|
||||
return bass;
|
||||
}
|
||||
|
||||
public void setBass(Integer bass) {
|
||||
this.bass = bass;
|
||||
}
|
||||
|
||||
public List<WaterCipherHeartTone> getHeartTones() {
|
||||
return heartTones;
|
||||
}
|
||||
|
||||
public void addHeartTone(WaterCipherHeartTone heartTone) {
|
||||
heartTones.add(heartTone);
|
||||
}
|
||||
|
||||
public void setHeartTones(List<WaterCipherHeartTone> heartTones) {
|
||||
this.heartTones = heartTones;
|
||||
}
|
||||
}
|
||||
|
|
@ -3,21 +3,30 @@ package love.distributedrebirth.numberxd.base2t.part.warp;
|
|||
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
|
||||
|
||||
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
|
||||
public class WarpCipherHeartCore {
|
||||
public class WaterCipherHeartTone {
|
||||
|
||||
private String identifierTone;
|
||||
private String part;
|
||||
private String dialTone;
|
||||
private String chinaKey;
|
||||
private String chinaValue;
|
||||
|
||||
public WarpCipherHeartCore() {
|
||||
public WaterCipherHeartTone() {
|
||||
}
|
||||
|
||||
public String getIdentifierTone() {
|
||||
return identifierTone;
|
||||
public String getPart() {
|
||||
return part;
|
||||
}
|
||||
|
||||
public void setIdentifierTone(String identifierTone) {
|
||||
this.identifierTone = identifierTone;
|
||||
public void setPart(String part) {
|
||||
this.part = part;
|
||||
}
|
||||
|
||||
public String getDialTone() {
|
||||
return dialTone;
|
||||
}
|
||||
|
||||
public void setDialTone(String dialTone) {
|
||||
this.dialTone = dialTone;
|
||||
}
|
||||
|
||||
public String getChinaKey() {
|
||||
Loading…
Add table
Add a link
Reference in a new issue