Compare commits

...

85 Commits

Author SHA1 Message Date
Anuken
280e345faf Cleanup 2020-11-16 19:50:15 -05:00
Anuken
f296d23cfa Bugfixes 2020-11-16 19:43:56 -05:00
Anuken
3b609f698a Fixed #3422 2020-11-16 17:41:42 -05:00
Anuken
242109f34e Mobile font border fix 2020-11-16 17:00:14 -05:00
Anuken
4b733fe244 Merge remote-tracking branch 'origin/master' 2020-11-16 16:32:10 -05:00
Anuken
74f083b897 Better sector icons 2020-11-16 16:31:55 -05:00
Anuken
f9580c7864 Merge pull request #3421 from MEEPofFaith/fix-absorbing-lasers
Lasers cannot and should not collide with anything.
2020-11-16 15:41:36 -05:00
MEEP of Faith
361ed26907 Lasers cannot and should not collide with anything. 2020-11-16 12:24:36 -08:00
Anuken
80130c69e4 arc 2020-11-16 14:21:44 -05:00
Anuken
3b47cb03bc Merge remote-tracking branch 'origin/master' 2020-11-16 14:21:39 -05:00
Anuken
8577eb9484 New sector display UI 2020-11-16 14:21:30 -05:00
Anuken
272a7af1ae Merge pull request #2575 from Voz-Duh/team-colors-for-payload-distributions
Team Colors For Payload Conveyor and Router
2020-11-16 12:35:27 -05:00
Anuken
33e8489f42 Bugfixes 2020-11-16 09:18:53 -05:00
Anuken
bdee65e925 Sector preset display 2020-11-15 23:09:40 -05:00
Anuken
b7b6ddf69a arc 2020-11-15 21:03:18 -05:00
Anuken
bf79e1a3d7 Map fixes 2020-11-15 20:34:02 -05:00
Anuken
bedf93f0e0 Cleanup 2020-11-15 20:20:37 -05:00
Anuken
a172c12e5d Auto-destruction of enemies after attack sector capture 2020-11-15 18:59:23 -05:00
Anuken
7bd05ad9ad New campaign map / Fixed #3414 2020-11-15 17:11:52 -05:00
Anuken
9928b0f788 #3412 but not broken 2020-11-15 15:29:31 -05:00
Anuken
c95872e992 #3413 but better 2020-11-15 15:05:34 -05:00
Anuken
c0786b31be Merge remote-tracking branch 'origin/master' 2020-11-15 12:52:33 -05:00
Anuken
d53b074760 Tutorial removed / Logic block group 2020-11-15 12:52:29 -05:00
Anuken
18cb0eeec6 Merge pull request #3323 from DeltaNedas/files
add file picker interface for mods
2020-11-15 11:51:50 -05:00
Anuken
1959ada854 Merge remote-tracking branch 'origin/master' 2020-11-15 11:40:20 -05:00
Anuken
fca1cacb30 Fixed #3411 / Fixed unit tests 2020-11-15 11:40:17 -05:00
Anuken
3870c64b60 Merge pull request #3388 from younggam/patch-5
protected->public for mod supports
2020-11-15 11:07:48 -05:00
Anuken
aebd3f959f Fixed #3402 / Fixed #3403 / Fixed #3401 / Fixed #3404 / Disabled derelict updates 2020-11-15 10:54:09 -05:00
Anuken
49e4aaa49b Bugfixes 2020-11-14 19:49:11 -05:00
Anuken
135c780f35 Fixed #3400 2020-11-14 19:06:21 -05:00
Anuken
6c2541491f More campaign water 2020-11-14 17:34:35 -05:00
Anuken
4975def352 Cleanup 2020-11-14 17:00:12 -05:00
Anuken
0c050a3ef4 Merge remote-tracking branch 'origin/master' 2020-11-14 15:02:51 -05:00
Anuken
bd4badc274 More campaign tweaks 2020-11-14 15:02:47 -05:00
Anuken
21b1a0aedf Merge pull request #3387 from MEEPofFaith/patch-1
Remove extra Omura cannon image.
2020-11-14 14:28:54 -05:00
Anuken
87050b6c56 Merge pull request #3396 from DeltaNedas/master
add mining/mineX/mineY sensors
2020-11-14 13:37:47 -05:00
Anuken
c96f4609d0 Research system changes, unfinished 2020-11-14 13:36:43 -05:00
DeltaNedas
9bde0dc18a multiple inheritance h 2020-11-14 18:18:52 +00:00
DeltaNedas
b66294b50a add mining/mineX/mineY sensors 2020-11-14 18:09:46 +00:00
younggam
bfc2b08bcc ammo protectd->public 2020-11-14 14:56:47 +09:00
younggam
4d66d63da2 requirements protected->public 2020-11-14 14:55:59 +09:00
younggam
4ee4e39518 constructor protected->public 2020-11-14 14:54:22 +09:00
MEEP of Faith
659be11b7d Remove extra omura cannon image.
It has the `-heat` prefix, so the game is using this instead of its actual heat sprite to draw heat.
2020-11-13 19:00:21 -08:00
Anuken
7559996227 Bugfixes / New campaign map 2020-11-13 19:03:27 -05:00
Anuken
04c465c8f0 Bugfixes 2020-11-13 17:33:32 -05:00
Anuken
cf71356bdb Merge branch 'genNAowl-unit-stats' 2020-11-13 14:42:58 -05:00
Anuken
a9756aefad Cleanup of weapon stats 2020-11-13 14:42:46 -05:00
Anuken
e0b4eb7f8f Merge branch 'unit-stats' of git://github.com/genNAowl/Mndstry into genNAowl-unit-stats 2020-11-13 14:14:38 -05:00
Anuken
ad620971d9 Cleanup 2020-11-13 14:14:29 -05:00
Anuken
648150df65 Fixed #3380 2020-11-13 12:57:49 -05:00
Anuken
3b3b1520f9 Apparently every base part had a base tier of 0 this whole time 2020-11-13 12:40:23 -05:00
Anuken
0d015a4dfc arc 2020-11-13 11:33:50 -05:00
Anuken
75df515234 Merge remote-tracking branch 'origin/master' 2020-11-13 11:33:45 -05:00
Anuken
0908176079 Campaign changes 2020-11-13 11:33:31 -05:00
Anuken
b435c83fb6 Merge pull request #3377 from Bohaska/patch-1
Knockback for Spectre
2020-11-13 10:47:36 -05:00
Anuken
1da52d2e42 Merge pull request #3374 from BasedUser/patch-6
Formation of the CAMS
2020-11-13 10:34:49 -05:00
Bohaska
eaf76b5513 Knockback for Spectre
just made knockback for spectre on par with water.
2020-11-13 19:52:34 +08:00
Bohaska
bda5393a74 Knockback for Spectre
Suggested in https://github.com/Anuken/Mindustry-Suggestions/issues/1170
2020-11-13 19:10:34 +08:00
BasedUser
388374aa24 Update servers_v6.json 2020-11-13 10:13:47 +03:00
BasedUser
8eedb5f610 Formation of CAMS 2020-11-13 10:11:55 +03:00
DeltaNedas
e9bcf9e8b8 Merge branch 'master' into files 2020-11-13 07:10:39 +00:00
Anuken
4e7d6e9a9d Merge branch 'master' of https://github.com/Anuken/Mindustry 2020-11-12 18:46:24 -05:00
Anuken
6eaec7d505 Bugfixes + Binary and 2020-11-12 18:46:20 -05:00
Anuken
d9d4360b49 Merge pull request #3372 from L0615T1C5-216AC-9437/patch-2
Add Chaotic Neutral's name and new attack server
2020-11-12 18:28:49 -05:00
DeltaNedas
6da6c9426d add file picker interface for mods 2020-11-12 23:21:49 +00:00
Anuken
d1d3ef0c67 Sound framework improvements 2020-11-12 18:07:26 -05:00
L0615T1C5-216AC-9437
addcf350b2 Add Chaotic Neutral's name and new attack server 2020-11-12 14:55:36 -05:00
Leonwang4234
636fffc750 scaling(Scaling.fit)
Untested
2020-11-12 08:37:38 -08:00
Anuken
d163cacb6a Merge remote-tracking branch 'origin/master' 2020-11-12 09:41:54 -05:00
Anuken
e847a74a25 Fixed #3362 2020-11-12 09:41:49 -05:00
Anuken
c2aa655d87 Merge pull request #3365 from younggam/patch-4
little java mod support
2020-11-12 09:35:52 -05:00
younggam
f03c022db8 Update Pump.java 2020-11-12 20:52:23 +09:00
genNAowl
21a8a39344 Merge branch 'master' into unit-stats 2020-11-11 16:50:37 -08:00
Leonwang4234
14ee997a76 Merge remote-tracking branch 'upstream/master' into unit-stats 2020-11-11 16:49:29 -08:00
Anuken
b1b84fe380 Minor sound changes 2020-11-11 18:11:38 -05:00
Leonwang4234
4d3c6879b5 Fix many things 2020-11-11 13:27:03 -08:00
Leonwang4234
3a27e6e94e Merge remote-tracking branch 'upstream/master' into unit-stats 2020-11-09 21:52:42 -08:00
Leonwang4234
e9c00d8a9f remove unused imports 2020-11-08 17:23:05 -08:00
Leonwang4234
490beb242a Merge remote-tracking branch 'upstream/master' into unit-stats 2020-11-08 15:21:27 -08:00
Leonwang4234
82348d4fff update sprite generation + update bullet stats 2020-11-08 14:35:06 -08:00
Leonwang4234
d133709423 update sprites 2020-11-07 18:31:47 -08:00
Leonwang4234
b448b90999 bundles 2020-11-07 17:21:16 -08:00
Leonwang4234
1555e77348 Create WeaponListValue.java 2020-11-07 17:21:03 -08:00
Leonwang4234
f9954ea4c7 initial implementation 2020-11-07 17:20:58 -08:00
Voz-Duh
6145b1c95c Team Colors For Payload Conveyor and Router 2020-09-17 16:34:34 +03:00
194 changed files with 4058 additions and 3503 deletions

