Merge branch 'master' of https://github.com/Anuken/Mindustry into 7.0-features
This commit is contained in:
@@ -216,7 +216,7 @@ host.invalid = [scarlet]Не удаётся подключиться к хост
|
|||||||
servers.local = Локальные серверы
|
servers.local = Локальные серверы
|
||||||
servers.remote = Удалённые серверы
|
servers.remote = Удалённые серверы
|
||||||
servers.global = Серверы сообщества
|
servers.global = Серверы сообщества
|
||||||
|
servers.local.steam = Открытые игры и локальные серверы
|
||||||
servers.disclaimer = Серверы сообщества [accent]не[] принадлежат разработчику и [accent]не[] контролируются им.\n\nСерверы могут содержать пользовательский контент, который не подходит для всех возрастов.
|
servers.disclaimer = Серверы сообщества [accent]не[] принадлежат разработчику и [accent]не[] контролируются им.\n\nСерверы могут содержать пользовательский контент, который не подходит для всех возрастов.
|
||||||
servers.showhidden = Отображать скрытые серверы
|
servers.showhidden = Отображать скрытые серверы
|
||||||
server.shown = Отображается
|
server.shown = Отображается
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public class ShieldRegenFieldAbility extends Ability{
|
|||||||
|
|
||||||
Units.nearby(unit.team, unit.x, unit.y, range, other -> {
|
Units.nearby(unit.team, unit.x, unit.y, range, other -> {
|
||||||
if(other.shield < max){
|
if(other.shield < max){
|
||||||
other.shield = Math.max(other.shield + amount, max);
|
other.shield = Math.min(other.shield + amount, max);
|
||||||
other.shieldAlpha = 1f; //TODO may not be necessary
|
other.shieldAlpha = 1f; //TODO may not be necessary
|
||||||
applyEffect.at(unit.x, unit.y, 0f, unit.team.color, parentizeEffects ? other : null);
|
applyEffect.at(unit.x, unit.y, 0f, unit.team.color, parentizeEffects ? other : null);
|
||||||
applied = true;
|
applied = true;
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ public class BulletType extends Content implements Cloneable{
|
|||||||
|
|
||||||
/** Returns maximum distance the bullet this bullet type has can travel. */
|
/** Returns maximum distance the bullet this bullet type has can travel. */
|
||||||
public float range(){
|
public float range(){
|
||||||
return Math.max(speed * lifetime * (1f - drag), maxRange);
|
return Mathf.zero(drag) ? speed * lifetime : Math.max(speed * (1f - Mathf.pow(1f - drag, lifetime)) / drag, maxRange);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return continuous damage in damage/sec, or -1 if not continuous. */
|
/** @return continuous damage in damage/sec, or -1 if not continuous. */
|
||||||
|
|||||||
@@ -45,11 +45,6 @@ public class LiquidBulletType extends BulletType{
|
|||||||
this(null);
|
this(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public float range(){
|
|
||||||
return speed * lifetime / 2f;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(Bullet b){
|
public void update(Bullet b){
|
||||||
super.update(b);
|
super.update(b);
|
||||||
|
|||||||
@@ -55,6 +55,16 @@ public class Saves{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//clear saves from build <130 that had the new naval sectors.
|
||||||
|
saves.removeAll(s -> {
|
||||||
|
if(s.getSector() != null && (s.getSector().id == 108 || s.getSector().id == 216) && s.meta.build <= 130 && s.meta.build > 0){
|
||||||
|
s.getSector().clearInfo();
|
||||||
|
s.file.delete();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
lastSectorSave = saves.find(s -> s.isSector() && s.getName().equals(Core.settings.getString("last-sector-save", "<none>")));
|
lastSectorSave = saves.find(s -> s.isSector() && s.getName().equals(Core.settings.getString("last-sector-save", "<none>")));
|
||||||
|
|
||||||
//automatically assign sector save slots
|
//automatically assign sector save slots
|
||||||
@@ -289,7 +299,7 @@ public class Saves{
|
|||||||
return meta.mods;
|
return meta.mods;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Sector getSector(){
|
public @Nullable Sector getSector(){
|
||||||
return meta == null || meta.rules == null ? null : meta.rules.sector;
|
return meta == null || meta.rules == null ? null : meta.rules.sector;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ public class MinimapRenderer{
|
|||||||
|
|
||||||
Draw.mixcol(unit.team().color, 1f);
|
Draw.mixcol(unit.team().color, 1f);
|
||||||
float scale = Scl.scl(1f) / 2f * scaling * 32f;
|
float scale = Scl.scl(1f) / 2f * scaling * 32f;
|
||||||
var region = unit.type.fullIcon;
|
var region = unit.icon();
|
||||||
Draw.rect(region, x + rx, y + ry, scale, scale * (float)region.height / region.width, unit.rotation() - 90);
|
Draw.rect(region, x + rx, y + ry, scale, scale * (float)region.height / region.width, unit.rotation() - 90);
|
||||||
Draw.reset();
|
Draw.reset();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||||||
|
|
||||||
//remove item for every controlling unit
|
//remove item for every controlling unit
|
||||||
player.unit().eachGroup(unit -> {
|
player.unit().eachGroup(unit -> {
|
||||||
Call.takeItems(build, item, unit.maxAccepted(item), unit);
|
Call.takeItems(build, item, Math.min(unit.maxAccepted(item), amount), unit);
|
||||||
|
|
||||||
if(unit == player.unit()){
|
if(unit == player.unit()){
|
||||||
Events.fire(new WithdrawEvent(build, player, item, amount));
|
Events.fire(new WithdrawEvent(build, player, item, amount));
|
||||||
|
|||||||
@@ -95,6 +95,12 @@ public class TypeIO{
|
|||||||
}else if(object instanceof BuildingBox b){
|
}else if(object instanceof BuildingBox b){
|
||||||
write.b(12);
|
write.b(12);
|
||||||
write.i(b.pos);
|
write.i(b.pos);
|
||||||
|
}else if(object instanceof boolean[] b){
|
||||||
|
write.b(16);
|
||||||
|
write.i(b.length);
|
||||||
|
for(boolean bool : b){
|
||||||
|
write.bool(bool);
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
throw new IllegalArgumentException("Unknown object type: " + object.getClass());
|
throw new IllegalArgumentException("Unknown object type: " + object.getClass());
|
||||||
}
|
}
|
||||||
@@ -126,6 +132,7 @@ public class TypeIO{
|
|||||||
case 13: return LAccess.all[read.s()];
|
case 13: return LAccess.all[read.s()];
|
||||||
case 14: int blen = read.i(); byte[] bytes = new byte[blen]; read.b(bytes); return bytes;
|
case 14: int blen = read.i(); byte[] bytes = new byte[blen]; read.b(bytes); return bytes;
|
||||||
case 15: return UnitCommand.all[read.b()];
|
case 15: return UnitCommand.all[read.b()];
|
||||||
|
case 16: int boollen = read.i(); boolean[] bools = new boolean[boollen]; for(int i = 0; i < boollen; i ++) bools[i] = read.bool(); return bools;
|
||||||
default: throw new IllegalArgumentException("Unknown object type: " + type);
|
default: throw new IllegalArgumentException("Unknown object type: " + type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ public class Turret extends ReloadTurret{
|
|||||||
public boolean targetAir = true;
|
public boolean targetAir = true;
|
||||||
public boolean targetGround = true;
|
public boolean targetGround = true;
|
||||||
public boolean targetHealing = false;
|
public boolean targetHealing = false;
|
||||||
|
public boolean playerControllable = true;
|
||||||
|
|
||||||
//charging
|
//charging
|
||||||
public float chargeTime = -1f;
|
public float chargeTime = -1f;
|
||||||
@@ -157,6 +158,11 @@ public class Turret extends ReloadTurret{
|
|||||||
unit.tile(this);
|
unit.tile(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canControl(){
|
||||||
|
return playerControllable;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void control(LAccess type, double p1, double p2, double p3, double p4){
|
public void control(LAccess type, double p1, double p2, double p3, double p4){
|
||||||
if(type == LAccess.shoot && (unit == null || !unit.isPlayer())){
|
if(type == LAccess.shoot && (unit == null || !unit.isPlayer())){
|
||||||
|
|||||||
@@ -11,4 +11,4 @@ android.useAndroidX=true
|
|||||||
#used for slow jitpack builds; TODO see if this actually works
|
#used for slow jitpack builds; TODO see if this actually works
|
||||||
http.socketTimeout=80000
|
http.socketTimeout=80000
|
||||||
http.connectionTimeout=80000
|
http.connectionTimeout=80000
|
||||||
archash=e982971b17f48c13f3a18c344b8080b7498cccf6
|
archash=6f56e0a3a33c0c7752c8aff868df035cf242e7aa
|
||||||
|
|||||||
@@ -112,7 +112,7 @@
|
|||||||
"address": ["144.76.120.74:18645"]
|
"address": ["144.76.120.74:18645"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "HexedPvP",
|
"name": "NukeDustry",
|
||||||
"address": ["001.finland.eu.hosts.dynamichost.xyz:23664"]
|
"address": ["nukedustry.tk", "nukedustry.tk:6568"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user