start with warp core impl

This commit is contained in:
Willem Cazander 2022-02-03 14:21:08 +01:00
parent 92408b67c3
commit 1bd8e53c6b
4 changed files with 67 additions and 5 deletions

View file

@ -28,6 +28,7 @@ import love.distributedrebirth.demo4d.screen.ScreenHelp;
import love.distributedrebirth.demo4d.screen.ScreenIntro;
import love.distributedrebirth.demo4d.screen.ScreenIntroMission;
import love.distributedrebirth.demo4d.screen.ScreenUnicode4D;
import love.distributedrebirth.numberxd.base2t.part.warp.TOSWarpCore;
import net.spookygames.gdx.nativefilechooser.NativeFileChooser;
/**
@ -97,6 +98,13 @@ public class Demo4DMain extends Game {
if (args.contains("full-screen")) {
Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode());
}
int fileArgu = args.indexOf("warpcore-load");
if (fileArgu != -1) {
// TODO: load warpcore
}
if (!args.contains("warpcore-nolock")) {
TOSWarpCore.INSTANCE.BãßLockWarpCipher();
}
}
@Override

View file

@ -1,8 +1,58 @@
package love.distributedrebirth.numberxd.base2t.part.warp;
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ȍőnPartʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class TOSWarpCore {
public enum TOSWarpCore implements BãßBȍőnEnumInstanceʸᴰ<TOSWarpCore> {
INSTANCE;
private String armedWarpCipherName;
private String armedWarpCipherDescription;
public void BãßLockWarpCipher() {
for (int base:BasePartFactory.INSTANCE.BãßBases()) {
for (BãßBȍőnPartʸᴰ<?> part:BasePartFactory.INSTANCE.BãßBuildPartsByBase(base)) {
BãßBȍőnCoffinOpenʸᴰ.class.cast(part.GET_BBC()).LOCK_COFFIN();
}
}
}
public WarpCipher BãßSaveWarpCipher() {
WarpCipher warpCore = new WarpCipher();
if (armedWarpCipherName == null) {
warpCore.setCipherName("default");
} else {
warpCore.setCipherName(armedWarpCipherName);
}
if (armedWarpCipherDescription == null) {
warpCore.setCipherName("Current active cipher.");
} else {
warpCore.setCipherDescription(armedWarpCipherDescription);
}
for (int base:BasePartFactory.INSTANCE.BãßBases()) {
WarpCipherHeart heart = new WarpCipherHeart();
BãßBȍőnPartʸᴰ<?>[] bases = BasePartFactory.INSTANCE.BãßBuildPartsByBase(base);
heart.setPartKey(bases[0].BȍőnNaamI18N());
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);
}
warpCore.getCipherHearts().add(heart);
}
return warpCore;
}
public void BãßLoadWarpCipher(WarpCipher warpCore) {
armedWarpCipherName = warpCore.getCipherName();
armedWarpCipherDescription = warpCore.getCipherDescription();
// TODO: load warpcore
}
}

View file

@ -1,5 +1,6 @@
package love.distributedrebirth.numberxd.base2t.part.warp;
import java.util.ArrayList;
import java.util.List;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
@ -7,11 +8,12 @@ import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
@BãßBȍőnAuthorInfoʸᴰ(name = "willemtsade", copyright = "©Δ∞ 仙上主天")
public class WarpCipher {
String cipherName;
String cipherDescription;
List<WarpCipherHeart> cipherHearts;
private String cipherName;
private String cipherDescription;
private List<WarpCipherHeart> cipherHearts;
public WarpCipher() {
cipherHearts = new ArrayList<>();
}
public String getCipherName() {

View file

@ -1,5 +1,6 @@
package love.distributedrebirth.numberxd.base2t.part.warp;
import java.util.ArrayList;
import java.util.List;
import love.distributedrebirth.bassboonyd.BãßBȍőnAuthorInfoʸᴰ;
@ -11,6 +12,7 @@ public class WarpCipherHeart {
private List<WarpCipherHeartCore> heartCores;
public WarpCipherHeart() {
heartCores = new ArrayList<>();
}
public String getPartKey() {