View File

@@ -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,16 +136,16 @@ 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, "@open", extension, cons);
} }
} }
} }
@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

View File

@@ -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());

View File

@@ -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 }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

View File

@@ -0,0 +1,2 @@
mschxś-<2D>ŃŠ! EouÔŮťBŰÇ~„/ý#™†Ept<70>_mÁăą <09>W…)‡Ť0םÖĆôŔň¤şrÜ[,pp˙ÜZl!ÇcókÉ/z†ĺr4bÜjI<6A>ý2%ß_„%…Jěź<C4BE>W©!˝
€;pęGŹk<18>…VNf żJjŞŇĐ8ŹPK¨G8&~m3bfŘÔçźqkľˇ•'ćÄća¦ăbú/(Ű×[¨=[)»

View File

@@ -0,0 +1 @@
mschx<>MΫn„ E7^Ζλ<CE96><31>Ύφ<CE8E><CF86>"JƒΨi?ΎµηΐKCd<43>λή$β<>•SΖp(·Ύ³οU ΕΡx<07><>oU<6F>»rΪJ<CEAA>>hΔD½ΙΓ<CE99>aΡ<61><CEA1>υW j‰>ΰξ<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>ΥυΎκϊΉ.<2E>MSΠ“ε<E2809C>δ<EFBFBD> ²lθ$>g-JF—qΟΕGΖΔhι$t}Ζ<>1ς«ZΪ+XγΞF}Ζΐθω―r6fι1K<31>%†T<E280A0>

