Compare commits
82 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
242109f34e | ||
|
|
4b733fe244 | ||
|
|
74f083b897 | ||
|
|
f9580c7864 | ||
|
|
361ed26907 | ||
|
|
80130c69e4 | ||
|
|
3b47cb03bc | ||
|
|
8577eb9484 | ||
|
|
272a7af1ae | ||
|
|
33e8489f42 | ||
|
|
bdee65e925 | ||
|
|
b7b6ddf69a | ||
|
|
bf79e1a3d7 | ||
|
|
bedf93f0e0 | ||
|
|
a172c12e5d | ||
|
|
7bd05ad9ad | ||
|
|
9928b0f788 | ||
|
|
c95872e992 | ||
|
|
c0786b31be | ||
|
|
d53b074760 | ||
|
|
18cb0eeec6 | ||
|
|
1959ada854 | ||
|
|
fca1cacb30 | ||
|
|
3870c64b60 | ||
|
|
aebd3f959f | ||
|
|
49e4aaa49b | ||
|
|
135c780f35 | ||
|
|
6c2541491f | ||
|
|
4975def352 | ||
|
|
0c050a3ef4 | ||
|
|
bd4badc274 | ||
|
|
21b1a0aedf | ||
|
|
87050b6c56 | ||
|
|
c96f4609d0 | ||
|
|
9bde0dc18a | ||
|
|
b66294b50a | ||
|
|
bfc2b08bcc | ||
|
|
4d66d63da2 | ||
|
|
4ee4e39518 | ||
|
|
659be11b7d | ||
|
|
7559996227 | ||
|
|
04c465c8f0 | ||
|
|
cf71356bdb | ||
|
|
a9756aefad | ||
|
|
e0b4eb7f8f | ||
|
|
ad620971d9 | ||
|
|
648150df65 | ||
|
|
3b3b1520f9 | ||
|
|
0d015a4dfc | ||
|
|
75df515234 | ||
|
|
0908176079 | ||
|
|
b435c83fb6 | ||
|
|
1da52d2e42 | ||
|
|
eaf76b5513 | ||
|
|
bda5393a74 | ||
|
|
388374aa24 | ||
|
|
8eedb5f610 | ||
|
|
e9bcf9e8b8 | ||
|
|
4e7d6e9a9d | ||
|
|
6eaec7d505 | ||
|
|
d9d4360b49 | ||
|
|
6da6c9426d | ||
|
|
d1d3ef0c67 | ||
|
|
addcf350b2 | ||
|
|
636fffc750 | ||
|
|
d163cacb6a | ||
|
|
e847a74a25 | ||
|
|
c2aa655d87 | ||
|
|
f03c022db8 | ||
|
|
21a8a39344 | ||
|
|
14ee997a76 | ||
|
|
b1b84fe380 | ||
|
|
4d3c6879b5 | ||
|
|
3a27e6e94e | ||
|
|
e9c00d8a9f | ||
|
|
490beb242a | ||
|
|
82348d4fff | ||
|
|
d133709423 | ||
|
|
b448b90999 | ||
|
|
1555e77348 | ||
|
|
f9954ea4c7 | ||
|
|
6145b1c95c |
@@ -77,11 +77,11 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void showFileChooser(boolean open, String extension, Cons<Fi> cons){
|
public void showFileChooser(boolean open, String title, String extension, Cons<Fi> cons){
|
||||||
showFileChooser(open, cons, extension);
|
showFileChooser(open, title, cons, extension);
|
||||||
}
|
}
|
||||||
|
|
||||||
void showFileChooser(boolean open, Cons<Fi> cons, String... extensions){
|
void showFileChooser(boolean open, String title, Cons<Fi> cons, String... extensions){
|
||||||
String extension = extensions[0];
|
String extension = extensions[0];
|
||||||
|
|
||||||
if(VERSION.SDK_INT >= VERSION_CODES.Q){
|
if(VERSION.SDK_INT >= VERSION_CODES.Q){
|
||||||
@@ -118,7 +118,7 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
});
|
});
|
||||||
}else if(VERSION.SDK_INT >= VERSION_CODES.M && !(checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED &&
|
}else if(VERSION.SDK_INT >= VERSION_CODES.M && !(checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED &&
|
||||||
checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED)){
|
checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED)){
|
||||||
chooser = new FileChooser(open ? "@open" : "@save", file -> Structs.contains(extensions, file.extension().toLowerCase()), open, file -> {
|
chooser = new FileChooser(title, file -> Structs.contains(extensions, file.extension().toLowerCase()), open, file -> {
|
||||||
if(!open){
|
if(!open){
|
||||||
cons.get(file.parent().child(file.nameWithoutExtension() + "." + extension));
|
cons.get(file.parent().child(file.nameWithoutExtension() + "." + extension));
|
||||||
}else{
|
}else{
|
||||||
@@ -136,7 +136,7 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
requestPermissions(perms.toArray(new String[0]), PERMISSION_REQUEST_CODE);
|
requestPermissions(perms.toArray(new String[0]), PERMISSION_REQUEST_CODE);
|
||||||
}else{
|
}else{
|
||||||
if(open){
|
if(open){
|
||||||
new FileChooser("@open", file -> Structs.contains(extensions, file.extension().toLowerCase()), true, cons).show();
|
new FileChooser(title, file -> Structs.contains(extensions, file.extension().toLowerCase()), true, cons).show();
|
||||||
}else{
|
}else{
|
||||||
super.showFileChooser(open, extension, cons);
|
super.showFileChooser(open, extension, cons);
|
||||||
}
|
}
|
||||||
@@ -145,7 +145,7 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void showMultiFileChooser(Cons<Fi> cons, String... extensions){
|
public void showMultiFileChooser(Cons<Fi> cons, String... extensions){
|
||||||
showFileChooser(true, cons, extensions);
|
showFileChooser(true, "@open", cons, extensions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -32,12 +32,15 @@ public class AssetsProcess extends BaseProcessor{
|
|||||||
MethodSpec.Builder load = MethodSpec.methodBuilder("load").addModifiers(Modifier.PUBLIC, Modifier.STATIC);
|
MethodSpec.Builder load = MethodSpec.methodBuilder("load").addModifiers(Modifier.PUBLIC, Modifier.STATIC);
|
||||||
MethodSpec.Builder loadStyles = MethodSpec.methodBuilder("loadStyles").addModifiers(Modifier.PUBLIC, Modifier.STATIC);
|
MethodSpec.Builder loadStyles = MethodSpec.methodBuilder("loadStyles").addModifiers(Modifier.PUBLIC, Modifier.STATIC);
|
||||||
MethodSpec.Builder icload = MethodSpec.methodBuilder("load").addModifiers(Modifier.PUBLIC, Modifier.STATIC);
|
MethodSpec.Builder icload = MethodSpec.methodBuilder("load").addModifiers(Modifier.PUBLIC, Modifier.STATIC);
|
||||||
|
CodeBlock.Builder ichinit = CodeBlock.builder();
|
||||||
String resources = rootDirectory + "/core/assets-raw/sprites/ui";
|
String resources = rootDirectory + "/core/assets-raw/sprites/ui";
|
||||||
Jval icons = Jval.read(Fi.get(rootDirectory + "/core/assets-raw/fontgen/config.json").readString());
|
Jval icons = Jval.read(Fi.get(rootDirectory + "/core/assets-raw/fontgen/config.json").readString());
|
||||||
|
|
||||||
ObjectMap<String, String> texIcons = new OrderedMap<>();
|
ObjectMap<String, String> texIcons = new OrderedMap<>();
|
||||||
PropertiesUtils.load(texIcons, Fi.get(rootDirectory + "/core/assets/icons/icons.properties").reader());
|
PropertiesUtils.load(texIcons, Fi.get(rootDirectory + "/core/assets/icons/icons.properties").reader());
|
||||||
|
|
||||||
|
StringBuilder iconcAll = new StringBuilder();
|
||||||
|
|
||||||
texIcons.each((key, val) -> {
|
texIcons.each((key, val) -> {
|
||||||
String[] split = val.split("\\|");
|
String[] split = val.split("\\|");
|
||||||
String name = Strings.kebabToCamel(split[1]).replace("Medium", "").replace("Icon", "");
|
String name = Strings.kebabToCamel(split[1]).replace("Medium", "").replace("Icon", "");
|
||||||
@@ -49,6 +52,9 @@ public class AssetsProcess extends BaseProcessor{
|
|||||||
ictype.addField(FieldSpec.builder(ParameterizedTypeName.get(ObjectMap.class, String.class, TextureRegionDrawable.class),
|
ictype.addField(FieldSpec.builder(ParameterizedTypeName.get(ObjectMap.class, String.class, TextureRegionDrawable.class),
|
||||||
"icons", Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL).initializer("new ObjectMap<>()").build());
|
"icons", Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL).initializer("new ObjectMap<>()").build());
|
||||||
|
|
||||||
|
ichtype.addField(FieldSpec.builder(ParameterizedTypeName.get(ObjectIntMap.class, String.class),
|
||||||
|
"codes", Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL).initializer("new ObjectIntMap<>()").build());
|
||||||
|
|
||||||
ObjectSet<String> used = new ObjectSet<>();
|
ObjectSet<String> used = new ObjectSet<>();
|
||||||
|
|
||||||
for(Jval val : icons.get("glyphs").asArray()){
|
for(Jval val : icons.get("glyphs").asArray()){
|
||||||
@@ -57,7 +63,9 @@ public class AssetsProcess extends BaseProcessor{
|
|||||||
if(!val.getBool("selected", true) || !used.add(name)) continue;
|
if(!val.getBool("selected", true) || !used.add(name)) continue;
|
||||||
|
|
||||||
int code = val.getInt("code", 0);
|
int code = val.getInt("code", 0);
|
||||||
|
iconcAll.append((char)code);
|
||||||
ichtype.addField(FieldSpec.builder(char.class, name, Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL).initializer("(char)" + code).build());
|
ichtype.addField(FieldSpec.builder(char.class, name, Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL).initializer("(char)" + code).build());
|
||||||
|
ichinit.addStatement("codes.put($S, $L)", name, code);
|
||||||
|
|
||||||
ictype.addField(TextureRegionDrawable.class, name + "Small", Modifier.PUBLIC, Modifier.STATIC);
|
ictype.addField(TextureRegionDrawable.class, name + "Small", Modifier.PUBLIC, Modifier.STATIC);
|
||||||
icload.addStatement(name + "Small = mindustry.ui.Fonts.getGlyph(mindustry.ui.Fonts.def, (char)" + code + ")");
|
icload.addStatement(name + "Small = mindustry.ui.Fonts.getGlyph(mindustry.ui.Fonts.def, (char)" + code + ")");
|
||||||
@@ -69,6 +77,9 @@ public class AssetsProcess extends BaseProcessor{
|
|||||||
icload.addStatement("icons.put($S, " + name + "Small)", name + "Small");
|
icload.addStatement("icons.put($S, " + name + "Small)", name + "Small");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ichtype.addField(FieldSpec.builder(String.class, "all", Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL).initializer("$S", iconcAll.toString()).build());
|
||||||
|
ichtype.addStaticBlock(ichinit.build());
|
||||||
|
|
||||||
Fi.get(resources).walk(p -> {
|
Fi.get(resources).walk(p -> {
|
||||||
if(!p.extEquals("png")) return;
|
if(!p.extEquals("png")) return;
|
||||||
|
|
||||||
@@ -111,7 +122,6 @@ public class AssetsProcess extends BaseProcessor{
|
|||||||
|
|
||||||
HashSet<String> names = new HashSet<>();
|
HashSet<String> names = new HashSet<>();
|
||||||
Fi.get(path).walk(p -> {
|
Fi.get(path).walk(p -> {
|
||||||
String fname = p.name();
|
|
||||||
String name = p.nameWithoutExtension();
|
String name = p.nameWithoutExtension();
|
||||||
|
|
||||||
if(names.contains(name)){
|
if(names.contains(name)){
|
||||||
@@ -122,18 +132,18 @@ public class AssetsProcess extends BaseProcessor{
|
|||||||
|
|
||||||
if(SourceVersion.isKeyword(name)) name += "s";
|
if(SourceVersion.isKeyword(name)) name += "s";
|
||||||
|
|
||||||
String filepath = path.substring(path.lastIndexOf("/") + 1) + "/" + fname;
|
String filepath = path.substring(path.lastIndexOf("/") + 1) + p.path().substring(p.path().lastIndexOf(path) + path.length());
|
||||||
String filename = "\"" + filepath + "\"";
|
|
||||||
|
|
||||||
|
String filename = "\"" + filepath + "\"";
|
||||||
loadBegin.addStatement("arc.Core.assets.load(" + filename + ", " + rtype + ".class).loaded = a -> " + name + " = (" + rtype + ")a", filepath, filepath.replace(".ogg", ".mp3"));
|
loadBegin.addStatement("arc.Core.assets.load(" + filename + ", " + rtype + ".class).loaded = a -> " + name + " = (" + rtype + ")a", filepath, filepath.replace(".ogg", ".mp3"));
|
||||||
|
|
||||||
dispose.addStatement("arc.Core.assets.unload(" + filename + ")");
|
dispose.addStatement("arc.Core.assets.unload(" + filename + ")");
|
||||||
dispose.addStatement(name + " = null");
|
dispose.addStatement(name + " = null");
|
||||||
type.addField(FieldSpec.builder(ClassName.bestGuess(rtype), name, Modifier.STATIC, Modifier.PUBLIC).initializer("new arc.mock.Mock" + rtype.substring(rtype.lastIndexOf(".") + 1) + "()").build());
|
type.addField(FieldSpec.builder(ClassName.bestGuess(rtype), name, Modifier.STATIC, Modifier.PUBLIC).initializer("new arc.audio." + rtype.substring(rtype.lastIndexOf(".") + 1) + "()").build());
|
||||||
});
|
});
|
||||||
|
|
||||||
if(classname.equals("Sounds")){
|
if(classname.equals("Sounds")){
|
||||||
type.addField(FieldSpec.builder(ClassName.bestGuess(rtype), "none", Modifier.STATIC, Modifier.PUBLIC).initializer("new arc.mock.Mock" + rtype.substring(rtype.lastIndexOf(".") + 1) + "()").build());
|
type.addField(FieldSpec.builder(ClassName.bestGuess(rtype), "none", Modifier.STATIC, Modifier.PUBLIC).initializer("new arc.audio." + rtype.substring(rtype.lastIndexOf(".") + 1) + "()").build());
|
||||||
}
|
}
|
||||||
|
|
||||||
type.addMethod(loadBegin.build());
|
type.addMethod(loadBegin.build());
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ allprojects{
|
|||||||
if(!project.hasProperty("versionType")) versionType = 'official'
|
if(!project.hasProperty("versionType")) versionType = 'official'
|
||||||
appName = 'Mindustry'
|
appName = 'Mindustry'
|
||||||
steamworksVersion = '891ed912791e01fe9ee6237a6497e5212b85c256'
|
steamworksVersion = '891ed912791e01fe9ee6237a6497e5212b85c256'
|
||||||
rhinoVersion = '2c3ad8c29560f695ad147a8e8cf5ed9f0ae834b3'
|
rhinoVersion = '2617981f706e50b8753155d8e15e326308be3b22'
|
||||||
|
|
||||||
loadVersionProps = {
|
loadVersionProps = {
|
||||||
return new Properties().with{p -> p.load(file('../core/assets/version.properties').newReader()); return p }
|
return new Properties().with{p -> p.load(file('../core/assets/version.properties').newReader()); return p }
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.5 KiB |
BIN
core/assets/baseparts/1605279968000.msch
Normal file
2
core/assets/baseparts/1605280014089.msch
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
mschxś-<2D>ŃŠ!EouÔŮťBŰÇ~„/ý#™†Ept<70>Nˇ_mÁăą <09>W…)‡Ť0םÖĆôŔň¤şrÜ[,pp˙ÜZl!ÇcókÉ/z†ĺr4bÜjI<6A>ý2%ß_„%…JěźSÂmľ–<C4BE>W‚©!˝
|
||||||
|
€;pęGŹk<18>…VNf żJjŞ›ŇĐ8ŹPK¨G8&~m3bfŘÔçźqkľˇ•'ćÄća¦ăbú/(Ű×[¨=[)»
|
||||||
1
core/assets/baseparts/1605280470180.msch
Normal file
@@ -0,0 +1 @@
|
|||||||
|
mschx<>M‘Ϋn„ E7^Ζλ<CE96>1ύ<31>Ύφ<CE8E><CF86>"JƒΨi?ΎµηΐKCd<43>λή$β<>—•S›Ζp(·Ύ³ο–’UΕΡx<07><>oU<6F>»rΪJ<CEAA>>hΔD½ΙΓ<CE99>aΡ<61><CEA1>*κ υWj‰>ΰξ<CEB0>ύ—N»Ση¦ΆYδ<1A>µδv’<76><E28099>ώ©©»xeεΆ]ζύ$ν9<CEBD>¨<EFBFBD>97Ήxχ©ΏIαόIθw^‘Ξ―<CE9E>jωµΣa¬΅IylΪςπTΎJ”5¨RPDuΎ<1A>*ΟΤάh‹<01>ΈQήA4©‘P3n,ΗEF Ρ‚W<E2809A><57>P·Υυ‹‚ΎκϊΉ.<2E>MSΠ“ε<E2809C>δ<EFBFBD>²lθ$¶’>g-JF—qΟΕGΖΔhι$t}Ζ<>1ς«ZΪ+XγΞF}Ζΐθω―r6fι1K<31>,ύ%†T<E280A0>
|
||||||
2
core/assets/baseparts/1605280548230.msch
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
mschxś-Ź[nĂ EŻń;nÓ8űŕ«+Bö(BÂ`i”˝'qăŻ3sď!pÁU ˛j!taĄ)zúĹ0S<30>Ľ^ŁvhŃ
|
||||||
|
ÍٞúľČÉŮ?z:Ź18ŁĽ\•%#yşët[ČF\V÷ /›é¨Ł'ł×Ć`Đ‘ÜÝO`
|
||||||
BIN
core/assets/baseparts/1605281022715.msch
Normal file
BIN
core/assets/baseparts/1605281081581.msch
Normal file
2
core/assets/baseparts/1605281121912.msch
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
mschxśMŤÍ „géÄj˘'ź˘ß[bL*4c|{gCB`vg?áÚč_vńq
|
||||||
|
ů†aŰ”źky¦8[Z|WĂ‚ľR8Ý})!GŽç5}BcšĂî4>O°;ĹŚ7ͱ(…Ë_ŕNW4Ü\m•®JŹF ¬ĹŔ°“†"®btk!ÂĘho:v]5ůBëNÉľćŇC¬=Nôw–6‡¶;í,tŚJóÁ,;
|
||||||
BIN
core/assets/baseparts/1605281215706.msch
Normal file
BIN
core/assets/baseparts/1605281306347.msch
Normal file
BIN
core/assets/baseparts/1605283900306.msch
Normal file
BIN
core/assets/baseparts/1605284013998.msch
Normal file
BIN
core/assets/baseparts/1605284595866.msch
Normal file
BIN
core/assets/baseparts/1605284660452.msch
Normal file
BIN
core/assets/baseparts/1605285080497.msch
Normal file
@@ -1,2 +0,0 @@
|
|||||||
mschxœMŽan„ …Š®ºmMÿöŠètC‚`ºí‰{Š]:àŸ&ïñ˜=Þ¤Óázh·ª`öÝÒWiS‡Oa!Ìw)(úŽA/ѼzcÿÉyw”6Í¢Ö`¬å^)ÜHE'¾]¼¶j!ƒùL7Â{4Q;“6µx÷E?Ü¡>ñL{y¢œ_‰½ú̇±†“êØÈ–ðÁ…¶$ÊŽ†ˆ¶êj7CÃn‹6ÿŠŽõѳ!Ot-G+ĉæëoíÀè†.?ó£dò
|
|
||||||
—Ì<EFBFBD>œkr/‰Ô8N4@Ϩƒd41úSq± c%
|
|
||||||
1
core/assets/baseparts/754024880747315332.msch
Normal file
@@ -0,0 +1 @@
|
|||||||
|
mschxśMŹkNě0…OÓ6íL<C3AD>‰°<>üa)ě ´Ö©MJšňX;‚Á®ď•Hä|Ž}l'8ŕ¶@ú™pőä—e˘‡üâĂů„v<E2809E>áŤ>cÂi ´Í}ö<>“ź&Üqę“[ú@“cďL°3…‘î‡8?okö1¸3J}ćÍsź3ĄO—řNÉ…8şy›˛wK˘u…MűpfÜX‰Ó{Ďpô‘S?ě-ř9ăć3ş?ĂŃůLł[ă–Âőä_7?ş-€Gč*v+%o^5`8Ô˘t˙E;j<>QßhťŃ:ŁąR•ĄÜ$nQVŚEÍh!ÚćraűBņËŰwŮ ’y-ăF:U:şâc‡Q”ŠJQ+,ŠŁ‘é•<^p@qd÷é¸b4ŠV<C5A0>,ąćŚ©ĺă{»ĘŞĘŞĘ˛Ę´ęPŃhżF•ŤüMŔ#%ČĘŽ}+7)ŮÁą>8÷ÚßWI
|
||||||
1
core/assets/baseparts/755588030362026104.msch
Normal file
@@ -0,0 +1 @@
|
|||||||
|
mschxœ%<25>]!„öOã³gØC$‘DÀ°`âím)ý˜a†âŠMÁd—¶Ó¿Br-z‹åô®µPqo±¹{:|Éßð+·O}äŽg<C5BD>ï7.±…tœ¥W0×Ò¹<0Žâa 4Ý5Ã@kL¤câ7#Q2VâJ†e_FØJز0Kgµ°`(<28>L#ß-TÑ´Bz›˜;%ÉÜIiVù
|
||||||
1
core/assets/baseparts/759634196280508416.msch
Normal file
@@ -0,0 +1 @@
|
|||||||
|
mschxś=ŃÍŽ›0†á<E280A0>ăŹĂßĘt™ŕ:şęŞWŕÉXٍDŕĚĎťw×ÚĽRĹâáű<C3A1>Źŕ µ|ĎDOîÍËÓO·®×wţĽ{;˙đÓů6ş))ź]~ůF·Ľz9®sĽnnňŁÔ.>ügXÜ%Ě‹”·ű¸úá2O/÷k{ąŹáúîŇŁzM“‡W?ůe+šŰüOó‹˙?űBęEä·HŻ]BĂ,”ĐŔ zŮmgd;š‰¨<E280B0>"iŘSć$”–T@IY‘x¤lI|ŁěyY<79>4ěÁŔPBŹĐÁ6zźf¦WW°ŁÔ¤”†dáHY<48>*¨)R'ĘŽÔĂ“l«R°<52>`áÔĐ z<>3u:qo MĘI†dI©"5¤–ÔA/jź–*YB<59>†X( ‚Zč —LĄĎr0`ÓęŽif˘‚Zč ® ŹżŰ<C5BC>ěďźxčďm’şŢ<C59F>úµĎ?č
|
||||||
BIN
core/assets/baseparts/759638168080351252.msch
Normal file
BIN
core/assets/baseparts/772638841168461854.msch
Normal file
BIN
core/assets/baseparts/772642175838191616.msch
Normal file
BIN
core/assets/baseparts/772642264635670528.msch
Normal file
BIN
core/assets/baseparts/772642357136719872.msch
Normal file
BIN
core/assets/baseparts/772642606227390504.msch
Normal file
BIN
core/assets/baseparts/772642700713000960.msch
Normal file
BIN
core/assets/baseparts/772754117604409344.msch
Normal file
BIN
core/assets/baseparts/772836684403834920.msch
Normal file
BIN
core/assets/baseparts/772859800051908639.msch
Normal file
2
core/assets/baseparts/772860007561166868.msch
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
mschxśMPŰnë |IâKëćáüÄ‘řŠJçú!›VH,Ś›ćŰ›w<>w–™ťÝĹ8â±@ĺÔYăĎéĹ™xú§ĆčĂőôÔĹę€nŇËĚŤwŔ:«äڵčLÔgąř5ŚĂEE*ú#†{‹±fôN.gm)áMTάgIö]_YÓŽ«Ťć]Ąún™}ĐrzY0Ś^Y9j<17>y]ß4ÚŮ_ŘŢůIăń-řŐMň5/K§·*ČY9mqüu‘Ěč}šŐŐz5ýĚţ{‚ůC
|
||||||
|
T˘ !P–
|
||||||
BIN
core/assets/baseparts/772860344174772254.msch
Normal file
3
core/assets/baseparts/772861253630165084.msch
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
mschxœ%Žknà „ÇØIü¨äV9×È
|
||||||
|
ú;¢xS!a@€“úîMÝ%F¬¾Ñ>fz<>Æ©™p¾~:“¯¥}ŽëõbU$%MÈÆ;à
|
||||||
|
ãCeŠ’~rT:ûˆ^/6›»*ú#y’A9²’Õ7ϧà#É)%ŒÚ++5¹Ímáꘌ5Ú;™f²ì‹18Zf•<66>–S4Öb0™f™ü5áô¥2wèƒðÎO„÷ VëÕ$ÙçN+Ÿ1(åíuÞ
|
||||||
BIN
core/assets/baseparts/772861891516301334.msch
Normal file
BIN
core/assets/baseparts/772862221297909760.msch
Normal file
BIN
core/assets/baseparts/772880624582787112.msch
Normal file
BIN
core/assets/baseparts/772880838392152095.msch
Normal file
BIN
core/assets/baseparts/773972917637611530.msch
Normal file
1
core/assets/baseparts/773972978551226368.msch
Normal file
@@ -0,0 +1 @@
|
|||||||
|
mschxœ%<25>] „‡ŸÖ³øàm|3U‰i¢ÁãíevJš<4A>&»1zÄezVŒó}9¿×ÇÔNØßêûÚæ×6¯<10>/Ó¶ÕöÃއ״ÔGŸv¯‡mýÖà}N?Qäì¨Ìv¶1x™Y(„%½"ž"ÈLBfÒ³´ë' }"Ï! vCd•Þ*b‘LðŽAªA*éM‰õˆ(BâIÕ²Ì|¤’<C2A4>™Ìz!''x™Y(L–Þµ³!Á&`Íï8šÝþ Ú
|
||||||
1
core/assets/baseparts/773973064429993996.msch
Normal file
@@ -0,0 +1 @@
|
|||||||
|
mschxśEĎmjĂ0ŕ×ůtÚ´ěů»ÓF–<46>Î<EFBFBD>ŘĹi»ŃnŮIcóX‘,ËxAŻaă¸zśĂ-ľoa˝/~ŢÓ7űmĘáţ)5ýE=ĄřĺżSF™ÓţđnKË<4B>‡űý‚ţ#‡ůć‡˙ŞŐÇ™«ÂĂŻĂ–ö<y\V?}Ž1Lă2Ě9,€WZhˇ'tPŠv-´&G´<>F#PNN8ń9Ť3HÎ*ĆV(„R¨ ,QW<51>Ď®§ŢA˝9éŞçóůFëÇđJ'jOWYÚkľˇŽˇ,
|
||||||
BIN
core/assets/baseparts/773973230179319858.msch
Normal file
BIN
core/assets/baseparts/773973383956135957.msch
Normal file
2
core/assets/baseparts/773973810848333844.msch
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
mschxœ%ÎÝ‚0à³EÑK_‚;ßÇhp lËFßÞÎ^,_Û%§Eƒ›†õÃJ¸¹Ù?_ƒ[><3E>ìÖ¸Ú‰ò˜\Ü\ð@
|
||||||
|
[~q<>žöuØÜØOÉ-êö<>š1ø7}CB7§!¾ÜF}L”3Z.×>‡=<3D>àΔ‚âBk¦ƒs…2\qg`¸W-Á
|
||||||
BIN
core/assets/baseparts/773974064850272309.msch
Normal file
BIN
core/assets/baseparts/773974140545531924.msch
Normal file
BIN
core/assets/baseparts/773976628883619840.msch
Normal file
BIN
core/assets/baseparts/774001709088505867.msch
Normal file
BIN
core/assets/baseparts/774002215428816936.msch
Normal file
BIN
core/assets/baseparts/774013552553754635.msch
Normal file
@@ -20,7 +20,7 @@ gameover = Game Over
|
|||||||
gameover.pvp = The[accent] {0}[] team is victorious!
|
gameover.pvp = The[accent] {0}[] team is victorious!
|
||||||
highscore = [accent]New highscore!
|
highscore = [accent]New highscore!
|
||||||
copied = Copied.
|
copied = Copied.
|
||||||
indev.popup = [accent]v6[] is currently in [accent]beta[].\n[lightgray]This means:[]\n[scarlet]- The campaign is unfinished[]\n- SFX and music are unfinished/missing\n- Everything you see is subject to change or removal.\n\nReport bugs or crashes on [accent]Github[].
|
indev.popup = [accent]v6[] is currently in [accent]beta[].\n[lightgray]This means:[]\n[scarlet]- The campaign is unfinished[]\n- Everything you see is subject to change or removal.\n\nReport bugs or crashes on [accent]Github[].
|
||||||
indev.notready = This part of the game isn't ready yet
|
indev.notready = This part of the game isn't ready yet
|
||||||
|
|
||||||
load.sound = Sounds
|
load.sound = Sounds
|
||||||
@@ -57,6 +57,7 @@ schematic.rename = Rename Schematic
|
|||||||
schematic.info = {0}x{1}, {2} blocks
|
schematic.info = {0}x{1}, {2} blocks
|
||||||
schematic.disabled = [scarlet]Schematics disabled[]\nYou are not allowed to use schematics on this [accent]map[] or [accent]server.
|
schematic.disabled = [scarlet]Schematics disabled[]\nYou are not allowed to use schematics on this [accent]map[] or [accent]server.
|
||||||
|
|
||||||
|
stats = Stats
|
||||||
stat.wave = Waves Defeated:[accent] {0}
|
stat.wave = Waves Defeated:[accent] {0}
|
||||||
stat.enemiesDestroyed = Enemies Destroyed:[accent] {0}
|
stat.enemiesDestroyed = Enemies Destroyed:[accent] {0}
|
||||||
stat.built = Buildings Built:[accent] {0}
|
stat.built = Buildings Built:[accent] {0}
|
||||||
@@ -290,6 +291,7 @@ cancelbuilding = [accent][[{0}][] to clear plan
|
|||||||
selectschematic = [accent][[{0}][] to select+copy
|
selectschematic = [accent][[{0}][] to select+copy
|
||||||
pausebuilding = [accent][[{0}][] to pause building
|
pausebuilding = [accent][[{0}][] to pause building
|
||||||
resumebuilding = [scarlet][[{0}][] to resume building
|
resumebuilding = [scarlet][[{0}][] to resume building
|
||||||
|
showui = UI hidden.\nPress [accent][[{0}][] to show UI.
|
||||||
wave = [accent]Wave {0}
|
wave = [accent]Wave {0}
|
||||||
wave.cap = [accent]Wave {0}/{1}
|
wave.cap = [accent]Wave {0}/{1}
|
||||||
wave.waiting = [lightgray]Wave in {0}
|
wave.waiting = [lightgray]Wave in {0}
|
||||||
@@ -297,6 +299,8 @@ wave.waveInProgress = [lightgray]Wave in progress
|
|||||||
waiting = [lightgray]Waiting...
|
waiting = [lightgray]Waiting...
|
||||||
waiting.players = Waiting for players...
|
waiting.players = Waiting for players...
|
||||||
wave.enemies = [lightgray]{0} Enemies Remaining
|
wave.enemies = [lightgray]{0} Enemies Remaining
|
||||||
|
wave.enemycores = [accent]{0}[lightgray] Enemy Cores
|
||||||
|
wave.enemycore = [accent]{0}[lightgray] Enemy Core
|
||||||
wave.enemy = [lightgray]{0} Enemy Remaining
|
wave.enemy = [lightgray]{0} Enemy Remaining
|
||||||
wave.guardianwarn = Guardian approaching in [accent]{0}[] waves.
|
wave.guardianwarn = Guardian approaching in [accent]{0}[] waves.
|
||||||
wave.guardianwarn.one = Guardian approaching in [accent]{0}[] wave.
|
wave.guardianwarn.one = Guardian approaching in [accent]{0}[] wave.
|
||||||
@@ -486,8 +490,8 @@ complete = [lightgray]Complete:
|
|||||||
requirement.wave = Reach Wave {0} in {1}
|
requirement.wave = Reach Wave {0} in {1}
|
||||||
requirement.core = Destroy Enemy Core in {0}
|
requirement.core = Destroy Enemy Core in {0}
|
||||||
requirement.research = Research {0}
|
requirement.research = Research {0}
|
||||||
|
requirement.produce = Produce {0}
|
||||||
requirement.capture = Capture {0}
|
requirement.capture = Capture {0}
|
||||||
bestwave = [lightgray]Best Wave: {0}
|
|
||||||
launch.text = Launch
|
launch.text = Launch
|
||||||
research.multiplayer = Only the host can research items.
|
research.multiplayer = Only the host can research items.
|
||||||
uncover = Uncover
|
uncover = Uncover
|
||||||
@@ -529,13 +533,30 @@ weather.fog.name = Fog
|
|||||||
sectors.unexplored = [lightgray]Unexplored
|
sectors.unexplored = [lightgray]Unexplored
|
||||||
sectors.resources = Resources:
|
sectors.resources = Resources:
|
||||||
sectors.production = Production:
|
sectors.production = Production:
|
||||||
|
sectors.export = Export:
|
||||||
|
sectors.time = Time:
|
||||||
|
sectors.threat = Threat:
|
||||||
|
sectors.wave = Wave:
|
||||||
sectors.stored = Stored:
|
sectors.stored = Stored:
|
||||||
sectors.resume = Resume
|
sectors.resume = Resume
|
||||||
sectors.launch = Launch
|
sectors.launch = Launch
|
||||||
sectors.select = Select
|
sectors.select = Select
|
||||||
sectors.nonelaunch = [lightgray]none (sun)
|
sectors.nonelaunch = [lightgray]none (sun)
|
||||||
sectors.rename = Rename Sector
|
sectors.rename = Rename Sector
|
||||||
|
|
||||||
sector.missingresources = [scarlet]Insufficient Core Resources
|
sector.missingresources = [scarlet]Insufficient Core Resources
|
||||||
|
sector.attacked = Sector [accent]{0}[white] under attack!
|
||||||
|
sector.lost = Sector [accent]{0}[white] lost!
|
||||||
|
#note: the missing space in the line below is intentional
|
||||||
|
sector.captured = Sector [accent]{0}[white]captured!
|
||||||
|
|
||||||
|
threat.low = Low
|
||||||
|
threat.medium = Medium
|
||||||
|
threat.high = High
|
||||||
|
threat.extreme = Extreme
|
||||||
|
threat.eradication = Eradication
|
||||||
|
|
||||||
|
planets = Planets
|
||||||
|
|
||||||
planet.serpulo.name = Serpulo
|
planet.serpulo.name = Serpulo
|
||||||
#TODO better name
|
#TODO better name
|
||||||
@@ -554,6 +575,9 @@ sector.overgrowth.name = Overgrowth
|
|||||||
sector.tarFields.name = Tar Fields
|
sector.tarFields.name = Tar Fields
|
||||||
sector.saltFlats.name = Salt Flats
|
sector.saltFlats.name = Salt Flats
|
||||||
sector.fungalPass.name = Fungal Pass
|
sector.fungalPass.name = Fungal Pass
|
||||||
|
sector.biomassFacility.name = Biomass Synthesis Facility
|
||||||
|
sector.windsweptIslands.name = Windswept Islands
|
||||||
|
sector.extractionOutpost.name = Extraction Outpost
|
||||||
|
|
||||||
#unused
|
#unused
|
||||||
#sector.crags.name = Crags
|
#sector.crags.name = Crags
|
||||||
@@ -628,6 +652,8 @@ stat.memorycapacity = Memory Capacity
|
|||||||
stat.basepowergeneration = Base Power Generation
|
stat.basepowergeneration = Base Power Generation
|
||||||
stat.productiontime = Production Time
|
stat.productiontime = Production Time
|
||||||
stat.repairtime = Block Full Repair Time
|
stat.repairtime = Block Full Repair Time
|
||||||
|
stat.weapons = Weapons
|
||||||
|
stat.bullet = Bullet
|
||||||
stat.speedincrease = Speed Increase
|
stat.speedincrease = Speed Increase
|
||||||
stat.range = Range
|
stat.range = Range
|
||||||
stat.drilltier = Drillables
|
stat.drilltier = Drillables
|
||||||
@@ -697,12 +723,14 @@ units.processorcontrol = [lightgray]Processor Controlled
|
|||||||
bullet.damage = [stat]{0}[lightgray] damage
|
bullet.damage = [stat]{0}[lightgray] damage
|
||||||
bullet.splashdamage = [stat]{0}[lightgray] area dmg ~[stat] {1}[lightgray] tiles
|
bullet.splashdamage = [stat]{0}[lightgray] area dmg ~[stat] {1}[lightgray] tiles
|
||||||
bullet.incendiary = [stat]incendiary
|
bullet.incendiary = [stat]incendiary
|
||||||
|
bullet.sapping = [stat]sapping
|
||||||
bullet.homing = [stat]homing
|
bullet.homing = [stat]homing
|
||||||
bullet.shock = [stat]shock
|
bullet.shock = [stat]shock
|
||||||
bullet.frag = [stat]frag
|
bullet.frag = [stat]frag
|
||||||
bullet.knockback = [stat]{0}[lightgray] knockback
|
bullet.knockback = [stat]{0}[lightgray] knockback
|
||||||
bullet.pierce = [stat]{0}[lightgray]x pierce
|
bullet.pierce = [stat]{0}[lightgray]x pierce
|
||||||
bullet.infinitepierce = [stat]pierce
|
bullet.infinitepierce = [stat]pierce
|
||||||
|
bullet.healpercent = [stat]{0}[lightgray]% healing
|
||||||
bullet.freezing = [stat]freezing
|
bullet.freezing = [stat]freezing
|
||||||
bullet.tarred = [stat]tarred
|
bullet.tarred = [stat]tarred
|
||||||
bullet.multiplier = [stat]{0}[lightgray]x ammo multiplier
|
bullet.multiplier = [stat]{0}[lightgray]x ammo multiplier
|
||||||
@@ -922,6 +950,7 @@ content.item.name = Items
|
|||||||
content.liquid.name = Liquids
|
content.liquid.name = Liquids
|
||||||
content.unit.name = Units
|
content.unit.name = Units
|
||||||
content.block.name = Blocks
|
content.block.name = Blocks
|
||||||
|
content.sector.name = Sectors
|
||||||
|
|
||||||
item.copper.name = Copper
|
item.copper.name = Copper
|
||||||
item.lead.name = Lead
|
item.lead.name = Lead
|
||||||
@@ -1236,7 +1265,7 @@ item.coal.description = Used for fuel and refined material production.
|
|||||||
item.coal.details = Appears to be fossilized plant matter, formed long before the seeding event.
|
item.coal.details = Appears to be fossilized plant matter, formed long before the seeding event.
|
||||||
item.titanium.description = Used in liquid transportation structures, drills and aircraft.
|
item.titanium.description = Used in liquid transportation structures, drills and aircraft.
|
||||||
item.thorium.description = Used in durable structures and as nuclear fuel.
|
item.thorium.description = Used in durable structures and as nuclear fuel.
|
||||||
item.scrap.description = Melted down and refined into other materials.
|
item.scrap.description = Used in Melters and Pulverizers for refining into other materials.
|
||||||
item.scrap.details = Leftover remnants of old structures and units.
|
item.scrap.details = Leftover remnants of old structures and units.
|
||||||
item.silicon.description = Used in solar panels, complex electronics and homing turret ammunition.
|
item.silicon.description = Used in solar panels, complex electronics and homing turret ammunition.
|
||||||
item.plastanium.description = Used in advanced units, insulation and fragmentation ammunition.
|
item.plastanium.description = Used in advanced units, insulation and fragmentation ammunition.
|
||||||
|
|||||||
BIN
core/assets/maps/biomassFacility.msav
Normal file
BIN
core/assets/maps/extractionOutpost.msav
Normal file
BIN
core/assets/maps/windsweptIslands.msav
Normal file
@@ -1,13 +1,18 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const log = function(context, obj){
|
const log = function(context, obj){
|
||||||
Vars.mods.getScripts().log(context, String(obj))
|
Vars.mods.scripts.log(context, String(obj))
|
||||||
}
|
}
|
||||||
|
|
||||||
const readString = path => Vars.mods.getScripts().readString(path)
|
const readString = path => Vars.mods.scripts.readString(path)
|
||||||
const readBytes = path => Vars.mods.getScripts().readBytes(path)
|
const readBytes = path => Vars.mods.scripts.readBytes(path)
|
||||||
const loadMusic = path => Vars.mods.getScripts().loadMusic(path)
|
const loadMusic = path => Vars.mods.scripts.loadMusic(path)
|
||||||
const loadSound = path => Vars.mods.getScripts().loadSound(path)
|
const loadSound = path => Vars.mods.scripts.loadSound(path)
|
||||||
|
|
||||||
|
const readFile = (purpose, ext, cons) => Vars.mods.scripts.readFile(purpose, ext, cons);
|
||||||
|
const readBinFile = (purpose, ext, cons) => Vars.mods.scripts.readBinFile(purpose, ext, cons);
|
||||||
|
const writeFile = (purpose, ext, str) => Vars.mods.scripts.writeFile(purpose, ext, str);
|
||||||
|
const writeBinFile = (purpose, ext, bytes) => Vars.mods.scripts.writeBinFile(purpose, ext, bytes);
|
||||||
|
|
||||||
let scriptName = "base.js"
|
let scriptName = "base.js"
|
||||||
let modName = "none"
|
let modName = "none"
|
||||||
|
|||||||
@@ -11,6 +11,11 @@ const readBytes = path => Vars.mods.getScripts().readBytes(path)
|
|||||||
const loadMusic = path => Vars.mods.getScripts().loadMusic(path)
|
const loadMusic = path => Vars.mods.getScripts().loadMusic(path)
|
||||||
const loadSound = path => Vars.mods.getScripts().loadSound(path)
|
const loadSound = path => Vars.mods.getScripts().loadSound(path)
|
||||||
|
|
||||||
|
const readFile = (purpose, ext, cons) => Vars.mods.scripts.readFile(purpose, ext, cons);
|
||||||
|
const readBinFile = (purpose, ext, cons) => Vars.mods.scripts.readBinFile(purpose, ext, cons);
|
||||||
|
const writeFile = (purpose, ext, str) => Vars.mods.scripts.writeFile(purpose, ext, str);
|
||||||
|
const writeBinFile = (purpose, ext, bytes) => Vars.mods.scripts.writeBinFile(purpose, ext, bytes);
|
||||||
|
|
||||||
let scriptName = "base.js"
|
let scriptName = "base.js"
|
||||||
let modName = "none"
|
let modName = "none"
|
||||||
|
|
||||||
|
|||||||
BIN
core/assets/sounds/noammo.ogg
Normal file
|
Before Width: | Height: | Size: 917 KiB After Width: | Height: | Size: 944 KiB |
|
Before Width: | Height: | Size: 608 KiB After Width: | Height: | Size: 596 KiB |
|
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 186 KiB |
|
Before Width: | Height: | Size: 2.9 MiB After Width: | Height: | Size: 2.9 MiB |
|
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 188 KiB |
@@ -9,6 +9,7 @@ import arc.graphics.g2d.*;
|
|||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import arc.util.async.*;
|
import arc.util.async.*;
|
||||||
|
import mindustry.ai.*;
|
||||||
import mindustry.core.*;
|
import mindustry.core.*;
|
||||||
import mindustry.ctype.*;
|
import mindustry.ctype.*;
|
||||||
import mindustry.game.EventType.*;
|
import mindustry.game.EventType.*;
|
||||||
@@ -45,7 +46,6 @@ public abstract class ClientLauncher extends ApplicationCore implements Platform
|
|||||||
//debug GL information
|
//debug GL information
|
||||||
Log.info("[GL] Version: @", graphics.getGLVersion());
|
Log.info("[GL] Version: @", graphics.getGLVersion());
|
||||||
Log.info("[GL] Max texture size: @", Gl.getInt(Gl.maxTextureSize));
|
Log.info("[GL] Max texture size: @", Gl.getInt(Gl.maxTextureSize));
|
||||||
Log.info("[GL] Max vert/frag shader FP precision: @ / @", Gl.getShaderPrecision(Gl.vertexShader, Gl.highFloat), Gl.getShaderPrecision(Gl.fragmentShader, Gl.highFloat));
|
|
||||||
Log.info("[GL] Using @ context.", gl30 != null ? "OpenGL 3" : "OpenGL 2");
|
Log.info("[GL] Using @ context.", gl30 != null ? "OpenGL 3" : "OpenGL 2");
|
||||||
Log.info("[JAVA] Version: @", System.getProperty("java.version"));
|
Log.info("[JAVA] Version: @", System.getProperty("java.version"));
|
||||||
|
|
||||||
@@ -104,6 +104,7 @@ public abstract class ClientLauncher extends ApplicationCore implements Platform
|
|||||||
assets.load(schematics);
|
assets.load(schematics);
|
||||||
|
|
||||||
assets.loadRun("contentinit", ContentLoader.class, () -> content.init(), () -> content.load());
|
assets.loadRun("contentinit", ContentLoader.class, () -> content.init(), () -> content.load());
|
||||||
|
assets.loadRun("baseparts", BaseRegistry.class, () -> {}, () -> bases.load());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -10,11 +10,10 @@ import arc.util.*;
|
|||||||
import arc.util.Log.*;
|
import arc.util.Log.*;
|
||||||
import mindustry.ai.*;
|
import mindustry.ai.*;
|
||||||
import mindustry.async.*;
|
import mindustry.async.*;
|
||||||
import mindustry.audio.*;
|
|
||||||
import mindustry.core.*;
|
import mindustry.core.*;
|
||||||
import mindustry.entities.*;
|
import mindustry.entities.*;
|
||||||
import mindustry.game.*;
|
|
||||||
import mindustry.game.EventType.*;
|
import mindustry.game.EventType.*;
|
||||||
|
import mindustry.game.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.input.*;
|
import mindustry.input.*;
|
||||||
import mindustry.io.*;
|
import mindustry.io.*;
|
||||||
@@ -188,7 +187,6 @@ public class Vars implements Loadable{
|
|||||||
public static GameState state;
|
public static GameState state;
|
||||||
public static EntityCollisions collisions;
|
public static EntityCollisions collisions;
|
||||||
public static Waves waves;
|
public static Waves waves;
|
||||||
public static LoopControl loops;
|
|
||||||
public static Platform platform = new Platform(){};
|
public static Platform platform = new Platform(){};
|
||||||
public static Mods mods;
|
public static Mods mods;
|
||||||
public static Schematics schematics;
|
public static Schematics schematics;
|
||||||
@@ -235,6 +233,7 @@ public class Vars implements Loadable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
Arrays.sort(locales, Structs.comparing(l -> l.getDisplayName(l), String.CASE_INSENSITIVE_ORDER));
|
Arrays.sort(locales, Structs.comparing(l -> l.getDisplayName(l), String.CASE_INSENSITIVE_ORDER));
|
||||||
|
locales = Seq.with(locales).and(new Locale("router")).toArray(Locale.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
Version.init();
|
Version.init();
|
||||||
@@ -255,7 +254,6 @@ public class Vars implements Loadable{
|
|||||||
if(mods == null) mods = new Mods();
|
if(mods == null) mods = new Mods();
|
||||||
|
|
||||||
content = new ContentLoader();
|
content = new ContentLoader();
|
||||||
loops = new LoopControl();
|
|
||||||
waves = new Waves();
|
waves = new Waves();
|
||||||
collisions = new EntityCollisions();
|
collisions = new EntityCollisions();
|
||||||
world = new World();
|
world = new World();
|
||||||
@@ -392,6 +390,11 @@ public class Vars implements Loadable{
|
|||||||
|
|
||||||
Locale.setDefault(locale);
|
Locale.setDefault(locale);
|
||||||
Core.bundle = I18NBundle.createBundle(handle, locale);
|
Core.bundle = I18NBundle.createBundle(handle, locale);
|
||||||
|
|
||||||
|
//router
|
||||||
|
if(locale.getDisplayName().equals("router")){
|
||||||
|
bundle.debug("router");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class BaseAI{
|
|||||||
}
|
}
|
||||||
|
|
||||||
//only schedule when there's something to build.
|
//only schedule when there's something to build.
|
||||||
if(data.blocks.isEmpty() && timer.get(timerStep, step)){
|
if(data.blocks.isEmpty() && timer.get(timerStep, Mathf.lerp(20f, 4f, data.team.rules().aiTier))){
|
||||||
if(!triedWalls){
|
if(!triedWalls){
|
||||||
tryWalls();
|
tryWalls();
|
||||||
triedWalls = true;
|
triedWalls = true;
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class BaseRegistry{
|
|||||||
}
|
}
|
||||||
schem.tiles.removeAll(s -> s.block.buildVisibility == BuildVisibility.sandboxOnly);
|
schem.tiles.removeAll(s -> s.block.buildVisibility == BuildVisibility.sandboxOnly);
|
||||||
|
|
||||||
part.tier = schem.tiles.sumf(s -> Mathf.pow(s.block.buildCost / s.block.buildCostMultiplier, 1.2f));
|
part.tier = schem.tiles.sumf(s -> Mathf.pow(s.block.buildCost / s.block.buildCostMultiplier, 1.4f));
|
||||||
|
|
||||||
if(part.core != null){
|
if(part.core != null){
|
||||||
cores.add(part);
|
cores.add(part);
|
||||||
@@ -99,7 +99,9 @@ public class BaseRegistry{
|
|||||||
part.centerY = part.schematic.height/2;
|
part.centerY = part.schematic.height/2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(part.required != null) reqParts.get(part.required, Seq::new).add(part);
|
if(part.required != null && part.core == null){
|
||||||
|
reqParts.get(part.required, Seq::new).add(part);
|
||||||
|
}
|
||||||
|
|
||||||
}catch(IOException e){
|
}catch(IOException e){
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|||||||
@@ -56,18 +56,7 @@ public class BlockIndexer{
|
|||||||
|
|
||||||
public BlockIndexer(){
|
public BlockIndexer(){
|
||||||
Events.on(TileChangeEvent.class, event -> {
|
Events.on(TileChangeEvent.class, event -> {
|
||||||
if(typeMap.get(event.tile.pos()) != null){
|
updateIndices(event.tile);
|
||||||
TileIndex index = typeMap.get(event.tile.pos());
|
|
||||||
for(BlockFlag flag : index.flags){
|
|
||||||
getFlagged(index.team)[flag.ordinal()].remove(event.tile);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(index.flags.contains(BlockFlag.unitModifier)){
|
|
||||||
updateCap(index.team);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
process(event.tile);
|
|
||||||
updateQuadrant(event.tile);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Events.on(WorldLoadEvent.class, event -> {
|
Events.on(WorldLoadEvent.class, event -> {
|
||||||
@@ -111,6 +100,21 @@ public class BlockIndexer{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updateIndices(Tile tile){
|
||||||
|
if(typeMap.get(tile.pos()) != null){
|
||||||
|
TileIndex index = typeMap.get(tile.pos());
|
||||||
|
for(BlockFlag flag : index.flags){
|
||||||
|
getFlagged(index.team)[flag.ordinal()].remove(tile);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(index.flags.contains(BlockFlag.unitModifier)){
|
||||||
|
updateCap(index.team);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
process(tile);
|
||||||
|
updateQuadrant(tile);
|
||||||
|
}
|
||||||
|
|
||||||
private TileArray[] getFlagged(Team team){
|
private TileArray[] getFlagged(Team team){
|
||||||
return flagMap[team.id];
|
return flagMap[team.id];
|
||||||
}
|
}
|
||||||
@@ -208,16 +212,30 @@ public class BlockIndexer{
|
|||||||
public Seq<Tile> getEnemy(Team team, BlockFlag type){
|
public Seq<Tile> getEnemy(Team team, BlockFlag type){
|
||||||
returnArray.clear();
|
returnArray.clear();
|
||||||
Seq<TeamData> data = state.teams.present;
|
Seq<TeamData> data = state.teams.present;
|
||||||
for(int i = 0; i < data.size; i++){
|
//when team data is not initialized, scan through every team. this is terrible
|
||||||
Team enemy = data.items[i].team;
|
if(data.isEmpty()){
|
||||||
if(enemy == team) continue;
|
for(Team enemy : Team.all){
|
||||||
TileArray set = getFlagged(enemy)[type.ordinal()];
|
if(enemy == team) continue;
|
||||||
if(set != null){
|
TileArray set = getFlagged(enemy)[type.ordinal()];
|
||||||
for(Tile tile : set){
|
if(set != null){
|
||||||
returnArray.add(tile);
|
for(Tile tile : set){
|
||||||
|
returnArray.add(tile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
for(int i = 0; i < data.size; i++){
|
||||||
|
Team enemy = data.items[i].team;
|
||||||
|
if(enemy == team) continue;
|
||||||
|
TileArray set = getFlagged(enemy)[type.ordinal()];
|
||||||
|
if(set != null){
|
||||||
|
for(Tile tile : set){
|
||||||
|
returnArray.add(tile);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return returnArray;
|
return returnArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -233,7 +251,7 @@ public class BlockIndexer{
|
|||||||
for(int i = 0; i < activeTeams.size; i++){
|
for(int i = 0; i < activeTeams.size; i++){
|
||||||
Team enemy = activeTeams.items[i];
|
Team enemy = activeTeams.items[i];
|
||||||
|
|
||||||
if(enemy == team) continue;
|
if(enemy == team || team == Team.derelict) continue;
|
||||||
|
|
||||||
Building entity = indexer.findTile(enemy, x, y, range, pred, true);
|
Building entity = indexer.findTile(enemy, x, y, range, pred, true);
|
||||||
if(entity != null){
|
if(entity != null){
|
||||||
@@ -262,10 +280,7 @@ public class BlockIndexer{
|
|||||||
for(int ty = ry * quadrantSize; ty < (ry + 1) * quadrantSize && ty < world.height(); ty++){
|
for(int ty = ry * quadrantSize; ty < (ry + 1) * quadrantSize && ty < world.height(); ty++){
|
||||||
Building e = world.build(tx, ty);
|
Building e = world.build(tx, ty);
|
||||||
|
|
||||||
if(e == null) continue;
|
if(e == null || e.team != team || !pred.get(e) || !e.block.targetable || e.team == Team.derelict) continue;
|
||||||
|
|
||||||
if(e.team != team || !pred.get(e) || !e.block.targetable)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
float ndst = e.dst2(x, y);
|
float ndst = e.dst2(x, y);
|
||||||
if(ndst < range2 && (closest == null ||
|
if(ndst < range2 && (closest == null ||
|
||||||
|
|||||||
@@ -351,13 +351,7 @@ public class Pathfinder implements Runnable{
|
|||||||
threadList.add(path);
|
threadList.add(path);
|
||||||
|
|
||||||
//add to main thread's list of paths
|
//add to main thread's list of paths
|
||||||
Core.app.post(() -> {
|
Core.app.post(() -> mainList.add(path));
|
||||||
mainList.add(path);
|
|
||||||
//TODO
|
|
||||||
//if(fieldMap[team.id] != null){
|
|
||||||
// fieldMap[team.id].put(target, path);
|
|
||||||
//}
|
|
||||||
});
|
|
||||||
|
|
||||||
//fill with impassables by default
|
//fill with impassables by default
|
||||||
for(int x = 0; x < world.width(); x++){
|
for(int x = 0; x < world.width(); x++){
|
||||||
|
|||||||
@@ -1,67 +0,0 @@
|
|||||||
package mindustry.audio;
|
|
||||||
|
|
||||||
import arc.*;
|
|
||||||
import arc.audio.*;
|
|
||||||
import arc.math.*;
|
|
||||||
import arc.math.geom.*;
|
|
||||||
import arc.struct.*;
|
|
||||||
import mindustry.*;
|
|
||||||
|
|
||||||
public class LoopControl{
|
|
||||||
private ObjectMap<Sound, SoundData> sounds = new ObjectMap<>();
|
|
||||||
|
|
||||||
public void play(Sound sound, float volume){
|
|
||||||
if(Vars.headless) return;
|
|
||||||
|
|
||||||
play(sound, Core.camera.position, volume);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void play(Sound sound, Position pos, float volume){
|
|
||||||
if(Vars.headless) return;
|
|
||||||
|
|
||||||
float baseVol = sound.calcFalloff(pos.getX(), pos.getY());
|
|
||||||
float vol = baseVol * volume;
|
|
||||||
|
|
||||||
SoundData data = sounds.get(sound, SoundData::new);
|
|
||||||
data.volume += vol;
|
|
||||||
data.volume = Mathf.clamp(data.volume, 0f, 1f);
|
|
||||||
data.total += baseVol;
|
|
||||||
data.sum.add(pos.getX() * baseVol, pos.getY() * baseVol);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void update(){
|
|
||||||
float avol = Core.settings.getInt("ambientvol", 100) / 100f;
|
|
||||||
|
|
||||||
sounds.each((sound, data) -> {
|
|
||||||
data.curVolume = Mathf.lerpDelta(data.curVolume, data.volume * avol, 0.2f);
|
|
||||||
|
|
||||||
boolean play = data.curVolume > 0.01f;
|
|
||||||
float pan = Mathf.zero(data.total, 0.0001f) ? 0f : sound.calcPan(data.sum.x / data.total, data.sum.y / data.total);
|
|
||||||
if(data.soundID <= 0 || !sound.isPlaying(data.soundID)){
|
|
||||||
if(play){
|
|
||||||
data.soundID = sound.loop(data.curVolume, 1f, pan);
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
if(data.curVolume <= 0.001f){
|
|
||||||
sound.stop();
|
|
||||||
data.soundID = -1;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
sound.set(data.soundID, pan, data.curVolume);
|
|
||||||
}
|
|
||||||
|
|
||||||
data.volume = 0f;
|
|
||||||
data.total = 0f;
|
|
||||||
data.sum.setZero();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private static class SoundData{
|
|
||||||
float volume;
|
|
||||||
float total;
|
|
||||||
Vec2 sum = new Vec2();
|
|
||||||
|
|
||||||
int soundID;
|
|
||||||
float curVolume;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2,18 +2,21 @@ package mindustry.audio;
|
|||||||
|
|
||||||
import arc.*;
|
import arc.*;
|
||||||
import arc.audio.*;
|
import arc.audio.*;
|
||||||
import arc.audio.SoloudAudio.*;
|
import arc.audio.Filters.*;
|
||||||
|
import arc.files.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
|
import arc.math.geom.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
|
import mindustry.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
import mindustry.game.EventType.*;
|
import mindustry.game.EventType.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
|
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
/** Controls playback of multiple music tracks.*/
|
/** Controls playback of multiple audio tracks.*/
|
||||||
public class MusicControl{
|
public class SoundControl{
|
||||||
protected static final float finTime = 120f, foutTime = 120f, musicInterval = 60 * 60 * 3f, musicChance = 0.6f, musicWaveChance = 0.46f;
|
protected static final float finTime = 120f, foutTime = 120f, musicInterval = 60 * 60 * 3f, musicChance = 0.6f, musicWaveChance = 0.46f;
|
||||||
|
|
||||||
/** normal, ambient music, plays at any time */
|
/** normal, ambient music, plays at any time */
|
||||||
@@ -29,12 +32,15 @@ public class MusicControl{
|
|||||||
protected float fade;
|
protected float fade;
|
||||||
protected boolean silenced;
|
protected boolean silenced;
|
||||||
|
|
||||||
protected boolean wasPaused;
|
protected AudioBus uiBus = new AudioBus();
|
||||||
|
protected boolean wasPaused, wasPlaying;
|
||||||
protected AudioFilter filter = new BiquadFilter(){{
|
protected AudioFilter filter = new BiquadFilter(){{
|
||||||
set(0, 500, 1);
|
set(0, 500, 1);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
public MusicControl(){
|
protected ObjectMap<Sound, SoundData> sounds = new ObjectMap<>();
|
||||||
|
|
||||||
|
public SoundControl(){
|
||||||
Events.on(ClientLoadEvent.class, e -> reload());
|
Events.on(ClientLoadEvent.class, e -> reload());
|
||||||
|
|
||||||
//only run music 10 seconds after a wave spawns
|
//only run music 10 seconds after a wave spawns
|
||||||
@@ -47,6 +53,13 @@ public class MusicControl{
|
|||||||
playRandom();
|
playRandom();
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
setupFilters();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setupFilters(){
|
||||||
|
Core.audio.soundBus.setFilter(0, filter);
|
||||||
|
Core.audio.soundBus.setFilterParam(0, Filters.paramWet, 0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void reload(){
|
protected void reload(){
|
||||||
@@ -55,6 +68,33 @@ public class MusicControl{
|
|||||||
ambientMusic = Seq.with(Musics.game1, Musics.game3, Musics.game6, Musics.game8, Musics.game9);
|
ambientMusic = Seq.with(Musics.game1, Musics.game3, Musics.game6, Musics.game8, Musics.game9);
|
||||||
darkMusic = Seq.with(Musics.game2, Musics.game5, Musics.game7, Musics.game4);
|
darkMusic = Seq.with(Musics.game2, Musics.game5, Musics.game7, Musics.game4);
|
||||||
bossMusic = Seq.with(Musics.boss1, Musics.boss2, Musics.game2, Musics.game5);
|
bossMusic = Seq.with(Musics.boss1, Musics.boss2, Musics.game2, Musics.game5);
|
||||||
|
|
||||||
|
//setup UI bus for all sounds that are in the UI folder
|
||||||
|
for(var sound : Core.assets.getAll(Sound.class, new Seq<>())){
|
||||||
|
var file = Fi.get(Core.assets.getAssetFileName(sound));
|
||||||
|
if(file.parent().name().equals("ui")){
|
||||||
|
sound.setBus(uiBus);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void loop(Sound sound, float volume){
|
||||||
|
if(Vars.headless) return;
|
||||||
|
|
||||||
|
loop(sound, Core.camera.position, volume);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void loop(Sound sound, Position pos, float volume){
|
||||||
|
if(Vars.headless) return;
|
||||||
|
|
||||||
|
float baseVol = sound.calcFalloff(pos.getX(), pos.getY());
|
||||||
|
float vol = baseVol * volume;
|
||||||
|
|
||||||
|
SoundData data = sounds.get(sound, SoundData::new);
|
||||||
|
data.volume += vol;
|
||||||
|
data.volume = Mathf.clamp(data.volume, 0f, 1f);
|
||||||
|
data.total += baseVol;
|
||||||
|
data.sum.add(pos.getX() * baseVol, pos.getY() * baseVol);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void stop(){
|
public void stop(){
|
||||||
@@ -69,10 +109,30 @@ public class MusicControl{
|
|||||||
/** Update and play the right music track.*/
|
/** Update and play the right music track.*/
|
||||||
public void update(){
|
public void update(){
|
||||||
boolean paused = state.isGame() && Core.scene.hasDialog();
|
boolean paused = state.isGame() && Core.scene.hasDialog();
|
||||||
|
boolean playing = state.isGame();
|
||||||
|
|
||||||
|
//check if current track is finished
|
||||||
|
if(current != null && !current.isPlaying()){
|
||||||
|
current = null;
|
||||||
|
fade = 0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
//fade the lowpass filter in/out
|
||||||
if(paused != wasPaused){
|
if(paused != wasPaused){
|
||||||
Core.audio.setFilter(0, paused ? filter : null);
|
|
||||||
wasPaused = paused;
|
wasPaused = paused;
|
||||||
|
Core.audio.soundBus.fadeFilterParam(0, Filters.paramWet, paused ? 1f : 0f, 0.4f);
|
||||||
|
}
|
||||||
|
|
||||||
|
//play/stop ordinary effects
|
||||||
|
if(playing != wasPlaying){
|
||||||
|
wasPlaying = playing;
|
||||||
|
|
||||||
|
if(playing){
|
||||||
|
Core.audio.soundBus.play();
|
||||||
|
setupFilters();
|
||||||
|
}else{
|
||||||
|
Core.audio.soundBus.stop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(state.isMenu()){
|
if(state.isMenu()){
|
||||||
@@ -99,6 +159,42 @@ public class MusicControl{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateLoops();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void updateLoops(){
|
||||||
|
//clear loops when in menu
|
||||||
|
if(!state.isGame()){
|
||||||
|
sounds.clear();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
float avol = Core.settings.getInt("ambientvol", 100) / 100f;
|
||||||
|
|
||||||
|
sounds.each((sound, data) -> {
|
||||||
|
data.curVolume = Mathf.lerpDelta(data.curVolume, data.volume * avol, 0.2f);
|
||||||
|
|
||||||
|
boolean play = data.curVolume > 0.01f;
|
||||||
|
float pan = Mathf.zero(data.total, 0.0001f) ? 0f : sound.calcPan(data.sum.x / data.total, data.sum.y / data.total);
|
||||||
|
if(data.soundID <= 0 || !Core.audio.isPlaying(data.soundID)){
|
||||||
|
if(play){
|
||||||
|
data.soundID = sound.loop(data.curVolume, 1f, pan);
|
||||||
|
Core.audio.protect(data.soundID, true);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(data.curVolume <= 0.001f){
|
||||||
|
sound.stop();
|
||||||
|
data.soundID = -1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Core.audio.set(data.soundID, pan, data.curVolume);
|
||||||
|
}
|
||||||
|
|
||||||
|
data.volume = 0f;
|
||||||
|
data.total = 0f;
|
||||||
|
data.sum.setZero();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Plays a random track.*/
|
/** Plays a random track.*/
|
||||||
@@ -191,12 +287,6 @@ public class MusicControl{
|
|||||||
current = music;
|
current = music;
|
||||||
current.setVolume(1f);
|
current.setVolume(1f);
|
||||||
current.setLooping(false);
|
current.setLooping(false);
|
||||||
current.setCompletionListener(m -> {
|
|
||||||
if(current == m){
|
|
||||||
current = null;
|
|
||||||
fade = 0f;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
current.play();
|
current.play();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,4 +298,13 @@ public class MusicControl{
|
|||||||
protected void silence(){
|
protected void silence(){
|
||||||
play(null);
|
play(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected static class SoundData{
|
||||||
|
float volume;
|
||||||
|
float total;
|
||||||
|
Vec2 sum = new Vec2();
|
||||||
|
|
||||||
|
int soundID;
|
||||||
|
float curVolume;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package mindustry.audio;
|
package mindustry.audio;
|
||||||
|
|
||||||
|
import arc.*;
|
||||||
import arc.audio.*;
|
import arc.audio.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
@@ -31,19 +32,19 @@ public class SoundLoop{
|
|||||||
}else{
|
}else{
|
||||||
volume = Mathf.clamp(volume - fadeSpeed * Time.delta);
|
volume = Mathf.clamp(volume - fadeSpeed * Time.delta);
|
||||||
if(volume <= 0.001f){
|
if(volume <= 0.001f){
|
||||||
sound.stop(id);
|
Core.audio.stop(id);
|
||||||
id = -1;
|
id = -1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sound.set(id, sound.calcPan(x, y), sound.calcVolume(x, y) * volume * baseVolume);
|
Core.audio.set(id, sound.calcPan(x, y), sound.calcVolume(x, y) * volume * baseVolume);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void stop(){
|
public void stop(){
|
||||||
if(id != -1){
|
if(id != -1){
|
||||||
sound.stop(id);
|
Core.audio.stop(id);
|
||||||
id = -1;
|
id = -1;
|
||||||
volume = baseVolume = -1;
|
volume = baseVolume = -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -728,7 +728,7 @@ public class Blocks implements ContentList{
|
|||||||
hasItems = hasPower = true;
|
hasItems = hasPower = true;
|
||||||
drawer = new DrawRotator();
|
drawer = new DrawRotator();
|
||||||
ambientSound = Sounds.grinding;
|
ambientSound = Sounds.grinding;
|
||||||
ambientSoundVolume = 0.02f;
|
ambientSoundVolume = 0.025f;
|
||||||
|
|
||||||
consumes.item(Items.scrap, 1);
|
consumes.item(Items.scrap, 1);
|
||||||
consumes.power(0.50f);
|
consumes.power(0.50f);
|
||||||
@@ -1179,7 +1179,7 @@ public class Blocks implements ContentList{
|
|||||||
size = 2;
|
size = 2;
|
||||||
floating = true;
|
floating = true;
|
||||||
ambientSound = Sounds.hum;
|
ambientSound = Sounds.hum;
|
||||||
ambientSoundVolume = 0.04f;
|
ambientSoundVolume = 0.06f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
steamGenerator = new BurnerGenerator("steam-generator"){{
|
steamGenerator = new BurnerGenerator("steam-generator"){{
|
||||||
@@ -1217,19 +1217,19 @@ public class Blocks implements ContentList{
|
|||||||
|
|
||||||
solarPanel = new SolarGenerator("solar-panel"){{
|
solarPanel = new SolarGenerator("solar-panel"){{
|
||||||
requirements(Category.power, with(Items.lead, 10, Items.silicon, 15));
|
requirements(Category.power, with(Items.lead, 10, Items.silicon, 15));
|
||||||
powerProduction = 0.07f;
|
powerProduction = 0.08f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
largeSolarPanel = new SolarGenerator("solar-panel-large"){{
|
largeSolarPanel = new SolarGenerator("solar-panel-large"){{
|
||||||
requirements(Category.power, with(Items.lead, 100, Items.silicon, 145, Items.phaseFabric, 15));
|
requirements(Category.power, with(Items.lead, 100, Items.silicon, 145, Items.phaseFabric, 15));
|
||||||
size = 3;
|
size = 3;
|
||||||
powerProduction = 0.95f;
|
powerProduction = 1f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
thoriumReactor = new NuclearReactor("thorium-reactor"){{
|
thoriumReactor = new NuclearReactor("thorium-reactor"){{
|
||||||
requirements(Category.power, with(Items.lead, 300, Items.silicon, 200, Items.graphite, 150, Items.thorium, 150, Items.metaglass, 50));
|
requirements(Category.power, with(Items.lead, 300, Items.silicon, 200, Items.graphite, 150, Items.thorium, 150, Items.metaglass, 50));
|
||||||
ambientSound = Sounds.hum;
|
ambientSound = Sounds.hum;
|
||||||
ambientSoundVolume = 0.2f;
|
ambientSoundVolume = 0.24f;
|
||||||
size = 3;
|
size = 3;
|
||||||
health = 700;
|
health = 700;
|
||||||
itemDuration = 360f;
|
itemDuration = 360f;
|
||||||
@@ -1354,7 +1354,7 @@ public class Blocks implements ContentList{
|
|||||||
//region storage
|
//region storage
|
||||||
|
|
||||||
coreShard = new CoreBlock("core-shard"){{
|
coreShard = new CoreBlock("core-shard"){{
|
||||||
requirements(Category.effect, BuildVisibility.editorOnly, with(Items.copper, 1500, Items.lead, 1000));
|
requirements(Category.effect, BuildVisibility.editorOnly, with(Items.copper, 1000, Items.lead, 1000));
|
||||||
alwaysUnlocked = true;
|
alwaysUnlocked = true;
|
||||||
|
|
||||||
unitType = UnitTypes.alpha;
|
unitType = UnitTypes.alpha;
|
||||||
|
|||||||
@@ -358,6 +358,7 @@ public class Bullets implements ContentList{
|
|||||||
shootEffect = Fx.shootBig;
|
shootEffect = Fx.shootBig;
|
||||||
pierceCap = 2;
|
pierceCap = 2;
|
||||||
pierceBuilding = true;
|
pierceBuilding = true;
|
||||||
|
knockback = 0.7f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
standardIncendiaryBig = new BasicBulletType(7f, 60, "bullet"){{
|
standardIncendiaryBig = new BasicBulletType(7f, 60, "bullet"){{
|
||||||
@@ -370,6 +371,7 @@ public class Bullets implements ContentList{
|
|||||||
makeFire = true;
|
makeFire = true;
|
||||||
pierceCap = 2;
|
pierceCap = 2;
|
||||||
pierceBuilding = true;
|
pierceBuilding = true;
|
||||||
|
knockback = 0.7f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
healBullet = new LaserBoltBulletType(5.2f, 13){{
|
healBullet = new LaserBoltBulletType(5.2f, 13){{
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import static mindustry.content.Planets.*;
|
|||||||
public class SectorPresets implements ContentList{
|
public class SectorPresets implements ContentList{
|
||||||
public static SectorPreset
|
public static SectorPreset
|
||||||
groundZero,
|
groundZero,
|
||||||
craters, frozenForest, ruinousShores, stainedMountains, tarFields, fungalPass,
|
craters, biomassFacility, frozenForest, ruinousShores, windsweptIslands, stainedMountains, tarFields,
|
||||||
saltFlats, overgrowth,
|
fungalPass, extractionOutpost, saltFlats, overgrowth,
|
||||||
impact0078, desolateRift, nuclearComplex;
|
impact0078, desolateRift, nuclearComplex;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -31,6 +31,11 @@ public class SectorPresets implements ContentList{
|
|||||||
difficulty = 2;
|
difficulty = 2;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
biomassFacility = new SectorPreset("biomassFacility", serpulo, 81){{
|
||||||
|
captureWave = 20;
|
||||||
|
difficulty = 3;
|
||||||
|
}};
|
||||||
|
|
||||||
craters = new SectorPreset("craters", serpulo, 18){{
|
craters = new SectorPreset("craters", serpulo, 18){{
|
||||||
captureWave = 20;
|
captureWave = 20;
|
||||||
difficulty = 2;
|
difficulty = 2;
|
||||||
@@ -41,16 +46,27 @@ public class SectorPresets implements ContentList{
|
|||||||
difficulty = 3;
|
difficulty = 3;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
windsweptIslands = new SectorPreset("windsweptIslands", serpulo, 246){{
|
||||||
|
captureWave = 30;
|
||||||
|
difficulty = 4;
|
||||||
|
}};
|
||||||
|
|
||||||
stainedMountains = new SectorPreset("stainedMountains", serpulo, 20){{
|
stainedMountains = new SectorPreset("stainedMountains", serpulo, 20){{
|
||||||
captureWave = 30;
|
captureWave = 30;
|
||||||
difficulty = 3;
|
difficulty = 3;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
fungalPass = new SectorPreset("fungalPass", serpulo, 21){{
|
extractionOutpost = new SectorPreset("extractionOutpost", serpulo, 165){{
|
||||||
difficulty = 4;
|
difficulty = 5;
|
||||||
|
useAI = false;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
overgrowth = new SectorPreset("overgrowth", serpulo, 22){{
|
fungalPass = new SectorPreset("fungalPass", serpulo, 21){{
|
||||||
|
difficulty = 4;
|
||||||
|
useAI = false;
|
||||||
|
}};
|
||||||
|
|
||||||
|
overgrowth = new SectorPreset("overgrowth", serpulo, 134){{
|
||||||
difficulty = 5;
|
difficulty = 5;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import static mindustry.content.Blocks.*;
|
|||||||
import static mindustry.content.SectorPresets.craters;
|
import static mindustry.content.SectorPresets.craters;
|
||||||
import static mindustry.content.SectorPresets.*;
|
import static mindustry.content.SectorPresets.*;
|
||||||
import static mindustry.content.UnitTypes.*;
|
import static mindustry.content.UnitTypes.*;
|
||||||
import static mindustry.type.ItemStack.*;
|
|
||||||
|
|
||||||
public class TechTree implements ContentList{
|
public class TechTree implements ContentList{
|
||||||
static ObjectMap<UnlockableContent, TechNode> map = new ObjectMap<>();
|
static ObjectMap<UnlockableContent, TechNode> map = new ObjectMap<>();
|
||||||
@@ -30,7 +29,7 @@ public class TechTree implements ContentList{
|
|||||||
|
|
||||||
node(junction, () -> {
|
node(junction, () -> {
|
||||||
node(router, () -> {
|
node(router, () -> {
|
||||||
node(launchPad, () -> {
|
node(launchPad, Seq.with(new SectorComplete(extractionOutpost)), () -> {
|
||||||
});
|
});
|
||||||
|
|
||||||
node(distributor);
|
node(distributor);
|
||||||
@@ -40,9 +39,9 @@ public class TechTree implements ContentList{
|
|||||||
node(underflowGate);
|
node(underflowGate);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
node(container, () -> {
|
node(container, Seq.with(new SectorComplete(biomassFacility)), () -> {
|
||||||
node(unloader);
|
node(unloader);
|
||||||
node(vault, () -> {
|
node(vault, Seq.with(new SectorComplete(stainedMountains)), () -> {
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -88,7 +87,7 @@ public class TechTree implements ContentList{
|
|||||||
|
|
||||||
node(bridgeConduit);
|
node(bridgeConduit);
|
||||||
|
|
||||||
node(pulseConduit, () -> {
|
node(pulseConduit, Seq.with(new SectorComplete(windsweptIslands)), () -> {
|
||||||
node(phaseConduit, () -> {
|
node(phaseConduit, () -> {
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -108,185 +107,152 @@ public class TechTree implements ContentList{
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
node(Items.coal, with(Items.lead, 3000), () -> {
|
node(graphitePress, () -> {
|
||||||
node(Items.graphite, with(Items.coal, 1000), () -> {
|
node(pneumaticDrill, () -> {
|
||||||
|
node(cultivator, Seq.with(new SectorComplete(biomassFacility)), () -> {
|
||||||
|
|
||||||
node(graphitePress, () -> {
|
});
|
||||||
node(Items.titanium, with(Items.graphite, 3000, Items.copper, 7000, Items.lead, 7000), () -> {
|
|
||||||
node(pneumaticDrill, () -> {
|
|
||||||
node(Items.sporePod, with(Items.coal, 4000, Items.graphite, 4000, Items.lead, 4000), () -> {
|
|
||||||
node(cultivator, () -> {
|
|
||||||
|
|
||||||
});
|
node(laserDrill, () -> {
|
||||||
});
|
node(blastDrill, Seq.with(new SectorComplete(nuclearComplex)), () -> {
|
||||||
|
|
||||||
node(Items.thorium, with(Items.titanium, 8000, Items.lead, 12000, Items.copper, 20000), () -> {
|
|
||||||
node(laserDrill, () -> {
|
|
||||||
node(blastDrill, () -> {
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
node(waterExtractor, () -> {
|
|
||||||
node(oilExtractor, () -> {
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
node(Items.pyratite, with(Items.coal, 6000, Items.lead, 8000, Items.sand, 4000), () -> {
|
node(waterExtractor, () -> {
|
||||||
node(pyratiteMixer, () -> {
|
node(oilExtractor, () -> {
|
||||||
node(Items.blastCompound, with(Items.pyratite, 3000, Items.sporePod, 3000), () -> {
|
|
||||||
node(blastMixer, () -> {
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
node(Items.silicon, with(Items.coal, 3000, Items.sand, 4000), () -> {
|
|
||||||
node(siliconSmelter, () -> {
|
|
||||||
|
|
||||||
node(Liquids.oil, with(Items.coal, 8000, Items.pyratite, 6000, Items.sand, 8000), () -> {
|
|
||||||
node(sporePress, () -> {
|
|
||||||
node(coalCentrifuge, () -> {
|
|
||||||
node(multiPress, () -> {
|
|
||||||
node(siliconCrucible, () -> {
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
node(Items.plastanium, with(Items.titanium, 8000, Items.silicon, 8000), () -> {
|
|
||||||
node(plastaniumCompressor, () -> {
|
|
||||||
node(Items.phaseFabric, with(Items.thorium, 12000, Items.sand, 8000, Items.silicon, 5000), () -> {
|
|
||||||
node(phaseWeaver, () -> {
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
node(Items.metaglass, with(Items.sand, 4000, Items.lead, 10000), () -> {
|
|
||||||
node(kiln, () -> {
|
|
||||||
node(incinerator, () -> {
|
|
||||||
node(Items.scrap, with(Items.copper, 8000, Items.sand, 4000), () -> {
|
|
||||||
node(Liquids.slag, with(Items.scrap, 4000), () -> {
|
|
||||||
node(melter, () -> {
|
|
||||||
node(Items.surgeAlloy, with(Items.thorium, 20000, Items.silicon, 20000, Items.lead, 40000), () -> {
|
|
||||||
node(surgeSmelter, () -> {
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
node(separator, () -> {
|
|
||||||
node(pulverizer, () -> {
|
|
||||||
node(disassembler, () -> {
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
node(Liquids.cryofluid, with(Items.titanium, 8000, Items.metaglass, 4000), () -> {
|
|
||||||
node(cryofluidMixer, () -> {
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
node(microProcessor, () -> {
|
|
||||||
node(switchBlock, () -> {
|
|
||||||
node(message, () -> {
|
|
||||||
node(logicDisplay, () -> {
|
|
||||||
node(largeLogicDisplay, () -> {
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
node(memoryCell, () -> {
|
|
||||||
node(memoryBank, () -> {
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
node(logicProcessor, () -> {
|
|
||||||
node(hyperProcessor, () -> {
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
node(illuminator, () -> {
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
node(pyratiteMixer, () -> {
|
||||||
|
node(blastMixer, () -> {
|
||||||
|
|
||||||
node(combustionGenerator, () -> {
|
});
|
||||||
node(powerNode, () -> {
|
});
|
||||||
node(powerNodeLarge, () -> {
|
|
||||||
node(diode, () -> {
|
node(siliconSmelter, () -> {
|
||||||
node(surgeTower, () -> {
|
|
||||||
|
node(sporePress, () -> {
|
||||||
|
node(coalCentrifuge, () -> {
|
||||||
|
node(multiPress, () -> {
|
||||||
|
node(siliconCrucible, () -> {
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
node(battery, () -> {
|
node(plastaniumCompressor, Seq.with(new SectorComplete(windsweptIslands)), () -> {
|
||||||
node(batteryLarge, () -> {
|
node(phaseWeaver, Seq.with(new SectorComplete(tarFields)), () -> {
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
node(mender, () -> {
|
node(kiln, Seq.with(new SectorComplete(craters)), () -> {
|
||||||
node(mendProjector, () -> {
|
node(incinerator, () -> {
|
||||||
node(forceProjector, () -> {
|
node(melter, () -> {
|
||||||
node(overdriveProjector, () -> {
|
node(surgeSmelter, () -> {
|
||||||
node(overdriveDome, () -> {
|
|
||||||
|
});
|
||||||
|
|
||||||
|
node(separator, () -> {
|
||||||
|
node(pulverizer, () -> {
|
||||||
|
node(disassembler, () -> {
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
node(repairPoint, () -> {
|
node(cryofluidMixer, () -> {
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
node(steamGenerator, () -> {
|
node(microProcessor, () -> {
|
||||||
node(thermalGenerator, () -> {
|
node(switchBlock, () -> {
|
||||||
node(differentialGenerator, () -> {
|
node(message, () -> {
|
||||||
node(thoriumReactor, Seq.with(new Research(Liquids.cryofluid)), () -> {
|
node(logicDisplay, () -> {
|
||||||
node(impactReactor, () -> {
|
node(largeLogicDisplay, () -> {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
node(rtgGenerator, () -> {
|
node(memoryCell, () -> {
|
||||||
|
node(memoryBank, () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
node(logicProcessor, () -> {
|
||||||
|
node(hyperProcessor, () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
node(illuminator, () -> {
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
node(combustionGenerator, Seq.with(new Research(Items.coal)), () -> {
|
||||||
|
node(powerNode, () -> {
|
||||||
|
node(powerNodeLarge, () -> {
|
||||||
|
node(diode, () -> {
|
||||||
|
node(surgeTower, () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
node(battery, () -> {
|
||||||
|
node(batteryLarge, () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
node(mender, () -> {
|
||||||
|
node(mendProjector, () -> {
|
||||||
|
node(forceProjector, Seq.with(new SectorComplete(impact0078)), () -> {
|
||||||
|
node(overdriveProjector, Seq.with(new SectorComplete(impact0078)), () -> {
|
||||||
|
node(overdriveDome, Seq.with(new SectorComplete(impact0078)), () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
node(repairPoint, () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
node(steamGenerator, () -> {
|
||||||
|
node(thermalGenerator, () -> {
|
||||||
|
node(differentialGenerator, () -> {
|
||||||
|
node(thoriumReactor, Seq.with(new Research(Liquids.cryofluid)), () -> {
|
||||||
|
node(impactReactor, () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
node(rtgGenerator, () -> {
|
||||||
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
node(solarPanel, () -> {
|
node(solarPanel, () -> {
|
||||||
node(largeSolarPanel, () -> {
|
node(largeSolarPanel, () -> {
|
||||||
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -321,8 +287,7 @@ public class TechTree implements ContentList{
|
|||||||
});
|
});
|
||||||
|
|
||||||
node(scatter, () -> {
|
node(scatter, () -> {
|
||||||
node(hail, () -> {
|
node(hail, Seq.with(new SectorComplete(craters)), () -> {
|
||||||
|
|
||||||
node(salvo, () -> {
|
node(salvo, () -> {
|
||||||
node(swarmer, () -> {
|
node(swarmer, () -> {
|
||||||
node(cyclone, () -> {
|
node(cyclone, () -> {
|
||||||
@@ -436,7 +401,7 @@ public class TechTree implements ContentList{
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
node(navalFactory, () -> {
|
node(navalFactory, Seq.with(new SectorComplete(ruinousShores)), () -> {
|
||||||
node(risso, () -> {
|
node(risso, () -> {
|
||||||
node(minke, () -> {
|
node(minke, () -> {
|
||||||
node(bryde, () -> {
|
node(bryde, () -> {
|
||||||
@@ -451,7 +416,7 @@ public class TechTree implements ContentList{
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
node(additiveReconstructor, () -> {
|
node(additiveReconstructor, Seq.with(new SectorComplete(biomassFacility)), () -> {
|
||||||
node(multiplicativeReconstructor, () -> {
|
node(multiplicativeReconstructor, () -> {
|
||||||
node(exponentialReconstructor, () -> {
|
node(exponentialReconstructor, () -> {
|
||||||
node(tetrativeReconstructor, () -> {
|
node(tetrativeReconstructor, () -> {
|
||||||
@@ -479,36 +444,55 @@ public class TechTree implements ContentList{
|
|||||||
new Research(kiln),
|
new Research(kiln),
|
||||||
new Research(mechanicalPump)
|
new Research(mechanicalPump)
|
||||||
), () -> {
|
), () -> {
|
||||||
node(tarFields, Seq.with(
|
node(windsweptIslands, Seq.with(
|
||||||
new SectorComplete(ruinousShores),
|
new SectorComplete(ruinousShores),
|
||||||
new Research(coalCentrifuge),
|
new Research(pneumaticDrill),
|
||||||
new Research(conduit),
|
new Research(hail),
|
||||||
new Research(wave)
|
new Research(siliconSmelter),
|
||||||
|
new Research(steamGenerator)
|
||||||
), () -> {
|
), () -> {
|
||||||
//TODO change positions?
|
node(tarFields, Seq.with(
|
||||||
node(impact0078, Seq.with(
|
new SectorComplete(windsweptIslands),
|
||||||
new SectorComplete(tarFields),
|
new Research(coalCentrifuge),
|
||||||
new Research(Items.thorium),
|
new Research(conduit),
|
||||||
new Research(overdriveProjector)
|
new Research(wave)
|
||||||
), () -> {
|
), () -> {
|
||||||
node(desolateRift, Seq.with(
|
//TODO change positions?
|
||||||
new SectorComplete(impact0078),
|
node(impact0078, Seq.with(
|
||||||
new Research(thermalGenerator),
|
new SectorComplete(tarFields),
|
||||||
new Research(thoriumReactor)
|
new Research(Items.thorium),
|
||||||
|
new Research(overdriveProjector)
|
||||||
), () -> {
|
), () -> {
|
||||||
|
node(desolateRift, Seq.with(
|
||||||
|
new SectorComplete(impact0078),
|
||||||
|
new Research(thermalGenerator),
|
||||||
|
new Research(thoriumReactor)
|
||||||
|
), () -> {
|
||||||
|
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
node(saltFlats, Seq.with(
|
node(extractionOutpost, Seq.with(
|
||||||
new SectorComplete(ruinousShores),
|
new SectorComplete(stainedMountains),
|
||||||
new Research(groundFactory),
|
new SectorComplete(windsweptIslands),
|
||||||
new Research(airFactory),
|
new Research(groundFactory),
|
||||||
new Research(door),
|
new Research(nova),
|
||||||
new Research(waterExtractor)
|
new Research(airFactory),
|
||||||
), () -> {
|
new Research(mono)
|
||||||
|
), () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
node(saltFlats, Seq.with(
|
||||||
|
new SectorComplete(windsweptIslands),
|
||||||
|
new Research(groundFactory),
|
||||||
|
new Research(airFactory),
|
||||||
|
new Research(door),
|
||||||
|
new Research(waterExtractor)
|
||||||
|
), () -> {
|
||||||
|
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -517,6 +501,7 @@ public class TechTree implements ContentList{
|
|||||||
new SectorComplete(fungalPass),
|
new SectorComplete(fungalPass),
|
||||||
new Research(cultivator),
|
new Research(cultivator),
|
||||||
new Research(sporePress),
|
new Research(sporePress),
|
||||||
|
new Research(additiveReconstructor),
|
||||||
new Research(UnitTypes.mace),
|
new Research(UnitTypes.mace),
|
||||||
new Research(UnitTypes.flare)
|
new Research(UnitTypes.flare)
|
||||||
), () -> {
|
), () -> {
|
||||||
@@ -524,25 +509,90 @@ public class TechTree implements ContentList{
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
node(stainedMountains, Seq.with(
|
node(biomassFacility, Seq.with(
|
||||||
new SectorComplete(frozenForest),
|
new SectorComplete(frozenForest),
|
||||||
new Research(pneumaticDrill),
|
|
||||||
new Research(powerNode),
|
new Research(powerNode),
|
||||||
new Research(steamGenerator)
|
new Research(steamGenerator),
|
||||||
|
new Research(scatter),
|
||||||
|
new Research(graphitePress)
|
||||||
), () -> {
|
), () -> {
|
||||||
node(fungalPass, Seq.with(
|
node(stainedMountains, Seq.with(
|
||||||
new SectorComplete(stainedMountains),
|
new SectorComplete(biomassFacility),
|
||||||
new Research(groundFactory),
|
new Research(pneumaticDrill),
|
||||||
new Research(door),
|
|
||||||
new Research(siliconSmelter)
|
new Research(siliconSmelter)
|
||||||
), () -> {
|
), () -> {
|
||||||
node(nuclearComplex, Seq.with(
|
node(fungalPass, Seq.with(
|
||||||
new SectorComplete(fungalPass),
|
new SectorComplete(stainedMountains),
|
||||||
new Research(thermalGenerator),
|
new Research(groundFactory),
|
||||||
new Research(laserDrill)
|
new Research(door),
|
||||||
|
new Research(siliconSmelter)
|
||||||
), () -> {
|
), () -> {
|
||||||
|
node(nuclearComplex, Seq.with(
|
||||||
|
new SectorComplete(fungalPass),
|
||||||
|
new Research(thermalGenerator),
|
||||||
|
new Research(laserDrill)
|
||||||
|
), () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
nodeProduce(Items.copper, () -> {
|
||||||
|
nodeProduce(Liquids.water, () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
nodeProduce(Items.lead, () -> {
|
||||||
|
nodeProduce(Items.titanium, () -> {
|
||||||
|
nodeProduce(Liquids.cryofluid, () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
nodeProduce(Items.thorium, () -> {
|
||||||
|
nodeProduce(Items.surgeAlloy, () -> {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
nodeProduce(Items.phaseFabric, () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
nodeProduce(Items.metaglass, () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
nodeProduce(Items.sand, () -> {
|
||||||
|
nodeProduce(Items.scrap, () -> {
|
||||||
|
nodeProduce(Liquids.slag, () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
nodeProduce(Items.coal, () -> {
|
||||||
|
nodeProduce(Items.graphite, () -> {
|
||||||
|
nodeProduce(Items.silicon, () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
nodeProduce(Items.pyratite, () -> {
|
||||||
|
nodeProduce(Items.blastCompound, () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
nodeProduce(Items.sporePod, () -> {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
nodeProduce(Liquids.oil, () -> {
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -589,6 +639,14 @@ public class TechTree implements ContentList{
|
|||||||
return node(block, () -> {});
|
return node(block, () -> {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static TechNode nodeProduce(UnlockableContent content, Seq<Objective> objectives, Runnable children){
|
||||||
|
return node(content, content.researchRequirements(), objectives.and(new Produce(content)), children);
|
||||||
|
}
|
||||||
|
|
||||||
|
static TechNode nodeProduce(UnlockableContent content, Runnable children){
|
||||||
|
return nodeProduce(content, new Seq<>(), children);
|
||||||
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public static TechNode get(UnlockableContent content){
|
public static TechNode get(UnlockableContent content){
|
||||||
return map.get(content);
|
return map.get(content);
|
||||||
|
|||||||
@@ -295,7 +295,6 @@ public class UnitTypes implements ContentList{
|
|||||||
backColor = Pal.heal;
|
backColor = Pal.heal;
|
||||||
frontColor = Color.white;
|
frontColor = Color.white;
|
||||||
}};
|
}};
|
||||||
shootSound = Sounds.pew;
|
|
||||||
}});
|
}});
|
||||||
}};
|
}};
|
||||||
|
|
||||||
@@ -338,6 +337,8 @@ public class UnitTypes implements ContentList{
|
|||||||
lightningLength = 7;
|
lightningLength = 7;
|
||||||
lightningLengthRand = 7;
|
lightningLengthRand = 7;
|
||||||
shootEffect = Fx.shootHeal;
|
shootEffect = Fx.shootHeal;
|
||||||
|
//Does not actually do anything; Just here to make stats work
|
||||||
|
healPercent = 2f;
|
||||||
|
|
||||||
lightningType = new BulletType(0.0001f, 0f){{
|
lightningType = new BulletType(0.0001f, 0f){{
|
||||||
lifetime = Fx.lightning.lifetime;
|
lifetime = Fx.lightning.lifetime;
|
||||||
@@ -1246,7 +1247,7 @@ public class UnitTypes implements ContentList{
|
|||||||
mineTier = 3;
|
mineTier = 3;
|
||||||
health = 500;
|
health = 500;
|
||||||
armor = 5f;
|
armor = 5f;
|
||||||
speed = 2.4f;
|
speed = 2.5f;
|
||||||
accel = 0.06f;
|
accel = 0.06f;
|
||||||
drag = 0.017f;
|
drag = 0.017f;
|
||||||
lowAltitude = true;
|
lowAltitude = true;
|
||||||
@@ -1256,7 +1257,7 @@ public class UnitTypes implements ContentList{
|
|||||||
hitSize = 15f;
|
hitSize = 15f;
|
||||||
engineSize = 3f;
|
engineSize = 3f;
|
||||||
payloadCapacity = (2 * 2) * tilePayload;
|
payloadCapacity = (2 * 2) * tilePayload;
|
||||||
buildSpeed = 2.5f;
|
buildSpeed = 2.6f;
|
||||||
|
|
||||||
ammoType = AmmoTypes.power;
|
ammoType = AmmoTypes.power;
|
||||||
|
|
||||||
@@ -1404,6 +1405,7 @@ public class UnitTypes implements ContentList{
|
|||||||
y = -5f;
|
y = -5f;
|
||||||
rotate = true;
|
rotate = true;
|
||||||
ejectEffect = Fx.casing1;
|
ejectEffect = Fx.casing1;
|
||||||
|
shootSound = Sounds.missile;
|
||||||
bullet = new MissileBulletType(2.7f, 12, "missile"){{
|
bullet = new MissileBulletType(2.7f, 12, "missile"){{
|
||||||
width = 8f;
|
width = 8f;
|
||||||
height = 8f;
|
height = 8f;
|
||||||
@@ -1450,6 +1452,7 @@ public class UnitTypes implements ContentList{
|
|||||||
rotateSpeed = 5f;
|
rotateSpeed = 5f;
|
||||||
inaccuracy = 10f;
|
inaccuracy = 10f;
|
||||||
ejectEffect = Fx.casing1;
|
ejectEffect = Fx.casing1;
|
||||||
|
shootSound = Sounds.shoot;
|
||||||
bullet = Bullets.flakLead;
|
bullet = Bullets.flakLead;
|
||||||
}});
|
}});
|
||||||
|
|
||||||
@@ -1462,6 +1465,7 @@ public class UnitTypes implements ContentList{
|
|||||||
rotateSpeed = 2f;
|
rotateSpeed = 2f;
|
||||||
shake = 1.5f;
|
shake = 1.5f;
|
||||||
ejectEffect = Fx.casing2;
|
ejectEffect = Fx.casing2;
|
||||||
|
shootSound = Sounds.bang;
|
||||||
bullet = Bullets.artilleryIncendiary;
|
bullet = Bullets.artilleryIncendiary;
|
||||||
}});
|
}});
|
||||||
}};
|
}};
|
||||||
@@ -1498,6 +1502,7 @@ public class UnitTypes implements ContentList{
|
|||||||
shots = 1;
|
shots = 1;
|
||||||
inaccuracy = 3f;
|
inaccuracy = 3f;
|
||||||
ejectEffect = Fx.casing3;
|
ejectEffect = Fx.casing3;
|
||||||
|
shootSound = Sounds.artillery;
|
||||||
|
|
||||||
bullet = new ArtilleryBulletType(3.2f, 12){{
|
bullet = new ArtilleryBulletType(3.2f, 12){{
|
||||||
trailMult = 0.8f;
|
trailMult = 0.8f;
|
||||||
@@ -1536,6 +1541,7 @@ public class UnitTypes implements ContentList{
|
|||||||
shotDelay = 3f;
|
shotDelay = 3f;
|
||||||
inaccuracy = 5f;
|
inaccuracy = 5f;
|
||||||
velocityRnd = 0.1f;
|
velocityRnd = 0.1f;
|
||||||
|
shootSound = Sounds.missile;
|
||||||
|
|
||||||
ejectEffect = Fx.none;
|
ejectEffect = Fx.none;
|
||||||
bullet = new MissileBulletType(2.7f, 12){{
|
bullet = new MissileBulletType(2.7f, 12){{
|
||||||
|
|||||||