Code cleanup
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
package mindustry.ai;
|
package mindustry.ai;
|
||||||
|
|
||||||
import arc.*;
|
|
||||||
import arc.input.*;
|
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.math.geom.*;
|
import arc.math.geom.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
|
|||||||
@@ -1772,7 +1772,7 @@ public class Blocks implements ContentList{
|
|||||||
|
|
||||||
maxAmmo = 40;
|
maxAmmo = 40;
|
||||||
ammoPerShot = 4;
|
ammoPerShot = 4;
|
||||||
rotateSpeed = 2.5f;
|
rotateSpeed = 2f;
|
||||||
reloadTime = 200f;
|
reloadTime = 200f;
|
||||||
ammoUseEffect = Fx.casing3Double;
|
ammoUseEffect = Fx.casing3Double;
|
||||||
recoilAmount = 5f;
|
recoilAmount = 5f;
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public class Fx{
|
|||||||
alpha(e.fout());
|
alpha(e.fout());
|
||||||
rect(block ? ((BlockUnitc)select).tile().block.icon(Cicon.full) : select.type.icon(Cicon.full), select.x, select.y, block ? 0f : select.rotation - 90f);
|
rect(block ? ((BlockUnitc)select).tile().block.icon(Cicon.full) : select.type.icon(Cicon.full), select.x, select.y, block ? 0f : select.rotation - 90f);
|
||||||
alpha(1f);
|
alpha(1f);
|
||||||
Lines.stroke(e.fslope() * 1f);
|
Lines.stroke(e.fslope());
|
||||||
Lines.square(select.x, select.y, e.fout() * select.hitSize * 2f, 45);
|
Lines.square(select.x, select.y, e.fout() * select.hitSize * 2f, 45);
|
||||||
Lines.stroke(e.fslope() * 2f);
|
Lines.stroke(e.fslope() * 2f);
|
||||||
Lines.square(select.x, select.y, e.fout() * select.hitSize * 3f, 45f);
|
Lines.square(select.x, select.y, e.fout() * select.hitSize * 3f, 45f);
|
||||||
@@ -96,7 +96,7 @@ public class Fx{
|
|||||||
x = Tmp.v1.x;
|
x = Tmp.v1.x;
|
||||||
y = Tmp.v1.y;
|
y = Tmp.v1.y;
|
||||||
|
|
||||||
Fill.square(x, y, 1f * size, 45f);
|
Fill.square(x, y, size, 45f);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
itemTransfer = new Effect(12f, e -> {
|
itemTransfer = new Effect(12f, e -> {
|
||||||
@@ -127,7 +127,7 @@ public class Fx{
|
|||||||
|
|
||||||
pointHit = new Effect(8f, e -> {
|
pointHit = new Effect(8f, e -> {
|
||||||
color(Color.white, e.color, e.fin());
|
color(Color.white, e.color, e.fin());
|
||||||
stroke(e.fout() * 1f + 0.2f);
|
stroke(e.fout() + 0.2f);
|
||||||
Lines.circle(e.x, e.y, e.fin() * 6f);
|
Lines.circle(e.x, e.y, e.fin() * 6f);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
@@ -560,7 +560,7 @@ public class Fx{
|
|||||||
});
|
});
|
||||||
|
|
||||||
color(Pal.lighterOrange);
|
color(Pal.lighterOrange);
|
||||||
stroke(1f * e.fout());
|
stroke(e.fout());
|
||||||
|
|
||||||
randLenVectors(e.id + 1, 4, 1f + 23f * e.finpow(), (x, y) -> {
|
randLenVectors(e.id + 1, 4, 1f + 23f * e.finpow(), (x, y) -> {
|
||||||
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
|
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
|
||||||
@@ -582,7 +582,7 @@ public class Fx{
|
|||||||
});
|
});
|
||||||
|
|
||||||
color(Pal.plastaniumBack);
|
color(Pal.plastaniumBack);
|
||||||
stroke(1f * e.fout());
|
stroke(e.fout());
|
||||||
|
|
||||||
randLenVectors(e.id + 1, 4, 1f + 25f * e.finpow(), (x, y) -> {
|
randLenVectors(e.id + 1, 4, 1f + 25f * e.finpow(), (x, y) -> {
|
||||||
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
|
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
|
||||||
@@ -604,7 +604,7 @@ public class Fx{
|
|||||||
});
|
});
|
||||||
|
|
||||||
color(Pal.plastaniumBack);
|
color(Pal.plastaniumBack);
|
||||||
stroke(1f * e.fout());
|
stroke(e.fout());
|
||||||
|
|
||||||
randLenVectors(e.id + 1, 4, 1f + 30f * e.finpow(), (x, y) -> {
|
randLenVectors(e.id + 1, 4, 1f + 30f * e.finpow(), (x, y) -> {
|
||||||
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
|
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
|
||||||
@@ -626,7 +626,7 @@ public class Fx{
|
|||||||
});
|
});
|
||||||
|
|
||||||
color(Pal.missileYellowBack);
|
color(Pal.missileYellowBack);
|
||||||
stroke(1f * e.fout());
|
stroke(e.fout());
|
||||||
|
|
||||||
randLenVectors(e.id + 1, 4, 1f + 23f * e.finpow(), (x, y) -> {
|
randLenVectors(e.id + 1, 4, 1f + 23f * e.finpow(), (x, y) -> {
|
||||||
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
|
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
|
||||||
@@ -648,7 +648,7 @@ public class Fx{
|
|||||||
});
|
});
|
||||||
|
|
||||||
color(Pal.sapBulletBack);
|
color(Pal.sapBulletBack);
|
||||||
stroke(1f * e.fout());
|
stroke(e.fout());
|
||||||
|
|
||||||
randLenVectors(e.id + 1, 8, 1f + 60f * e.finpow(), (x, y) -> {
|
randLenVectors(e.id + 1, 8, 1f + 60f * e.finpow(), (x, y) -> {
|
||||||
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
|
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
|
||||||
@@ -670,7 +670,7 @@ public class Fx{
|
|||||||
});
|
});
|
||||||
|
|
||||||
color(Pal.missileYellowBack);
|
color(Pal.missileYellowBack);
|
||||||
stroke(1f * e.fout());
|
stroke(e.fout());
|
||||||
|
|
||||||
randLenVectors(e.id + 1, 6, 1f + 29f * e.finpow(), (x, y) -> {
|
randLenVectors(e.id + 1, 6, 1f + 29f * e.finpow(), (x, y) -> {
|
||||||
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 4f);
|
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 4f);
|
||||||
@@ -713,7 +713,7 @@ public class Fx{
|
|||||||
});
|
});
|
||||||
|
|
||||||
color(Pal.bulletYellow);
|
color(Pal.bulletYellow);
|
||||||
stroke(1f * e.fout());
|
stroke(e.fout());
|
||||||
|
|
||||||
randLenVectors(e.id + 1, 4, 1f + 23f * e.finpow(), (x, y) -> {
|
randLenVectors(e.id + 1, 4, 1f + 23f * e.finpow(), (x, y) -> {
|
||||||
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
|
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f);
|
||||||
@@ -792,14 +792,14 @@ public class Fx{
|
|||||||
color(Liquids.water.color);
|
color(Liquids.water.color);
|
||||||
alpha(Mathf.clamp(e.fin() * 2f));
|
alpha(Mathf.clamp(e.fin() * 2f));
|
||||||
|
|
||||||
Fill.circle(e.x, e.y, e.fout() * 1f);
|
Fill.circle(e.x, e.y, e.fout());
|
||||||
}),
|
}),
|
||||||
|
|
||||||
muddy = new Effect(80f, e -> {
|
muddy = new Effect(80f, e -> {
|
||||||
color(Color.valueOf("432722"));
|
color(Color.valueOf("432722"));
|
||||||
alpha(Mathf.clamp(e.fin() * 2f));
|
alpha(Mathf.clamp(e.fin() * 2f));
|
||||||
|
|
||||||
Fill.circle(e.x, e.y, e.fout() * 1f);
|
Fill.circle(e.x, e.y, e.fout());
|
||||||
}),
|
}),
|
||||||
|
|
||||||
sapped = new Effect(40f, e -> {
|
sapped = new Effect(40f, e -> {
|
||||||
@@ -820,7 +820,7 @@ public class Fx{
|
|||||||
color(Liquids.oil.color);
|
color(Liquids.oil.color);
|
||||||
|
|
||||||
randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> {
|
randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> {
|
||||||
Fill.circle(e.x + x, e.y + y, e.fout() * 1f);
|
Fill.circle(e.x + x, e.y + y, e.fout());
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
|
||||||
@@ -885,7 +885,7 @@ public class Fx{
|
|||||||
|
|
||||||
randLenVectors(e.id, 6, 2f + 19f * e.finpow(), (x, y) -> {
|
randLenVectors(e.id, 6, 2f + 19f * e.finpow(), (x, y) -> {
|
||||||
Fill.circle(e.x + x, e.y + y, e.fout() * 3f + 0.5f);
|
Fill.circle(e.x + x, e.y + y, e.fout() * 3f + 0.5f);
|
||||||
Fill.circle(e.x + x / 2f, e.y + y / 2f, e.fout() * 1f);
|
Fill.circle(e.x + x / 2f, e.y + y / 2f, e.fout());
|
||||||
});
|
});
|
||||||
|
|
||||||
color(Pal.lighterOrange, Pal.lightOrange, Color.gray, e.fin());
|
color(Pal.lighterOrange, Pal.lightOrange, Color.gray, e.fin());
|
||||||
@@ -929,7 +929,7 @@ public class Fx{
|
|||||||
|
|
||||||
randLenVectors(e.id, 6, 2f + 19f * e.finpow(), (x, y) -> {
|
randLenVectors(e.id, 6, 2f + 19f * e.finpow(), (x, y) -> {
|
||||||
Fill.circle(e.x + x, e.y + y, e.fout() * 3f + 0.5f);
|
Fill.circle(e.x + x, e.y + y, e.fout() * 3f + 0.5f);
|
||||||
Fill.circle(e.x + x / 2f, e.y + y / 2f, e.fout() * 1f);
|
Fill.circle(e.x + x / 2f, e.y + y / 2f, e.fout());
|
||||||
});
|
});
|
||||||
|
|
||||||
color(Pal.lighterOrange, Pal.lightOrange, Color.gray, e.fin());
|
color(Pal.lighterOrange, Pal.lightOrange, Color.gray, e.fin());
|
||||||
@@ -945,7 +945,7 @@ public class Fx{
|
|||||||
|
|
||||||
randLenVectors(e.id, 6, 4f + 30f * e.finpow(), (x, y) -> {
|
randLenVectors(e.id, 6, 4f + 30f * e.finpow(), (x, y) -> {
|
||||||
Fill.circle(e.x + x, e.y + y, e.fout() * 3f);
|
Fill.circle(e.x + x, e.y + y, e.fout() * 3f);
|
||||||
Fill.circle(e.x + x / 2f, e.y + y / 2f, e.fout() * 1f);
|
Fill.circle(e.x + x / 2f, e.y + y / 2f, e.fout());
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
|
||||||
@@ -1311,7 +1311,7 @@ public class Fx{
|
|||||||
plasticburn = new Effect(40, e -> {
|
plasticburn = new Effect(40, e -> {
|
||||||
randLenVectors(e.id, 5, 3f + e.fin() * 5f, (x, y) -> {
|
randLenVectors(e.id, 5, 3f + e.fin() * 5f, (x, y) -> {
|
||||||
color(Color.valueOf("e9ead3"), Color.gray, e.fin());
|
color(Color.valueOf("e9ead3"), Color.gray, e.fin());
|
||||||
Fill.circle(e.x + x, e.y + y, e.fout() * 1f);
|
Fill.circle(e.x + x, e.y + y, e.fout());
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
|
||||||
@@ -1339,14 +1339,14 @@ public class Fx{
|
|||||||
pulverizeSmall = new Effect(30, e -> {
|
pulverizeSmall = new Effect(30, e -> {
|
||||||
randLenVectors(e.id, 3, e.fin() * 5f, (x, y) -> {
|
randLenVectors(e.id, 3, e.fin() * 5f, (x, y) -> {
|
||||||
color(Pal.stoneGray);
|
color(Pal.stoneGray);
|
||||||
Fill.square(e.x + x, e.y + y, e.fout() * 1f + 0.5f, 45);
|
Fill.square(e.x + x, e.y + y, e.fout() + 0.5f, 45);
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
|
||||||
pulverizeMedium = new Effect(30, e -> {
|
pulverizeMedium = new Effect(30, e -> {
|
||||||
randLenVectors(e.id, 5, 3f + e.fin() * 8f, (x, y) -> {
|
randLenVectors(e.id, 5, 3f + e.fin() * 8f, (x, y) -> {
|
||||||
color(Pal.stoneGray);
|
color(Pal.stoneGray);
|
||||||
Fill.square(e.x + x, e.y + y, e.fout() * 1f + 0.5f, 45);
|
Fill.square(e.x + x, e.y + y, e.fout() + 0.5f, 45);
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
|
||||||
@@ -1548,7 +1548,7 @@ public class Fx{
|
|||||||
|
|
||||||
overdriveWave = new Effect(50, e -> {
|
overdriveWave = new Effect(50, e -> {
|
||||||
color(e.color);
|
color(e.color);
|
||||||
stroke(e.fout() * 1f);
|
stroke(e.fout());
|
||||||
Lines.circle(e.x, e.y, e.finpow() * e.rotation);
|
Lines.circle(e.x, e.y, e.finpow() * e.rotation);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
@@ -1593,7 +1593,7 @@ public class Fx{
|
|||||||
});
|
});
|
||||||
|
|
||||||
color(Pal.shield, e.fout());
|
color(Pal.shield, e.fout());
|
||||||
stroke(1f * e.fout());
|
stroke(e.fout());
|
||||||
Lines.circle(e.x, e.y, radius);
|
Lines.circle(e.x, e.y, radius);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import mindustry.ctype.*;
|
|||||||
import mindustry.game.EventType.*;
|
import mindustry.game.EventType.*;
|
||||||
import mindustry.entities.bullet.*;
|
import mindustry.entities.bullet.*;
|
||||||
import mindustry.mod.Mods.*;
|
import mindustry.mod.Mods.*;
|
||||||
import mindustry.net.*;
|
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
|
|
||||||
|
|||||||
@@ -452,12 +452,12 @@ public class NetServer implements ApplicationListener{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!arg[0].toLowerCase().equals("y") && !arg[0].toLowerCase().equals("n")){
|
if(!arg[0].equalsIgnoreCase("y") && !arg[0].equalsIgnoreCase("n")){
|
||||||
player.sendMessage("[scarlet]Vote either 'y' (yes) or 'n' (no).");
|
player.sendMessage("[scarlet]Vote either 'y' (yes) or 'n' (no).");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sign = arg[0].toLowerCase().equals("y") ? 1 : -1;
|
int sign = arg[0].equalsIgnoreCase("y") ? 1 : -1;
|
||||||
currentlyKicking[0].vote(player, sign);
|
currentlyKicking[0].vote(player, sign);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -302,9 +302,7 @@ public class World{
|
|||||||
entries.removeAll(e -> e.value < 30);
|
entries.removeAll(e -> e.value < 30);
|
||||||
|
|
||||||
Block[] floors = new Block[entries.size];
|
Block[] floors = new Block[entries.size];
|
||||||
int[] floorCounts = new int[entries.size];
|
|
||||||
for(int i = 0; i < entries.size; i++){
|
for(int i = 0; i < entries.size; i++){
|
||||||
floorCounts[i] = entries.get(i).value;
|
|
||||||
floors[i] = entries.get(i).key;
|
floors[i] = entries.get(i).key;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -544,7 +542,7 @@ public class World{
|
|||||||
|
|
||||||
int circleDst = (int)(rawDst - (length - circleBlend));
|
int circleDst = (int)(rawDst - (length - circleBlend));
|
||||||
if(circleDst > 0){
|
if(circleDst > 0){
|
||||||
dark = Math.max(circleDst / 1f, dark);
|
dark = Math.max(circleDst, dark);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package mindustry.entities.bullet;
|
package mindustry.entities.bullet;
|
||||||
|
|
||||||
import arc.graphics.*;
|
|
||||||
import arc.graphics.g2d.*;
|
import arc.graphics.g2d.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
|
|||||||
@@ -575,7 +575,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
|||||||
if(next.team == team && next.block.hasLiquids && liquids.get(liquid) > 0f){
|
if(next.team == team && next.block.hasLiquids && liquids.get(liquid) > 0f){
|
||||||
float ofract = next.liquids.get(liquid) / next.block.liquidCapacity;
|
float ofract = next.liquids.get(liquid) / next.block.liquidCapacity;
|
||||||
float fract = liquids.get(liquid) / block.liquidCapacity * block.liquidPressure;
|
float fract = liquids.get(liquid) / block.liquidCapacity * block.liquidPressure;
|
||||||
float flow = Math.min(Mathf.clamp((fract - ofract) * (1f)) * (block.liquidCapacity), liquids.get(liquid));
|
float flow = Math.min(Mathf.clamp((fract - ofract)) * (block.liquidCapacity), liquids.get(liquid));
|
||||||
flow = Math.min(flow, next.block.liquidCapacity - next.liquids.get(liquid));
|
flow = Math.min(flow, next.block.liquidCapacity - next.liquids.get(liquid));
|
||||||
|
|
||||||
if(flow > 0f && ofract <= fract && next.acceptLiquid(self(), liquid)){
|
if(flow > 0f && ofract <= fract && next.acceptLiquid(self(), liquid)){
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ abstract class FlyingComp implements Posc, Velc, Healthc, Hitboxc{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(canDrown() && floor.isLiquid && floor.drownTime > 0){
|
if(canDrown() && floor.isLiquid && floor.drownTime > 0){
|
||||||
drownTime += Time.delta * 1f / floor.drownTime;
|
drownTime += Time.delta / floor.drownTime;
|
||||||
drownTime = Mathf.clamp(drownTime);
|
drownTime = Mathf.clamp(drownTime);
|
||||||
if(Mathf.chanceDelta(0.05f)){
|
if(Mathf.chanceDelta(0.05f)){
|
||||||
floor.drownUpdateEffect.at(x, y, 1f, floor.mapColor);
|
floor.drownUpdateEffect.at(x, y, 1f, floor.mapColor);
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import mindustry.entities.units.*;
|
|||||||
import mindustry.game.EventType.*;
|
import mindustry.game.EventType.*;
|
||||||
import mindustry.game.*;
|
import mindustry.game.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.graphics.*;
|
|
||||||
import mindustry.logic.*;
|
import mindustry.logic.*;
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
import mindustry.ui.*;
|
import mindustry.ui.*;
|
||||||
|
|||||||
@@ -263,10 +263,10 @@ public class Schematics implements Loadable{
|
|||||||
requests.each(req -> {
|
requests.each(req -> {
|
||||||
req.animScale = 1f;
|
req.animScale = 1f;
|
||||||
req.worldContext = false;
|
req.worldContext = false;
|
||||||
req.block.drawRequestRegion(req, requests::each);
|
req.block.drawRequestRegion(req, requests);
|
||||||
});
|
});
|
||||||
|
|
||||||
requests.each(req -> req.block.drawRequestConfigTop(req, requests::each));
|
requests.each(req -> req.block.drawRequestConfigTop(req, requests));
|
||||||
|
|
||||||
Draw.flush();
|
Draw.flush();
|
||||||
Draw.trans().idt();
|
Draw.trans().idt();
|
||||||
|
|||||||
@@ -311,7 +311,7 @@ public class LoadRenderer implements Disposable{
|
|||||||
float vsize = vcont - vpad*2;
|
float vsize = vcont - vpad*2;
|
||||||
int rx = (int)(vx + vw/2f - vsize/2f), ry = (int)(vy + vh/2f - vsize/2f), rw = (int)vsize, rh = (int)vsize;
|
int rx = (int)(vx + vw/2f - vsize/2f), ry = (int)(vy + vh/2f - vsize/2f), rw = (int)vsize, rh = (int)vsize;
|
||||||
|
|
||||||
float vrad = vsize/2f + vpad / 1f;
|
float vrad = vsize/2f + vpad;
|
||||||
|
|
||||||
//planet + bars
|
//planet + bars
|
||||||
if(!graphics.isPortrait()){
|
if(!graphics.isPortrait()){
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public class Trail{
|
|||||||
for(int i = 0; i < points.size - 1; i++){
|
for(int i = 0; i < points.size - 1; i++){
|
||||||
Vec3 c = points.get(i);
|
Vec3 c = points.get(i);
|
||||||
Vec3 n = points.get(i + 1);
|
Vec3 n = points.get(i + 1);
|
||||||
float size = width * 1f / length;
|
float size = width / length;
|
||||||
|
|
||||||
float cx = Mathf.sin(c.z) * i * size, cy = Mathf.cos(c.z) * i * size, nx = Mathf.sin(n.z) * (i + 1) * size, ny = Mathf.cos(n.z) * (i + 1) * size;
|
float cx = Mathf.sin(c.z) * i * size, cy = Mathf.cos(c.z) * i * size, nx = Mathf.sin(n.z) * (i + 1) * size, ny = Mathf.cos(n.z) * (i + 1) * size;
|
||||||
Fill.quad(c.x - cx, c.y - cy, c.x + cx, c.y + cy, n.x + nx, n.y + ny, n.x - nx, n.y - ny);
|
Fill.quad(c.x - cx, c.y - cy, c.x + cx, c.y + cy, n.x + nx, n.y + ny, n.x - nx, n.y - ny);
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ public class SectorDamage{
|
|||||||
|
|
||||||
if(build.block instanceof ForceProjector f){
|
if(build.block instanceof ForceProjector f){
|
||||||
sumHealth += f.shieldHealth * e;
|
sumHealth += f.shieldHealth * e;
|
||||||
sumRps += 1f * e;
|
sumRps += e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package mindustry.maps.filters;
|
|||||||
|
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
import mindustry.maps.filters.FilterOption.*;
|
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
|
|
||||||
import static mindustry.maps.filters.FilterOption.*;
|
import static mindustry.maps.filters.FilterOption.*;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package mindustry.maps.filters;
|
|||||||
|
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
import mindustry.maps.filters.FilterOption.*;
|
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
|
|
||||||
import static mindustry.maps.filters.FilterOption.*;
|
import static mindustry.maps.filters.FilterOption.*;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package mindustry.maps.filters;
|
|||||||
|
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
import mindustry.maps.filters.FilterOption.*;
|
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
|
|
||||||
import static mindustry.maps.filters.FilterOption.*;
|
import static mindustry.maps.filters.FilterOption.*;
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package mindustry.maps.filters;
|
|||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
import mindustry.maps.filters.FilterOption.*;
|
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
|
|
||||||
import static mindustry.maps.filters.FilterOption.*;
|
import static mindustry.maps.filters.FilterOption.*;
|
||||||
|
|||||||
@@ -27,12 +27,10 @@ public class BaseGenerator{
|
|||||||
private static final int range = 160;
|
private static final int range = 160;
|
||||||
|
|
||||||
private Tiles tiles;
|
private Tiles tiles;
|
||||||
private Team team;
|
|
||||||
private Seq<Tile> cores;
|
private Seq<Tile> cores;
|
||||||
|
|
||||||
public void generate(Tiles tiles, Seq<Tile> cores, Tile spawn, Team team, Sector sector, float difficulty){
|
public void generate(Tiles tiles, Seq<Tile> cores, Tile spawn, Team team, Sector sector, float difficulty){
|
||||||
this.tiles = tiles;
|
this.tiles = tiles;
|
||||||
this.team = team;
|
|
||||||
this.cores = cores;
|
this.cores = cores;
|
||||||
|
|
||||||
//don't generate bases when there are no loaded schematics
|
//don't generate bases when there are no loaded schematics
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package mindustry.mod;
|
|||||||
|
|
||||||
import arc.*;
|
import arc.*;
|
||||||
import arc.assets.*;
|
import arc.assets.*;
|
||||||
import arc.assets.loaders.*;
|
|
||||||
import arc.assets.loaders.SoundLoader.*;
|
import arc.assets.loaders.SoundLoader.*;
|
||||||
import arc.audio.*;
|
import arc.audio.*;
|
||||||
import arc.files.*;
|
import arc.files.*;
|
||||||
@@ -10,7 +9,6 @@ import arc.func.*;
|
|||||||
import arc.graphics.*;
|
import arc.graphics.*;
|
||||||
import arc.graphics.g2d.*;
|
import arc.graphics.g2d.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.mock.*;
|
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import arc.util.serialization.*;
|
import arc.util.serialization.*;
|
||||||
@@ -29,7 +27,6 @@ import mindustry.gen.*;
|
|||||||
import mindustry.mod.Mods.*;
|
import mindustry.mod.Mods.*;
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
import mindustry.world.blocks.*;
|
|
||||||
import mindustry.world.blocks.units.*;
|
import mindustry.world.blocks.units.*;
|
||||||
import mindustry.world.blocks.units.UnitFactory.*;
|
import mindustry.world.blocks.units.UnitFactory.*;
|
||||||
import mindustry.world.consumers.*;
|
import mindustry.world.consumers.*;
|
||||||
@@ -37,7 +34,6 @@ import mindustry.world.draw.*;
|
|||||||
import mindustry.world.meta.*;
|
import mindustry.world.meta.*;
|
||||||
|
|
||||||
import java.lang.reflect.*;
|
import java.lang.reflect.*;
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import static mindustry.Vars.*;
|
|||||||
|
|
||||||
/** Handles control of bleeding edge builds. */
|
/** Handles control of bleeding edge builds. */
|
||||||
public class BeControl{
|
public class BeControl{
|
||||||
private static final int updateInterval = 60 * 1;
|
private static final int updateInterval = 60;
|
||||||
|
|
||||||
private AsyncExecutor executor = new AsyncExecutor(1);
|
private AsyncExecutor executor = new AsyncExecutor(1);
|
||||||
private boolean checkUpdates = true;
|
private boolean checkUpdates = true;
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import arc.graphics.g2d.*;
|
|||||||
import arc.graphics.g2d.Font.*;
|
import arc.graphics.g2d.Font.*;
|
||||||
import arc.graphics.g2d.PixmapPacker.*;
|
import arc.graphics.g2d.PixmapPacker.*;
|
||||||
import arc.graphics.g2d.TextureAtlas.*;
|
import arc.graphics.g2d.TextureAtlas.*;
|
||||||
import arc.math.*;
|
|
||||||
import arc.math.geom.*;
|
import arc.math.geom.*;
|
||||||
import arc.scene.style.*;
|
import arc.scene.style.*;
|
||||||
import arc.scene.ui.layout.*;
|
import arc.scene.ui.layout.*;
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ public class JoinDialog extends BaseDialog{
|
|||||||
pad = 6;
|
pad = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
Cell cell = ((Table)pane.parent).getCell(button);
|
var cell = ((Table)pane.parent).getCell(button);
|
||||||
|
|
||||||
if(!Mathf.equal(cell.minWidth(), pw)){
|
if(!Mathf.equal(cell.minWidth(), pw)){
|
||||||
cell.width(pw);
|
cell.width(pw);
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import arc.input.*;
|
|||||||
import arc.scene.*;
|
import arc.scene.*;
|
||||||
import arc.scene.event.*;
|
import arc.scene.event.*;
|
||||||
import arc.scene.ui.*;
|
import arc.scene.ui.*;
|
||||||
import arc.scene.ui.SettingsDialog.SettingsTable.*;
|
|
||||||
import arc.scene.ui.TextButton.*;
|
import arc.scene.ui.TextButton.*;
|
||||||
import arc.scene.ui.layout.*;
|
import arc.scene.ui.layout.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
|
|||||||
@@ -252,11 +252,10 @@ public class HudFragment extends Fragment{
|
|||||||
|
|
||||||
if(android){
|
if(android){
|
||||||
info.label(() -> memnative.get((int)(Core.app.getJavaHeap() / 1024 / 1024), (int)(Core.app.getNativeHeap() / 1024 / 1024))).left().style(Styles.outlineLabel).name("memory2");
|
info.label(() -> memnative.get((int)(Core.app.getJavaHeap() / 1024 / 1024), (int)(Core.app.getNativeHeap() / 1024 / 1024))).left().style(Styles.outlineLabel).name("memory2");
|
||||||
info.row();
|
|
||||||
}else{
|
}else{
|
||||||
info.label(() -> mem.get((int)(Core.app.getJavaHeap() / 1024 / 1024))).left().style(Styles.outlineLabel).name("memory");
|
info.label(() -> mem.get((int)(Core.app.getJavaHeap() / 1024 / 1024))).left().style(Styles.outlineLabel).name("memory");
|
||||||
info.row();
|
|
||||||
}
|
}
|
||||||
|
info.row();
|
||||||
|
|
||||||
info.label(() -> ping.get(netClient.getPing())).visible(net::client).left().style(Styles.outlineLabel).name("ping");
|
info.label(() -> ping.get(netClient.getPing())).visible(net::client).left().style(Styles.outlineLabel).name("ping");
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ public class PlayerListFragment extends Fragment{
|
|||||||
private boolean visible = false;
|
private boolean visible = false;
|
||||||
private Interval timer = new Interval();
|
private Interval timer = new Interval();
|
||||||
private TextField sField;
|
private TextField sField;
|
||||||
private boolean found = false;
|
|
||||||
private Seq<Player> players = new Seq<>();
|
private Seq<Player> players = new Seq<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -78,7 +77,7 @@ public class PlayerListFragment extends Fragment{
|
|||||||
content.clear();
|
content.clear();
|
||||||
|
|
||||||
float h = 74f;
|
float h = 74f;
|
||||||
found = false;
|
boolean found = false;
|
||||||
|
|
||||||
players.clear();
|
players.clear();
|
||||||
Groups.player.copy(players);
|
Groups.player.copy(players);
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class BlockForge extends PayloadAcceptor{
|
|||||||
public void setBars(){
|
public void setBars(){
|
||||||
super.setBars();
|
super.setBars();
|
||||||
|
|
||||||
bars.add("progress", (BlockForgeBuild entity) -> new Bar("bar.progress", Pal.ammo, () -> entity.recipe == null ? 0f : (float)(entity.progress / entity.recipe.buildCost)));
|
bars.add("progress", (BlockForgeBuild entity) -> new Bar("bar.progress", Pal.ammo, () -> entity.recipe == null ? 0f : (entity.progress / entity.recipe.buildCost)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ public class Cultivator extends GenericCrafter{
|
|||||||
float life = 1f - (((Time.time + offset) / 50f) % recurrence);
|
float life = 1f - (((Time.time + offset) / 50f) % recurrence);
|
||||||
|
|
||||||
if(life > 0){
|
if(life > 0){
|
||||||
Lines.stroke(warmup * (life * 1f + 0.2f));
|
Lines.stroke(warmup * (life + 0.2f));
|
||||||
Lines.poly(x + x, y + y, 8, (1f - life) * 3f);
|
Lines.poly(x + x, y + y, 8, (1f - life) * 3f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import arc.graphics.g2d.*;
|
|||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.math.geom.*;
|
import arc.math.geom.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
import arc.util.*;
|
|
||||||
import mindustry.*;
|
import mindustry.*;
|
||||||
import mindustry.annotations.Annotations.*;
|
import mindustry.annotations.Annotations.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
|
|||||||
Reference in New Issue
Block a user