View File

@@ -0,0 +1,2 @@
mschxś-Ź[nĂ EŻń;nÓ8űŕ«+Bö(BÂ`i”˝'qăŻ3sď!pÁU ˛j!taĄ)zúĹ0S<30>Ľ^Łv
ÍٞúľČÉŮ?z:Ź18ŁĽ\•%#yşët[ČF\V÷ /­›é¨Ł'ł×Ć`Đ‘ÜÝO`

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,2 @@
mschxśMŤÍ „géÄj˘'ź˘ß[bL*4c|{gCB`vg?á Úč_vńq
ů†aŰ”źky¦8 [Z|WĂľR8Ý})!ç5}BcšĂî4>O°;ĹŚ7ͱ(…Ë_ŕNW4Ü\m•®JŹF ¬ĹŔ°“†"®btk! Ęho:v]5ůBëNÉľćŇ=Nôw6‡¶;í,tŚJ óÁ,;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View 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Ãn6ÿŠŽõѳ!Ot-G+ĉæë oíÀè†.?ó£dò
—Ì<EFBFBD>œkr/‰Ô8N4@Ϩƒd41úSqñ c%

View 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

View 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#Q 2 VâJ†e_FØJز­0Kgµ°`(<28>L#ß-TÑ´Bz˜;%ÉÜIiVù

View 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+šŰü˙?űBęEä·HŻ]BĂ,”ĐŔ zŮmgd;š‰¨<E280B0>"iŘSć$T@IYx¤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(  —LĄĎr0`ÓęŽif˘Zč ® ŹżŰ<C5BC>ěďźxčďmşŢ<C59F>úµĎ?č

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View 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

