Merge branch 'master' of https://github.com/Anuken/Mindustry into 7.0-features
Conflicts: core/src/mindustry/ai/BlockIndexer.java gradle.properties
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -251,6 +251,10 @@ public class ContentLoader{
|
|||||||
return getByID(ContentType.item, id);
|
return getByID(ContentType.item, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Item item(String name){
|
||||||
|
return getByName(ContentType.item, name);
|
||||||
|
}
|
||||||
|
|
||||||
public Seq<Liquid> liquids(){
|
public Seq<Liquid> liquids(){
|
||||||
return getBy(ContentType.liquid);
|
return getBy(ContentType.liquid);
|
||||||
}
|
}
|
||||||
@@ -259,6 +263,10 @@ public class ContentLoader{
|
|||||||
return getByID(ContentType.liquid, id);
|
return getByID(ContentType.liquid, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Liquid liquid(String name){
|
||||||
|
return getByName(ContentType.liquid, name);
|
||||||
|
}
|
||||||
|
|
||||||
public Seq<BulletType> bullets(){
|
public Seq<BulletType> bullets(){
|
||||||
return getBy(ContentType.bullet);
|
return getBy(ContentType.bullet);
|
||||||
}
|
}
|
||||||
@@ -271,10 +279,18 @@ public class ContentLoader{
|
|||||||
return getBy(ContentType.status);
|
return getBy(ContentType.status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public StatusEffect statusEffect(String name){
|
||||||
|
return getByName(ContentType.status, name);
|
||||||
|
}
|
||||||
|
|
||||||
public Seq<SectorPreset> sectors(){
|
public Seq<SectorPreset> sectors(){
|
||||||
return getBy(ContentType.sector);
|
return getBy(ContentType.sector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SectorPreset sector(String name){
|
||||||
|
return getByName(ContentType.sector, name);
|
||||||
|
}
|
||||||
|
|
||||||
public Seq<UnitType> units(){
|
public Seq<UnitType> units(){
|
||||||
return getBy(ContentType.unit);
|
return getBy(ContentType.unit);
|
||||||
}
|
}
|
||||||
@@ -283,7 +299,15 @@ public class ContentLoader{
|
|||||||
return getByID(ContentType.unit, id);
|
return getByID(ContentType.unit, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public UnitType unit(String name){
|
||||||
|
return getByName(ContentType.unit, name);
|
||||||
|
}
|
||||||
|
|
||||||
public Seq<Planet> planets(){
|
public Seq<Planet> planets(){
|
||||||
return getBy(ContentType.planet);
|
return getBy(ContentType.planet);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
public Planet planet(String name){
|
||||||
|
return getByName(ContentType.planet, name);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,7 +14,7 @@ import mindustry.gen.*;
|
|||||||
public class MoveLightningAbility extends Ability{
|
public class MoveLightningAbility extends Ability{
|
||||||
/** Lightning damage */
|
/** Lightning damage */
|
||||||
public float damage = 35f;
|
public float damage = 35f;
|
||||||
/** Chance of firing every tick. Set >= 1 to always fire lightning every tick at max speed. */
|
/** Chance of firing every tick. Set >= 1 to always fire lightning every tick at max speed */
|
||||||
public float chance = 0.15f;
|
public float chance = 0.15f;
|
||||||
/** Length of the lightning. <= 0 to disable */
|
/** Length of the lightning. <= 0 to disable */
|
||||||
public int length = 12;
|
public int length = 12;
|
||||||
@@ -24,8 +24,10 @@ public class MoveLightningAbility extends Ability{
|
|||||||
public Color color = Color.valueOf("a9d8ff");
|
public Color color = Color.valueOf("a9d8ff");
|
||||||
/** Shifts where the lightning spawns along the Y axis */
|
/** Shifts where the lightning spawns along the Y axis */
|
||||||
public float offset = 0f;
|
public float offset = 0f;
|
||||||
/** Offset along the X axis. */
|
/** Offset along the X axis */
|
||||||
public float width = 0f;
|
public float width = 0f;
|
||||||
|
/** Whether the spawn side alternates */
|
||||||
|
public boolean alternate = true;
|
||||||
/** Jittering heat sprite like the shield on v5 Javelin */
|
/** Jittering heat sprite like the shield on v5 Javelin */
|
||||||
public String heatRegion = "error";
|
public String heatRegion = "error";
|
||||||
/** Bullet type that is fired. Can be null */
|
/** Bullet type that is fired. Can be null */
|
||||||
@@ -36,6 +38,8 @@ public class MoveLightningAbility extends Ability{
|
|||||||
public Effect shootEffect = Fx.sparkShoot;
|
public Effect shootEffect = Fx.sparkShoot;
|
||||||
public boolean parentizeEffects;
|
public boolean parentizeEffects;
|
||||||
public Sound shootSound = Sounds.spark;
|
public Sound shootSound = Sounds.spark;
|
||||||
|
|
||||||
|
protected float side = 1f;
|
||||||
|
|
||||||
MoveLightningAbility(){}
|
MoveLightningAbility(){}
|
||||||
|
|
||||||
@@ -64,10 +68,10 @@ public class MoveLightningAbility extends Ability{
|
|||||||
public void update(Unit unit){
|
public void update(Unit unit){
|
||||||
float scl = Mathf.clamp((unit.vel().len() - minSpeed) / (maxSpeed - minSpeed));
|
float scl = Mathf.clamp((unit.vel().len() - minSpeed) / (maxSpeed - minSpeed));
|
||||||
if(Mathf.chance(Time.delta * chance * scl)){
|
if(Mathf.chance(Time.delta * chance * scl)){
|
||||||
float x = unit.x + Angles.trnsx(unit.rotation, offset, width), y = unit.y + Angles.trnsy(unit.rotation, offset, width);
|
float x = unit.x + Angles.trnsx(unit.rotation, offset, width * side), y = unit.y + Angles.trnsy(unit.rotation, offset, width * side);
|
||||||
|
|
||||||
shootEffect.at(x, y, unit.rotation, color, parentizeEffects ? unit : null);
|
shootEffect.at(x, y, unit.rotation, color, parentizeEffects ? unit : null);
|
||||||
shootSound.at(unit);
|
shootSound.at(x, y);
|
||||||
|
|
||||||
if(length > 0){
|
if(length > 0){
|
||||||
Lightning.create(unit.team, color, damage, x + unit.vel.x, y + unit.vel.y, unit.rotation, length);
|
Lightning.create(unit.team, color, damage, x + unit.vel.x, y + unit.vel.y, unit.rotation, length);
|
||||||
@@ -76,6 +80,8 @@ public class MoveLightningAbility extends Ability{
|
|||||||
if(bullet != null){
|
if(bullet != null){
|
||||||
bullet.create(unit, unit.team, x, y, unit.rotation + bulletAngle + Mathf.range(bulletSpread));
|
bullet.create(unit, unit.team, x, y, unit.rotation + bulletAngle + Mathf.range(bulletSpread));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(alternate) side *= -1f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -302,11 +302,13 @@ public class Administration{
|
|||||||
public boolean adminPlayer(String id, String usid){
|
public boolean adminPlayer(String id, String usid){
|
||||||
PlayerInfo info = getCreateInfo(id);
|
PlayerInfo info = getCreateInfo(id);
|
||||||
|
|
||||||
|
var wasAdmin = info.admin;
|
||||||
|
|
||||||
info.adminUsid = usid;
|
info.adminUsid = usid;
|
||||||
info.admin = true;
|
info.admin = true;
|
||||||
save();
|
save();
|
||||||
|
|
||||||
return true;
|
return wasAdmin;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public class Liquid extends UnlockableContent{
|
|||||||
public @Nullable Color barColor;
|
public @Nullable Color barColor;
|
||||||
/** Color used to draw lights. Note that the alpha channel is used to dictate brightness. */
|
/** Color used to draw lights. Note that the alpha channel is used to dictate brightness. */
|
||||||
public Color lightColor = Color.clear.cpy();
|
public Color lightColor = Color.clear.cpy();
|
||||||
/** 0-1, 0 is completely inflammable, anything above that may catch fire when exposed to heat, 0.5+ is very flammable. */
|
/** 0-1, 0 is completely not flammable, anything above that may catch fire when exposed to heat, 0.5+ is very flammable. */
|
||||||
public float flammability;
|
public float flammability;
|
||||||
/** temperature: 0.5 is 'room' temperature, 0 is very cold, 1 is molten hot */
|
/** temperature: 0.5 is 'room' temperature, 0 is very cold, 1 is molten hot */
|
||||||
public float temperature = 0.5f;
|
public float temperature = 0.5f;
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ public class Attributes implements JsonSerializable{
|
|||||||
|
|
||||||
public void add(Attributes other){
|
public void add(Attributes other){
|
||||||
check();
|
check();
|
||||||
|
other.check();
|
||||||
for(int i = 0; i < arr.length; i++){
|
for(int i = 0; i < arr.length; i++){
|
||||||
arr[i] += other.arr[i];
|
arr[i] += other.arr[i];
|
||||||
}
|
}
|
||||||
@@ -32,6 +33,7 @@ public class Attributes implements JsonSerializable{
|
|||||||
|
|
||||||
public void add(Attributes other, float scl){
|
public void add(Attributes other, float scl){
|
||||||
check();
|
check();
|
||||||
|
other.check();
|
||||||
for(int i = 0; i < arr.length; i++){
|
for(int i = 0; i < arr.length; i++){
|
||||||
arr[i] += other.arr[i] * scl;
|
arr[i] += other.arr[i] * scl;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,11 +97,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Mindustry Español",
|
"name": "Mindustry Español",
|
||||||
"address": ["panel.mindustry.me:2011", "yeeth.mindustry.me:6573", "panel.mindustry.me:2000", "panel.mindustry.me:2026"]
|
"address": ["yeeth.mindustry.me:6578", "yeeth.mindustry.me:6573", "yeeth.mindustry.me:6577", "yeeth.mindustry.me:6576"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CreateDustry",
|
"name": "CreateDustry",
|
||||||
"address": ["144.76.120.74:18645"]
|
"address": ["129.151.66.139:26032"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "NukeDustry",
|
"name": "NukeDustry",
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "DarkDustry",
|
"name": "DarkDustry",
|
||||||
"address": ["darkdustry.ml", "darkdustry.ml:6000", "darkdustry.ml:7000", "darkdustry.ml:8000", "darkdustry.ml:9000"]
|
"address": ["darkdustry.ml", "darkdustry.ml:5000", "darkdustry.ml:6000", "darkdustry.ml:7000", "darkdustry.ml:8000", "darkdustry.ml:9000"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Chaotic Neutral",
|
"name": "Chaotic Neutral",
|
||||||
@@ -74,5 +74,9 @@
|
|||||||
{
|
{
|
||||||
"name": "LostDustry",
|
"name": "LostDustry",
|
||||||
"address": ["lostdustry.northeurope.cloudapp.azure.com:6568", "lostdustry.northeurope.cloudapp.azure.com:6569", "lostdustry.northeurope.cloudapp.azure.com:6570"]
|
"address": ["lostdustry.northeurope.cloudapp.azure.com:6568", "lostdustry.northeurope.cloudapp.azure.com:6569", "lostdustry.northeurope.cloudapp.azure.com:6570"]
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
"name": "ALEX",
|
||||||
|
"address": ["dogemindustry.ddns.net:25588"]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user