Compare commits

...

112 Commits

Author SHA1 Message Date
Anuken
33d4ab9edb Fixed block plans not being deleted locally 2021-07-17 19:17:47 -04:00
Anuken
f7f2b3438c Use short filter names in JSON 2021-07-17 16:46:35 -04:00
Anuken
0ed7934df0 arc 2021-07-17 15:33:19 -04:00
Anuken
55920e6242 Cleanup 2021-07-17 15:18:51 -04:00
Anuken
820920e5f9 Redundant cast cleanup 2021-07-17 09:30:31 -04:00
Anuken
8e21c627a7 Improved Serpulo sector path generation 2021-07-17 09:22:02 -04:00
Anuken
6973ed7d55 PvP defeated team cleanup 2021-07-17 08:52:24 -04:00
Anuken
0980495a28 (commented) support for Call server-to-client sounds 2021-07-16 15:39:03 -04:00
Anuken
5c6b659ce3 Possible rare crash fix 2021-07-16 12:59:50 -04:00
Anuken
35e263223d Merge remote-tracking branch 'origin/master' 2021-07-16 12:37:36 -04:00
Anuken
07ba378095 Hide construct/legacy blocks 2021-07-16 12:37:31 -04:00
buthed010203
6e10f86546 Display item rates on reconstructors (#5581)
Display the rates here because why not
![]https://mee6.is-terrible.com/54feDAY76.png
2021-07-16 12:21:58 -04:00
RebornTrack970
fc6ee11ffe Some more servers are back (#5594)
* Servers Back

* Update servers_v7.json
2021-07-16 12:19:56 -04:00
Anuken
84cd87370f Merge remote-tracking branch 'origin/master' 2021-07-16 10:06:07 -04:00
Anuken
822fe9ab7a Fixed inaccessible gaps in Serpulo generator 2021-07-16 10:05:59 -04:00
Sharlotte
57b22a9cab Update bundle_ko.properties (#5590) 2021-07-16 08:56:23 -04:00
Anuken
278c4f17e5 Why was this class even created 2021-07-15 20:19:51 -04:00
Anuken
b0d4607798 Fixed #5588 2021-07-15 20:08:05 -04:00
Anuken
3f7dc66ac0 Fixed #5587 2021-07-15 14:55:32 -04:00
Anuken
1c2b1fb757 System property cleanup 2021-07-15 11:27:21 -04:00
Anuken
eb31483a15 Fixed #5585 2021-07-15 10:18:08 -04:00
Anuken
8fb7cdaba6 Fixed #5584 2021-07-15 10:10:36 -04:00
Anuken
61d81046ae Fixed #5583 2021-07-15 08:46:56 -04:00
Anuken
0c3d7e09e0 Don't crash when font glyphs are missing 2021-07-14 21:40:47 -04:00
Anuken
a9f9ddcacf AnnotationProxyMaker workaround cleanup 2021-07-14 19:52:43 -04:00
Anuken
a559c3581e Fixed continuous weapon sounds / Improved naval support audio 2021-07-14 18:46:51 -04:00
Anuken
dd5389c738 New sound for rock/plant breaking 2021-07-14 17:22:21 -04:00
Anuken
ac25e17286 Unused property cleanup 2021-07-14 16:06:03 -04:00
Anuken
9de4c89e76 Fixed #5582 2021-07-14 15:55:40 -04:00
Anuken
2f6846d8c3 Conveyor tweaks 2021-07-14 15:12:00 -04:00
Anuken
c3e60531c4 Merge remote-tracking branch 'origin/master' 2021-07-14 09:28:05 -04:00
Anuken
44aff82a6c "Fixed" #5580 2021-07-14 09:27:59 -04:00
alex
7619e7643d Update v6 servers for alex servers (#5576) 2021-07-14 09:23:53 -04:00
RebornTrack970
353ef05b93 OmegaHub is back (kinda) (#5578) 2021-07-14 09:23:41 -04:00
Anuken
2801e4ed80 Fixed #5579 2021-07-14 09:14:19 -04:00
Anuken
173dd0a90e Fixed #5577 2021-07-14 09:07:17 -04:00
Anuken
e5412aeb1b Inventory constant cleanup 2021-07-13 17:38:42 -04:00
Anuken
0eec955a3d #5563 2021-07-13 10:42:00 -04:00
Anuken
47038ac06d Longer mod test timeout 2021-07-13 10:33:44 -04:00
Anuken
8041c305ad Misc bugfixes 2021-07-13 10:28:35 -04:00
Anuken
e0d249898e Fixed mod dialog width... again. 2021-07-12 16:18:29 -04:00
Anuken
a1f5982a85 Fixed loading bar stroke not scaling correctly 2021-07-12 15:36:43 -04:00
Anuken
3c688d3fec arc 2021-07-12 15:35:08 -04:00
Anuken
889a9a7a05 Merge remote-tracking branch 'origin/master' 2021-07-12 15:06:46 -04:00
Anuken
ce6c39b7aa Reorganized settings 2021-07-12 15:06:41 -04:00
VizardAlpha
2a1fdded72 bundle_fr.properties Updates (#5558)
* bundle_fr.properties Updates

Add new commits

* Update Bundle
2021-07-12 14:49:24 -04:00
Angel-24
2b757fe107 Update bundle_es.properties (#5526)
Updated Spanish trasnlations to the 1 - Jul - 2021 changes in "bundle.properties".
2021-07-12 14:47:17 -04:00
Sharlotte
a8d78453ff Update bundle_ko.properties (#5527) 2021-07-12 14:47:05 -04:00
Antsiferov Andrew
2b88396aac [Bundle][RU] Update (#5531)
* double newline fix

hint.guardian

* 13 changed lines

mod.enabled
mod.disabled
status.burning.name
status.freezing.name
status.wet.name
status.melting.name
status.sapped.name
status.spore-slowed.name
status.tarred.name
status.overclock.name
status.shocked.name
status.blasted.name
status.unmoving.name

* yon't

* x'nt

* Update bundle_ru.properties

* 1 new, 1 changed

New:
stat.healing

Changed:
bullet.healpercent

* Inverse trig logic functions

See 00ca247d0f

* new v7 stuff, long list

New:
schematic.tags
schematic.edittags
schematic.addtag
schematic.texttag
schematic.icontag
schematic.renametag
schematic.tagdelconfirm
schematic.tagexists
tps
guardian
sector.changeicon
status.electrified.name
unsupported.environment
stat.repairspeed
ability.energyfield
bar.strength
rules.corecapture
block.rhyolite.name
block.repair-turret.name
hint.blockInfo
lenum.config
laccess.progress
unit.retusa.name
unit.oxynoe.name
unit.cyerce.name
unit.aegires.name
unit.navanax.name
block.duct.name
block.duct-router.name
block.duct-bridge.name
block.payload-propulsion-tower.name
block.payload-void.name
block.payload-source.name
filter.option.rotate

Changed:
stat.repairtime
bullet.pierce
team.crux.name
team.sharded.name
item.titanium.description

Deleted:
quit.confirm.tutorial
boss.health
team.orange.name
lenum.configure

* Update bundle_ru.properties

* 1 line changed

unit.oxynoe.name

* роутер-marshrutizator

ibglish

* 2 lines changed

block.surge-wall.name
block.surge-wall-large.name

* 3 new, 2 changed

New:
stat.showinmap
block.metal-floor-4.name
block.metal-floor-5.name

Changed:
stat.affinities
stat.opposites

* undone the dumb

* 1 new line

filter.option.replacement

* 1 new, 1 changed

New:
rules.polygoncoreprotection

Changed:
hint.respawn

* Fixed outdated minke description

unit.minke.description: "зажигательными" -> "артиллерийскими"

* 3 new lines

unit.tilessecond (ec59cb602c)
lst.wait, lst.lookup (0949852758)

* typo

еденицы -> единицы

Co-authored-by: Vanguard <55051135+XEN0PHIL@users.noreply.github.com>
2021-07-12 14:46:46 -04:00
Antsiferov Andrew
f856ad16ba Fixed a typo (#5532) 2021-07-12 14:46:36 -04:00
Anuken
f36d47c13f Merge branch 'master' of https://github.com/Anuken/Mindustry 2021-07-12 12:36:48 -04:00
Anuken
4f98bc95a2 Better sliders 2021-07-12 12:36:45 -04:00
Arik
ec3dc867c1 Always increment launchpad counter (#5569) 2021-07-12 12:33:17 -04:00
Antsiferov Andrew
7fea7e91aa Correct comment (#5568)
This is `UI.packer`, not `Fonts.packer`.
2021-07-12 09:23:36 -04:00
TranquillyUnpleasant
1ea545ccb2 fix (#5567) 2021-07-12 09:23:20 -04:00
buthed010203
e5e2d0ab03 Fix payload driver crash (#5565)
Similar to the mass driver one, https://i-dont.go-outsi.de/53ZwBY_YS.png
2021-07-11 14:39:33 -04:00
Anuken
c94e7aa031 Mod bugfixes 2021-07-11 12:03:10 -04:00
Anuken
5d1af6fb76 Android release debuggable; fixes default interfaces 2021-07-11 11:54:07 -04:00
Anuken
3b400ac3f3 just in case 2021-07-11 10:15:53 -04:00
Anuken
308176ee81 Revert theme removal / Android jar import bugfixes 2021-07-11 10:13:34 -04:00
Anuken
8a84ebb58d Fixed server IO errors / Fixed kick IP tracing 2021-07-10 22:18:58 -04:00
Anuken
158d11d3ba arc 2021-07-10 18:54:22 -04:00
Anuken
beec1eeaba Fixed #5561 2021-07-10 12:32:29 -04:00
Anuken
63a1f4e2de Merge branch 'master' of https://github.com/Anuken/Mindustry 2021-07-10 11:33:09 -04:00
Anuken
7d845951e9 Fixed #5560 2021-07-10 11:33:05 -04:00
Anuken
48d9ea6aa1 Deleted all v6 servers with incorrect versions 2021-07-10 08:39:32 -04:00
RebornTrack970
ae83e604ba Added Rush V7 (#5557)
* Added Rush V7

Hosted by Red.

* Fixed

* Update servers_v7.json
2021-07-10 08:32:57 -04:00
키에르
c156968be6 update kr server list & Fix json format (#5559) 2021-07-10 08:32:05 -04:00
Anuken
effe2312e0 no 2021-07-09 16:51:12 -04:00
Anuken
1c389dc7f8 Fixed #5553 2021-07-08 13:42:30 -04:00
Anuken
972ca71978 Team-colored force projectors 2021-07-08 12:14:20 -04:00
Anuken
fb35adb494 Added AttributeCrafter env calculation 2021-07-08 11:06:46 -04:00
Anuken
22813b71ff Ignore all future changelogs 2021-07-08 09:47:01 -04:00
Anuken
02243d1f5c Merge remote-tracking branch 'origin/master' 2021-07-08 09:46:21 -04:00
Anuken
e2b2e8fb4e Deleted all Android changelogs - see below for details
Android changelogs are practically use due to their character limit; GitHub changelogs should be used instead. Translations always arrive a few days after an update, so they are seldom read.
2021-07-08 09:46:10 -04:00
Anuken
390ceb8887 FileChooser cleanup 2021-07-08 09:33:44 -04:00
Patrick 'Quezler' Mounier
2167a3d7fe Remove double space (#5551) 2021-07-08 09:32:53 -04:00
Anuken
6f2033a455 arc 2021-07-07 19:28:34 -04:00
Anuken
2ae7863cae arc.util.Http migration 2021-07-07 19:00:32 -04:00
Anuken
02b42c51da Fixed #5549 2021-07-07 13:38:39 -04:00
Anuken
0ba26b22c0 Fixed #5548 2021-07-06 16:32:42 -04:00
Anuken
017552f573 Fixed crash caused by invalid NinePatch sprites 2021-07-06 15:23:37 -04:00
Anuken
01a3c772e7 Sync unit velocity / Sync separator seed / 127.x Compat break 2021-07-06 11:41:05 -04:00
Anuken
5693605f31 Correct Bullet#scaleVelocity documentation 2021-07-06 11:10:11 -04:00
Anuken
481881aa8b Prop cleanup / Optimization of large skybox PNG 2021-07-05 21:18:40 -04:00
Anuken
544660c4bb Fixed #5545 2021-07-05 15:11:53 -04:00
Anuken
3d8d84177b Map listing improvements 2021-07-04 21:30:47 -04:00
TranquillyUnpleasant
789e354400 Server qol (#5534) 2021-07-04 21:18:41 -04:00
TranquillyUnpleasant
4fdb817d4a move domains (#5542) 2021-07-04 21:16:47 -04:00
Anuken
4055361501 Merge remote-tracking branch 'origin/master' 2021-07-04 19:14:16 -04:00
Anuken
416007593f convert_sounds.sh is no longer needed 2021-07-04 19:14:11 -04:00
Anuken
4ed9f10c1b Cleanup 2021-07-04 09:51:39 -04:00
GaviTSRA
178cb12f85 Change ip of TSR Server (#5539)
* Change ip of TSR Server

* Ip changed again - should be final
2021-07-04 09:28:40 -04:00
Vajda Simon
c0582cd527 Update servers_v6.json (#5538) 2021-07-04 09:28:25 -04:00
Anuken
39e47db8c7 Merge remote-tracking branch 'origin/master' 2021-07-03 23:21:35 -04:00
Anuken
ed4156850b Cached ping executor 2021-07-03 23:21:29 -04:00
Anuken
5364522a5a Update deployment.yml 2021-07-03 21:42:19 -04:00
Anuken
3382d56590 Fixed tests 2021-07-03 21:17:38 -04:00
Anuken
1e30c46322 Merge remote-tracking branch 'origin/master' 2021-07-03 20:27:09 -04:00
Anuken
3eb72d6d86 Updated to new Arc net 2021-07-03 20:27:04 -04:00
KotMilkMeoW
2d01c41159 Update servers_v7.json (#5533)
* Update servers_v7.json

* Fix
2021-07-03 10:53:19 -04:00
Anuken
0b3dddcc9e Minor reformatting 2021-07-01 17:06:35 -04:00
Anuken
bc7085826e Re-generated ClassMap 2021-07-01 11:44:29 -04:00
Anuken
f78ee66049 Deployment script fixes 2021-07-01 11:36:51 -04:00
Anuken
fecaf768ab Allow 3x3 blocks on payload conveyors 2021-07-01 11:24:23 -04:00
Anuken
ec59cb602c Crash fix / tilesSecond speed unit 2021-07-01 11:17:42 -04:00
Anuken
2ea1671739 Fixed #5519 2021-07-01 10:22:28 -04:00
Anuken
f7e4936445 Merge remote-tracking branch 'origin/master' 2021-06-30 22:22:57 -04:00
Anuken
d37e8c2e75 why 2021-06-30 22:22:53 -04:00
Sahrea
fb8dcc5f86 Update servers_v6.json (#5518)
A server for German players. See history in #deutsch on the io Discord. https://discord.com/channels/391020510269669376/464914764066324500/859754657134936134
2021-06-30 22:22:16 -04:00
Anuken
4c4c361093 #5517 2021-06-30 22:18:57 -04:00
Anuken
9c29706297 Only draw status for player's team blocks 2021-06-30 19:09:48 -04:00
305 changed files with 1170 additions and 1835 deletions

View File

@@ -47,7 +47,8 @@ jobs:
git clone --depth=1 --branch=master https://github.com/Anuken/MindustryBuilds ../MindustryBuilds git clone --depth=1 --branch=master https://github.com/Anuken/MindustryBuilds ../MindustryBuilds
cd ../MindustryBuilds cd ../MindustryBuilds
echo "Updating version to ${RELEASE_VERSION:1}" echo "Updating version to ${RELEASE_VERSION:1}"
echo versionName=7-fdroid-${RELEASE_VERSION:1}$'\n'versionCode=${GITHUB_RUN_NUMBER} > version_fdroid.txt BNUM=$(($GITHUB_RUN_NUMBER + 1000))
echo versionName=7-fdroid-${RELEASE_VERSION:1}$'\n'versionCode=${BNUM} > version_fdroid.txt
git add . git add .
git commit -m "Updating to build ${RELEASE_VERSION:1}" git commit -m "Updating to build ${RELEASE_VERSION:1}"
git push https://Anuken:${{ secrets.API_TOKEN_GITHUB }}@github.com/Anuken/MindustryBuilds git push https://Anuken:${{ secrets.API_TOKEN_GITHUB }}@github.com/Anuken/MindustryBuilds

1
.gitignore vendored
View File

@@ -1,4 +1,5 @@
logs/ logs/
/fastlane/metadata/android/en-US/changelogs/
/core/assets/mindustry-saves/ /core/assets/mindustry-saves/
/core/assets/mindustry-maps/ /core/assets/mindustry-maps/
/core/assets/bundles/output/ /core/assets/bundles/output/

View File

@@ -14,6 +14,7 @@
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:isGame="true" android:isGame="true"
android:theme="@style/ArcTheme"
android:usesCleartextTraffic="true" android:usesCleartextTraffic="true"
android:appCategory="game" android:appCategory="game"
android:label="@string/app_name" android:label="@string/app_name"

View File

@@ -100,6 +100,9 @@ android{
all{ all{
minifyEnabled = true minifyEnabled = true
shrinkResources = true shrinkResources = true
//this is the ONLY WAY I could find to force r8 to keep its filthy hands off of my default interfaces.
//may have undesirable side effects
debuggable = true
proguardFiles("proguard-rules.pro") proguardFiles("proguard-rules.pro")
} }
} }

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="ArcTheme" parent="android:Theme.Material.NoActionBar">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowAnimationStyle">@android:style/Animation</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowFullscreen">true</item>
</style>
</resources>

View File

@@ -0,0 +1,10 @@
<resources>
<style name="ArcTheme" parent="android:Theme">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowAnimationStyle">@android:style/Animation</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowFullscreen">true</item>
</style>
</resources>

View File

@@ -1,5 +1,7 @@
package mindustry.annotations.impl; package mindustry.annotations.impl;
import arc.*;
import arc.audio.*;
import arc.files.*; import arc.files.*;
import arc.scene.style.*; import arc.scene.style.*;
import arc.struct.*; import arc.struct.*;
@@ -87,18 +89,18 @@ public class AssetsProcess extends BaseProcessor{
filename = filename.substring(0, filename.indexOf(".")); filename = filename.substring(0, filename.indexOf("."));
String sfilen = filename; String sfilen = filename;
String dtype = p.name().endsWith(".9.png") ? "arc.scene.style.NinePatchDrawable" : "arc.scene.style.TextureRegionDrawable"; String dtype = "arc.scene.style.Drawable";
String varname = capitalize(sfilen); String varname = capitalize(sfilen);
if(SourceVersion.isKeyword(varname)) varname += "s"; if(SourceVersion.isKeyword(varname)) varname += "s";
type.addField(ClassName.bestGuess(dtype), varname, Modifier.STATIC, Modifier.PUBLIC); type.addField(ClassName.bestGuess(dtype), varname, Modifier.STATIC, Modifier.PUBLIC);
load.addStatement(varname + " = (" + dtype + ")arc.Core.atlas.drawable($S)", sfilen); load.addStatement(varname + " = arc.Core.atlas.drawable($S)", sfilen);
}); });
for(Element elem : elements){ for(Element elem : elements){
Seq.with(((TypeElement)elem).getEnclosedElements()).each(e -> e.getKind() == ElementKind.FIELD, field -> { Seq.with(elem.getEnclosedElements()).each(e -> e.getKind() == ElementKind.FIELD, field -> {
String fname = field.getSimpleName().toString(); String fname = field.getSimpleName().toString();
if(fname.startsWith("default")){ if(fname.startsWith("default")){
loadStyles.addStatement("arc.Core.scene.addStyle(" + field.asType().toString() + ".class, mindustry.ui.Styles." + fname + ")"); loadStyles.addStatement("arc.Core.scene.addStyle(" + field.asType().toString() + ".class, mindustry.ui.Styles." + fname + ")");
@@ -118,13 +120,35 @@ public class AssetsProcess extends BaseProcessor{
void processSounds(String classname, String path, String rtype) throws Exception{ void processSounds(String classname, String path, String rtype) throws Exception{
TypeSpec.Builder type = TypeSpec.classBuilder(classname).addModifiers(Modifier.PUBLIC); TypeSpec.Builder type = TypeSpec.classBuilder(classname).addModifiers(Modifier.PUBLIC);
MethodSpec.Builder loadBegin = MethodSpec.methodBuilder("load").addModifiers(Modifier.PUBLIC, Modifier.STATIC); MethodSpec.Builder loadBegin = MethodSpec.methodBuilder("load").addModifiers(Modifier.PUBLIC, Modifier.STATIC);
CodeBlock.Builder staticb = CodeBlock.builder();
type.addField(FieldSpec.builder(IntMap.class, "idToSound", Modifier.STATIC, Modifier.PRIVATE).initializer("new IntMap()").build());
type.addField(FieldSpec.builder(ObjectIntMap.class, "soundToId", Modifier.STATIC, Modifier.PRIVATE).initializer("new ObjectIntMap()").build());
type.addMethod(MethodSpec.methodBuilder("getSoundId")
.addModifiers(Modifier.PUBLIC, Modifier.STATIC)
.addParameter(Sound.class, "sound")
.returns(int.class)
.addStatement("return soundToId.get(sound, -1)").build());
type.addMethod(MethodSpec.methodBuilder("getSound")
.addModifiers(Modifier.PUBLIC, Modifier.STATIC)
.addParameter(int.class, "id")
.returns(Sound.class)
.addStatement("return (Sound)idToSound.get(id, () -> Sounds.none)").build());
HashSet<String> names = new HashSet<>(); HashSet<String> names = new HashSet<>();
Fi.get(path).walk(p -> { Seq<Fi> files = new Seq<>();
Fi.get(path).walk(files::add);
files.sortComparing(Fi::name);
int id = 0;
for(Fi p : files){
String name = p.nameWithoutExtension(); String name = p.nameWithoutExtension();
if(names.contains(name)){ if(names.contains(name)){
BaseProcessor.err("Duplicate file name: " + p.toString() + "!"); BaseProcessor.err("Duplicate file name: " + p + "!");
}else{ }else{
names.add(name); names.add(name);
} }
@@ -133,14 +157,20 @@ public class AssetsProcess extends BaseProcessor{
String filepath = path.substring(path.lastIndexOf("/") + 1) + p.path().substring(p.path().lastIndexOf(path) + path.length()); String filepath = path.substring(path.lastIndexOf("/") + 1) + p.path().substring(p.path().lastIndexOf(path) + path.length());
String filename = "\"" + filepath + "\""; staticb.addStatement("soundToId.put($L, $L)", name, id);
loadBegin.addStatement("arc.Core.assets.load(" + filename + ", " + rtype + ".class).loaded = a -> " + name + " = (" + rtype + ")a", filepath, filepath.replace(".ogg", ".mp3"));
type.addField(FieldSpec.builder(ClassName.bestGuess(rtype), name, Modifier.STATIC, Modifier.PUBLIC).initializer("new arc.audio." + rtype.substring(rtype.lastIndexOf(".") + 1) + "()").build()); loadBegin.addStatement("$T.assets.load($S, $L.class).loaded = a -> { $L = ($L)a; soundToId.put(a, $L); idToSound.put($L, a); }",
}); Core.class, filepath, rtype, name, rtype, id, id);
type.addField(FieldSpec.builder(ClassName.bestGuess(rtype), name, Modifier.STATIC, Modifier.PUBLIC).initializer("new " + rtype + "()").build());
id ++;
}
type.addStaticBlock(staticb.build());
if(classname.equals("Sounds")){ if(classname.equals("Sounds")){
type.addField(FieldSpec.builder(ClassName.bestGuess(rtype), "none", Modifier.STATIC, Modifier.PUBLIC).initializer("new arc.audio." + rtype.substring(rtype.lastIndexOf(".") + 1) + "()").build()); type.addField(FieldSpec.builder(ClassName.bestGuess(rtype), "none", Modifier.STATIC, Modifier.PUBLIC).initializer("new " + rtype + "()").build());
} }
type.addMethod(loadBegin.build()); type.addMethod(loadBegin.build());

View File

@@ -7,6 +7,7 @@ import com.sun.tools.javac.code.Attribute.Enum;
import com.sun.tools.javac.code.Attribute.Error; import com.sun.tools.javac.code.Attribute.Error;
import com.sun.tools.javac.code.Attribute.Visitor; import com.sun.tools.javac.code.Attribute.Visitor;
import com.sun.tools.javac.code.Attribute.*; import com.sun.tools.javac.code.Attribute.*;
import com.sun.tools.javac.code.Scope.*;
import com.sun.tools.javac.code.Type; import com.sun.tools.javac.code.Type;
import com.sun.tools.javac.code.Symbol.*; import com.sun.tools.javac.code.Symbol.*;
import com.sun.tools.javac.code.Type.ArrayType; import com.sun.tools.javac.code.Type.ArrayType;
@@ -64,36 +65,13 @@ public class AnnotationProxyMaker{
LinkedHashMap map = new LinkedHashMap(); LinkedHashMap map = new LinkedHashMap();
ClassSymbol cl = (ClassSymbol)this.anno.type.tsym; ClassSymbol cl = (ClassSymbol)this.anno.type.tsym;
//try to use Java 8 API for this if possible for(Symbol s : cl.members().getSymbols(LookupKind.NON_RECURSIVE)){
try{ if(s.getKind() == ElementKind.METHOD){
Class entryClass = Class.forName("com.sun.tools.javac.code.Scope$Entry"); MethodSymbol var4 = (MethodSymbol)s;
Object members = cl.members(); Attribute var5 = var4.getDefaultValue();
Field field = members.getClass().getField("elems"); if(var5 != null){
Object elems = field.get(members); map.put(var4, var5);
Field siblingField = entryClass.getField("sibling");
Field symField = entryClass.getField("sym");
for(Object currEntry = elems; currEntry != null; currEntry = siblingField.get(currEntry)){
handleSymbol((Symbol)symField.get(currEntry), map);
}
}catch(Throwable e){
//otherwise try other API
try{
Class lookupClass = Class.forName("com.sun.tools.javac.code.Scope$LookupKind");
Field nonRecField = lookupClass.getField("NON_RECURSIVE");
Object nonRec = nonRecField.get(null);
Scope scope = cl.members();
Method getSyms = scope.getClass().getMethod("getSymbols", lookupClass);
Iterable<Symbol> it = (Iterable<Symbol>)getSyms.invoke(scope, nonRec);
Iterator<Symbol> i = it.iterator();
while(i.hasNext()){
handleSymbol(i.next(), map);
} }
}catch(Throwable death){
//I tried
throw new RuntimeException(death);
} }
} }
@@ -104,17 +82,6 @@ public class AnnotationProxyMaker{
return map; return map;
} }
private void handleSymbol(Symbol sym, LinkedHashMap map){
if(sym.getKind() == ElementKind.METHOD){
MethodSymbol var4 = (MethodSymbol)sym;
Attribute var5 = var4.getDefaultValue();
if(var5 != null){
map.put(var4, var5);
}
}
}
private Object generateValue(MethodSymbol var1, Attribute var2){ private Object generateValue(MethodSymbol var1, Attribute var2){
AnnotationProxyMaker.ValueVisitor var3 = new AnnotationProxyMaker.ValueVisitor(var1); AnnotationProxyMaker.ValueVisitor var3 = new AnnotationProxyMaker.ValueVisitor(var1);
return var3.getValue(var2); return var3.getValue(var2);

View File

@@ -12,6 +12,10 @@ import java.lang.Class;
import java.lang.annotation.*; import java.lang.annotation.*;
import java.lang.reflect.*; import java.lang.reflect.*;
/**
* Wrapper over Element with added utility functions.
* I would have preferred to use extension methods for this, but Java doesn't have any.
* */
public class Selement<T extends Element>{ public class Selement<T extends Element>{
public final T e; public final T e;

View File

@@ -0,0 +1 @@
{version:2,fields:[{name:collided,type:arc.struct.IntSeq},{name:damage,type:float},{name:data,type:java.lang.Object},{name:fdata,type:float},{name:lifetime,type:float},{name:owner,type:mindustry.gen.Entityc},{name:rotation,type:float},{name:team,type:mindustry.game.Team},{name:time,type:float},{name:type,type:mindustry.entities.bullet.BulletType},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}

View File

@@ -0,0 +1 @@
{version:2,fields:[{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}

View File

@@ -0,0 +1 @@
{version:2,fields:[{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}

View File

@@ -0,0 +1 @@
{version:2,fields:[{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}

View File

@@ -0,0 +1 @@
{version:6,fields:[{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}

View File

@@ -0,0 +1 @@
{version:6,fields:[{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}

View File

@@ -0,0 +1 @@
{version:6,fields:[{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}

View File

@@ -0,0 +1 @@
{version:2,fields:[{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}

View File

@@ -0,0 +1 @@
{version:6,fields:[{name:ammo,type:float},{name:baseRotation,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}

View File

@@ -0,0 +1 @@
{version:4,fields:[{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}

View File

@@ -0,0 +1 @@
{version:5,fields:[{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}

View File

@@ -0,0 +1 @@
{version:4,fields:[{name:ammo,type:float},{name:baseRotation,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}

View File

@@ -0,0 +1 @@
{version:4,fields:[{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}

View File

@@ -0,0 +1 @@
{version:4,fields:[{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}

View File

@@ -0,0 +1 @@
{version:2,fields:[{name:ammo,type:float},{name:baseRotation,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}

View File

@@ -0,0 +1 @@
{version:5,fields:[{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:payloads,type:arc.struct.Seq<mindustry.world.blocks.payloads.Payload>},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}

View File

@@ -0,0 +1 @@
{version:2,fields:[{name:ammo,type:float},{name:baseRotation,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}

View File

@@ -0,0 +1 @@
{version:6,fields:[{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}

View File

@@ -0,0 +1 @@
{version:5,fields:[{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}

View File

@@ -0,0 +1 @@
{version:2,fields:[{name:ammo,type:float},{name:controller,type:mindustry.entities.units.UnitController},{name:elevation,type:float},{name:flag,type:double},{name:health,type:float},{name:isShooting,type:boolean},{name:mineTile,type:mindustry.world.Tile},{name:mounts,type:"mindustry.entities.units.WeaponMount[]"},{name:plans,type:arc.struct.Queue<mindustry.entities.units.BuildPlan>},{name:rotation,type:float},{name:shield,type:float},{name:spawnedByCore,type:boolean},{name:stack,type:mindustry.type.ItemStack},{name:statuses,type:arc.struct.Seq<mindustry.entities.units.StatusEntry>},{name:team,type:mindustry.game.Team},{name:type,type:mindustry.type.UnitType},{name:updateBuilding,type:boolean},{name:vel,type:arc.math.geom.Vec2},{name:x,type:float},{name:y,type:float}]}

View File

@@ -57,7 +57,7 @@ allprojects{
if(!project.hasProperty("versionType")) versionType = 'official' if(!project.hasProperty("versionType")) versionType = 'official'
appName = 'Mindustry' appName = 'Mindustry'
steamworksVersion = '0b86023401880bb5e586bc404bedbaae9b1f1c94' steamworksVersion = '0b86023401880bb5e586bc404bedbaae9b1f1c94'
rhinoVersion = '55bf0dac1cfa7770672fd26112512c733ca9d5dc' rhinoVersion = '9f792d202471fb3789eab7bb261fec13d67287e2'
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 }
@@ -501,8 +501,10 @@ task deployAll{
dependsOn "desktop:packrWindows64" dependsOn "desktop:packrWindows64"
dependsOn "desktop:packrWindows32" dependsOn "desktop:packrWindows32"
dependsOn "desktop:packrMacOS" dependsOn "desktop:packrMacOS"
dependsOn "server:deploy" if(versionModifier != "steam"){
dependsOn "android:deploy" dependsOn "server:deploy"
dependsOn "android:deploy"
}
} }
task resolveDependencies{ task resolveDependencies{

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 B

After

Width:  |  Height:  |  Size: 117 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 B

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 B

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 B

View File

@@ -101,6 +101,7 @@ customgame = Custom Game
newgame = New Game newgame = New Game
none = <none> none = <none>
none.found = [lightgray]<none found> none.found = [lightgray]<none found>
none.inmap = [lightgray]<none in map>
minimap = Minimap minimap = Minimap
position = Position position = Position
close = Close close = Close
@@ -806,6 +807,7 @@ bullet.reload = [stat]{0}[lightgray]x fire rate
unit.blocks = blocks unit.blocks = blocks
unit.blockssquared = blocks² unit.blockssquared = blocks²
unit.powersecond = power units/second unit.powersecond = power units/second
unit.tilessecond = tiles/second
unit.liquidsecond = liquid units/second unit.liquidsecond = liquid units/second
unit.itemssecond = items/second unit.itemssecond = items/second
unit.liquidunits = liquid units unit.liquidunits = liquid units
@@ -994,6 +996,7 @@ rules.wavetimer = Wave Timer
rules.waves = Waves rules.waves = Waves
rules.attack = Attack Mode rules.attack = Attack Mode
rules.buildai = AI Building rules.buildai = AI Building
rules.cleanupdeadteams = Clean Up Defeated Team Buildings (PvP)
rules.corecapture = Capture Core On Destruction rules.corecapture = Capture Core On Destruction
rules.polygoncoreprotection = Polygonal Core Protection rules.polygoncoreprotection = Polygonal Core Protection
rules.enemyCheat = Infinite AI (Red Team) Resources rules.enemyCheat = Infinite AI (Red Team) Resources
@@ -1592,7 +1595,7 @@ lst.set = Set a variable.
lst.operation = Perform an operation on 1-2 variables. lst.operation = Perform an operation on 1-2 variables.
lst.end = Jump to the top of the instruction stack. lst.end = Jump to the top of the instruction stack.
lst.wait = Wait a certain number of seconds. lst.wait = Wait a certain number of seconds.
lst.lookup = Look up a item/liquid/unit/block type by ID.\nTotal counts of each type can be accessed with:\n[accent]@unitCount[] / [accent]@itemCount[] / [accent]@liquidCount[] / [accent]@blockCount[] lst.lookup = Look up an item/liquid/unit/block type by ID.\nTotal counts of each type can be accessed with:\n[accent]@unitCount[] / [accent]@itemCount[] / [accent]@liquidCount[] / [accent]@blockCount[]
lst.jump = Conditionally jump to another statement. lst.jump = Conditionally jump to another statement.
lst.unitbind = Bind to the next unit of a type, and store it in [accent]@unit[]. lst.unitbind = Bind to the next unit of a type, and store it in [accent]@unit[].
lst.unitcontrol = Control the currently bound unit. lst.unitcontrol = Control the currently bound unit.

View File

@@ -41,11 +41,13 @@ be.ignore = Ignorar
be.noupdates = No se encontraron actualizaciones. be.noupdates = No se encontraron actualizaciones.
be.check = Buscar actualizaciones be.check = Buscar actualizaciones
mod.featured.title = Explorador de mods mods.browser = Explorador de Mods
mod.featured.dialog.title = Explorador de Mods
mods.browser.selected = Mod seleccionado mods.browser.selected = Mod seleccionado
mods.browser.add = Installar Mod mods.browser.add = Instalar
mods.github.open = Abrir en Github mods.browser.reinstall = Reinstalar
mods.github.open = Repositorio
mods.browser.sortdate = Más recientes
mods.browser.sortstars = Mejor valorados
schematic = Plantilla schematic = Plantilla
schematic.add = Guardar plantilla... schematic.add = Guardar plantilla...
@@ -55,16 +57,24 @@ schematic.exists = Ya existe una plantilla con ese nombre.
schematic.import = Importar plantilla... schematic.import = Importar plantilla...
schematic.exportfile = Exportar archivo schematic.exportfile = Exportar archivo
schematic.importfile = Importar archivo schematic.importfile = Importar archivo
schematic.browseworkshop = Buscar en el Steam Workshop schematic.browseworkshop = Buscar en Steam Workshop
schematic.copy = Copiar al portapapeles. schematic.copy = Copiar al portapapeles.
schematic.copy.import = Importar desde el portapapeles. schematic.copy.import = Importar desde el portapapeles.
schematic.shareworkshop = Compartir en el Steam Workshop schematic.shareworkshop = Compartir en Steam Workshop
schematic.flip = [accent][[{0}][]/[accent][[{1}][]: Girar plantilla schematic.flip = [accent][[{0}][]/[accent][[{1}][]: Girar plantilla
schematic.saved = Plantilla guardada. schematic.saved = Plantilla guardada.
schematic.delete.confirm = Se borrará ésta plantilla. schematic.delete.confirm = Se borrará ésta plantilla.
schematic.rename = Renombrar plantilla schematic.rename = Renombrar plantilla
schematic.info = {0}x{1}, {2} bloques schematic.info = {0}x{1}, {2} bloques
schematic.disabled = [scarlet]Plantillas desactivadas.[]\nNo puedes usar plantillas en este [accent]mapa[] o [accent]servidor. schematic.disabled = [scarlet]Plantillas desactivadas.[]\nNo puedes usar plantillas en este [accent]mapa[] o [accent]servidor.
schematic.tags = Etiquetas:
schematic.edittags = Editar Etiquetas
schematic.addtag = Añadir Etiqueta
schematic.texttag = Texto de Etiqueta
schematic.icontag = Icono de Etiqueta
schematic.renametag = Renombrar Etiqueta
schematic.tagdelconfirm = ¿Eliminar ésta etiqueta?
schematic.tagexists = Esa etiqueta ya existe.
stats = Estadísticas stats = Estadísticas
stat.wave = Oleadas Derrotadas:[accent] {0} stat.wave = Oleadas Derrotadas:[accent] {0}
@@ -77,12 +87,12 @@ stat.playtime = Tiempo jugado:[accent] {0}
stat.rank = Rango final: [accent]{0} stat.rank = Rango final: [accent]{0}
globalitems = [accent]Recursos Totales globalitems = [accent]Recursos Totales
map.delete = ¿Estás seguro de que quieres borrar el mapa "[accent]{0}[]"? map.delete = ¿Quieres borrar el mapa "[accent]{0}[]"?
level.highscore = Puntuación más alta: [accent]{0} level.highscore = Puntuación más alta: [accent]{0}
level.select = Selección de nivel level.select = Selección de Nivel
level.mode = Modo de juego: level.mode = Modo de juego:
coreattack = < ¡El núcleo está bajo ataque! > coreattack = < ¡El núcleo está bajo ataque! >
nearpoint = [[ [scarlet]ABANDONA EL PUNTO DE APARICIÓN INMEDIATAMENTE[] ]\nRiesgo de aniquilación inminente nearpoint = [[ [scarlet]ABANDONA EL PUNTO DE ATERRIZAJE INMEDIATAMENTE[] ]\nRiesgo de aniquilación inminente
database = Base de datos database = Base de datos
savegame = Guardar Partida savegame = Guardar Partida
loadgame = Cargar Partida loadgame = Cargar Partida
@@ -90,6 +100,7 @@ joingame = Unirse a Partida
customgame = Crear Partida customgame = Crear Partida
newgame = Nueva Partida newgame = Nueva Partida
none = <no hay> none = <no hay>
none.found = [lightgray]<no hay coincidencias>
minimap = Minimapa minimap = Minimapa
position = Posición position = Posición
close = Cerrar close = Cerrar
@@ -110,17 +121,20 @@ committingchanges = Confirmando Cambios
done = Hecho done = Hecho
feature.unsupported = Tu dispositivo no es compatible con esta función. feature.unsupported = Tu dispositivo no es compatible con esta función.
mods.alphainfo = Ten en cuenta que los mods estan en fase Alpha, y[scarlet] pueden tener varios errores[].\nReporta cualquier error que encuentres en la página de GitHub de Mindustry. mods.initfailed = [red]⚠[] La anterior ejecución de Mindustry encontró un fallo al inicializarse. Seguramente fue causado por algún mod erróneo.\n\nPara evitar un bucle de erroes al iniciar el juego, [red]se han desactivado todos los mods.[]\n\nPuedes desactivar ésta medida de seguridad desde [accent]Opciones->Juego->Desactivar mods si el juego encuentra un error al iniciarse.[].
mods = Mods mods = Mods
mods.none = [lightgray]¡No se encontraron Mods! mods.none = [lightgray]¡No se encontraron Mods!
mods.guide = Guía de Modding mods.guide = Guía sobre Mods
mods.report = Reportar Error mods.report = Reportar Error
mods.openfolder = Abrir carpeta de mods mods.openfolder = Abrir carpeta de mods
mods.viewcontent = Ver Contenido
mods.reload = Recargar mods.reload = Recargar
mods.reloadexit = A continuación se cerrará el juego para recargar los mods. mods.reloadexit = A continuación se cerrará el juego para recargar los mods.
mod.installed = [[Instalado]
mod.display = [gray]Mod:[orange] {0} mod.display = [gray]Mod:[orange] {0}
mod.enabled = [lightgray]Activado mod.enabled = [lightgray]Activado
mod.disabled = [scarlet]Desactivado mod.disabled = [scarlet]Desactivado
mod.multiplayer.compatible = [gray]Compatible con Multijugador
mod.disable = Desactivar mod.disable = Desactivar
mod.content = Contenido: mod.content = Contenido:
mod.delete.error = No se pudo elminar el mod. Tal vez esté en uso por el juego. mod.delete.error = No se pudo elminar el mod. Tal vez esté en uso por el juego.
@@ -130,20 +144,20 @@ mod.missingdependencies = [scarlet]Dependencias faltantes: {0}
mod.erroredcontent = [scarlet]Contenido erróneo mod.erroredcontent = [scarlet]Contenido erróneo
mod.errors = Ha ocurrido un fallo al cargar el contenido. mod.errors = Ha ocurrido un fallo al cargar el contenido.
mod.noerrorplay = [scarlet]Se están ejecutando algunos mods con fallos.[]Deshabilítalos o arregla los errores antes de jugar. mod.noerrorplay = [scarlet]Se están ejecutando algunos mods con fallos.[]Deshabilítalos o arregla los errores antes de jugar.
mod.nowdisabled = [scarlet]Al/Los Mod/s '{0}'le esta/n faltando dependencias:[accent] {1}\n[lightgray]Estos mods necesitan descargarse primero.\nEste mod será automaticamente desactivado. mod.nowdisabled = [scarlet]El mod '{0}' necesita ejecutarse junto a otros mods de los que depende:[accent] {1}\n[lightgray]Es necesario descargar primero estos mods.\nEste mod será automaticamente desactivado.
mod.enable = Activar mod.enable = Activar
mod.requiresrestart = El juego se cerrará para aplicar los mods. mod.requiresrestart = El juego se cerrará para aplicar los mods.
mod.reloadrequired = [scarlet]Se requiere volver a cargar mod.reloadrequired = [scarlet]Es necesario Reiniciar
mod.import = Importar mod mod.import = Importar mod
mod.import.file = Importar archivo mod.import.file = Importar archivo
mod.import.github = Importar Mod de Github mod.import.github = Importar desde Github
mod.jarwarn = [scarlet]Los mods JAR pueden no ser seguros.[]\n¡Asegúrate de haberlos descargado de una fuente en la que confíes! mod.jarwarn = [scarlet]Los mods JAR pueden no ser seguros.[]\n¡Asegúrate de haberlos descargado de una fuente en la que confíes!
mod.item.remove = Este objeto es parte del[accent] '{0}'[] mod. Para eliminarlo, desinstala ese mod. mod.item.remove = Este objeto es parte del[accent] '{0}'[] mod. Para eliminarlo, desinstala ese mod.
mod.remove.confirm = Este mod va a ser eliminado.\n¿Quieres continuar? mod.remove.confirm = Este mod va a ser eliminado.\n¿Quieres continuar?
mod.author = [lightgray]Autor:[] {0} mod.author = [lightgray]Autor:[] {0}
mod.missing = Esta partida guardada usa mods que has actualizado recientemente o que no tienes instalados. Se puede corromper la partida guardada. ¿Quieres cargarla a pesar de ello?\n[lightgray]Mods:\n{0} mod.missing = Esta partida guardada usa mods que has actualizado recientemente o que no tienes instalados. Se puede corromper la partida guardada. ¿Quieres cargarla a pesar de ello?\n[lightgray]Mods:\n{0}
mod.preview.missing = Antes de publicar este mod en el Steam Workshop, debe añadir una imagen de vista previa.\nAñada una imagen con nombre[accent] preview.png[] en la carpeta del mod e intente nuevamente. mod.preview.missing = Antes de publicar este mod en Steam Workshop, debes añadir una imagen de vista previa.\nAñade una imagen llamada[accent] preview.png[] en la carpeta del mod e inténtalo de nuevo.
mod.folder.missing = Solo los mods en forma de carpeta se pueden publicar en el Steam Workshop.\nPara convertir cualquier mod en una carpeta, simplemente descomprima su archivo a una carpeta y elimine el zip anterior, luego reinicie su juego o vuelva a cargar sus mods. mod.folder.missing = Sólo los mods en forma de carpeta se pueden publicar en Steam Workshop.\nPara convertir cualquier mod en una carpeta, descomprime su archivo a una carpeta y elimina el zip anterior, luego reinicia el juego o vuelve a cargar tus mods.
mod.scripts.disable = Tu dispositivo no es compatible con mods con scripts. Debes deshabilitar esos mods para jugar. mod.scripts.disable = Tu dispositivo no es compatible con mods con scripts. Debes deshabilitar esos mods para jugar.
about.button = Acerca de... about.button = Acerca de...
@@ -214,6 +228,8 @@ trace.ip = IP: [accent]{0}
trace.id = ID Única: [accent]{0} trace.id = ID Única: [accent]{0}
trace.mobile = Cliente de móvil: [accent]{0} trace.mobile = Cliente de móvil: [accent]{0}
trace.modclient = Cliente Personalizado: [accent]{0} trace.modclient = Cliente Personalizado: [accent]{0}
trace.times.joined = Se ha unido [accent]{0} []veces
trace.times.kicked = Fue expulsado [accent]{0} []veces
invalidid = ¡ID de cliente inválida! Por favor, envía un informe del error. invalidid = ¡ID de cliente inválida! Por favor, envía un informe del error.
server.bans = Expulsiones server.bans = Expulsiones
server.bans.none = No se ha baneado a ningún usuario aún server.bans.none = No se ha baneado a ningún usuario aún
@@ -222,16 +238,16 @@ server.admins.none = ¡No hay ningún administrador!
server.add = Agregar Servidor server.add = Agregar Servidor
server.delete = ¿Estás seguro de querer borrar este servidor? server.delete = ¿Estás seguro de querer borrar este servidor?
server.edit = Editar Servidor server.edit = Editar Servidor
server.outdated = [crimson]¡Servidor desactualizado![] server.outdated = [scarlet]¡Servidor Desactualizado![]
server.outdated.client = [crimson]¡Cliente desactualizado![] server.outdated.client = [scarlet]¡Cliente Desactualizado![]
server.version = [lightgray]Versión: {0} server.version = [gray]v{0} {1}
server.custombuild = [accent]Versión personalizada server.custombuild = [accent]Versión Personalizada
confirmban = ¿Quieres banear a este jugador? confirmban = ¿Quieres banear a "{0}[white]"?
confirmkick = ¿Estás seguro de querer expulsar este jugador? confirmkick = ¿Quieres expulsar a "{0}[white]"?
confirmvotekick = ¿Estás de acuerdo en expulsar este jugador? confirmvotekick = ¿Estás a favor de expulsar a "{0}[white]"?
confirmunban = ¿Quieres desbanear a este jugador? confirmunban = ¿Quieres desbanear a este jugador?
confirmadmin = ¿Quieres hacer administrador a este jugador? confirmadmin = ¿Quieres hacer administrador a "{0}[white]"?
confirmunadmin = ¿Quieres quitar los permisos de administrador a este jugador? confirmunadmin = ¿Quieres quitarle los permisos de administrador a "{0}[white]"?
joingame.title = Unirse a Partida joingame.title = Unirse a Partida
joingame.ip = IP: joingame.ip = IP:
disconnect = Desconectado. disconnect = Desconectado.
@@ -287,6 +303,7 @@ cancel = Cancelar
openlink = Abrir Enlace openlink = Abrir Enlace
copylink = Copiar Enlace copylink = Copiar Enlace
back = Atrás back = Atrás
max = Máximo
crash.export = Exportar Registros de errores crash.export = Exportar Registros de errores
crash.none = No se encontraron Registros de errores. crash.none = No se encontraron Registros de errores.
crash.exported = Registros de errores exportados. crash.exported = Registros de errores exportados.
@@ -361,7 +378,6 @@ editor.center = Centrar
workshop = Steam Workshop workshop = Steam Workshop
waves.title = Oleadas waves.title = Oleadas
waves.remove = Borrar waves.remove = Borrar
waves.never = <nunca>
waves.every = cada waves.every = cada
waves.waves = oleada(s) waves.waves = oleada(s)
waves.perspawn = por lugar de aparición waves.perspawn = por lugar de aparición
@@ -444,6 +460,7 @@ toolmode.drawteams = Dibujar Equipos
toolmode.drawteams.description = Dibuja equipos en lugar de bloques. toolmode.drawteams.description = Dibuja equipos en lugar de bloques.
filters.empty = [lightgray]¡No hay filtros! Añade uno con el botón de abajo. filters.empty = [lightgray]¡No hay filtros! Añade uno con el botón de abajo.
filter.distort = Distorsionar filter.distort = Distorsionar
filter.noise = Ruido filter.noise = Ruido
filter.enemyspawn = Punto de aparición enemigo filter.enemyspawn = Punto de aparición enemigo
@@ -460,19 +477,22 @@ filter.clear = Despejar
filter.option.ignore = Ignorar filter.option.ignore = Ignorar
filter.scatter = Dispersar filter.scatter = Dispersar
filter.terrain = Terreno filter.terrain = Terreno
filter.option.scale = Escala filter.option.scale = Escala
filter.option.chance = Probabilidad filter.option.chance = Probabilidad
filter.option.mag = Magnitud filter.option.mag = Magnitud
filter.option.threshold = Umbral filter.option.threshold = Umbral
filter.option.circle-scale = Escala del círculo filter.option.circle-scale = Escala del círculo
filter.option.octaves = Continuidad filter.option.octaves = Continuidad
filter.option.falloff = Aterrizaje filter.option.falloff = Caída
filter.option.angle = Ángulo filter.option.angle = Ángulo
filter.option.rotate = Rotación
filter.option.amount = Cantidad filter.option.amount = Cantidad
filter.option.block = Bloque filter.option.block = Bloque
filter.option.floor = Suelo filter.option.floor = Suelo
filter.option.flooronto = Suelo objetivo filter.option.flooronto = Suelo objetivo
filter.option.target = Target filter.option.target = Objetivo
filter.option.replacement = Reemplazo
filter.option.wall = Muro filter.option.wall = Muro
filter.option.ore = Veta filter.option.ore = Veta
filter.option.floor2 = Terreno secundario filter.option.floor2 = Terreno secundario
@@ -484,11 +504,12 @@ width = Ancho:
height = Alto: height = Alto:
menu = Menú menu = Menú
play = Jugar play = Jugar
campaign = Continuar Campaña campaign = Campaña
load = Cargar load = Cargar
save = Guardar save = Guardar
fps = FPS: {0} fps = FPS: {0}
ping = Ping: {0} ms ping = Ping: {0}ms
tps = TPS: {0}
memory = Mem: {0}mb memory = Mem: {0}mb
memory2 = Mem:\n {0}mb +\n {1}mb memory2 = Mem:\n {0}mb +\n {1}mb
language.restart = Reinicia el juego para que los cambios en el idioma tengan efecto. language.restart = Reinicia el juego para que los cambios en el idioma tengan efecto.
@@ -565,6 +586,7 @@ sector.attacked = Sector [accent]{0}[white] bajo ataque[]!
sector.lost = ¡Sector [accent]{0}[white] perdido[]! sector.lost = ¡Sector [accent]{0}[white] perdido[]!
#nota: el espacio en blanco en la línea siguiente es intencionado #nota: el espacio en blanco en la línea siguiente es intencionado
sector.captured = ¡Sector [accent]{0}[white] capturado[]! sector.captured = ¡Sector [accent]{0}[white] capturado[]!
sector.changeicon = Cambiar Icono
threat.low = Baja threat.low = Baja
threat.medium = Media threat.medium = Media
@@ -611,6 +633,20 @@ sector.extractionOutpost.description = Una base remota, construida por el enemig
sector.impact0078.description = Aquí yacen las ruinas de la primera estación de transporte interestelar en estar operativa del sistema.\n\nRecupera todo lo posible de los escombros. Investiga cualquier tecnología intacta. sector.impact0078.description = Aquí yacen las ruinas de la primera estación de transporte interestelar en estar operativa del sistema.\n\nRecupera todo lo posible de los escombros. Investiga cualquier tecnología intacta.
sector.planetaryTerminal.description = El objetivo final.\n\nÉsta base costera alberga una estructura capaz de lanzar Núcleos a planeteas locales. Está extremadamente bien protegida.\n\nProduce unidades navales. Acaba con el enemigo lo antes posible. Analiza la estructura de lanzamiento. sector.planetaryTerminal.description = El objetivo final.\n\nÉsta base costera alberga una estructura capaz de lanzar Núcleos a planeteas locales. Está extremadamente bien protegida.\n\nProduce unidades navales. Acaba con el enemigo lo antes posible. Analiza la estructura de lanzamiento.
status.burning.name = En llamas
status.freezing.name = Congelado
status.wet.name = Húmedo
status.muddy.name = Fangoso
status.melting.name = Fundido
status.sapped.name = Debilitado
status.electrified.name = Electrificado
status.spore-slowed.name = Ralentizado
status.tarred.name = Alquitranado
status.overclock.name = Sobrecargado
status.shocked.name = Aturdido
status.blasted.name = Explotado
status.unmoving.name = Inmóvil
settings.language = Idioma settings.language = Idioma
settings.data = Datos del Juego settings.data = Datos del Juego
settings.reset = Reiniciar a los valores por defecto settings.reset = Reiniciar a los valores por defecto
@@ -632,6 +668,7 @@ settings.clearcampaignsaves.confirm = ¿Quieres borrar tus partidas guardadas en
paused = [accent] < Pausado > paused = [accent] < Pausado >
clear = Vaciar clear = Vaciar
banned = [scarlet]Baneado banned = [scarlet]Baneado
unsupported.environment = [scarlet]Entorno no válido
yes = yes =
no = No no = No
info.title = Información info.title = Información
@@ -641,12 +678,14 @@ unit.nobuild = [scarlet]Esta unidad no puede construir
lastaccessed = [lightgray]Último usado: {0} lastaccessed = [lightgray]Último usado: {0}
block.unknown = [lightgray]??? block.unknown = [lightgray]???
stat.showinmap = <cargar mapa para mostrar>
stat.description = Objetivo stat.description = Objetivo
stat.input = Entrada stat.input = Entrada
stat.output = Salida stat.output = Salida
stat.booster = Potenciador stat.booster = Potenciador
stat.tiles = Terreno requerido stat.tiles = Terreno requerido
stat.affinities = Afinidades stat.affinities = Afinidades
stat.opposites = Opuestos
stat.powercapacity = Capacidad de Energía stat.powercapacity = Capacidad de Energía
stat.powershot = Energía/Disparo stat.powershot = Energía/Disparo
stat.damage = Daño stat.damage = Daño
@@ -669,6 +708,7 @@ stat.memorycapacity = Capacidad de memoria
stat.basepowergeneration = Generación de energía stat.basepowergeneration = Generación de energía
stat.productiontime = Tiempo de producción stat.productiontime = Tiempo de producción
stat.repairtime = Tiempo para Reparar Bloque Completamente stat.repairtime = Tiempo para Reparar Bloque Completamente
stat.repairspeed = Velocidad de Reparación
stat.weapons = Armas stat.weapons = Armas
stat.bullet = Proyectil stat.bullet = Proyectil
stat.speedincrease = Aumento de Velocidad stat.speedincrease = Aumento de Velocidad
@@ -705,15 +745,24 @@ stat.minetier = Nivel de taladro
stat.payloadcapacity = Capacidad de carga stat.payloadcapacity = Capacidad de carga
stat.commandlimit = Límite de comando stat.commandlimit = Límite de comando
stat.abilities = Habilidades stat.abilities = Habilidades
stat.canboost = Tiene Propulsores stat.canboost = Potenciador
stat.flying = Aéreo stat.flying = Aéreo
stat.ammouse = Usa Munición
stat.damagemultiplier = Multiplicador de Daño
stat.healthmultiplier = Multiplicador de Vida
stat.speedmultiplier = Multiplicador de Velocidad
stat.reloadmultiplier = Multiplicador de Recarga
stat.buildspeedmultiplier = Multiplicador de Velocidad de Construcción
stat.reactive = Reacciona
stat.healing = Sanador
ability.forcefield = Campo de Fuerza ability.forcefield = Campo de Escudo
ability.repairfield = Campo de Reparación ability.repairfield = Campo de Reparación
ability.statusfield = Campo de Estado ability.statusfield = {0} Campo de aceleración
ability.unitspawn = {0} Fábrica de Drones ability.unitspawn = {0} Fábrica
ability.shieldregenfield = Campo de Regeneración de Escudos ability.shieldregenfield = Regeneración de Armaduras
ability.movelightning = Movimiento Relámpago ability.movelightning = Movimiento Relámpago
ability.energyfield = Campo de Energía: [accent]{0}[] daño ~ [accent]{1}[] bloques / [accent]{2}[] objetivos
bar.drilltierreq = Requiere un taladro mejor bar.drilltierreq = Requiere un taladro mejor
bar.noresources = Recursos insuficientes bar.noresources = Recursos insuficientes
@@ -736,29 +785,28 @@ bar.power = Energía
bar.progress = Progreso de construcción bar.progress = Progreso de construcción
bar.input = Entrada bar.input = Entrada
bar.output = Salida bar.output = Salida
bar.strength = [stat]{0}[lightgray]x fuerza
units.processorcontrol = [lightgray]Controlado por Procesador units.processorcontrol = [lightgray]Controlado por Procesador
bullet.damage = [stat]{0}[lightgray] Daño bullet.damage = [stat]{0}[lightgray] Daño
bullet.splashdamage = [stat]{0}[lightgray] daño de área ~[stat] {1}[lightgray] casillas bullet.splashdamage = [stat]{0}[lightgray] área daño ~[stat] {1}[lightgray] bloques
bullet.incendiary = [stat]Incendiaria bullet.incendiary = [stat]Incendiaria
bullet.sapping = [stat]Oxidante
bullet.homing = [stat]Rastreadora bullet.homing = [stat]Rastreadora
bullet.shock = [stat]Electrizante
bullet.frag = [stat]De fragmentación bullet.frag = [stat]De fragmentación
bullet.buildingdamage = [stat]{0}%[lightgray]daño a estructuras bullet.lightning = [stat]{0}[lightgray]x rayo ~ [stat]{1}[lightgray] daño
bullet.knockback = [stat]{0}[lightgray] Empuje bullet.buildingdamage = [stat]{0}%[lightgray] daño a estructuras
bullet.pierce = [stat]{0}[lightgray]x penetración bullet.knockback = [stat]{0}[lightgray] empuje
bullet.infinitepierce = [stat]Penetrante bullet.pierce = [stat]{0}[lightgray]x perforación
bullet.infinitepierce = [stat]Perforante
bullet.healpercent = [stat]{0}[lightgray]% reparación bullet.healpercent = [stat]{0}[lightgray]% reparación
bullet.freezing = [stat]Congelación
bullet.tarred = [stat]Ralentizado
bullet.multiplier = [stat]{0}[lightgray]x multiplicador de munición bullet.multiplier = [stat]{0}[lightgray]x multiplicador de munición
bullet.reload = [stat]{0}[lightgray]x cadencia de fuego bullet.reload = [stat]{0}[lightgray]x cadencia de fuego
unit.blocks = bloques unit.blocks = bloques
unit.blockssquared = bloques² unit.blockssquared = bloques²
unit.powersecond = unidades de energía/segundo unit.powersecond = unidades de energía/segundo
unit.tilessecond = bloques/segundo
unit.liquidsecond = unidades de líquido/segundo unit.liquidsecond = unidades de líquido/segundo
unit.itemssecond = objetos/segundo unit.itemssecond = objetos/segundo
unit.liquidunits = unidades de líquido unit.liquidunits = unidades de líquido
@@ -775,6 +823,7 @@ unit.items = objetos
unit.thousands = k unit.thousands = k
unit.millions = M unit.millions = M
unit.billions = b unit.billions = b
unit.pershot = /disparo
category.purpose = Objetivo category.purpose = Objetivo
category.general = General category.general = General
category.power = Energía category.power = Energía
@@ -788,10 +837,13 @@ setting.shadows.name = Sombras
setting.blockreplace.name = Sugerir bloques al construir setting.blockreplace.name = Sugerir bloques al construir
setting.linear.name = Filtrado Lineal setting.linear.name = Filtrado Lineal
setting.hints.name = Consejos setting.hints.name = Consejos
setting.logichints.name = Consejos sobre "Bloques Lógicos"
setting.flow.name = Mostrar tasa de flujo de recursos setting.flow.name = Mostrar tasa de flujo de recursos
setting.backgroundpause.name = Pausar en segundo plano setting.backgroundpause.name = Pausar en segundo plano
setting.buildautopause.name = Auto-pausar construcción setting.buildautopause.name = Auto-pausar construcción
setting.animatedwater.name = Animaciones de Terreno setting.doubletapmine.name = Doble-Click para Extraer minerales
setting.modcrashdisable.name = Desactivar Mods si se cuelga el juego
setting.animatedwater.name = Animación de Terreno
setting.animatedshields.name = Animación de Escudos setting.animatedshields.name = Animación de Escudos
setting.antialias.name = Antialias[lightgray] (necesita un reinicio)[] setting.antialias.name = Antialias[lightgray] (necesita un reinicio)[]
setting.playerindicators.name = Indicadores de Jugadores setting.playerindicators.name = Indicadores de Jugadores
@@ -844,6 +896,7 @@ setting.bridgeopacity.name = Opacidad de Puentes Transportadores
setting.playerchat.name = Mostrar el chat de burbuja setting.playerchat.name = Mostrar el chat de burbuja
setting.showweather.name = Efectos visuales climáticos setting.showweather.name = Efectos visuales climáticos
public.confirm = ¿Quieres hacer pública tu partida?\n[lightgray]Esto se puede cambiar más tarde en "Configuración->Juego->Visibilidad pública de la partida". public.confirm = ¿Quieres hacer pública tu partida?\n[lightgray]Esto se puede cambiar más tarde en "Configuración->Juego->Visibilidad pública de la partida".
public.confirm.really = ¡Si quieres jugar con amigos, usa [green]Invitar a Amigos[] en lugar de un [scarlet]Servidor Público[]!\n¿De verdad quieres hacer [scarlet]pública[] tu partida?
public.beta = Recuerda que no puedes crear partidas públicas en las versiones beta del juego. public.beta = Recuerda que no puedes crear partidas públicas en las versiones beta del juego.
uiscale.reset = La escala de la interfaz ha sido modificada.\nPulsa "OK" para conservar esta escala.\n[scarlet]Se desharán los cambios automáticamente en [accent] {0}[] segundos... uiscale.reset = La escala de la interfaz ha sido modificada.\nPulsa "OK" para conservar esta escala.\n[scarlet]Se desharán los cambios automáticamente en [accent] {0}[] segundos...
uiscale.cancel = Cancelar y Salir uiscale.cancel = Cancelar y Salir
@@ -908,7 +961,8 @@ keybind.pause.name = Pausa
keybind.pause_building.name = Pausar/Reanudar construcción keybind.pause_building.name = Pausar/Reanudar construcción
keybind.minimap.name = Minimapa keybind.minimap.name = Minimapa
keybind.planet_map.name = Mapa del Planeta keybind.planet_map.name = Mapa del Planeta
keybind.research.name = Investigaciones keybind.research.name = Investigar
keybind.block_info.name = Información del Bloque
keybind.chat.name = Chat keybind.chat.name = Chat
keybind.player_list.name = Lista de jugadores keybind.player_list.name = Lista de jugadores
keybind.console.name = Consola keybind.console.name = Consola
@@ -935,18 +989,23 @@ mode.custom = Normas personalizadas
rules.infiniteresources = Recursos infinitos rules.infiniteresources = Recursos infinitos
rules.reactorexplosions = Los reactores pueden explotar rules.reactorexplosions = Los reactores pueden explotar
rules.coreincinerates = Núcleos inceran exceso de recursos
rules.schematic = Permitir Plantillas rules.schematic = Permitir Plantillas
rules.wavetimer = Temporizador de Oleadas rules.wavetimer = Temporizador de Oleadas
rules.waves = Oleadas rules.waves = Oleadas
rules.attack = Ataque rules.attack = Asalto
rules.buildai = La IA enemiga puede construir rules.buildai = Contrucción de IA
rules.enemyCheat = La IA enemiga tiene recursos infinitos rules.corecapture = Capturar Núcleo al Destruirlo
rules.blockhealthmultiplier = Multiplicador de salud de bloque rules.polygoncoreprotection = Protección de Núcleo Poligonal
rules.blockdamagemultiplier = Multiplicador de daño de bloque rules.enemyCheat = La IA (Equipo Rojo) tiene recursos infinitos
rules.blockhealthmultiplier = Multiplicador de Salud de Bloque
rules.blockdamagemultiplier = Multiplicador de Daño de Bloque
rules.unitbuildspeedmultiplier = Multiplicador de velocidad de creación de unidades rules.unitbuildspeedmultiplier = Multiplicador de velocidad de creación de unidades
rules.unithealthmultiplier = Multiplicador de la vida de las unidades rules.unithealthmultiplier = Multiplicador de Vida de Unidades
rules.unitdamagemultiplier = Multiplicador del daño de unidades rules.unitdamagemultiplier = Multiplicador de Daño de Unidades
rules.enemycorebuildradius = Radio de No-Construcción del Núcleo Enemigo:[lightgray] (casillas) rules.unitcapvariable = Núcleos alteran el Límite de Unidades
rules.unitcap = Límite Base de Unidades
rules.enemycorebuildradius = Radio de No-Construcción del Núcleo Enemigo:[lightgray] (bloques)
rules.wavespacing = Tiempo entre oleadas:[lightgray] (seg) rules.wavespacing = Tiempo entre oleadas:[lightgray] (seg)
rules.buildcostmultiplier = Multiplicador de coste de construcción rules.buildcostmultiplier = Multiplicador de coste de construcción
rules.buildspeedmultiplier = Multiplicador de velocidad de construcción rules.buildspeedmultiplier = Multiplicador de velocidad de construcción
@@ -967,12 +1026,14 @@ rules.explosions = Daño de explosiones de Bloques/Unidades
rules.ambientlight = Iluminación ambiental rules.ambientlight = Iluminación ambiental
rules.weather = Clima rules.weather = Clima
rules.weather.frequency = Frequencia: rules.weather.frequency = Frequencia:
rules.weather.always = Siempre
rules.weather.duration = Duracion: rules.weather.duration = Duracion:
content.item.name = Objetos content.item.name = Objetos
content.liquid.name = Líquidos content.liquid.name = Líquidos
content.unit.name = Unidades content.unit.name = Unidades
content.block.name = Bloques content.block.name = Bloques
content.status.name = Alteraciones de Estado
content.sector.name = Sectores content.sector.name = Sectores
item.copper.name = Cobre item.copper.name = Cobre
@@ -983,7 +1044,7 @@ item.titanium.name = Titanio
item.thorium.name = Torio item.thorium.name = Torio
item.silicon.name = Silicio item.silicon.name = Silicio
item.plastanium.name = Plastanio item.plastanium.name = Plastanio
item.phase-fabric.name = Tejido de fase item.phase-fabric.name = Tejido de Fase
item.surge-alloy.name = Aleación Eléctrica item.surge-alloy.name = Aleación Eléctrica
item.spore-pod.name = Vaina de Esporas item.spore-pod.name = Vaina de Esporas
item.sand.name = Arena item.sand.name = Arena
@@ -991,11 +1052,12 @@ item.blast-compound.name = Compuesto Explosivo
item.pyratite.name = Pirotita item.pyratite.name = Pirotita
item.metaglass.name = Metacristal item.metaglass.name = Metacristal
item.scrap.name = Chatarra item.scrap.name = Chatarra
liquid.water.name = Agua liquid.water.name = Agua
liquid.slag.name = Magma liquid.slag.name = Magma
liquid.oil.name = Petróleo liquid.oil.name = Petróleo
liquid.cryofluid.name = Líquido criogénico liquid.cryofluid.name = Líquido criogénico
#Names of Units and Turrets look better untranslated, since they are propper/own names #Names of Units and Turrets looks better untranslated, since they are propper/own names
unit.dagger.name = Dagger unit.dagger.name = Dagger
unit.mace.name = Mace unit.mace.name = Mace
unit.fortress.name = Fortress unit.fortress.name = Fortress
@@ -1022,6 +1084,11 @@ unit.minke.name = Minke
unit.bryde.name = Bryde unit.bryde.name = Bryde
unit.sei.name = Sei unit.sei.name = Sei
unit.omura.name = Omura unit.omura.name = Omura
unit.retusa.name = Retusa
unit.oxynoe.name = Oxynoe
unit.cyerce.name = Cyerce
unit.aegires.name = Aegires
unit.navanax.name = Navanax
unit.alpha.name = Alpha unit.alpha.name = Alpha
unit.beta.name = Beta unit.beta.name = Beta
unit.gamma.name = Gamma unit.gamma.name = Gamma
@@ -1082,23 +1149,25 @@ block.sand-water.name = Agua con arena
block.darksand-water.name = Agua con arena oscura block.darksand-water.name = Agua con arena oscura
block.char.name = Cenizas block.char.name = Cenizas
block.dacite.name = Dacita block.dacite.name = Dacita
block.dacite-wall.name = Bloque de dacita block.rhyolite.name = Riolita
block.dacite-boulder.name = Roca de dacita block.dacite-wall.name = Bloque de Dacita
block.dacite-boulder.name = Roca de Dacita
block.ice-snow.name = Hielo-Nieve block.ice-snow.name = Hielo-Nieve
block.stone-wall.name = Bloque de piedra block.stone-wall.name = Bloque de Piedra
block.ice-wall.name = Bloque de hielo block.ice-wall.name = Bloque de Hielo
block.snow-wall.name = Bloque de nieve block.snow-wall.name = Bloque de Nieve
block.dune-wall.name = Bloque de arena block.dune-wall.name = Bloque de Arena
block.pine.name = Pino block.pine.name = Pino
block.dirt.name = Tierra block.dirt.name = Tierra
block.dirt-wall.name = Bloque de tierra block.dirt-wall.name = Bloque de tierra
block.mud.name = Lodo block.mud.name = Lodo
block.white-tree-dead.name = Árbol Blanco Muerto block.white-tree-dead.name = Árbol Blanco Muerto
block.white-tree.name = Árbol Blanco block.white-tree.name = Árbol Blanco
block.spore-cluster.name = Concentración de Esporas block.spore-cluster.name = Esporas
block.metal-floor.name = Suelo de Metal block.metal-floor.name = Suelo de Metal 1
block.metal-floor-2.name = Suelo de Metal 2 block.metal-floor-2.name = Suelo de Metal 2
block.metal-floor-3.name = Suelo de Metal 3 block.metal-floor-3.name = Suelo de Metal 3
block.metal-floor-4.name = Suelo de Metal 4
block.metal-floor-5.name = Suelo de Metal 5 block.metal-floor-5.name = Suelo de Metal 5
block.metal-floor-damaged.name = Suelo de Metal dañado block.metal-floor-damaged.name = Suelo de Metal dañado
block.dark-panel-1.name = Panel Oscuro 1 block.dark-panel-1.name = Panel Oscuro 1
@@ -1189,6 +1258,7 @@ block.solar-panel.name = Panel Solar
block.solar-panel-large.name = Panel Solar Grande block.solar-panel-large.name = Panel Solar Grande
block.oil-extractor.name = Extractor de Petróleo block.oil-extractor.name = Extractor de Petróleo
block.repair-point.name = Punto de Reparación de Unidades block.repair-point.name = Punto de Reparación de Unidades
block.repair-turret.name = Torreta Reparadora
block.pulse-conduit.name = Conducto de Pulso block.pulse-conduit.name = Conducto de Pulso
block.plated-conduit.name = Conducto Acorazado block.plated-conduit.name = Conducto Acorazado
block.phase-conduit.name = Conducto de Fase block.phase-conduit.name = Conducto de Fase
@@ -1221,16 +1291,22 @@ block.container.name = Contenedor
block.launch-pad.name = Plataforma de Lanzamiento block.launch-pad.name = Plataforma de Lanzamiento
block.launch-pad-large.name = Plataforma de Lanzamiento Grande block.launch-pad-large.name = Plataforma de Lanzamiento Grande
block.segment.name = Segment block.segment.name = Segment
block.command-center.name = Centro de comando block.command-center.name = Centro de Comando
block.ground-factory.name = Fábrica terrestre block.ground-factory.name = Fábrica Terrestre
block.air-factory.name = Fábrica aérea block.air-factory.name = Fábrica Aérea
block.naval-factory.name = Fábrica naval block.naval-factory.name = Fábrica naval
block.additive-reconstructor.name = Reconstructor aditivo block.additive-reconstructor.name = Reconstructor Aditivo
block.multiplicative-reconstructor.name = Reconstructor multiplicativo block.multiplicative-reconstructor.name = Reconstructor Multiplicativo
block.exponential-reconstructor.name = Reconstructor exponencial block.exponential-reconstructor.name = Reconstructor Exponencial
block.tetrative-reconstructor.name = Reconstructor tetrativo block.tetrative-reconstructor.name = Reconstructor Tetrativo
block.payload-conveyor.name = Transportador de carga block.payload-conveyor.name = Cinta Transportadora de Carga
block.payload-router.name = Enrutador de carga block.payload-router.name = Enrutador de Carga
block.duct.name = Túnel
block.duct-router.name = Túnel Enrutador
block.duct-bridge.name = Túnel Puente
block.payload-propulsion-tower.name = Torre de Propulsión de Bloques
block.payload-void.name = Vacío de Bloques
block.payload-source.name = Fuente de Bloques
block.disassembler.name = Desensamblador block.disassembler.name = Desensamblador
block.silicon-crucible.name = Crisol de silicio block.silicon-crucible.name = Crisol de silicio
block.overdrive-dome.name = Campo de Aceleración block.overdrive-dome.name = Campo de Aceleración
@@ -1252,7 +1328,6 @@ block.memory-bank.name = Servidor de memoria
team.blue.name = azul team.blue.name = azul
team.crux.name = crux team.crux.name = crux
team.sharded.name = sharded team.sharded.name = sharded
team.orange.name = naranja
team.derelict.name = delerict team.derelict.name = delerict
team.green.name = verde team.green.name = verde
team.purple.name = morado team.purple.name = morado
@@ -1273,6 +1348,7 @@ hint.placeConveyor.mobile = Las cintas transportadoras pueden mover objetos de l
hint.placeTurret = Construye \uf861 [accent]Torretas[] para defender tu base de los enemigos.\n\nLas torretas necesitan munición - en este caso, \uf838cobre.\nUsa cintas transportadoras y taladros para abastecerlas con cobre. hint.placeTurret = Construye \uf861 [accent]Torretas[] para defender tu base de los enemigos.\n\nLas torretas necesitan munición - en este caso, \uf838cobre.\nUsa cintas transportadoras y taladros para abastecerlas con cobre.
hint.breaking = Pulsa [accent]Clic-derecho[] y arrastra para destruir bloques. hint.breaking = Pulsa [accent]Clic-derecho[] y arrastra para destruir bloques.
hint.breaking.mobile = Activa el botón con el \ue817 [accent]martillo[] situado abajo a la derecha y selecciona bloques para eliminarlos.\n\nMantén el dedo un segundo y arrastra para eliminar bloques directamente en esa selección. hint.breaking.mobile = Activa el botón con el \ue817 [accent]martillo[] situado abajo a la derecha y selecciona bloques para eliminarlos.\n\nMantén el dedo un segundo y arrastra para eliminar bloques directamente en esa selección.
hint.blockInfo = Puedes visualizar información de un bloque seleccionándolo en el [accent]menú de construcción[], mediante el botón [accent][[?][] en la derecha.
hint.research = Usa el botón \ue875 [accent]Investigación[] para acceder al menú de descubrimientos tecnológicos. hint.research = Usa el botón \ue875 [accent]Investigación[] para acceder al menú de descubrimientos tecnológicos.
hint.research.mobile = Usa el botón \ue875 [accent]Investigación[] para acceder al menú de descubrimientos tecnológicos. hint.research.mobile = Usa el botón \ue875 [accent]Investigación[] para acceder al menú de descubrimientos tecnológicos.
hint.unitControl = Mantén [accent][[L-ctrl][] y [accent]haz clic[] sobre unidades o torretas aliadas para controlarlas manualmente. hint.unitControl = Mantén [accent][[L-ctrl][] y [accent]haz clic[] sobre unidades o torretas aliadas para controlarlas manualmente.
@@ -1319,7 +1395,7 @@ item.spore-pod.details = Esporas. Es algo parecido a una forma de vida sintétic
item.blast-compound.description = Usado en bombas y munición explosiva. item.blast-compound.description = Usado en bombas y munición explosiva.
item.pyratite.description = Usado en armas incendiarias y generadores de combustión. item.pyratite.description = Usado en armas incendiarias y generadores de combustión.
liquid.water.description = Usada comúnmente para enfriar máquinas y para procesar residuos. liquid.water.description = Usada para enfriar máquinas y para procesar residuos.
liquid.slag.description = Diferentes tipos de metales fundidos mezclados. Puede ser separado en sus minerales constituyentes, o disparado a unidades enemigas como arma. liquid.slag.description = Diferentes tipos de metales fundidos mezclados. Puede ser separado en sus minerales constituyentes, o disparado a unidades enemigas como arma.
liquid.oil.description = Se utiliza en producción de materiales avanzados, y en munición incendiaria. liquid.oil.description = Se utiliza en producción de materiales avanzados, y en munición incendiaria.
liquid.cryofluid.description = Usado como refrigerante para reactores, torretas, y fábricas. liquid.cryofluid.description = Usado como refrigerante para reactores, torretas, y fábricas.
@@ -1502,3 +1578,155 @@ unit.omura.description = Dispara rayos contínuos perforantes. Construye unidade
unit.alpha.description = Defiende el núcleo Shard de los enemigos. Construye estructuras. unit.alpha.description = Defiende el núcleo Shard de los enemigos. Construye estructuras.
unit.beta.description = Defiende el núcleo Foundation de los enemigos. Construye estructuras. unit.beta.description = Defiende el núcleo Foundation de los enemigos. Construye estructuras.
unit.gamma.description = Defiende el núcleo Nucleus de los enemigos. Construye estructuras. unit.gamma.description = Defiende el núcleo Nucleus de los enemigos. Construye estructuras.
lst.read = Lee un número desde una unidad de memoria conectada.
lst.write = Escribe un número en una unidad de memoria conectada.
lst.print = Añade texto a la cola para impresión.\nNo mostrará nada hasta que se use [accent]Ejecutar Imprimir[].
lst.draw = Añade una operación a la cola de gráfico.\nNo mostrará nada hasta que se use [accent]Ejecutar Gráfico[].
lst.drawflush = Ejecución en cola de operaciones [accent]Gráfico[] a un monitor gráfico.
lst.printflush = Ejecución en cola de operaciones [accent]Imprimir[] a un bloque de mensaje.
lst.getlink = Obtiene el número de enlace de procesador. Inicia en 0.
lst.control = Controla el estado de un bloque.
lst.radar = Localiza unidades alrededor de un bloque con rango.
lst.sensor = Recopila datos de un bloque o unidad.
lst.set = Establece una variable.
lst.operation = Realiza una operación sobre 1-2 variables.
lst.end = Salta al inicio de la lista de instrucciones.
lst.wait = Espera unos segundos.
lst.lookup = Busca un objeto/líquido/unidad/tipo de bloque por ID.\nSe puede acceder al número total de cada tipo con:\n[accent]@unitCount[] / [accent]@itemCount[] / [accent]@liquidCount[] / [accent]@blockCount[]
lst.jump = Salta a otra instrucción.
lst.unitbind = Se enlaza a la siguiente unidad de un tipo, y la almacena en [accent]@unit[].
lst.unitcontrol = Controla la unidad actualmente enlazada.
lst.unitradar = Localiza unidades alrededor de la unidad actualmente enlazada.
lst.unitlocate = Localiza un tipo específico de posición/bloque en cualquier lugar del mapa.\nRequiere una unidad enlazada.
logic.nounitbuild = [red]No se permite la construcción de bloques de categoría lógica.
lenum.type = El tipo de bloque/unidad\nEjemplo: "para cualquier enrutador", devolverá [accent]@router[].\nNo es una cadena de texto.
lenum.shoot = Dispara a una posición.
lenum.shootp = Dispara a una unidad/bloque con predicción de velocidad.
lenum.config = Configuración de bloque, por ejemplo: clasificador.
lenum.enabled = Si el bloque está activado o no.
laccess.color = Color del iluminador.
laccess.controller = Controlador de unidad. Si se controla mediante un procesador, devuelve dicho procesador.\nSi está en formación, devuelve su líder.\nDe otra forma, devuelve la misma unidad.
laccess.dead = Si una unidad/bloque es destruída o inválida.
laccess.controlled = Devuelve:\n[accent]@ctrlProcessor[] si el control de la unidad lo tiene un procesador\n[accent]@ctrlPlayer[] si el control de la unidad/bloque lo tiene un jugador\n[accent]@ctrlFormation[] si la unidad está en formación\nDe otra forma, devuelve 0.
laccess.commanded = [red]En desuso. ¡Será eliminado![]\nUsa [accent]controlado[] en su lugar.
laccess.progress = Progreso de una acción, 0 a 1.\nDevuelve de una producción, recarga de una torreta o progreso de una construcción.
graphicstype.clear = Llena el monitor con un color.
graphicstype.color = Establece el color para próximas operaciones de gráficos.
graphicstype.stroke = Establece el ancho de la línea.
graphicstype.line = Segmento de la línea del gráfico.
graphicstype.rect = Rellena un rectángulo.
graphicstype.linerect = Dibuja las aristas de un rectángulo.
graphicstype.poly = Rellena un polígono regular.
graphicstype.linepoly = Dibuja las aristas de un polígono regular.
graphicstype.triangle = Rellena un triángulo.
graphicstype.image = Dibuja una imágen de un contenido.\nEjemplo: [accent]@router[] o [accent]@dagger[].
lenum.always = Siempre "true".
lenum.idiv = División de un número entero.
lenum.div = División.\nDevuelve [accent]null[] al dividir entre cero.
lenum.mod = Modulo.
lenum.equal = Igual. Coacciona tipos.\nObjetos no-nulos coaccionados con números pasan a 1, si no coinciden pasan a 0.
lenum.notequal = No igual. Coacciona tipos.
lenum.strictequal = Igualdad estricta. No coacciona tipos.\nSe puede usar para comprobar si un resultado es [accent]null[].
lenum.shl = Cambia bits a izquierda.
lenum.shr = Cambia bits a derecha.
lenum.or = Comprobación bit a bit OR.
lenum.land = Comprobación lógica AND.
lenum.and = Comprobación bit a bit AND.
lenum.not = Comprobación bit a bit invertida.
lenum.xor = Comprobación bit a bit XOR.
lenum.min = Mínimo de dos números.
lenum.max = Máximo de dos números.
lenum.angle = Ángulo del vector en grados.
lenum.len = Longitud del vector.
lenum.sin = Seno, en grados.
lenum.cos = Coseno, en grados.
lenum.tan = Tangente, en grados.
lenum.asin = Arco seno, en grados.
lenum.acos = Arco coseno, en grados.
lenum.atan = Arco tangente, en grados.
#not a typo, look up 'range notation'
lenum.rand = Número decimal aleatorio en un rango [0, valor).
lenum.log = Logaritmo natural (ln).
lenum.log10 = Logaritmo en base 10.
lenum.noise = Ruido simplex 2D.
lenum.abs = Valor absoluto.
lenum.sqrt = Raíz cuadrada.
lenum.any = Cualquier unidad.
lenum.ally = Unidad aliada.
lenum.attacker = Unidad con un arma.
lenum.enemy = Unidad enemiga.
lenum.boss = Unidad guardián (Jefe).
lenum.flying = Unidad aérea.
lenum.ground = Unidad terrestre.
lenum.player = Unidad controlada por un jugador.
lenum.ore = Depósito mineral.
lenum.damaged = Bloque aliado dañado.
lenum.spawn = Punto de aterrizaje enemigo.\nPuede ser un núcleo o una posición.
lenum.building = Un bloque de una categoría específica.
lenum.core = Cualquier núcleo.
lenum.storage = Bloque de almacenamiento, ejemplo: Contenedor.
lenum.generator = Bloques que generan energía.
lenum.factory = Bloques que transforman recursos.
lenum.repair = Puntos de reparación.
lenum.rally = Centro de comando.
lenum.battery = Cualquier batería.
lenum.resupply = Puntos de reabastecimiento.\nSólo es relevante cuando [accent]"Unidades necesitan munición"[] está activada.
lenum.reactor = Reactor de Impacto/Torio.
lenum.turret = Cualquier torreta.
sensor.in = El bloque/unidad a detectar.
radar.from = Bloque del que detectar.\nEl rango del sensor está limitado por el rango de dicha construcción.
radar.target = Filtro de unidades a detectar.
radar.and = Filtros adicionales.
radar.order = Orden para ordenar. 0 para invertir.
radar.sort = Métrica a usar al ordenar resultados.
radar.output = Variable en la que escribir la salida de una unidad.
unitradar.target = Filtro para detectar unidades.
unitradar.and = Filtros adicionales.
unitradar.order = Orden para ordenar. 0 para invertir.
unitradar.sort = Métrica a usar al ordenar resultados.
unitradar.output = Variable en la que escribir la salida de una unidad.
control.of = Bloque a controlar.
control.unit = Unidad/bloque al que apuntar.
control.shoot = Cuándo disparar.
unitlocate.enemy = Cuándo localizar construcciones enemigas.
unitlocate.found = Cuándo el objeto es encontrado.
unitlocate.building = Variable de salida para contrucciones localizadas.
unitlocate.outx = Coordenada X devuelta.
unitlocate.outy = Coordenada Y devuelta.
unitlocate.group = Grupo de bloque a buscar.
lenum.idle = No se mueve, pero seguirá construyendo/extrayendo minerales.\nEs el estado por defecto.
lenum.stop = Deja de moverse/extraer minerales/contruir.
lenum.move = Moverse a una posición exacta.
lenum.approach = Aproximarse a una posición con un radio.
lenum.pathfind = Establece una ruta hasta el punto de aterrizaje enemigo.
lenum.target = Dispara a una posición.
lenum.targetp = Dispara a un objetivo con predicción de velocidad.
lenum.itemdrop = Suelta un objeto.
lenum.itemtake = Recoge un objeto de una construcción.
lenum.paydrop = Suelta la carga actual.
lenum.paytake = Recoge bloques o unidades en la posición actual como carga a trasnportar.
lenum.flag = Etiqueta numérica de la unidad.
lenum.mine = Extrae minerales de una posición.
lenum.build = Construye una estructura.
lenum.getblock = Obtiene la construcción y su categoría en unas coordenadas específicas.\nLa unidad debe estar en el rango de su posición.\nLos bloques no-construcciones tendrán el tipo [accent]@solid[].
lenum.within = Comprueba si una unidad se encuentra cerca de una posición.
lenum.boost = Inicia/Detiene potenciación.

View File

@@ -807,6 +807,7 @@ bullet.reload = [stat]{0}[lightgray]x vitesse de tir
unit.blocks = blocs unit.blocks = blocs
unit.blockssquared = blocs² unit.blockssquared = blocs²
unit.powersecond = unités d'énergie/seconde unit.powersecond = unités d'énergie/seconde
unit.tilessecond = tuiles/seconde
unit.liquidsecond = unités de liquide/seconde unit.liquidsecond = unités de liquide/seconde
unit.itemssecond = objets/seconde unit.itemssecond = objets/seconde
unit.liquidunits = unités de liquide unit.liquidunits = unités de liquide
@@ -1601,6 +1602,8 @@ lst.sensor = Récupère des données depuis un bâtiment ou une unité.
lst.set = Définit une variable. lst.set = Définit une variable.
lst.operation = Effectue une opération sur 1 ou 2 variables. lst.operation = Effectue une opération sur 1 ou 2 variables.
lst.end = Saute au sommet de la série dinstructions. lst.end = Saute au sommet de la série dinstructions.
lst.wait = Attendre un certain nombre de secondes.
lst.lookup = Recherche d'un type d'objet/liquide/unité/bloc par ID.\nLe nombre total de chaque type peut être consulté avec:\n[accent]@unitCount[] / [accent]@itemCount[] / [accent]@liquidCount[] / [accent]@blockCount[]
lst.jump = Saute conditionnellement vers une autre instruction. lst.jump = Saute conditionnellement vers une autre instruction.
lst.unitbind = Se lie à une unité du type donné et la stocke dans [accent]@unit[]. lst.unitbind = Se lie à une unité du type donné et la stocke dans [accent]@unit[].
lst.unitcontrol = Contrôle l'unité actuellement liée. lst.unitcontrol = Contrôle l'unité actuellement liée.

View File

@@ -100,7 +100,8 @@ joingame = 게임 참여
customgame = 사용자 지정 게임 customgame = 사용자 지정 게임
newgame = 새 게임 newgame = 새 게임
none = < 없음 > none = < 없음 >
none.found = [lightgray]< 없거나 찾을 수 없음 > none.found = [lightgray]< 찾을 수 없음 >
none.inmap = [lightgray]< 맵에 없음 >
minimap = 미니맵 minimap = 미니맵
position = 위치 position = 위치
close = 닫기 close = 닫기
@@ -806,6 +807,7 @@ bullet.reload = [stat]{0}[lightgray]배 발사 속도
unit.blocks = 블록 unit.blocks = 블록
unit.blockssquared = 블록² unit.blockssquared = 블록²
unit.powersecond = 전력/초 unit.powersecond = 전력/초
unit.tilessecond = 타일/초
unit.liquidsecond = 액체/초 unit.liquidsecond = 액체/초
unit.itemssecond = 자원/초 unit.itemssecond = 자원/초
unit.liquidunits = 액체 unit.liquidunits = 액체

View File

@@ -806,6 +806,7 @@ bullet.reload = [stat]{0}[lightgray]x скорость стрельбы
unit.blocks = блоков unit.blocks = блоков
unit.blockssquared = блоков² unit.blockssquared = блоков²
unit.powersecond = единиц энергии/секунду unit.powersecond = единиц энергии/секунду
unit.tilessecond = плиток/секунду
unit.liquidsecond = жидкостных единиц/секунду unit.liquidsecond = жидкостных единиц/секунду
unit.itemssecond = предметов/секунду unit.itemssecond = предметов/секунду
unit.liquidunits = жидкостных единиц unit.liquidunits = жидкостных единиц
@@ -1570,7 +1571,7 @@ unit.mega.description = Автоматически ремонтирует пов
unit.quad.description = Сбрасывает большие бомбы на наземные цели, восстанавливая союзные постройки и повреждая врагов. Может переносить единицы среднего размера. unit.quad.description = Сбрасывает большие бомбы на наземные цели, восстанавливая союзные постройки и повреждая врагов. Может переносить единицы среднего размера.
unit.oct.description = Защищает союзников поблизости при помощи своего восстанавливающегося щита. Может переносить большинство наземных единиц. unit.oct.description = Защищает союзников поблизости при помощи своего восстанавливающегося щита. Может переносить большинство наземных единиц.
unit.risso.description = Стреляет залпами ракет и пуль по всем врагам поблизости. unit.risso.description = Стреляет залпами ракет и пуль по всем врагам поблизости.
unit.minke.description = Стреляет зажигательными снарядами и стандартными пулями по наземным целям. unit.minke.description = Стреляет артиллерийскими снарядами и стандартными пулями по наземным целям.
unit.bryde.description = Стреляет дальнобойными артиллерийскими снарядами и ракетами по врагам. unit.bryde.description = Стреляет дальнобойными артиллерийскими снарядами и ракетами по врагам.
unit.sei.description = Стреляет залпами ракет и бронебойных пуль по врагам. unit.sei.description = Стреляет залпами ракет и бронебойных пуль по врагам.
unit.omura.description = Стреляет дальнобойным пробивающим снарядом из рельсотрона по врагам. Производит единицы «Вспышка». unit.omura.description = Стреляет дальнобойным пробивающим снарядом из рельсотрона по врагам. Производит единицы «Вспышка».
@@ -1591,6 +1592,8 @@ lst.sensor = Получает данные из постройки или еди
lst.set = Устанавливает переменную. lst.set = Устанавливает переменную.
lst.operation = Совершает операцию над 1-2 переменными. lst.operation = Совершает операцию над 1-2 переменными.
lst.end = Переходит к началу стека операций. lst.end = Переходит к началу стека операций.
lst.wait = Ждёт определённое количество секунд.
lst.lookup = Находит тип предмета/жидкости/единицы/блока по ID.\nОбщее количество каждого типа может быть получено при помощи:\n[accent]@unitCount[] / [accent]@itemCount[] / [accent]@liquidCount[] / [accent]@blockCount[]
lst.jump = Условно переходит к другой операции. lst.jump = Условно переходит к другой операции.
lst.unitbind = Привязывается к единице определённого типа и сохраняет её в [accent]@unit[]. lst.unitbind = Привязывается к единице определённого типа и сохраняет её в [accent]@unit[].
lst.unitcontrol = Управляет привязанной в данный момент единицей. lst.unitcontrol = Управляет привязанной в данный момент единицей.

View File

@@ -126,3 +126,4 @@ Skat
WilloIzCitron WilloIzCitron
SAMBUYYA SAMBUYYA
genNAowl genNAowl
TranquillyUnpleasant

Binary file not shown.

Before

Width:  |  Height:  |  Size: 239 KiB

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 447 KiB

After

Width:  |  Height:  |  Size: 268 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 KiB

After

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 KiB

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 229 KiB

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 KiB

After

Width:  |  Height:  |  Size: 147 KiB

View File

@@ -155,6 +155,7 @@ const BlockBuildBeginEvent = Packages.mindustry.game.EventType.BlockBuildBeginEv
const ResearchEvent = Packages.mindustry.game.EventType.ResearchEvent const ResearchEvent = Packages.mindustry.game.EventType.ResearchEvent
const UnlockEvent = Packages.mindustry.game.EventType.UnlockEvent const UnlockEvent = Packages.mindustry.game.EventType.UnlockEvent
const StateChangeEvent = Packages.mindustry.game.EventType.StateChangeEvent const StateChangeEvent = Packages.mindustry.game.EventType.StateChangeEvent
const CoreChangeEvent = Packages.mindustry.game.EventType.CoreChangeEvent
const TileChangeEvent = Packages.mindustry.game.EventType.TileChangeEvent const TileChangeEvent = Packages.mindustry.game.EventType.TileChangeEvent
const TilePreChangeEvent = Packages.mindustry.game.EventType.TilePreChangeEvent const TilePreChangeEvent = Packages.mindustry.game.EventType.TilePreChangeEvent
const GameOverEvent = Packages.mindustry.game.EventType.GameOverEvent const GameOverEvent = Packages.mindustry.game.EventType.GameOverEvent
@@ -166,6 +167,7 @@ const DepositEvent = Packages.mindustry.game.EventType.DepositEvent
const WithdrawEvent = Packages.mindustry.game.EventType.WithdrawEvent const WithdrawEvent = Packages.mindustry.game.EventType.WithdrawEvent
const SectorCaptureEvent = Packages.mindustry.game.EventType.SectorCaptureEvent const SectorCaptureEvent = Packages.mindustry.game.EventType.SectorCaptureEvent
const PlayerChatEvent = Packages.mindustry.game.EventType.PlayerChatEvent const PlayerChatEvent = Packages.mindustry.game.EventType.PlayerChatEvent
const MenuOptionChooseEvent = Packages.mindustry.game.EventType.MenuOptionChooseEvent
const ClientPreConnectEvent = Packages.mindustry.game.EventType.ClientPreConnectEvent const ClientPreConnectEvent = Packages.mindustry.game.EventType.ClientPreConnectEvent
const CommandIssueEvent = Packages.mindustry.game.EventType.CommandIssueEvent const CommandIssueEvent = Packages.mindustry.game.EventType.CommandIssueEvent
const SchematicCreateEvent = Packages.mindustry.game.EventType.SchematicCreateEvent const SchematicCreateEvent = Packages.mindustry.game.EventType.SchematicCreateEvent

View File

@@ -20,9 +20,9 @@ void main(){
vec4 color = texture2D(u_texture, c); vec4 color = texture2D(u_texture, c);
if(noise > 0.54 && noise < 0.68){ if(noise > 0.54 && noise < 0.68){
color.rgb *= 1.4; color.rgb *= vec3(1.4);
}else if(!(noise > 0.40 && noise < 0.54)){ }else if(!(noise > 0.40 && noise < 0.54)){
color.rgb *= 1.2; color.rgb *= vec3(1.2);
} }
gl_FragColor = color; gl_FragColor = color;

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,12 +0,0 @@
#convert from stereo to mono
cd assets/sounds/
for i in *.ogg; do
echo $i
ffmpeg -i "$i" -ac 1 "OUT_$i"
done
find . -type f ! -name "OUT_*" -delete
for file in OUT_*; do mv "$file" "${file#OUT_}"; done;
cd ../../

View File

@@ -55,7 +55,7 @@ public abstract class ClientLauncher extends ApplicationCore implements Platform
Log.info("[GL] Max texture size: @", maxTextureSize); Log.info("[GL] Max texture size: @", maxTextureSize);
Log.info("[GL] Using @ context.", gl30 != null ? "OpenGL 3" : "OpenGL 2"); Log.info("[GL] Using @ context.", gl30 != null ? "OpenGL 3" : "OpenGL 2");
if(maxTextureSize < 4096) Log.warn("[GL] Your maximum texture size is below the recommended minimum of 4096. This will cause severe performance issues."); if(maxTextureSize < 4096) Log.warn("[GL] Your maximum texture size is below the recommended minimum of 4096. This will cause severe performance issues.");
Log.info("[JAVA] Version: @", System.getProperty("java.version")); Log.info("[JAVA] Version: @", OS.javaVersion);
Time.setDeltaProvider(() -> { Time.setDeltaProvider(() -> {
float result = Core.graphics.getDeltaTime() * 60f; float result = Core.graphics.getDeltaTime() * 60f;

View File

@@ -24,10 +24,8 @@ import mindustry.logic.*;
import mindustry.maps.Map; import mindustry.maps.Map;
import mindustry.maps.*; import mindustry.maps.*;
import mindustry.mod.*; import mindustry.mod.*;
import mindustry.net.Net;
import mindustry.net.*; import mindustry.net.*;
import mindustry.service.*; import mindustry.service.*;
import mindustry.world.*;
import java.io.*; import java.io.*;
import java.nio.charset.*; import java.nio.charset.*;
@@ -113,8 +111,6 @@ public class Vars implements Loadable{
public static final float tilePayload = tilesize * tilesize; public static final float tilePayload = tilesize * tilesize;
/** icon sizes for UI */ /** icon sizes for UI */
public static final float iconXLarge = 8*6f, iconLarge = 8*5f, iconMed = 8*4f, iconSmall = 8*3f; public static final float iconXLarge = 8*6f, iconLarge = 8*5f, iconMed = 8*4f, iconSmall = 8*3f;
/** tile used in certain situations, instead of null */
public static Tile emptyTile;
/** for map generator dialog */ /** for map generator dialog */
public static boolean updateEditorOnChange = false; public static boolean updateEditorOnChange = false;
/** all choosable player colors in join/host dialog */ /** all choosable player colors in join/host dialog */
@@ -278,7 +274,6 @@ public class Vars implements Loadable{
schematicDirectory = dataDirectory.child("schematics/"); schematicDirectory = dataDirectory.child("schematics/");
bebuildDirectory = dataDirectory.child("be_builds/"); bebuildDirectory = dataDirectory.child("be_builds/");
emptyMap = new Map(new StringMap()); emptyMap = new Map(new StringMap());
emptyTile = null;
if(tree == null) tree = new FileTree(); if(tree == null) tree = new FileTree();
if(mods == null) mods = new Mods(); if(mods == null) mods = new Mods();

View File

@@ -48,6 +48,7 @@ public class BlockIndexer{
private Seq<Building> breturnArray = new Seq<>(Building.class); private Seq<Building> breturnArray = new Seq<>(Building.class);
public BlockIndexer(){ public BlockIndexer(){
clearFlags();
Events.on(TilePreChangeEvent.class, event -> { Events.on(TilePreChangeEvent.class, event -> {
removeIndex(event.tile); removeIndex(event.tile);
@@ -62,11 +63,7 @@ public class BlockIndexer{
flagMap = new TileArray[Team.all.length][BlockFlag.all.length]; flagMap = new TileArray[Team.all.length][BlockFlag.all.length];
activeTeams = new Seq<>(Team.class); activeTeams = new Seq<>(Team.class);
for(int i = 0; i < flagMap.length; i++){ clearFlags();
for(int j = 0; j < BlockFlag.all.length; j++){
flagMap[i][j] = new TileArray();
}
}
allOres.clear(); allOres.clear();
ores = new IntSeq[content.items().size][][]; ores = new IntSeq[content.items().size][][];
@@ -106,7 +103,7 @@ public class BlockIndexer{
public void removeIndex(Tile tile){ public void removeIndex(Tile tile){
var team = tile.team(); var team = tile.team();
if(team != Team.derelict && tile.isCenter()){ if(tile.build != null && tile.isCenter()){
var flags = tile.block().flags; var flags = tile.block().flags;
var data = team.data(); var data = team.data();
@@ -160,6 +157,14 @@ public class BlockIndexer{
return blocksPresent != null && blocksPresent[block.id]; return blocksPresent != null && blocksPresent[block.id];
} }
private void clearFlags(){
for(int i = 0; i < flagMap.length; i++){
for(int j = 0; j < BlockFlag.all.length; j++){
flagMap[i][j] = new TileArray();
}
}
}
private TileArray[] getFlagged(Team team){ private TileArray[] getFlagged(Team team){
return flagMap[team.id]; return flagMap[team.id];
} }

View File

@@ -19,6 +19,7 @@ public class BuilderAI extends AIController{
@Nullable Unit following; @Nullable Unit following;
@Nullable Teamc enemy; @Nullable Teamc enemy;
float retreatTimer; float retreatTimer;
@Nullable BlockPlan lastPlan;
@Override @Override
public void updateMovement(){ public void updateMovement(){
@@ -43,6 +44,7 @@ public class BuilderAI extends AIController{
//set to follower's first build plan, whatever that is //set to follower's first build plan, whatever that is
unit.plans.clear(); unit.plans.clear();
unit.plans.addFirst(following.buildPlan()); unit.plans.addFirst(following.buildPlan());
lastPlan = null;
}else if(unit.buildPlan() == null){ }else if(unit.buildPlan() == null){
//not following anyone or building //not following anyone or building
if(timer.get(timerTarget4, 40)){ if(timer.get(timerTarget4, 40)){
@@ -78,10 +80,11 @@ public class BuilderAI extends AIController{
} }
boolean valid = boolean valid =
(req.tile() != null && req.tile().build instanceof ConstructBuild cons && cons.current == req.block) || !(lastPlan != null && lastPlan.removed) &&
(req.breaking ? ((req.tile() != null && req.tile().build instanceof ConstructBuild cons && cons.current == req.block) ||
Build.validBreak(unit.team(), req.x, req.y) : (req.breaking ?
Build.validPlace(req.block, unit.team(), req.x, req.y, req.rotation)); Build.validBreak(unit.team(), req.x, req.y) :
Build.validPlace(req.block, unit.team(), req.x, req.y, req.rotation)));
if(valid){ if(valid){
//move toward the request //move toward the request
@@ -89,6 +92,7 @@ public class BuilderAI extends AIController{
}else{ }else{
//discard invalid request //discard invalid request
unit.plans.removeFirst(); unit.plans.removeFirst();
lastPlan = null;
} }
}else{ }else{
@@ -127,6 +131,7 @@ public class BuilderAI extends AIController{
if(world.tile(block.x, block.y) != null && world.tile(block.x, block.y).block().id == block.block){ if(world.tile(block.x, block.y) != null && world.tile(block.x, block.y).block().id == block.block){
blocks.removeFirst(); blocks.removeFirst();
}else if(Build.validPlace(content.block(block.block), unit.team(), block.x, block.y, block.rotation)){ //it's valid. }else if(Build.validPlace(content.block(block.block), unit.team(), block.x, block.y, block.rotation)){ //it's valid.
lastPlan = block;
//add build request. //add build request.
unit.addBuild(new BuildPlan(block.x, block.y, block.rotation, content.block(block.block), block.config)); unit.addBuild(new BuildPlan(block.x, block.y, block.rotation, content.block(block.block), block.config));
//shift build plan to tail so next unit builds something else. //shift build plan to tail so next unit builds something else.

View File

@@ -235,7 +235,6 @@ public class Blocks implements ContentList{
magmarock = new Floor("magmarock"){{ magmarock = new Floor("magmarock"){{
attributes.set(Attribute.heat, 0.75f); attributes.set(Attribute.heat, 0.75f);
attributes.set(Attribute.water, -0.75f); attributes.set(Attribute.water, -0.75f);
updateEffect = Fx.magmasmoke;
blendGroup = basalt; blendGroup = basalt;
emitLight = true; emitLight = true;
@@ -369,6 +368,7 @@ public class Blocks implements ContentList{
sporeCluster = new Prop("spore-cluster"){{ sporeCluster = new Prop("spore-cluster"){{
variants = 3; variants = 3;
breakSound = Sounds.plantBreak;
}}; }};
boulder = new Prop("boulder"){{ boulder = new Prop("boulder"){{
@@ -426,6 +426,9 @@ public class Blocks implements ContentList{
darkMetal = new StaticWall("dark-metal"); darkMetal = new StaticWall("dark-metal");
Seq.with(metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor4, metalFloor5, darkPanel1, darkPanel2, darkPanel3, darkPanel4, darkPanel5, darkPanel6)
.each(b -> b.asFloor().wall = darkMetal);
pebbles = new DoubleOverlayFloor("pebbles"); pebbles = new DoubleOverlayFloor("pebbles");
tendrils = new OverlayFloor("tendrils"); tendrils = new OverlayFloor("tendrils");
@@ -659,12 +662,12 @@ public class Blocks implements ContentList{
}}; }};
disassembler = new Separator("disassembler"){{ disassembler = new Separator("disassembler"){{
requirements(Category.crafting, with(Items.graphite, 140, Items.titanium, 100, Items.silicon, 150, Items.surgeAlloy, 70)); requirements(Category.crafting, with(Items.plastanium, 40, Items.titanium, 100, Items.silicon, 150, Items.thorium, 80));
results = with( results = with(
Items.sand, 4, Items.sand, 4,
Items.graphite, 2, Items.graphite, 2,
Items.titanium, 2, Items.titanium, 2,
Items.thorium, 1 Items.thorium, 2
); );
hasPower = true; hasPower = true;
craftTime = 15f; craftTime = 15f;
@@ -1978,25 +1981,25 @@ public class Blocks implements ContentList{
}}; }};
repairPoint = new RepairPoint("repair-point"){{ repairPoint = new RepairPoint("repair-point"){{
requirements(Category.units, with(Items.lead, 25, Items.copper, 25, Items.silicon, 20)); requirements(Category.units, with(Items.lead, 30, Items.copper, 30, Items.silicon, 20));
repairSpeed = 0.5f; repairSpeed = 0.45f;
repairRadius = 65f; repairRadius = 60f;
beamWidth = 0.73f; beamWidth = 0.73f;
powerUse = 1f; powerUse = 1f;
pulseRadius = 5f; pulseRadius = 5f;
}}; }};
repairTurret = new RepairPoint("repair-turret"){{ repairTurret = new RepairPoint("repair-turret"){{
requirements(Category.units, with(Items.silicon, 90, Items.thorium, 80, Items.plastanium, 80)); requirements(Category.units, with(Items.silicon, 90, Items.thorium, 80, Items.plastanium, 60));
size = 2; size = 2;
length = 6f; length = 6f;
repairSpeed = 3f; repairSpeed = 3f;
repairRadius = 140f; repairRadius = 145f;
powerUse = 5f; powerUse = 5f;
beamWidth = 1.1f; beamWidth = 1.1f;
pulseRadius = 6.1f; pulseRadius = 6.1f;
coolantUse = 0.16f; coolantUse = 0.16f;
coolantMultiplier = 1.5f; coolantMultiplier = 1.6f;
acceptCoolant = true; acceptCoolant = true;
}}; }};

View File

@@ -47,7 +47,6 @@ public class StatusEffects implements ContentList{
affinity(blasted, ((unit, result, time) -> { affinity(blasted, ((unit, result, time) -> {
unit.damagePierce(transitionDamage); unit.damagePierce(transitionDamage);
result.set(freezing, time);
})); }));
}); });
}}; }};
@@ -75,7 +74,6 @@ public class StatusEffects implements ContentList{
if(unit.team == state.rules.waveTeam){ if(unit.team == state.rules.waveTeam){
Events.fire(Trigger.shock); Events.fire(Trigger.shock);
} }
result.set(wet, time);
})); }));
opposite(burning, melting); opposite(burning, melting);
}); });

View File

@@ -120,7 +120,7 @@ public class UnitTypes implements ContentList{
hitSize = 13f; hitSize = 13f;
rotateSpeed = 3f; rotateSpeed = 3f;
targetAir = false; targetAir = false;
health = 820; health = 900;
armor = 9f; armor = 9f;
mechFrontSway = 0.55f; mechFrontSway = 0.55f;
@@ -133,15 +133,15 @@ public class UnitTypes implements ContentList{
shake = 2f; shake = 2f;
ejectEffect = Fx.casing2; ejectEffect = Fx.casing2;
shootSound = Sounds.artillery; shootSound = Sounds.artillery;
bullet = new ArtilleryBulletType(2f, 8, "shell"){{ bullet = new ArtilleryBulletType(2f, 20, "shell"){{
hitEffect = Fx.blastExplosion; hitEffect = Fx.blastExplosion;
knockback = 0.8f; knockback = 0.8f;
lifetime = 120f; lifetime = 120f;
width = height = 14f; width = height = 14f;
collides = true; collides = true;
collidesTiles = true; collidesTiles = true;
splashDamageRadius = 30f; splashDamageRadius = 35f;
splashDamage = 60f; splashDamage = 80f;
backColor = Pal.bulletYellowBack; backColor = Pal.bulletYellowBack;
frontColor = Pal.bulletYellow; frontColor = Pal.bulletYellow;
}}; }};
@@ -1780,6 +1780,7 @@ public class UnitTypes implements ContentList{
shots = 3; shots = 3;
shotDelay = 7f; shotDelay = 7f;
x = y = shootX = shootY = 0f; x = y = shootX = shootY = 0f;
shootSound = Sounds.mineDeploy;
bullet = new BasicBulletType(){{ bullet = new BasicBulletType(){{
sprite = "mine-bullet"; sprite = "mine-bullet";
@@ -2047,7 +2048,6 @@ public class UnitTypes implements ContentList{
buildSpeed = 3f; buildSpeed = 3f;
abilities.add(new EnergyFieldAbility(35f, 65f, 180f){{ abilities.add(new EnergyFieldAbility(35f, 65f, 180f){{
repair = 35f;
statusDuration = 60f * 6f; statusDuration = 60f * 6f;
maxTargets = 25; maxTargets = 25;
}}); }});
@@ -2151,10 +2151,13 @@ public class UnitTypes implements ContentList{
shootY = 7f; shootY = 7f;
recoil = 4f; recoil = 4f;
cooldownTime = reload - 10f; cooldownTime = reload - 10f;
//TODO better sound
shootSound = Sounds.laser;
bullet = new EmpBulletType(){{ bullet = new EmpBulletType(){{
float rad = 100f; float rad = 100f;
scaleVelocity = true;
lightOpacity = 0.7f; lightOpacity = 0.7f;
unitDamageScl = 0.8f; unitDamageScl = 0.8f;
healPercent = 20f; healPercent = 20f;
@@ -2182,6 +2185,7 @@ public class UnitTypes implements ContentList{
hitShake = 4f; hitShake = 4f;
trailRotation = true; trailRotation = true;
status = StatusEffects.electrified; status = StatusEffects.electrified;
hitSound = Sounds.plasmaboom;
trailEffect = new Effect(16f, e -> { trailEffect = new Effect(16f, e -> {
color(Pal.heal); color(Pal.heal);

View File

@@ -49,6 +49,7 @@ public class Logic implements ApplicationListener{
BlockPlan b = it.next(); BlockPlan b = it.next();
Block block = content.block(b.block); Block block = content.block(b.block);
if(event.tile.block().bounds(event.tile.x, event.tile.y, Tmp.r1).overlaps(block.bounds(b.x, b.y, Tmp.r2))){ if(event.tile.block().bounds(event.tile.x, event.tile.y, Tmp.r1).overlaps(block.bounds(b.x, b.y, Tmp.r2))){
b.removed = true;
it.remove(); it.remove();
} }
} }
@@ -128,25 +129,7 @@ public class Logic implements ApplicationListener{
Events.on(SectorCaptureEvent.class, e -> { Events.on(SectorCaptureEvent.class, e -> {
if(!net.client() && e.sector == state.getSector() && e.sector.isBeingPlayed()){ if(!net.client() && e.sector == state.getSector() && e.sector.isBeingPlayed()){
for(Tile tile : world.tiles){ state.rules.waveTeam.data().destroyToDerelict();
//convert all blocks to neutral, randomly killing them
if(tile.isCenter() && tile.build != null && tile.build.team == state.rules.waveTeam){
Building b = tile.build;
Call.setTeam(b, Team.derelict);
Time.run(Mathf.random(0f, 60f * 6f), () -> {
if(Mathf.chance(0.25)){
b.kill();
}
});
}
}
//kill all units
Groups.unit.each(u -> {
if(u.team == state.rules.waveTeam){
Time.run(Mathf.random(0f, 60f * 5f), u::kill);
}
});
} }
}); });
@@ -162,6 +145,12 @@ public class Logic implements ApplicationListener{
} }
}); });
//listen to core changes; if all cores have been destroyed, set to derelict.
Events.on(CoreChangeEvent.class, e -> Core.app.post(() -> {
if(state.rules.cleanupDeadTeams && state.rules.pvp && !e.core.isAdded() && e.core.team != Team.derelict && e.core.team.cores().isEmpty()){
e.core.team.data().destroyToDerelict();
}
}));
} }
/** Adds starting items, resets wave time, and sets state to playing. */ /** Adds starting items, resets wave time, and sets state to playing. */

View File

@@ -159,6 +159,22 @@ public class NetClient implements ApplicationListener{
clientPacketReliable(type, contents); clientPacketReliable(type, contents);
} }
//TODO enable in build 129
/*
@Remote(variants = Variant.both, unreliable = true)
public static void sound(Sound sound, float volume, float pitch, float pan){
if(sound == null) return;
sound.play(volume * Core.settings.getInt("sfxvol") / 100f, pitch, pan);
}
@Remote(variants = Variant.both, unreliable = true)
public static void soundAt(Sound sound, float x, float y, float volume, float pitch){
if(sound == null) return;
sound.at(x, y, pitch, volume);
}*/
@Remote(variants = Variant.both, unreliable = true) @Remote(variants = Variant.both, unreliable = true)
public static void effect(Effect effect, float x, float y, float rotation, Color color){ public static void effect(Effect effect, float x, float y, float rotation, Color color){
if(effect == null) return; if(effect == null) return;

View File

@@ -344,8 +344,7 @@ public class NetServer implements ApplicationListener{
boolean checkPass(){ boolean checkPass(){
if(votes >= votesRequired()){ if(votes >= votesRequired()){
Call.sendMessage(Strings.format("[orange]Vote passed.[scarlet] @[orange] will be banned from the server for @ minutes.", target.name, (kickDuration / 60))); Call.sendMessage(Strings.format("[orange]Vote passed.[scarlet] @[orange] will be banned from the server for @ minutes.", target.name, (kickDuration / 60)));
target.getInfo().lastKicked = Time.millis() + kickDuration * 1000; Groups.player.each(p -> p.uuid().equals(target.uuid()), p -> p.kick(KickReason.vote, kickDuration * 1000));
Groups.player.each(p -> p.uuid().equals(target.uuid()), p -> p.kick(KickReason.vote));
map[0] = null; map[0] = null;
task.cancel(); task.cancel();
return true; return true;

View File

@@ -33,7 +33,7 @@ import static arc.scene.actions.Actions.*;
import static mindustry.Vars.*; import static mindustry.Vars.*;
public class UI implements ApplicationListener, Loadable{ public class UI implements ApplicationListener, Loadable{
private static String billions, millions, thousands; public static String billions, millions, thousands;
public static PixmapPacker packer; public static PixmapPacker packer;

View File

@@ -525,8 +525,7 @@ public class World{
private class Context implements WorldContext{ private class Context implements WorldContext{
Context(){ Context(){}
}
@Override @Override
public Tile tile(int index){ public Tile tile(int index){
@@ -579,7 +578,7 @@ public class World{
for(GenerateFilter filter : filters){ for(GenerateFilter filter : filters){
filter.randomize(); filter.randomize();
input.begin(filter, width(), height(), (x, y) -> tiles.getn(x, y)); input.begin(width(), height(), (x, y) -> tiles.getn(x, y));
filter.apply(tiles, input); filter.apply(tiles, input);
} }
} }

View File

@@ -15,6 +15,7 @@ import mindustry.game.*;
import mindustry.gen.*; import mindustry.gen.*;
import mindustry.graphics.*; import mindustry.graphics.*;
import mindustry.io.*; import mindustry.io.*;
import mindustry.maps.*;
import mindustry.maps.filters.*; import mindustry.maps.filters.*;
import mindustry.maps.filters.GenerateFilter.*; import mindustry.maps.filters.GenerateFilter.*;
import mindustry.ui.*; import mindustry.ui.*;
@@ -26,12 +27,6 @@ import static mindustry.Vars.*;
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public class MapGenerateDialog extends BaseDialog{ public class MapGenerateDialog extends BaseDialog{
final Prov<GenerateFilter>[] filterTypes = new Prov[]{
NoiseFilter::new, ScatterFilter::new, TerrainFilter::new, DistortFilter::new,
RiverNoiseFilter::new, OreFilter::new, OreMedianFilter::new, MedianFilter::new,
BlendFilter::new, MirrorFilter::new, ClearFilter::new, CoreSpawnFilter::new,
EnemySpawnFilter::new, SpawnPathFilter::new
};
final boolean applied; final boolean applied;
Pixmap pixmap; Pixmap pixmap;
@@ -158,7 +153,7 @@ public class MapGenerateDialog extends BaseDialog{
long[] writeTiles = new long[editor.width() * editor.height()]; long[] writeTiles = new long[editor.width() * editor.height()];
for(GenerateFilter filter : filters){ for(GenerateFilter filter : filters){
input.begin(filter, editor.width(), editor.height(), editor::tile); input.begin(editor.width(), editor.height(), editor::tile);
//write to buffer //write to buffer
for(int x = 0; x < editor.width(); x++){ for(int x = 0; x < editor.width(); x++){
@@ -333,7 +328,7 @@ public class MapGenerateDialog extends BaseDialog{
p.marginRight(14); p.marginRight(14);
p.defaults().size(195f, 56f); p.defaults().size(195f, 56f);
int i = 0; int i = 0;
for(var gen : filterTypes){ for(var gen : Maps.allFilterTypes){
var filter = gen.get(); var filter = gen.get();
var icon = filter.icon(); var icon = filter.icon();
@@ -414,7 +409,7 @@ public class MapGenerateDialog extends BaseDialog{
} }
for(var filter : copy){ for(var filter : copy){
input.begin(filter, editor.width(), editor.height(), (x, y) -> unpack(buffer1[Mathf.clamp(x / scaling, 0, pixmap.width -1) + w* Mathf.clamp(y / scaling, 0, pixmap.height -1)])); input.begin(editor.width(), editor.height(), (x, y) -> unpack(buffer1[Mathf.clamp(x / scaling, 0, pixmap.width -1) + w* Mathf.clamp(y / scaling, 0, pixmap.height -1)]));
//read from buffer1 and write to buffer2 //read from buffer1 and write to buffer2
pixmap.each((px, py) -> { pixmap.each((px, py) -> {

View File

@@ -1,6 +1,7 @@
package mindustry.entities.abilities; package mindustry.entities.abilities;
import arc.*; import arc.*;
import arc.audio.*;
import arc.graphics.*; import arc.graphics.*;
import arc.graphics.g2d.*; import arc.graphics.g2d.*;
import arc.math.*; import arc.math.*;
@@ -16,14 +17,15 @@ import mindustry.type.*;
public class EnergyFieldAbility extends Ability{ public class EnergyFieldAbility extends Ability{
private static final Seq<Healthc> all = new Seq<>(); private static final Seq<Healthc> all = new Seq<>();
public float damage = 1, repair = 20f, reload = 100, range = 60; public float damage = 1, reload = 100, range = 60;
public Effect healEffect = Fx.heal, hitEffect = Fx.hitLaserBlast, damageEffect = Fx.chainLightning; public Effect healEffect = Fx.heal, hitEffect = Fx.hitLaserBlast, damageEffect = Fx.chainLightning;
public StatusEffect status = StatusEffects.electrified; public StatusEffect status = StatusEffects.electrified;
public Sound shootSound = Sounds.spark;
public float statusDuration = 60f * 6f; public float statusDuration = 60f * 6f;
public float x, y; public float x, y;
public boolean hitBuildings = true; public boolean hitBuildings = true;
public int maxTargets = 25; public int maxTargets = 25;
public float healPercent = 3f; public float healPercent = 2.5f;
public float layer = Layer.bullet - 0.001f, blinkScl = 20f; public float layer = Layer.bullet - 0.001f, blinkScl = 20f;
public float effectRadius = 5f, sectorRad = 0.14f, rotateSpeed = 0.5f; public float effectRadius = 5f, sectorRad = 0.14f, rotateSpeed = 0.5f;
@@ -139,6 +141,10 @@ public class EnergyFieldAbility extends Ability{
} }
} }
if(anyNearby){
shootSound.at(unit);
}
timer = 0f; timer = 0f;
} }
} }

View File

@@ -93,7 +93,7 @@ public class BulletType extends Content implements Cloneable{
public boolean collides = true; public boolean collides = true;
/** Whether velocity is inherited from the shooter. */ /** Whether velocity is inherited from the shooter. */
public boolean keepVelocity = true; public boolean keepVelocity = true;
/** Whether to scale velocity to disappear at the target position. Used for artillery. */ /** Whether to scale lifetime (not actually velocity!) to disappear at the target position. Used for artillery. */
public boolean scaleVelocity; public boolean scaleVelocity;
/** Whether this bullet can be hit by point defense. */ /** Whether this bullet can be hit by point defense. */
public boolean hittable = true; public boolean hittable = true;
@@ -232,8 +232,8 @@ public class BulletType extends Content implements Cloneable{
} }
if(entity instanceof Unit unit){ if(entity instanceof Unit unit){
Tmp.v3.set(unit).sub(b.x, b.y).nor().scl(knockback * 80f); Tmp.v3.set(unit).sub(b).nor().scl(knockback * 80f);
if(impact) Tmp.v3.setAngle(b.rotation()); if(impact) Tmp.v3.setAngle(b.rotation() + (knockback < 0 ? 180f : 0f));
unit.impulse(Tmp.v3); unit.impulse(Tmp.v3);
unit.apply(status, statusDuration); unit.apply(status, statusDuration);
} }

View File

@@ -9,7 +9,7 @@ import static mindustry.Vars.*;
@Component @Component
abstract class BoundedComp implements Velc, Posc, Healthc, Flyingc{ abstract class BoundedComp implements Velc, Posc, Healthc, Flyingc{
static final float warpDst = 40f; static final float warpDst = 30f;
@Import float x, y; @Import float x, y;

View File

@@ -106,7 +106,6 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
/** Sets up all the necessary variables, but does not add this entity anywhere. */ /** Sets up all the necessary variables, but does not add this entity anywhere. */
public Building create(Block block, Team team){ public Building create(Block block, Team team){
this.tile = emptyTile;
this.block = block; this.block = block;
this.team = team; this.team = team;
@@ -1443,7 +1442,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
@Override @Override
public void killed(){ public void killed(){
Events.fire(new BlockDestroyEvent(tile)); Events.fire(new BlockDestroyEvent(tile));
block.breakSound.at(tile); block.destroySound.at(tile);
onDestroyed(); onDestroyed();
tile.remove(); tile.remove();
remove(); remove();

View File

@@ -44,6 +44,13 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw
} }
} }
//bullets always considered local
@Override
@Replace
public boolean isLocal(){
return true;
}
@Override @Override
public void add(){ public void add(){
type.init(self()); type.init(self());

View File

@@ -2,6 +2,7 @@ package mindustry.entities.comp;
import arc.math.*; import arc.math.*;
import arc.math.geom.*; import arc.math.geom.*;
import arc.util.*;
import mindustry.annotations.Annotations.*; import mindustry.annotations.Annotations.*;
import mindustry.async.PhysicsProcess.*; import mindustry.async.PhysicsProcess.*;
import mindustry.gen.*; import mindustry.gen.*;

View File

@@ -51,13 +51,11 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
return unit.canBuild(); return unit.canBuild();
} }
public @Nullable public @Nullable CoreBuild closestCore(){
CoreBuild closestCore(){
return state.teams.closestCore(x, y, team); return state.teams.closestCore(x, y, team);
} }
public @Nullable public @Nullable CoreBuild core(){
CoreBuild core(){
return team.core(); return team.core();
} }
@@ -240,6 +238,10 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
con.kick(reason); con.kick(reason);
} }
void kick(KickReason reason, long duration){
con.kick(reason, duration);
}
void kick(String reason){ void kick(String reason){
con.kick(reason); con.kick(reason);
} }

View File

@@ -16,8 +16,8 @@ abstract class ShieldComp implements Healthc, Posc{
/** Absorbs health damage. */ /** Absorbs health damage. */
float shield; float shield;
/** Subtracts an amount from damage. */ /** Subtracts an amount from damage. No need to save. */
float armor; transient float armor;
/** Shield opacity. */ /** Shield opacity. */
transient float shieldAlpha = 0f; transient float shieldAlpha = 0f;

View File

@@ -13,20 +13,24 @@ import static mindustry.Vars.*;
abstract class VelComp implements Posc{ abstract class VelComp implements Posc{
@Import float x, y; @Import float x, y;
//TODO @SyncLocal this? does it even need to be sent? @SyncLocal Vec2 vel = new Vec2();
transient final Vec2 vel = new Vec2();
transient float drag = 0f; transient float drag = 0f;
//velocity needs to be called first, as it affects delta and lastPosition //velocity needs to be called first, as it affects delta and lastPosition
@MethodPriority(-1) @MethodPriority(-1)
@Override @Override
public void update(){ public void update(){
float px = x, py = y; //do not update velocity on the client at all, unless it's non-interpolated
move(vel.x * Time.delta, vel.y * Time.delta); //velocity conflicts with interpolation.
if(Mathf.equal(px, x)) vel.x = 0; if(!net.client() || isLocal()){
if(Mathf.equal(py, y)) vel.y = 0; float px = x, py = y;
move(vel.x * Time.delta, vel.y * Time.delta);
if(Mathf.equal(px, x)) vel.x = 0;
if(Mathf.equal(py, y)) vel.y = 0;
vel.scl(Math.max(1f - drag * Time.delta, 0)); vel.scl(Math.max(1f - drag * Time.delta, 0));
}
} }
/** @return function to use for check solid state. if null, no checking is done. */ /** @return function to use for check solid state. if null, no checking is done. */

View File

@@ -70,6 +70,8 @@ public class Rules{
public float enemyCoreBuildRadius = 400f; public float enemyCoreBuildRadius = 400f;
/** If true, no-build zones are calculated based on the closest core. */ /** If true, no-build zones are calculated based on the closest core. */
public boolean polygonCoreProtection = false; public boolean polygonCoreProtection = false;
/** If true, dead teams in PvP automatically have their blocks & units converted to derelict upon death. */
public boolean cleanupDeadTeams = true;
/** Radius around enemy wave drop zones.*/ /** Radius around enemy wave drop zones.*/
public float dropZoneRadius = 300f; public float dropZoneRadius = 300f;
/** Time between waves in ticks. */ /** Time between waves in ticks. */
@@ -114,22 +116,6 @@ public class Rules{
/** special tags for additional info. */ /** special tags for additional info. */
public StringMap tags = new StringMap(); public StringMap tags = new StringMap();
/** A team-specific ruleset. */
public static class TeamRule{
/** Whether to use building AI. */
public boolean ai;
/** TODO Tier of blocks/designs that the AI uses for building. [0, 1] */
public float aiTier = 1f;
/** Whether, when AI is enabled, ships should be spawned from the core. */
public boolean aiCoreSpawn = true;
/** If true, blocks don't require power or resources. */
public boolean cheat;
/** If true, resources are not consumed when building. */
public boolean infiniteResources;
/** If true, this team has infinite unit ammo. */
public boolean infiniteAmmo;
}
/** Copies this ruleset exactly. Not efficient at all, do not use often. */ /** Copies this ruleset exactly. Not efficient at all, do not use often. */
public Rules copy(){ public Rules copy(){
return JsonIO.copy(this); return JsonIO.copy(this);
@@ -150,6 +136,22 @@ public class Rules{
} }
} }
/** A team-specific ruleset. */
public static class TeamRule{
/** Whether to use building AI. */
public boolean ai;
/** TODO Tier of blocks/designs that the AI uses for building. [0, 1] */
public float aiTier = 1f;
/** Whether, when AI is enabled, ships should be spawned from the core. */
public boolean aiCoreSpawn = true;
/** If true, blocks don't require power or resources. */
public boolean cheat;
/** If true, resources are not consumed when building. */
public boolean infiniteResources;
/** If true, this team has infinite unit ammo. */
public boolean infiniteAmmo;
}
/** A simple map for storing TeamRules in an efficient way without hashing. */ /** A simple map for storing TeamRules in an efficient way without hashing. */
public static class TeamRules implements JsonSerializable{ public static class TeamRules implements JsonSerializable{
final TeamRule[] values = new TeamRule[Team.all.length]; final TeamRule[] values = new TeamRule[Team.all.length];

View File

@@ -1,6 +1,7 @@
package mindustry.game; package mindustry.game;
import arc.func.*; import arc.func.*;
import arc.math.*;
import arc.math.geom.*; import arc.math.geom.*;
import arc.struct.Queue; import arc.struct.Queue;
import arc.struct.*; import arc.struct.*;
@@ -260,6 +261,34 @@ public class Teams{
this.ai = new BaseAI(this); this.ai = new BaseAI(this);
} }
/** Destroys this team's presence on the map, killing part of its buildings and converting everything to 'derelict'. */
public void destroyToDerelict(){
//grab all buildings from quadtree.
var builds = new Seq<Building>();
if(buildings != null){
buildings.getObjects(builds);
}
//convert all team tiles to neutral, randomly killing them
for(var b : builds){
//TODO this may cause a lot of packet spam, optimize?
Call.setTeam(b, Team.derelict);
if(Mathf.chance(0.25)){
Time.run(Mathf.random(0f, 60f * 6f), b::kill);
}
}
//kill all units randomly
units.each(u -> Time.run(Mathf.random(0f, 60f * 5f), () -> {
//ensure unit hasn't switched teams for whatever reason
if(u.team == team){
u.kill();
}
}));
}
@Nullable @Nullable
public Seq<Unit> unitCache(UnitType type){ public Seq<Unit> unitCache(UnitType type){
if(unitsByType == null || unitsByType.length <= type.id || unitsByType[type.id] == null) return null; if(unitsByType == null || unitsByType.length <= type.id || unitsByType[type.id] == null) return null;
@@ -320,6 +349,7 @@ public class Teams{
public static class BlockPlan{ public static class BlockPlan{
public final short x, y, rotation, block; public final short x, y, rotation, block;
public final Object config; public final Object config;
public boolean removed;
public BlockPlan(int x, int y, short rotation, short block, Object config){ public BlockPlan(int x, int y, short rotation, short block, Object config){
this.x = (short)x; this.x = (short)x;

View File

@@ -339,7 +339,7 @@ public class BlockRenderer{
Draw.z(Layer.block); Draw.z(Layer.block);
} }
if(renderer.drawStatus && block.consumes.any()){ if(entity.team == player.team() && renderer.drawStatus && block.consumes.any()){
entity.drawStatus(); entity.drawStatus();
} }
} }

View File

@@ -145,6 +145,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
for(int pos : positions){ for(int pos : positions){
if(req.x == Point2.x(pos) && req.y == Point2.y(pos)){ if(req.x == Point2.x(pos) && req.y == Point2.y(pos)){
req.removed = true;
it.remove(); it.remove();
continue outer; continue outer;
} }
@@ -893,6 +894,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
Block block = content.block(req.block); Block block = content.block(req.block);
if(block.bounds(req.x, req.y, Tmp.r2).overlaps(Tmp.r1)){ if(block.bounds(req.x, req.y, Tmp.r2).overlaps(Tmp.r1)){
removed.add(Point2.pack(req.x, req.y)); removed.add(Point2.pack(req.x, req.y));
req.removed = true;
broken.remove(); broken.remove();
} }
} }

View File

@@ -1,11 +1,13 @@
package mindustry.io; package mindustry.io;
import arc.util.*;
import arc.util.serialization.*; import arc.util.serialization.*;
import arc.util.serialization.Json.*; import arc.util.serialization.Json.*;
import mindustry.*; import mindustry.*;
import mindustry.content.*; import mindustry.content.*;
import mindustry.ctype.*; import mindustry.ctype.*;
import mindustry.game.*; import mindustry.game.*;
import mindustry.maps.*;
import mindustry.type.*; import mindustry.type.*;
import mindustry.world.*; import mindustry.world.*;
import mindustry.world.meta.*; import mindustry.world.meta.*;
@@ -215,6 +217,12 @@ public class JsonIO{
return item != null ? item : liquid; return item != null ? item : liquid;
} }
}); });
//use short names for all filter types
for(var filter : Maps.allFilterTypes){
var i = filter.get();
json.addClassTag(Strings.camelize(i.getClass().getSimpleName().replace("Filter", "")), i.getClass());
}
} }
static class CustomJson extends Json{ static class CustomJson extends Json{

View File

@@ -1,5 +1,6 @@
package mindustry.io; package mindustry.io;
import arc.audio.*;
import arc.graphics.*; import arc.graphics.*;
import arc.math.geom.*; import arc.math.geom.*;
import arc.struct.*; import arc.struct.*;
@@ -501,6 +502,15 @@ public class TypeIO{
return id == -1 ? null : content.item(id); return id == -1 ? null : content.item(id);
} }
//note that only the standard sound constants in Sounds are supported; modded sounds are not.
public static void writeSound(Writes write, Sound sound){
write.s(Sounds.getSoundId(sound));
}
public static Sound readSound(Reads read){
return Sounds.getSound(read.s());
}
public static void writeWeather(Writes write, Weather item){ public static void writeWeather(Writes write, Weather item){
write.s(item == null ? -1 : item.id); write.s(item == null ? -1 : item.id);
} }
@@ -633,7 +643,7 @@ public class TypeIO{
} }
} }
/** Representes a building that has not been resolved yet. */ /** Represents a building that has not been resolved yet. */
public static class BuildingBox{ public static class BuildingBox{
public int pos; public int pos;

View File

@@ -181,7 +181,7 @@ public class LCanvas extends Table{
float dst = Math.min(y - this.y, Core.graphics.getHeight() - y); float dst = Math.min(y - this.y, Core.graphics.getHeight() - y);
if(dst < Scl.scl(100f)){ //scroll margin if(dst < Scl.scl(100f)){ //scroll margin
int sign = Mathf.sign(Core.graphics.getHeight()/2f - y); int sign = Mathf.sign(Core.graphics.getHeight()/2f - y);
pane.setScrollY(pane.getScrollY() + sign * Scl.scl(15f)); pane.setScrollY(pane.getScrollY() + sign * Scl.scl(15f) * Time.delta);
} }
} }
} }

View File

@@ -363,6 +363,9 @@ public class LExecutor{
float x1 = World.unconv(exec.numf(p1)), y1 = World.unconv(exec.numf(p2)), d1 = World.unconv(exec.numf(p3)); float x1 = World.unconv(exec.numf(p1)), y1 = World.unconv(exec.numf(p2)), d1 = World.unconv(exec.numf(p3));
switch(type){ switch(type){
case idle -> {
ai.control = type;
}
case move, stop, approach -> { case move, stop, approach -> {
ai.control = type; ai.control = type;
ai.moveX = x1; ai.moveX = x1;

View File

@@ -24,23 +24,30 @@ import mindustry.world.*;
import mindustry.world.blocks.storage.*; import mindustry.world.blocks.storage.*;
import java.io.*; import java.io.*;
import java.util.concurrent.*;
import static mindustry.Vars.*; import static mindustry.Vars.*;
public class Maps{ public class Maps{
/** All generation filter types. */
public static Prov<GenerateFilter>[] allFilterTypes = new Prov[]{
NoiseFilter::new, ScatterFilter::new, TerrainFilter::new, DistortFilter::new,
RiverNoiseFilter::new, OreFilter::new, OreMedianFilter::new, MedianFilter::new,
BlendFilter::new, MirrorFilter::new, ClearFilter::new, CoreSpawnFilter::new,
EnemySpawnFilter::new, SpawnPathFilter::new
};
/** List of all built-in maps. Filenames only. */ /** List of all built-in maps. Filenames only. */
private static String[] defaultMapNames = {"maze", "fortress", "labyrinth", "islands", "tendrils", "caldera", "wasteland", "shattered", "fork", "triad", "mudFlats", "moltenLake", "archipelago", "debrisField", "veins", "glacier", "passage"}; private static String[] defaultMapNames = {"maze", "fortress", "labyrinth", "islands", "tendrils", "caldera", "wasteland", "shattered", "fork", "triad", "mudFlats", "moltenLake", "archipelago", "debrisField", "veins", "glacier", "passage"};
/** Maps tagged as PvP */ /** Maps tagged as PvP */
static final String[] pvpMaps = {"veins", "glacier", "passage"}; private static String[] pvpMaps = {"veins", "glacier", "passage"};
/** All maps stored in an ordered array. */ /** All maps stored in an ordered array. */
private Seq<Map> maps = new Seq<>(); private Seq<Map> maps = new Seq<>();
/** Serializer for meta. */
private Json json = new Json();
private ShuffleMode shuffleMode = ShuffleMode.all; private ShuffleMode shuffleMode = ShuffleMode.all;
private @Nullable MapProvider shuffler; private @Nullable MapProvider shuffler;
private AsyncExecutor executor = new AsyncExecutor(2); private ExecutorService executor = Threads.executor(3);
private ObjectSet<Map> previewList = new ObjectSet<>(); private ObjectSet<Map> previewList = new ObjectSet<>();
public ShuffleMode getShuffleMode(){ public ShuffleMode getShuffleMode(){
@@ -352,20 +359,20 @@ public class Maps{
if(groups == null) return "[]"; if(groups == null) return "[]";
StringWriter buffer = new StringWriter(); StringWriter buffer = new StringWriter();
json.setWriter(new JsonWriter(buffer)); JsonIO.json.setWriter(new JsonWriter(buffer));
json.writeArrayStart(); JsonIO.json.writeArrayStart();
for(int i = 0; i < groups.size; i++){ for(int i = 0; i < groups.size; i++){
json.writeObjectStart(SpawnGroup.class, SpawnGroup.class); JsonIO.json.writeObjectStart(SpawnGroup.class, SpawnGroup.class);
groups.get(i).write(json); groups.get(i).write(JsonIO.json);
json.writeObjectEnd(); JsonIO.json.writeObjectEnd();
} }
json.writeArrayEnd(); JsonIO.json.writeArrayEnd();
return buffer.toString(); return buffer.toString();
} }
public Seq<SpawnGroup> readWaves(String str){ public Seq<SpawnGroup> readWaves(String str){
return str == null ? null : str.equals("[]") ? new Seq<>() : Seq.with(json.fromJson(SpawnGroup[].class, str)); return str == null ? null : str.equals("[]") ? new Seq<>() : Seq.with(JsonIO.json.fromJson(SpawnGroup[].class, str));
} }
public void loadPreviews(){ public void loadPreviews(){
@@ -422,7 +429,7 @@ public class Maps{
} }
private void writeCache(Map map) throws IOException{ private void writeCache(Map map) throws IOException{
try(DataOutputStream stream = new DataOutputStream(map.cacheFile().write(false, Streams.DEFAULT_BUFFER_SIZE))){ try(DataOutputStream stream = new DataOutputStream(map.cacheFile().write(false, Streams.defaultBufferSize))){
stream.write(0); stream.write(0);
stream.writeInt(map.spawns); stream.writeInt(map.spawns);
stream.write(map.teams.size); stream.write(map.teams.size);
@@ -434,7 +441,7 @@ public class Maps{
} }
private void readCache(Map map) throws IOException{ private void readCache(Map map) throws IOException{
try(DataInputStream stream = new DataInputStream(map.cacheFile().read(Streams.DEFAULT_BUFFER_SIZE))){ try(DataInputStream stream = new DataInputStream(map.cacheFile().read(Streams.defaultBufferSize))){
stream.read(); //version stream.read(); //version
map.spawns = stream.readInt(); map.spawns = stream.readInt();
int teamsize = stream.readByte(); int teamsize = stream.readByte();

View File

@@ -3,12 +3,15 @@ package mindustry.maps.filters;
import arc.*; import arc.*;
import arc.func.*; import arc.func.*;
import arc.scene.event.*;
import arc.scene.style.*; import arc.scene.style.*;
import arc.scene.ui.*; import arc.scene.ui.*;
import arc.scene.ui.layout.*; import arc.scene.ui.layout.*;
import arc.util.*;
import mindustry.*; import mindustry.*;
import mindustry.content.*; import mindustry.content.*;
import mindustry.gen.*; import mindustry.gen.*;
import mindustry.ui.*;
import mindustry.ui.dialogs.*; import mindustry.ui.dialogs.*;
import mindustry.world.*; import mindustry.world.*;
import mindustry.world.blocks.environment.*; import mindustry.world.blocks.environment.*;
@@ -35,7 +38,7 @@ public abstract class FilterOption{
final Floatc setter; final Floatc setter;
final float min, max, step; final float min, max, step;
boolean display; boolean display = true;
SliderOption(String name, Floatp getter, Floatc setter, float min, float max){ SliderOption(String name, Floatp getter, Floatc setter, float min, float max){
this(name, getter, setter, min, max, (max - min) / 200); this(name, getter, setter, min, max, (max - min) / 200);
@@ -57,19 +60,27 @@ public abstract class FilterOption{
@Override @Override
public void build(Table table){ public void build(Table table){
Label label;
if(!display){ if(!display){
table.add("@filter.option." + name); label = new Label("@filter.option." + name);
}else{ }else{
table.label(() -> Core.bundle.get("filter.option." + name) + ": " + (int)getter.get()); label = new Label(() -> Core.bundle.get("filter.option." + name) + ": " + Strings.autoFixed(getter.get(), 2));
} }
table.row(); label.setWrap(true);
Slider slider = table.slider(min, max, step, setter).growX().get(); label.setAlignment(Align.center);
label.touchable = Touchable.disabled;
label.setStyle(Styles.outlineLabel);
Slider slider = new Slider(min, max, step, false);
slider.moved(setter);
slider.setValue(getter.get()); slider.setValue(getter.get());
if(updateEditorOnChange){ if(updateEditorOnChange){
slider.changed(changed); slider.changed(changed);
}else{ }else{
slider.released(changed); slider.released(changed);
} }
table.stack(slider, label).colspan(2).pad(3).growX().row();
} }
} }

View File

@@ -75,8 +75,7 @@ public abstract class GenerateFilter{
/** localized display name */ /** localized display name */
public String name(){ public String name(){
var s = simpleName(); return Core.bundle.get("filter." + simpleName());
return Core.bundle.get("filter." + s);
} }
public char icon(){ public char icon(){
@@ -100,14 +99,12 @@ public abstract class GenerateFilter{
//utility generation functions //utility generation functions
//TODO would be nice if these functions used the seed and ditched "in" completely; simplex should be stateless
protected float noise(GenerateInput in, float scl, float mag){ protected float noise(GenerateInput in, float scl, float mag){
return (float)Simplex.noise2d(seed, 1f, 0f, 1f / scl, in.x, in.y) * mag; return Simplex.noise2d(seed, 1f, 0f, 1f / scl, in.x, in.y) * mag;
} }
protected float noise(GenerateInput in, float scl, float mag, float octaves, float persistence){ protected float noise(GenerateInput in, float scl, float mag, float octaves, float persistence){
return (float)Simplex.noise2d(seed, octaves, persistence, 1f / scl, in.x, in.y) * mag; return Simplex.noise2d(seed, octaves, persistence, 1f / scl, in.x, in.y) * mag;
} }
protected float rnoise(float x, float y, float scl, float mag){ protected float rnoise(float x, float y, float scl, float mag){
@@ -141,7 +138,7 @@ public abstract class GenerateFilter{
this.y = y; this.y = y;
} }
public void begin(GenerateFilter filter, int width, int height, TileProvider buffer){ public void begin(int width, int height, TileProvider buffer){
this.buffer = buffer; this.buffer = buffer;
this.width = width; this.width = width;
this.height = height; this.height = height;

View File

@@ -115,7 +115,7 @@ public abstract class PlanetGenerator extends BasicGenerator implements HexMeshe
@Override @Override
protected float noise(float x, float y, double octaves, double falloff, double scl, double mag){ protected float noise(float x, float y, double octaves, double falloff, double scl, double mag){
Vec3 v = sector.rect.project(x, y); Vec3 v = sector.rect.project(x, y);
return (float)Simplex.noise3d(0, octaves, falloff, 1f / scl, v.x, v.y, v.z) * (float)mag; return Simplex.noise3d(0, octaves, falloff, 1f / scl, v.x, v.y, v.z) * (float)mag;
} }
/** @return the scaling factor for sector rects. */ /** @return the scaling factor for sector rects. */

View File

@@ -57,7 +57,7 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
float rawHeight(Vec3 position){ float rawHeight(Vec3 position){
position = Tmp.v33.set(position).scl(scl); position = Tmp.v33.set(position).scl(scl);
return (Mathf.pow((float)Simplex.noise3d(seed, 7, 0.5f, 1f/3f, position.x, position.y, position.z), 2.3f) + waterOffset) / (1f + waterOffset); return (Mathf.pow(Simplex.noise3d(seed, 7, 0.5f, 1f/3f, position.x, position.y, position.z), 2.3f) + waterOffset) / (1f + waterOffset);
} }
@Override @Override
@@ -127,12 +127,12 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
position = Tmp.v33.set(position).scl(scl); position = Tmp.v33.set(position).scl(scl);
float rad = scl; float rad = scl;
float temp = Mathf.clamp(Math.abs(position.y * 2f) / (rad)); float temp = Mathf.clamp(Math.abs(position.y * 2f) / (rad));
float tnoise = (float)Simplex.noise3d(seed, 7, 0.56, 1f/3f, position.x, position.y + 999f, position.z); float tnoise = Simplex.noise3d(seed, 7, 0.56, 1f/3f, position.x, position.y + 999f, position.z);
temp = Mathf.lerp(temp, tnoise, 0.5f); temp = Mathf.lerp(temp, tnoise, 0.5f);
height *= 1.2f; height *= 1.2f;
height = Mathf.clamp(height); height = Mathf.clamp(height);
float tar = (float)Simplex.noise3d(seed, 4, 0.55f, 1f/2f, position.x, position.y + 999f, position.z) * 0.3f + Tmp.v31.dst(0, 0, 1f) * 0.2f; float tar = Simplex.noise3d(seed, 4, 0.55f, 1f/2f, position.x, position.y + 999f, position.z) * 0.3f + Tmp.v31.dst(0, 0, 1f) * 0.2f;
Block res = arr[Mathf.clamp((int)(temp * arr.length), 0, arr[0].length - 1)][Mathf.clamp((int)(height * arr[0].length), 0, arr[0].length - 1)]; Block res = arr[Mathf.clamp((int)(temp * arr.length), 0, arr[0].length - 1)][Mathf.clamp((int)(height * arr[0].length), 0, arr[0].length - 1)];
if(tar > 0.5f){ if(tar > 0.5f){
@@ -145,7 +145,7 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
@Override @Override
protected float noise(float x, float y, double octaves, double falloff, double scl, double mag){ protected float noise(float x, float y, double octaves, double falloff, double scl, double mag){
Vec3 v = sector.rect.project(x, y).scl(5f); Vec3 v = sector.rect.project(x, y).scl(5f);
return (float)Simplex.noise3d(seed, octaves, falloff, 1f / scl, v.x, v.y, v.z) * (float)mag; return Simplex.noise3d(seed, octaves, falloff, 1f / scl, v.x, v.y, v.z) * (float)mag;
} }
@Override @Override
@@ -162,12 +162,27 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
connected.add(this); connected.add(this);
} }
void con(int x1, int y1, int x2, int y2){
float nscl = rand.random(100f, 140f) * 6f;
int stroke = rand.random(3, 9);
brush(pathfind(x1, y1, x2, y2, tile -> (tile.solid() ? 50f : 0f) + noise(tile.x, tile.y, 2, 0.4f, 1f / nscl) * 500, Astar.manhattan), stroke);
}
void connect(Room to){ void connect(Room to){
if(!connected.add(to)) return; if(!connected.add(to)) return;
float nscl = rand.random(100f, 140f); Vec2 midpoint = Tmp.v1.set(to.x, to.y).add(x, y).scl(0.5f);
int stroke = rand.random(3, 9); rand.nextFloat();
brush(pathfind(x, y, to.x, to.y, tile -> (tile.solid() ? 5f : 0f) + noise(tile.x, tile.y, 2, 0.4, 1f / nscl) * 500, Astar.manhattan), stroke);
//add randomized offset to avoid straight lines
midpoint.add(Tmp.v2.setToRandomDirection(rand).scl(Tmp.v1.dst(x, y)));
midpoint.sub(width/2f, height/2f).limit(width / 2f / Mathf.sqrt3).add(width/2f, height/2f);
int mx = (int)midpoint.x, my = (int)midpoint.y;
con(x, y, mx, my);
con(mx, my, to.x, to.y);
} }
} }
@@ -244,8 +259,6 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
cells(1); cells(1);
distort(10f, 6f); distort(10f, 6f);
inverseFloodFill(tiles.getn(spawn.x, spawn.y));
Seq<Block> ores = Seq.with(Blocks.oreCopper, Blocks.oreLead); Seq<Block> ores = Seq.with(Blocks.oreCopper, Blocks.oreLead);
float poles = Math.abs(sector.tile.v.y); float poles = Math.abs(sector.tile.v.y);
float nmag = 0.5f; float nmag = 0.5f;
@@ -296,6 +309,8 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
median(2); median(2);
inverseFloodFill(tiles.getn(spawn.x, spawn.y));
tech(); tech();
pass((x, y) -> { pass((x, y) -> {

View File

@@ -1,9 +1,6 @@
package mindustry.mod; package mindustry.mod;
import arc.struct.*; import arc.struct.*;
import mindustry.world.blocks.environment.*;
import mindustry.world.blocks.payloads.*;
/** Generated class. Maps simple class names to concrete classes. For use in JSON mods. */ /** Generated class. Maps simple class names to concrete classes. For use in JSON mods. */
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public class ClassMap{ public class ClassMap{
@@ -168,26 +165,28 @@ public class ClassMap{
classes.put("StackConveyor", mindustry.world.blocks.distribution.StackConveyor.class); classes.put("StackConveyor", mindustry.world.blocks.distribution.StackConveyor.class);
classes.put("StackConveyorBuild", mindustry.world.blocks.distribution.StackConveyor.StackConveyorBuild.class); classes.put("StackConveyorBuild", mindustry.world.blocks.distribution.StackConveyor.StackConveyorBuild.class);
classes.put("AirBlock", mindustry.world.blocks.environment.AirBlock.class); classes.put("AirBlock", mindustry.world.blocks.environment.AirBlock.class);
classes.put("Bush", mindustry.world.blocks.environment.Bush.class);
classes.put("Cliff", mindustry.world.blocks.environment.Cliff.class); classes.put("Cliff", mindustry.world.blocks.environment.Cliff.class);
classes.put("DoubleOverlayFloor", mindustry.world.blocks.environment.DoubleOverlayFloor.class); classes.put("DoubleOverlayFloor", mindustry.world.blocks.environment.DoubleOverlayFloor.class);
classes.put("Floor", mindustry.world.blocks.environment.Floor.class); classes.put("Floor", mindustry.world.blocks.environment.Floor.class);
classes.put("OreBlock", mindustry.world.blocks.environment.OreBlock.class); classes.put("OreBlock", mindustry.world.blocks.environment.OreBlock.class);
classes.put("OverlayFloor", mindustry.world.blocks.environment.OverlayFloor.class); classes.put("OverlayFloor", mindustry.world.blocks.environment.OverlayFloor.class);
classes.put("Prop", mindustry.world.blocks.environment.Prop.class); classes.put("Prop", mindustry.world.blocks.environment.Prop.class);
classes.put("Bush", Bush.class);
classes.put("WavingProp", WavingProp.class);
classes.put("ShallowLiquid", mindustry.world.blocks.environment.ShallowLiquid.class); classes.put("ShallowLiquid", mindustry.world.blocks.environment.ShallowLiquid.class);
classes.put("SpawnBlock", mindustry.world.blocks.environment.SpawnBlock.class); classes.put("SpawnBlock", mindustry.world.blocks.environment.SpawnBlock.class);
classes.put("StaticClusterWall", StaticClusterWall.class); classes.put("StaticClusterWall", mindustry.world.blocks.environment.StaticClusterWall.class);
classes.put("StaticTree", mindustry.world.blocks.environment.StaticTree.class); classes.put("StaticTree", mindustry.world.blocks.environment.StaticTree.class);
classes.put("StaticWall", mindustry.world.blocks.environment.StaticWall.class); classes.put("StaticWall", mindustry.world.blocks.environment.StaticWall.class);
classes.put("TreeBlock", mindustry.world.blocks.environment.TreeBlock.class); classes.put("TreeBlock", mindustry.world.blocks.environment.TreeBlock.class);
classes.put("WallOreBlock", mindustry.world.blocks.environment.WallOreBlock.class); classes.put("WallOreBlock", mindustry.world.blocks.environment.WallOreBlock.class);
classes.put("WavingProp", mindustry.world.blocks.environment.WavingProp.class);
classes.put("WobbleProp", mindustry.world.blocks.environment.WobbleProp.class); classes.put("WobbleProp", mindustry.world.blocks.environment.WobbleProp.class);
classes.put("BlockLoader", BlockLoader.class); classes.put("BlockForge", mindustry.world.blocks.experimental.BlockForge.class);
classes.put("BlockLoaderBuild", BlockLoader.BlockLoaderBuild.class); classes.put("BlockForgeBuild", mindustry.world.blocks.experimental.BlockForge.BlockForgeBuild.class);
classes.put("BlockUnloader", BlockUnloader.class); classes.put("BlockLoader", mindustry.world.blocks.experimental.BlockLoader.class);
classes.put("BlockUnloaderBuild", BlockUnloader.BlockUnloaderBuild.class); classes.put("BlockLoaderBuild", mindustry.world.blocks.experimental.BlockLoader.BlockLoaderBuild.class);
classes.put("BlockUnloader", mindustry.world.blocks.experimental.BlockUnloader.class);
classes.put("BlockUnloaderBuild", mindustry.world.blocks.experimental.BlockUnloader.BlockUnloaderBuild.class);
classes.put("LegacyBlock", mindustry.world.blocks.legacy.LegacyBlock.class); classes.put("LegacyBlock", mindustry.world.blocks.legacy.LegacyBlock.class);
classes.put("LegacyMechPad", mindustry.world.blocks.legacy.LegacyMechPad.class); classes.put("LegacyMechPad", mindustry.world.blocks.legacy.LegacyMechPad.class);
classes.put("LegacyMechPadBuild", mindustry.world.blocks.legacy.LegacyMechPad.LegacyMechPadBuild.class); classes.put("LegacyMechPadBuild", mindustry.world.blocks.legacy.LegacyMechPad.LegacyMechPadBuild.class);
@@ -223,8 +222,12 @@ public class ClassMap{
classes.put("BallisticSiloBuild", mindustry.world.blocks.payloads.BallisticSilo.BallisticSiloBuild.class); classes.put("BallisticSiloBuild", mindustry.world.blocks.payloads.BallisticSilo.BallisticSiloBuild.class);
classes.put("BlockForge", mindustry.world.blocks.payloads.BlockForge.class); classes.put("BlockForge", mindustry.world.blocks.payloads.BlockForge.class);
classes.put("BlockForgeBuild", mindustry.world.blocks.payloads.BlockForge.BlockForgeBuild.class); classes.put("BlockForgeBuild", mindustry.world.blocks.payloads.BlockForge.BlockForgeBuild.class);
classes.put("BlockLoader", mindustry.world.blocks.payloads.BlockLoader.class);
classes.put("BlockLoaderBuild", mindustry.world.blocks.payloads.BlockLoader.BlockLoaderBuild.class);
classes.put("BlockProducer", mindustry.world.blocks.payloads.BlockProducer.class); classes.put("BlockProducer", mindustry.world.blocks.payloads.BlockProducer.class);
classes.put("BlockProducerBuild", mindustry.world.blocks.payloads.BlockProducer.BlockProducerBuild.class); classes.put("BlockProducerBuild", mindustry.world.blocks.payloads.BlockProducer.BlockProducerBuild.class);
classes.put("BlockUnloader", mindustry.world.blocks.payloads.BlockUnloader.class);
classes.put("BlockUnloaderBuild", mindustry.world.blocks.payloads.BlockUnloader.BlockUnloaderBuild.class);
classes.put("BuildPayload", mindustry.world.blocks.payloads.BuildPayload.class); classes.put("BuildPayload", mindustry.world.blocks.payloads.BuildPayload.class);
classes.put("NuclearWarhead", mindustry.world.blocks.payloads.NuclearWarhead.class); classes.put("NuclearWarhead", mindustry.world.blocks.payloads.NuclearWarhead.class);
classes.put("NuclearWarheadBuild", mindustry.world.blocks.payloads.NuclearWarhead.NuclearWarheadBuild.class); classes.put("NuclearWarheadBuild", mindustry.world.blocks.payloads.NuclearWarhead.NuclearWarheadBuild.class);
@@ -238,7 +241,7 @@ public class ClassMap{
classes.put("PayloadSource", mindustry.world.blocks.payloads.PayloadSource.class); classes.put("PayloadSource", mindustry.world.blocks.payloads.PayloadSource.class);
classes.put("PayloadSourceBuild", mindustry.world.blocks.payloads.PayloadSource.PayloadSourceBuild.class); classes.put("PayloadSourceBuild", mindustry.world.blocks.payloads.PayloadSource.PayloadSourceBuild.class);
classes.put("PayloadVoid", mindustry.world.blocks.payloads.PayloadVoid.class); classes.put("PayloadVoid", mindustry.world.blocks.payloads.PayloadVoid.class);
classes.put("BlockLoaderBuild", PayloadVoid.PayloadVoidBuild.class); classes.put("PayloadVoidBuild", mindustry.world.blocks.payloads.PayloadVoid.PayloadVoidBuild.class);
classes.put("UnitPayload", mindustry.world.blocks.payloads.UnitPayload.class); classes.put("UnitPayload", mindustry.world.blocks.payloads.UnitPayload.class);
classes.put("Battery", mindustry.world.blocks.power.Battery.class); classes.put("Battery", mindustry.world.blocks.power.Battery.class);
classes.put("BatteryBuild", mindustry.world.blocks.power.Battery.BatteryBuild.class); classes.put("BatteryBuild", mindustry.world.blocks.power.Battery.BatteryBuild.class);
@@ -246,6 +249,7 @@ public class ClassMap{
classes.put("BurnerGeneratorBuild", mindustry.world.blocks.power.BurnerGenerator.BurnerGeneratorBuild.class); classes.put("BurnerGeneratorBuild", mindustry.world.blocks.power.BurnerGenerator.BurnerGeneratorBuild.class);
classes.put("ConditionalConsumePower", mindustry.world.blocks.power.ConditionalConsumePower.class); classes.put("ConditionalConsumePower", mindustry.world.blocks.power.ConditionalConsumePower.class);
classes.put("DecayGenerator", mindustry.world.blocks.power.DecayGenerator.class); classes.put("DecayGenerator", mindustry.world.blocks.power.DecayGenerator.class);
classes.put("DynamicConsumePower", mindustry.world.blocks.power.DynamicConsumePower.class);
classes.put("ImpactReactor", mindustry.world.blocks.power.ImpactReactor.class); classes.put("ImpactReactor", mindustry.world.blocks.power.ImpactReactor.class);
classes.put("ImpactReactorBuild", mindustry.world.blocks.power.ImpactReactor.ImpactReactorBuild.class); classes.put("ImpactReactorBuild", mindustry.world.blocks.power.ImpactReactor.ImpactReactorBuild.class);
classes.put("ItemLiquidGenerator", mindustry.world.blocks.power.ItemLiquidGenerator.class); classes.put("ItemLiquidGenerator", mindustry.world.blocks.power.ItemLiquidGenerator.class);
@@ -334,6 +338,7 @@ public class ClassMap{
classes.put("DrawCells", mindustry.world.draw.DrawCells.class); classes.put("DrawCells", mindustry.world.draw.DrawCells.class);
classes.put("DrawCultivator", mindustry.world.draw.DrawCultivator.class); classes.put("DrawCultivator", mindustry.world.draw.DrawCultivator.class);
classes.put("DrawGlow", mindustry.world.draw.DrawGlow.class); classes.put("DrawGlow", mindustry.world.draw.DrawGlow.class);
classes.put("DrawLiquid", mindustry.world.draw.DrawLiquid.class);
classes.put("DrawMixer", mindustry.world.draw.DrawMixer.class); classes.put("DrawMixer", mindustry.world.draw.DrawMixer.class);
classes.put("DrawRotator", mindustry.world.draw.DrawRotator.class); classes.put("DrawRotator", mindustry.world.draw.DrawRotator.class);
classes.put("DrawSmelter", mindustry.world.draw.DrawSmelter.class); classes.put("DrawSmelter", mindustry.world.draw.DrawSmelter.class);

View File

@@ -86,7 +86,8 @@ public class Mods implements Loadable{
/** Imports an external mod file. Folders are not supported here. */ /** Imports an external mod file. Folders are not supported here. */
public LoadedMod importMod(Fi file) throws IOException{ public LoadedMod importMod(Fi file) throws IOException{
String baseName = file.nameWithoutExtension(); //for some reason, android likes to add colons to file names, e.g. primary:ExampleJavaMod.jar, which breaks dexing
String baseName = file.nameWithoutExtension().replace(':', '_').replace(' ', '_');
String finalName = baseName; String finalName = baseName;
//find a name to prevent any name conflicts //find a name to prevent any name conflicts
int count = 1; int count = 1;
@@ -300,12 +301,12 @@ public class Mods implements Loadable{
} }
private PageType getPage(Fi file){ private PageType getPage(Fi file){
String parent = file.parent().name(); String path = file.path();
return return
parent.equals("environment") ? PageType.environment : path.contains("sprites/blocks/environment") ? PageType.environment :
parent.equals("editor") ? PageType.editor : path.contains("sprites/editor") ? PageType.editor :
parent.equals("rubble") ? PageType.editor : path.contains("sprites/rubble") ? PageType.editor :
parent.equals("ui") || file.parent().parent().name().equals("ui") ? PageType.ui : path.contains("sprites/ui") ? PageType.ui :
PageType.main; PageType.main;
} }

View File

@@ -7,9 +7,9 @@ import arc.assets.loaders.SoundLoader.*;
import arc.audio.*; import arc.audio.*;
import arc.files.*; import arc.files.*;
import arc.func.*; import arc.func.*;
import arc.struct.*;
import arc.util.*; import arc.util.*;
import arc.util.Log.*; import arc.util.Log.*;
import arc.util.io.*;
import mindustry.*; import mindustry.*;
import mindustry.mod.Mods.*; import mindustry.mod.Mods.*;
import rhino.*; import rhino.*;
@@ -18,7 +18,6 @@ import rhino.module.provider.*;
import java.io.*; import java.io.*;
import java.net.*; import java.net.*;
import java.util.*;
import java.util.regex.*; import java.util.regex.*;
public class Scripts implements Disposable{ public class Scripts implements Disposable{
@@ -131,7 +130,7 @@ public class Scripts implements Disposable{
/** writeFile but for a byte[] */ /** writeFile but for a byte[] */
public void writeBinFile(String purpose, String ext, byte[] contents){ public void writeBinFile(String purpose, String ext, byte[] contents){
if(contents == null) contents = new byte[0]; if(contents == null) contents = Streams.emptyBytes;
final byte[] fContents = contents; final byte[] fContents = contents;
selectFile(false, purpose, ext, fi -> fi.writeBytes(fContents)); selectFile(false, purpose, ext, fi -> fi.writeBytes(fContents));
} }
@@ -183,7 +182,7 @@ public class Scripts implements Disposable{
} }
private class ScriptModuleProvider extends UrlModuleSourceProvider{ private class ScriptModuleProvider extends UrlModuleSourceProvider{
private Pattern directory = Pattern.compile("^(.+?)/(.+)"); private final Pattern directory = Pattern.compile("^(.+?)/(.+)");
public ScriptModuleProvider(){ public ScriptModuleProvider(){
super(null, null); super(null, null);

View File

@@ -391,15 +391,7 @@ public class ArcNetProvider implements NetProvider{
//no compression, copy over buffer //no compression, copy over buffer
if(compression == 0){ if(compression == 0){
buffer.position(0).limit(length); buffer.position(0).limit(length);
if(byteBuffer.hasArray()){ buffer.put(byteBuffer.array(), byteBuffer.position(), length);
buffer.put(byteBuffer.array(), byteBuffer.position(), length);
}else{
byte[] readcopy = new byte[length];
int pos = byteBuffer.position();
byteBuffer.get(readcopy);
byteBuffer.position(pos);
buffer.put(readcopy);
}
buffer.position(0); buffer.position(0);
packet.read(reads.get(), length); packet.read(reads.get(), length);
//move read packets forward //move read packets forward

View File

@@ -1,7 +1,6 @@
package mindustry.net; package mindustry.net;
import arc.*; import arc.*;
import arc.Net.*;
import arc.files.*; import arc.files.*;
import arc.func.*; import arc.func.*;
import arc.util.*; import arc.util.*;
@@ -62,27 +61,25 @@ public class BeControl{
/** asynchronously checks for updates. */ /** asynchronously checks for updates. */
public void checkUpdate(Boolc done){ public void checkUpdate(Boolc done){
Core.net.httpGet("https://api.github.com/repos/Anuken/MindustryBuilds/releases/latest", res -> { Http.get("https://api.github.com/repos/Anuken/MindustryBuilds/releases/latest")
if(res.getStatus() == HttpStatus.OK){ .error(e -> {}) //ignore errors
Jval val = Jval.read(res.getResultAsString()); .submit(res -> {
int newBuild = Strings.parseInt(val.getString("tag_name", "0")); Jval val = Jval.read(res.getResultAsString());
if(newBuild > Version.build){ int newBuild = Strings.parseInt(val.getString("tag_name", "0"));
Jval asset = val.get("assets").asArray().find(v -> v.getString("name", "").startsWith(headless ? "Mindustry-BE-Server" : "Mindustry-BE-Desktop")); if(newBuild > Version.build){
String url = asset.getString("browser_download_url", ""); Jval asset = val.get("assets").asArray().find(v -> v.getString("name", "").startsWith(headless ? "Mindustry-BE-Server" : "Mindustry-BE-Desktop"));
updateAvailable = true; String url = asset.getString("browser_download_url", "");
updateBuild = newBuild; updateAvailable = true;
updateUrl = url; updateBuild = newBuild;
Core.app.post(() -> { updateUrl = url;
showUpdateDialog(); Core.app.post(() -> {
done.get(true); showUpdateDialog();
}); done.get(true);
}else{ });
Core.app.post(() -> done.get(false));
}
}else{ }else{
Core.app.post(() -> done.get(false)); Core.app.post(() -> done.get(false));
} }
}, error -> {}); //ignore errors });
} }
/** @return whether a new update is available */ /** @return whether a new update is available */

View File

@@ -1,7 +1,6 @@
package mindustry.net; package mindustry.net;
import arc.*; import arc.*;
import arc.Net.*;
import arc.files.*; import arc.files.*;
import arc.func.*; import arc.func.*;
import arc.struct.*; import arc.struct.*;
@@ -30,18 +29,17 @@ public class CrashSender{
report += "Report this at " + Vars.reportIssueURL + "\n\n"; report += "Report this at " + Vars.reportIssueURL + "\n\n";
} }
return report return report
+ "Version: " + Version.combined() + (Vars.headless ? " (Server)" : "") + "\n" + "Version: " + Version.combined() + (Vars.headless ? " (Server)" : "") + "\n"
+ "OS: " + System.getProperty("os.name") + " x" + (OS.is64Bit ? "64" : "32") + "\n" + "OS: " + OS.osName + " x" + (OS.osArchBits) + " (" + OS.osArch + ")\n"
+ "Java Version: " + System.getProperty("java.version") + "\n" + "Java Version: " + OS.javaVersion + "\n"
+ "Java Architecture: " + System.getProperty("sun.arch.data.model") + "\n" + (mods == null ? "<no mod init>" : mods.list().size + " Mods" + (mods.list().isEmpty() ? "" : ": " + mods.list().toString(", ", mod -> mod.name + ":" + mod.meta.version)))
+ (mods == null ? "<no mod init>" : mods.list().size + " Mods" + (mods.list().isEmpty() ? "" : ": " + mods.list().toString(", ", mod -> mod.name + ":" + mod.meta.version))) + "\n\n" + error;
+ "\n\n" + error;
} }
public static void log(Throwable exception){ public static void log(Throwable exception){
try{ try{
Core.settings.getDataDirectory().child("crashes").child("crash_" + System.currentTimeMillis() + ".txt") Core.settings.getDataDirectory().child("crashes").child("crash_" + System.currentTimeMillis() + ".txt")
.writeString(createReport(Strings.neatError(exception))); .writeString(createReport(Strings.neatError(exception)));
}catch(Throwable ignored){ }catch(Throwable ignored){
} }
} }
@@ -61,7 +59,7 @@ public class CrashSender{
}catch(Throwable ignored){} }catch(Throwable ignored){}
//don't create crash logs for custom builds, as it's expected //don't create crash logs for custom builds, as it's expected
if(Version.build == -1 || (System.getProperty("user.name").equals("anuke") && "release".equals(Version.modifier))){ if(Version.build == -1 || (OS.username.equals("anuke") && !"steam".equals(Version.modifier))){
ret(); ret();
} }
@@ -142,31 +140,23 @@ public class CrashSender{
ex(() -> value.addChild("server", new JsonValue(fs))); ex(() -> value.addChild("server", new JsonValue(fs)));
ex(() -> value.addChild("players", new JsonValue(Groups.player.size()))); ex(() -> value.addChild("players", new JsonValue(Groups.player.size())));
ex(() -> value.addChild("state", new JsonValue(Vars.state.getState().name()))); ex(() -> value.addChild("state", new JsonValue(Vars.state.getState().name())));
ex(() -> value.addChild("os", new JsonValue(System.getProperty("os.name") + "x" + (OS.is64Bit ? "64" : "32")))); ex(() -> value.addChild("os", new JsonValue(OS.osName + " x" + OS.osArchBits + " " + OS.osVersion)));
ex(() -> value.addChild("trace", new JsonValue(parseException(exception)))); ex(() -> value.addChild("trace", new JsonValue(parseException(exception))));
ex(() -> value.addChild("javaVersion", new JsonValue(System.getProperty("java.version")))); ex(() -> value.addChild("javaVersion", new JsonValue(OS.javaVersion)));
ex(() -> value.addChild("javaArch", new JsonValue(System.getProperty("sun.arch.data.model")))); ex(() -> value.addChild("javaArch", new JsonValue(OS.osArchBits)));
boolean[] sent = {false};
Log.info("Sending crash report."); Log.info("Sending crash report.");
//post to crash report URL, exit code indicates send success //post to crash report URL, exit code indicates send success
httpPost(Vars.crashReportURL, value.toJson(OutputType.json), r -> { Http.post(Vars.crashReportURL, value.toJson(OutputType.json)).error(t -> {
Log.info("Crash sent successfully."); Log.info("Crash report not sent.");
sent[0] = true;
System.exit(1);
}, t -> {
t.printStackTrace();
sent[0] = true;
System.exit(-1); System.exit(-1);
}).block(r -> {
Log.info("Crash sent successfully.");
System.exit(1);
}); });
//sleep until report is sent ret();
try{
while(!sent[0]){
Thread.sleep(30);
}
}catch(InterruptedException ignored){}
}catch(Throwable death){ }catch(Throwable death){
death.printStackTrace(); death.printStackTrace();
} }
@@ -178,10 +168,6 @@ public class CrashSender{
System.exit(1); System.exit(1);
} }
private static void httpPost(String url, String content, Cons<HttpResponse> success, Cons<Throwable> failure){
new NetJavaImpl().http(new HttpRequest().method(HttpMethod.POST).content(content).url(url), success, failure);
}
private static String parseException(Throwable e){ private static String parseException(Throwable e){
StringWriter sw = new StringWriter(); StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw); PrintWriter pw = new PrintWriter(sw);

View File

@@ -9,6 +9,7 @@ import arc.util.async.*;
import mindustry.gen.*; import mindustry.gen.*;
import mindustry.net.Packets.*; import mindustry.net.Packets.*;
import mindustry.net.Streamable.*; import mindustry.net.Streamable.*;
import net.jpountz.lz4.*;
import java.io.*; import java.io.*;
import java.nio.*; import java.nio.*;
@@ -33,7 +34,7 @@ public class Net{
private final ObjectMap<Class<?>, Cons> clientListeners = new ObjectMap<>(); private final ObjectMap<Class<?>, Cons> clientListeners = new ObjectMap<>();
private final ObjectMap<Class<?>, Cons2<NetConnection, Object>> serverListeners = new ObjectMap<>(); private final ObjectMap<Class<?>, Cons2<NetConnection, Object>> serverListeners = new ObjectMap<>();
private final IntMap<StreamBuilder> streams = new IntMap<>(); private final IntMap<StreamBuilder> streams = new IntMap<>();
private final ExecutorService pingExecutor = Threads.executor(Math.max(Runtime.getRuntime().availableProcessors(), 6)); private final ExecutorService pingExecutor = Threads.cachedExecutor();
private final NetProvider provider; private final NetProvider provider;
@@ -97,7 +98,7 @@ public class Net{
if(e instanceof BufferUnderflowException || e instanceof BufferOverflowException){ if(e instanceof BufferUnderflowException || e instanceof BufferOverflowException){
error = Core.bundle.get("error.io"); error = Core.bundle.get("error.io");
}else if(error.equals("mismatch") || (e instanceof IndexOutOfBoundsException && e.getStackTrace()[0].getClassName().contains("java.nio"))){ }else if(error.equals("mismatch") || e instanceof LZ4Exception || (e instanceof IndexOutOfBoundsException && e.getStackTrace()[0].getClassName().contains("java.nio"))){
error = Core.bundle.get("error.mismatch"); error = Core.bundle.get("error.mismatch");
}else if(error.contains("port out of range") || error.contains("invalid argument") || (error.contains("invalid") && error.contains("address")) || Strings.neatError(e).contains("address associated")){ }else if(error.contains("port out of range") || error.contains("invalid argument") || (error.contains("invalid") && error.contains("address")) || Strings.neatError(e).contains("address associated")){
error = Core.bundle.get("error.invalidaddress"); error = Core.bundle.get("error.invalidaddress");
@@ -325,13 +326,6 @@ public class Net{
pingExecutor.submit(() -> provider.pingHost(address, port, valid, failed)); pingExecutor.submit(() -> provider.pingHost(address, port, valid, failed));
} }
/**
* Pings a host in an new thread. If an error occurred, failed() should be called with the exception.
*/
public void pingHostThread(String address, int port, Cons<Host> valid, Cons<Exception> failed){
Threads.daemon(() -> provider.pingHost(address, port, valid, failed));
}
/** /**
* Whether the net is active, e.g. whether this is a multiplayer game. * Whether the net is active, e.g. whether this is a multiplayer game.
*/ */

View File

@@ -4,7 +4,6 @@ import arc.struct.*;
import arc.util.*; import arc.util.*;
import mindustry.entities.units.*; import mindustry.entities.units.*;
import mindustry.gen.*; import mindustry.gen.*;
import mindustry.net.Administration.*;
import mindustry.net.Packets.*; import mindustry.net.Packets.*;
import java.io.*; import java.io.*;
@@ -37,38 +36,39 @@ public abstract class NetConnection{
/** Kick with a special, localized reason. Use this if possible. */ /** Kick with a special, localized reason. Use this if possible. */
public void kick(KickReason reason){ public void kick(KickReason reason){
if(kicked) return; kick(reason, (reason == KickReason.kick || reason == KickReason.banned || reason == KickReason.vote) ? 30 * 1000 : 0);
}
Log.info("Kicking connection @ / @; Reason: @", address, uuid, reason.name()); /** Kick with a special, localized reason. Use this if possible. */
public void kick(KickReason reason, long kickDuration){
if((reason == KickReason.kick || reason == KickReason.banned || reason == KickReason.vote)){ kick(null, reason, kickDuration);
PlayerInfo info = netServer.admins.getInfo(uuid);
info.timesKicked++;
info.lastKicked = Math.max(Time.millis() + 30 * 1000, info.lastKicked);
}
Call.kick(this, reason);
close();
netServer.admins.save();
kicked = true;
} }
/** Kick with an arbitrary reason. */ /** Kick with an arbitrary reason. */
public void kick(String reason){ public void kick(String reason){
kick(reason, 30 * 1000); kick(reason, null, 30 * 1000);
}
/** Kick with an arbitrary reason. */
public void kick(String reason, long duration){
kick(reason, null, duration);
} }
/** Kick with an arbitrary reason, and a kick duration in milliseconds. */ /** Kick with an arbitrary reason, and a kick duration in milliseconds. */
public void kick(String reason, long kickDuration){ private void kick(String reason, KickReason kickType, long kickDuration){
if(kicked) return; if(kicked) return;
Log.info("Kicking connection @ / @; Reason: @", address, uuid, reason.replace("\n", " ")); Log.info("Kicking connection @ / @; Reason: @", address, uuid, reason == null ? kickType.name() : reason.replace("\n", " "));
netServer.admins.handleKicked(uuid, address, kickDuration); if(kickDuration > 0){
netServer.admins.handleKicked(uuid, address, kickDuration);
}
Call.kick(this, reason); if(reason == null){
Call.kick(this, kickType);
}else{
Call.kick(this, reason);
}
close(); close();

View File

@@ -76,7 +76,7 @@ public class StatusEffect extends UnlockableContent{
if(reloadMultiplier != 1) stats.addPercent(Stat.reloadMultiplier, reloadMultiplier); if(reloadMultiplier != 1) stats.addPercent(Stat.reloadMultiplier, reloadMultiplier);
if(buildSpeedMultiplier != 1) stats.addPercent(Stat.buildSpeedMultiplier, buildSpeedMultiplier); if(buildSpeedMultiplier != 1) stats.addPercent(Stat.buildSpeedMultiplier, buildSpeedMultiplier);
if(damage > 0) stats.add(Stat.damage, damage * 60f, StatUnit.perSecond); if(damage > 0) stats.add(Stat.damage, damage * 60f, StatUnit.perSecond);
if(damage < 0) stats.add(Stat.healing, -(damage * 60f), StatUnit.perSecond); if(damage < 0) stats.add(Stat.healing, -damage * 60f, StatUnit.perSecond);
boolean reacts = false; boolean reacts = false;

View File

@@ -255,7 +255,7 @@ public class UnitType extends UnlockableContent{
stats.add(Stat.health, health); stats.add(Stat.health, health);
stats.add(Stat.armor, armor); stats.add(Stat.armor, armor);
stats.add(Stat.speed, speed); stats.add(Stat.speed, speed * 60f / tilesize, StatUnit.tilesSecond);
stats.add(Stat.size, hitSize / tilesize, StatUnit.blocksSquared); stats.add(Stat.size, hitSize / tilesize, StatUnit.blocksSquared);
stats.add(Stat.itemCapacity, itemCapacity); stats.add(Stat.itemCapacity, itemCapacity);
stats.add(Stat.range, (int)(maxRange / tilesize), StatUnit.blocks); stats.add(Stat.range, (int)(maxRange / tilesize), StatUnit.blocks);

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