Binary file not shown.

View File

@@ -0,0 +1,3 @@
mschxœ%Žknà „ÇØIü¨äV9×È
ú;¢xS!a@€“úîMÝ%F¬¾Ñ>fz<>Æ©™p¾~:“¯¥}ŽëõbU$ %MÈÆ;à
ãCeŠ~rT:ûˆ^/6»*ú#yA9²Õ7ϧà#É)%ŒÚ++5¹Ímáꘌ5Ú;™f²ì18Zf•<66>S4Öb0™f™ü5áô¥2w­èƒðÎO„÷ VëÕ$ÙçN+Ÿ1(åíuÞ

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1 @@
mschxœ%<25>] „‡ŸÖ³øàm|3U‰i¢­ÁãíevJš<4A>& »1zÄezVŒó}9¿×ÇÔNØßêûÚæ× <10>/Ó¶ÕöÃÞ×´ÔGŸv¯‡mýÖà}N?Qäì¨Ìv¶1x™Y(„%½"ž"ÈLBfÒ³´ë' }! vCd•Þ*bLðŽAªA*éM‰õˆ( IÕ²Ì|¤<C2A4>™Ìz!''x™Y(LÞµ³!Á&`Íï8šÝþ Ú

View 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ľˇގ,

Binary file not shown.

Binary file not shown.

View 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-Á

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View 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,31 @@ 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.curcapture = Sector Captured
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 +576,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 +653,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 +724,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 +951,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 +1266,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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View 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"

View File

@@ -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"

View File

@@ -17,9 +17,9 @@ const float shinelen = 0.2;
void main(){ void main(){
vec3 norc = u_ambientColor * (diffuse + vec3(clamp((dot(a_normal, u_lightdir) + 1.0) / 2.0, 0.0, 1.0))); vec3 norc = u_ambientColor * (diffuse + vec3(clamp((dot(a_normal, u_lightdir) + 1.0) / 2.0, 0.0, 1.0)));
float shinedot = max((-dot(u_camdir, a_normal) - (1.0 - shinelen)) / shinelen, 0.0); float shinedot = max((-dot(u_camdir, a_normal) - (1.0 - shinelen)) / shinelen, 0.0);
float shinyness = (1.0 - a_color.a) * pow(shinedot, shinefalloff); float albedo = (1.0 - a_color.a) * pow(shinedot, shinefalloff);
vec4 baseCol = vec4(a_color.rgb, 1.0); vec4 baseCol = vec4(a_color.rgb, 1.0);
v_col = mix(baseCol * vec4(norc, 1.0), vec4(1.0), shinyness * norc.r); v_col = mix(baseCol * vec4(norc, 1.0), vec4(1.0), albedo * norc.r);
gl_Position = u_proj * u_trans * a_position; gl_Position = u_proj * u_trans * a_position;
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 917 KiB

After

Width:  |  Height:  |  Size: 960 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 608 KiB

After

Width:  |  Height:  |  Size: 575 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

After

Width:  |  Height:  |  Size: 185 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 MiB

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

After

Width:  |  Height:  |  Size: 186 KiB

View File

@@ -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

View File

@@ -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");
}
} }
} }
} }

View File

@@ -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;

View File

@@ -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);

View File

@@ -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 ||

View File

@@ -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++){

View File

@@ -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;
}
}

View File

@@ -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;
}
} }

View File

@@ -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;
} }

View File

@@ -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;

View File

@@ -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){{

View File

@@ -36,6 +36,8 @@ public class Planets implements ContentList{
generator = new SerpuloPlanetGenerator(); generator = new SerpuloPlanetGenerator();
meshLoader = () -> new HexMesh(this, 6); meshLoader = () -> new HexMesh(this, 6);
atmosphereColor = Color.valueOf("3c1b8f"); atmosphereColor = Color.valueOf("3c1b8f");
atmosphereRadIn = 0.02f;
atmosphereRadOut = 0.3f;
startSector = 15; startSector = 15;
}}; }};
} }

View File

@@ -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,26 +31,42 @@ 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;
}}; }};
ruinousShores = new SectorPreset("ruinousShores", serpulo, 19){{ ruinousShores = new SectorPreset("ruinousShores", serpulo, 213){{
captureWave = 30; captureWave = 30;
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;
}}; }};

Some files were not shown because too many files have changed in this diff Show More