From f61aa6068bf1ab321d207ab4a6c7f949959aa058 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 8 Apr 2018 12:33:13 -0400 Subject: [PATCH 1/9] Added additional server commands, fixed a crash --- core/assets/version.properties | 2 +- .../io/anuke/mindustry/core/NetServer.java | 2 ++ .../anuke/mindustry/net/Administration.java | 12 +++++++ .../anuke/mindustry/server/ServerControl.java | 35 +++++++++++++++++-- 4 files changed, 47 insertions(+), 4 deletions(-) diff --git a/core/assets/version.properties b/core/assets/version.properties index c0b83ff852..1f97dce33e 100644 --- a/core/assets/version.properties +++ b/core/assets/version.properties @@ -4,4 +4,4 @@ version=release androidBuildCode=503 name=Mindustry code=3.5 -build=custom build +build=37 diff --git a/core/src/io/anuke/mindustry/core/NetServer.java b/core/src/io/anuke/mindustry/core/NetServer.java index 77c5a8b650..e431288aab 100644 --- a/core/src/io/anuke/mindustry/core/NetServer.java +++ b/core/src/io/anuke/mindustry/core/NetServer.java @@ -73,6 +73,8 @@ public class NetServer extends Module{ return; } + Log.info("Recieved connect packet for player '{0}' / UUID {1} / IP {2}", packet.name, uuid, trace.ip); + String ip = Net.getConnection(id).address; admins.updatePlayerJoined(uuid, ip, packet.name); diff --git a/core/src/io/anuke/mindustry/net/Administration.java b/core/src/io/anuke/mindustry/net/Administration.java index 59aa64fb75..00355d78f9 100644 --- a/core/src/io/anuke/mindustry/net/Administration.java +++ b/core/src/io/anuke/mindustry/net/Administration.java @@ -184,6 +184,18 @@ public class Administration { return result; } + public Array findByIPs(String ip){ + Array result = new Array<>(); + + for(PlayerInfo info : playerInfo.values()){ + if(info.ips.contains(ip, false)){ + result.add(info); + } + } + + return result; + } + public PlayerInfo getInfo(String id){ return getCreateInfo(id); } diff --git a/server/src/io/anuke/mindustry/server/ServerControl.java b/server/src/io/anuke/mindustry/server/ServerControl.java index aec207eb5a..f971330d4a 100644 --- a/server/src/io/anuke/mindustry/server/ServerControl.java +++ b/server/src/io/anuke/mindustry/server/ServerControl.java @@ -343,7 +343,9 @@ public class ServerControl extends Module { info("Banned player by IP: {0}.", arg[0]); for(Player player : playerGroup.all()){ - if(Net.getConnection(player.clientid).address.equals(arg[0])){ + if(Net.getConnection(player.clientid) != null && + Net.getConnection(player.clientid).address != null && + Net.getConnection(player.clientid).address.equals(arg[0])){ netServer.kick(player.clientid, KickReason.banned); break; } @@ -537,8 +539,8 @@ public class ServerControl extends Module { } }); - handler.register("find", " [check-all-names]", "Find player info(s) by name. Can optionally check for all names a player has had.", arg -> { - boolean checkAll = arg.length == 2 && arg[1].equals("true"); + handler.register("find", "", "Find player info(s) by name. Can optionally check for all names a player has had.", arg -> { + boolean checkAll = true; Array infos = netServer.admins.findByName(arg[0], checkAll); @@ -564,6 +566,33 @@ public class ServerControl extends Module { } }); + handler.register("findip", "", "Find player info(s) by IP.", arg -> { + + Array infos = netServer.admins.findByIPs(arg[0]); + + if(infos.size == 1) { + PlayerInfo info = infos.peek(); + Log.info("&lcTrace info for player '{0}' / UUID {1}:", info.lastName, info.id); + Log.info(" &lyall names used: {0}", info.names); + Log.info(" &lyIP: {0}", info.lastIP); + Log.info(" &lyall IPs used: {0}", info.ips); + Log.info(" &lytimes joined: {0}", info.timesJoined); + Log.info(" &lytimes kicked: {0}", info.timesKicked); + Log.info(""); + Log.info(" &lytotal blocks broken: {0}", info.totalBlocksBroken); + Log.info(" &lytotal blocks placed: {0}", info.totalBlockPlaced); + }else if(infos.size > 1){ + Log.info("&lcMultiple people have been found with that IP:"); + for(PlayerInfo info : infos){ + Log.info(" &ly{0}", info.id); + } + Log.info("&lcUse the info command to examine each person individually."); + }else{ + info("Nobody with that name could be found."); + } + }); + + handler.register("info", "", "Get global info for a player's UUID.", arg -> { PlayerInfo info = netServer.admins.getInfoOptional(arg[0]); From 815daccff1101ac78cf4e55669829a4e564838d9 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 8 Apr 2018 12:38:22 -0400 Subject: [PATCH 2/9] Made server connection info slightly less verbose --- core/assets/version.properties | 6 +++--- core/src/io/anuke/mindustry/core/NetServer.java | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/core/assets/version.properties b/core/assets/version.properties index 1f97dce33e..f1f1e8f674 100644 --- a/core/assets/version.properties +++ b/core/assets/version.properties @@ -1,7 +1,7 @@ #Autogenerated file. Do not modify. -#Fri Apr 06 17:05:53 EDT 2018 +#Sun Apr 08 12:37:55 EDT 2018 version=release -androidBuildCode=503 +androidBuildCode=505 name=Mindustry code=3.5 -build=37 +build=custom build diff --git a/core/src/io/anuke/mindustry/core/NetServer.java b/core/src/io/anuke/mindustry/core/NetServer.java index e431288aab..a1969f9917 100644 --- a/core/src/io/anuke/mindustry/core/NetServer.java +++ b/core/src/io/anuke/mindustry/core/NetServer.java @@ -88,8 +88,6 @@ public class NetServer extends Module{ trace.modclient = true; } - Log.info("Sending data to player '{0}' / {1}", packet.name, id); - Player player = new Player(); player.isAdmin = admins.isAdmin(uuid, ip); player.clientid = id; From 697e288de2fbbf9b90fb515be9c7e3c1a23b638c Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 9 Apr 2018 10:24:47 -0400 Subject: [PATCH 3/9] Fixed 'bans' server crash --- server/src/io/anuke/mindustry/server/ServerControl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src/io/anuke/mindustry/server/ServerControl.java b/server/src/io/anuke/mindustry/server/ServerControl.java index f971330d4a..586b564577 100644 --- a/server/src/io/anuke/mindustry/server/ServerControl.java +++ b/server/src/io/anuke/mindustry/server/ServerControl.java @@ -333,7 +333,11 @@ public class ServerControl extends Module { Log.info("&lmBanned players [IP]:"); for(String string : ipbans){ PlayerInfo info = netServer.admins.findByIP(string); - Log.info(" &lm '{0}' / Last known name: '{1}' / ID: '{2}'", string, info.lastName, info.id); + if(info != null) { + Log.info(" &lm '{0}' / Last known name: '{1}' / ID: '{2}'", string, info.lastName, info.id); + }else{ + Log.info(" &lm '{0}' (No known name or info)", string); + } } } }); From bed34c4cad36edca77d485a1e61589c85b75e22a Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 11 Apr 2018 10:25:59 -0400 Subject: [PATCH 4/9] Fixed typo in findip command / Tweaks to kicking criteria --- core/src/io/anuke/mindustry/core/NetServer.java | 4 ++-- server/src/io/anuke/mindustry/server/ServerControl.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/io/anuke/mindustry/core/NetServer.java b/core/src/io/anuke/mindustry/core/NetServer.java index a1969f9917..bdf02f8053 100644 --- a/core/src/io/anuke/mindustry/core/NetServer.java +++ b/core/src/io/anuke/mindustry/core/NetServer.java @@ -172,12 +172,12 @@ public class NetServer extends Module{ TraceInfo info = admins.getTrace(Net.getConnection(id).address); Weapon weapon = (Weapon)Upgrade.getByID(packet.weaponid); - float wtrc = 60; + float wtrc = 80; if(!Timers.get("fastshoot-" + id + "-" + weapon.id, wtrc)){ info.fastShots.getAndIncrement(weapon.id, 0, 1); - if(info.fastShots.get(weapon.id, 0) > (int)(wtrc / (weapon.getReload() / 2f)) + 2){ + if(info.fastShots.get(weapon.id, 0) > (int)(wtrc / (weapon.getReload() / 2f)) + 6){ kick(id, KickReason.kick); } }else{ diff --git a/server/src/io/anuke/mindustry/server/ServerControl.java b/server/src/io/anuke/mindustry/server/ServerControl.java index 586b564577..3a6e2a61d8 100644 --- a/server/src/io/anuke/mindustry/server/ServerControl.java +++ b/server/src/io/anuke/mindustry/server/ServerControl.java @@ -592,7 +592,7 @@ public class ServerControl extends Module { } Log.info("&lcUse the info command to examine each person individually."); }else{ - info("Nobody with that name could be found."); + info("Nobody with that IP could be found."); } }); From 221f7be21bffbce59c99de1c6b6be7fbdd8bfa8f Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 11 Apr 2018 13:05:08 -0400 Subject: [PATCH 5/9] Added utility griefer scan command --- core/assets/version.properties | 4 +-- .../anuke/mindustry/server/ServerControl.java | 31 +++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/core/assets/version.properties b/core/assets/version.properties index f1f1e8f674..7ae9f523a8 100644 --- a/core/assets/version.properties +++ b/core/assets/version.properties @@ -1,7 +1,7 @@ #Autogenerated file. Do not modify. -#Sun Apr 08 12:37:55 EDT 2018 +#Wed Apr 11 13:05:01 EDT 2018 version=release -androidBuildCode=505 +androidBuildCode=506 name=Mindustry code=3.5 build=custom build diff --git a/server/src/io/anuke/mindustry/server/ServerControl.java b/server/src/io/anuke/mindustry/server/ServerControl.java index 3a6e2a61d8..1ba8f40429 100644 --- a/server/src/io/anuke/mindustry/server/ServerControl.java +++ b/server/src/io/anuke/mindustry/server/ServerControl.java @@ -502,6 +502,37 @@ public class ServerControl extends Module { info("Saved to slot {0}.", slot); }); + handler.register("griefers", "[min-break:place-ratio] [min-breakage]", "Find possible griefers currently online.", arg -> { + if(!state.is(State.playing)) { + err("Open the server first."); + return; + } + + try { + + float ratio = arg.length > 0 ? Float.parseFloat(arg[0]) : 0.9f; + int minbreak = arg.length > 1 ? Integer.parseInt(arg[1]) : 100; + + boolean found = false; + + for (Player player : playerGroup.all()) { + TraceInfo info = netServer.admins.getTrace(Net.getConnection(player.clientid).address); + if(info.totalBlocksBroken >= minbreak && info.totalBlocksBroken / Math.max(info.totalBlocksPlaced, 1f) >= ratio){ + info("&ly - Player '{0}' / UUID &lm{1}&ly found: &lc{2}&ly broken and &lc{3}&ly placed.", + player.name, info.uuid, info.totalBlocksBroken, info.totalBlocksPlaced); + found = true; + } + } + + if (!found) { + info("No griefers matching the criteria have been found."); + } + + }catch (NumberFormatException e){ + err("Invalid number format."); + } + }); + handler.register("gameover", "Force a game over.", arg -> { if(state.is(State.menu)){ info("Not playing a map."); From b1ad8f917db72fa5b612b1a58eefae5ee543b43e Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 11 Apr 2018 13:06:03 -0400 Subject: [PATCH 6/9] Changed parameters of griefer command --- core/assets/version.properties | 6 +++--- server/src/io/anuke/mindustry/server/ServerControl.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/assets/version.properties b/core/assets/version.properties index 7ae9f523a8..71b26cf7e8 100644 --- a/core/assets/version.properties +++ b/core/assets/version.properties @@ -1,7 +1,7 @@ #Autogenerated file. Do not modify. -#Wed Apr 11 13:05:01 EDT 2018 +#Wed Apr 11 13:05:08 EDT 2018 version=release -androidBuildCode=506 +androidBuildCode=507 name=Mindustry code=3.5 -build=custom build +build=37 diff --git a/server/src/io/anuke/mindustry/server/ServerControl.java b/server/src/io/anuke/mindustry/server/ServerControl.java index 1ba8f40429..e93565c507 100644 --- a/server/src/io/anuke/mindustry/server/ServerControl.java +++ b/server/src/io/anuke/mindustry/server/ServerControl.java @@ -510,7 +510,7 @@ public class ServerControl extends Module { try { - float ratio = arg.length > 0 ? Float.parseFloat(arg[0]) : 0.9f; + float ratio = arg.length > 0 ? Float.parseFloat(arg[0]) : 0.5f; int minbreak = arg.length > 1 ? Integer.parseInt(arg[1]) : 100; boolean found = false; From 439d2c88ae8c542fbb0935f8ebae1c0f8c505936 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 12 Apr 2018 17:34:24 -0400 Subject: [PATCH 7/9] Updated uCore --- build.gradle | 2 +- core/assets/version.properties | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index e70a369b41..c3125d07ff 100644 --- a/build.gradle +++ b/build.gradle @@ -25,7 +25,7 @@ allprojects { appName = 'Mindustry' gdxVersion = '1.9.8' aiVersion = '1.8.1' - uCoreVersion = 'b41a747' + uCoreVersion = '5e20b05' getVersionString = { String buildVersion = getBuildVersion() diff --git a/core/assets/version.properties b/core/assets/version.properties index 71b26cf7e8..51e65610fb 100644 --- a/core/assets/version.properties +++ b/core/assets/version.properties @@ -1,7 +1,7 @@ #Autogenerated file. Do not modify. -#Wed Apr 11 13:05:08 EDT 2018 +#Thu Apr 12 17:32:28 EDT 2018 version=release -androidBuildCode=507 +androidBuildCode=511 name=Mindustry code=3.5 -build=37 +build=custom build From 4b6b1b43cdc8638e6c260533336f8efb17982e62 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 14 Apr 2018 13:49:42 -0400 Subject: [PATCH 8/9] Updated uCore --- build.gradle | 2 +- core/assets/version.properties | 4 ++-- .../anuke/mindustry/mapeditor/MapEditorDialog.java | 12 ++++++------ core/src/io/anuke/mindustry/mapeditor/MapView.java | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/build.gradle b/build.gradle index c3125d07ff..7e925de460 100644 --- a/build.gradle +++ b/build.gradle @@ -25,7 +25,7 @@ allprojects { appName = 'Mindustry' gdxVersion = '1.9.8' aiVersion = '1.8.1' - uCoreVersion = '5e20b05' + uCoreVersion = 'a6f9111' getVersionString = { String buildVersion = getBuildVersion() diff --git a/core/assets/version.properties b/core/assets/version.properties index 51e65610fb..cedc38472a 100644 --- a/core/assets/version.properties +++ b/core/assets/version.properties @@ -1,7 +1,7 @@ #Autogenerated file. Do not modify. -#Thu Apr 12 17:32:28 EDT 2018 +#Sat Apr 14 13:49:06 EDT 2018 version=release -androidBuildCode=511 +androidBuildCode=512 name=Mindustry code=3.5 build=custom build diff --git a/core/src/io/anuke/mindustry/mapeditor/MapEditorDialog.java b/core/src/io/anuke/mindustry/mapeditor/MapEditorDialog.java index 79ce0e18f8..b4c5a2c58c 100644 --- a/core/src/io/anuke/mindustry/mapeditor/MapEditorDialog.java +++ b/core/src/io/anuke/mindustry/mapeditor/MapEditorDialog.java @@ -1,6 +1,5 @@ package io.anuke.mindustry.mapeditor; -import com.badlogic.gdx.Input.Keys; import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Pixmap; @@ -27,6 +26,7 @@ import io.anuke.ucore.scene.builders.table; import io.anuke.ucore.scene.ui.*; import io.anuke.ucore.scene.ui.layout.Table; import io.anuke.ucore.util.Bundles; +import io.anuke.ucore.util.Input; import io.anuke.ucore.util.Log; import io.anuke.ucore.util.Strings; @@ -340,20 +340,20 @@ public class MapEditorDialog extends Dialog{ } //ctrl keys (undo, redo, save) - if(Inputs.keyDown(Keys.CONTROL_LEFT)){ - if(Inputs.keyTap(Keys.Z)){ + if(Inputs.keyDown(Input.CONTROL_LEFT)){ + if(Inputs.keyTap(Input.Z)){ view.undo(); } - if(Inputs.keyTap(Keys.Y)){ + if(Inputs.keyTap(Input.Y)){ view.redo(); } - if(Inputs.keyTap(Keys.S)){ + if(Inputs.keyTap(Input.S)){ saveDialog.save(); } - if(Inputs.keyTap(Keys.G)){ + if(Inputs.keyTap(Input.G)){ view.setGrid(!view.isGrid()); } } diff --git a/core/src/io/anuke/mindustry/mapeditor/MapView.java b/core/src/io/anuke/mindustry/mapeditor/MapView.java index 60a13f2815..d60f2b14a4 100644 --- a/core/src/io/anuke/mindustry/mapeditor/MapView.java +++ b/core/src/io/anuke/mindustry/mapeditor/MapView.java @@ -1,6 +1,5 @@ package io.anuke.mindustry.mapeditor; -import com.badlogic.gdx.Input.Keys; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Colors; import com.badlogic.gdx.graphics.Pixmap; @@ -27,6 +26,7 @@ import io.anuke.ucore.scene.event.InputListener; import io.anuke.ucore.scene.event.Touchable; import io.anuke.ucore.scene.ui.TextField; import io.anuke.ucore.scene.ui.layout.Unit; +import io.anuke.ucore.util.Input; import io.anuke.ucore.util.Mathf; import io.anuke.ucore.util.Tmp; @@ -182,7 +182,7 @@ public class MapView extends Element implements GestureListener{ super.act(delta); if(Core.scene.getKeyboardFocus() == null || !(Core.scene.getKeyboardFocus() instanceof TextField) && - !Inputs.keyDown(Keys.CONTROL_LEFT)) { + !Inputs.keyDown(Input.CONTROL_LEFT)) { float ax = Inputs.getAxis("move_x"); float ay = Inputs.getAxis("move_y"); offsetx -= ax * 15f / zoom; From cce4113b2d64f201905a3f78281ebdf4b6dc74e3 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 14 Apr 2018 20:44:40 -0400 Subject: [PATCH 9/9] Fixed flipped fin/fout usage --- core/assets/version.properties | 4 +- .../anuke/mindustry/entities/BulletType.java | 22 +- .../anuke/mindustry/entities/effect/EMP.java | 6 +- core/src/io/anuke/mindustry/graphics/Fx.java | 350 +++++++++--------- 4 files changed, 191 insertions(+), 191 deletions(-) diff --git a/core/assets/version.properties b/core/assets/version.properties index cedc38472a..ad7d533aa9 100644 --- a/core/assets/version.properties +++ b/core/assets/version.properties @@ -1,7 +1,7 @@ #Autogenerated file. Do not modify. -#Sat Apr 14 13:49:06 EDT 2018 +#Sat Apr 14 20:43:56 EDT 2018 version=release -androidBuildCode=512 +androidBuildCode=513 name=Mindustry code=3.5 build=custom build diff --git a/core/src/io/anuke/mindustry/entities/BulletType.java b/core/src/io/anuke/mindustry/entities/BulletType.java index dca208c352..592854f9b2 100644 --- a/core/src/io/anuke/mindustry/entities/BulletType.java +++ b/core/src/io/anuke/mindustry/entities/BulletType.java @@ -168,8 +168,8 @@ public abstract class BulletType extends BaseBulletType{ } public void draw(Bullet b) { - Draw.color(Color.LIGHT_GRAY, Color.GRAY, b.fout()); - Lines.stroke(2f - b.fout()); + Draw.color(Color.LIGHT_GRAY, Color.GRAY, b.fin()); + Lines.stroke(2f - b.fin()); Lines.lineAngleCenter(b.x, b.y, b.angle(), 2f); Draw.reset(); } @@ -325,7 +325,7 @@ public abstract class BulletType extends BaseBulletType{ } public void draw(Bullet b){ - Draw.color(Color.WHITE, lightOrange, b.fin()/2f + 0.25f); + Draw.color(Color.WHITE, lightOrange, b.fout()/2f + 0.25f); Lines.stroke(1.5f); Lines.lineAngle(b.x, b.y, b.angle(), 3f); Draw.reset(); @@ -337,7 +337,7 @@ public abstract class BulletType extends BaseBulletType{ } public void draw(Bullet b) { - float size = 3f - b.fout()*1f; + float size = 3f - b.fin()*1f; Draw.color(Color.PURPLE, Color.WHITE, 0.8f); Lines.stroke(1f); @@ -356,8 +356,8 @@ public abstract class BulletType extends BaseBulletType{ Draw.color(lightOrange, Color.WHITE, 0.4f); Lines.poly(b.x, b.y, 3, 1.6f, b.angle()); Lines.stroke(1f); - Draw.color(Color.WHITE, lightOrange, b.fout()/2f); - Draw.alpha(b.fout()); + Draw.color(Color.WHITE, lightOrange, b.fin()/2f); + Draw.alpha(b.fin()); Lines.spikes(b.x, b.y, 1.5f, 2f, 6); Draw.reset(); } @@ -408,9 +408,9 @@ public abstract class BulletType extends BaseBulletType{ } public void draw(Bullet b) { - Draw.color(Color.WHITE, Color.ORANGE, b.fout()); + Draw.color(Color.WHITE, Color.ORANGE, b.fin()); Lines.stroke(2f); - Lines.lineAngleCenter(b.x, b.y, b.angle(), b.fin()*5f); + Lines.lineAngleCenter(b.x, b.y, b.angle(), b.fout()*5f); Draw.reset(); } @@ -436,9 +436,9 @@ public abstract class BulletType extends BaseBulletType{ } public void draw(Bullet b) { - Draw.color(Color.WHITE, Color.ORANGE, b.fout()); + Draw.color(Color.WHITE, Color.ORANGE, b.fin()); Lines.stroke(1f); - Lines.lineAngleCenter(b.x, b.y, b.angle(), b.fin()*4f); + Lines.lineAngleCenter(b.x, b.y, b.angle(), b.fout()*4f); Draw.reset(); } }, @@ -454,7 +454,7 @@ public abstract class BulletType extends BaseBulletType{ } public void draw(Bullet b) { - float f = b.fin()*1.5f; + float f = b.fout()*1.5f; Draw.color(beam); Draw.rect("circle", b.x, b.y, 6f*f, 6f*f); diff --git a/core/src/io/anuke/mindustry/entities/effect/EMP.java b/core/src/io/anuke/mindustry/entities/effect/EMP.java index b8301e87d6..e7afc7b366 100644 --- a/core/src/io/anuke/mindustry/entities/effect/EMP.java +++ b/core/src/io/anuke/mindustry/entities/effect/EMP.java @@ -77,7 +77,7 @@ public class EMP extends TimedEntity{ drawLine(target.worldx(), target.worldy()); - float rad = 5f*fin(); + float rad = 5f*fout(); Draw.rect("circle", target.worldx(), target.worldy(), rad, rad); } @@ -86,7 +86,7 @@ public class EMP extends TimedEntity{ drawLine(x + tr.x, y + tr.y); } - Lines.stroke(fin()*2f); + Lines.stroke(fout()*2f); Lines.poly(x, y, 34, radius * tilesize); Draw.reset(); @@ -114,7 +114,7 @@ public class EMP extends TimedEntity{ } private void drawLaser(float x, float y, float x2, float y2){ - Lines.stroke(fin() * 2f); + Lines.stroke(fout() * 2f); Lines.line(x, y, x2, y2); } } diff --git a/core/src/io/anuke/mindustry/graphics/Fx.java b/core/src/io/anuke/mindustry/graphics/Fx.java index 8a92890190..f1315889a2 100644 --- a/core/src/io/anuke/mindustry/graphics/Fx.java +++ b/core/src/io/anuke/mindustry/graphics/Fx.java @@ -27,27 +27,27 @@ public class Fx{ public static final Effect generatorexplosion = new Effect(28, 40f, e -> { - Angles.randLenVectors(e.id, 16, 10f + e.fout()*8f, (x, y)->{ - float size = e.fin()*12f + 1f; - Draw.color(Color.WHITE, lightOrange, e.fout()); + Angles.randLenVectors(e.id, 16, 10f + e.fin()*8f, (x, y)->{ + float size = e.fout()*12f + 1f; + Draw.color(Color.WHITE, lightOrange, e.fin()); Draw.rect("circle", e.x + x, e.y + y, size, size); Draw.reset(); }); }), reactorsmoke = new Effect(17, e -> { - Angles.randLenVectors(e.id, 4, e.fout()*8f, (x, y)->{ - float size = 1f+e.fin()*5f; - Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.fout()); + Angles.randLenVectors(e.id, 4, e.fin()*8f, (x, y)->{ + float size = 1f+e.fout()*5f; + Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.fin()); Draw.rect("circle", e.x + x, e.y + y, size, size); Draw.reset(); }); }), nuclearsmoke = new Effect(40, e -> { - Angles.randLenVectors(e.id, 4, e.fout()*13f, (x, y)->{ + Angles.randLenVectors(e.id, 4, e.fin()*13f, (x, y)->{ float size = e.finpow()*4f; - Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.fout()); + Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.fin()); Draw.rect("circle", e.x + x, e.y + y, size, size); Draw.reset(); }); @@ -55,97 +55,97 @@ public class Fx{ nuclearcloud = new Effect(90, 200f, e -> { Angles.randLenVectors(e.id, 10, e.finpow()*90f, (x, y)->{ - float size = e.fin()*14f; - Draw.color(Color.LIME, Color.GRAY, e.fout()); + float size = e.fout()*14f; + Draw.color(Color.LIME, Color.GRAY, e.fin()); Draw.rect("circle", e.x + x, e.y + y, size, size); Draw.reset(); }); }), chainshot = new Effect(9f, e -> { - Draw.color(Color.WHITE, lightOrange, e.fout()); - Lines.stroke(e.fin()*4f); - Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*7f); - Lines.stroke(e.fin()*2f); - Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*10f); + Draw.color(Color.WHITE, lightOrange, e.fin()); + Lines.stroke(e.fout()*4f); + Lines.lineAngle(e.x, e.y, e.rotation, e.fout()*7f); + Lines.stroke(e.fout()*2f); + Lines.lineAngle(e.x, e.y, e.rotation, e.fout()*10f); Draw.reset(); }), mortarshot = new Effect(10f, e -> { - Draw.color(Color.WHITE, Color.DARK_GRAY, e.fout()); - Lines.stroke(e.fin()*6f); - Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*10f); - Lines.stroke(e.fin()*5f); - Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*14f); - Lines.stroke(e.fin()*1f); - Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*16f); + Draw.color(Color.WHITE, Color.DARK_GRAY, e.fin()); + Lines.stroke(e.fout()*6f); + Lines.lineAngle(e.x, e.y, e.rotation, e.fout()*10f); + Lines.stroke(e.fout()*5f); + Lines.lineAngle(e.x, e.y, e.rotation, e.fout()*14f); + Lines.stroke(e.fout()*1f); + Lines.lineAngle(e.x, e.y, e.rotation, e.fout()*16f); Draw.reset(); }), railshot = new Effect(9f, e -> { - Draw.color(Color.WHITE, Color.DARK_GRAY, e.fout()); - Lines.stroke(e.fin()*5f); - Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*8f); - Lines.stroke(e.fin()*4f); - Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*12f); - Lines.stroke(e.fin()*1f); - Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*14f); + Draw.color(Color.WHITE, Color.DARK_GRAY, e.fin()); + Lines.stroke(e.fout()*5f); + Lines.lineAngle(e.x, e.y, e.rotation, e.fout()*8f); + Lines.stroke(e.fout()*4f); + Lines.lineAngle(e.x, e.y, e.rotation, e.fout()*12f); + Lines.stroke(e.fout()*1f); + Lines.lineAngle(e.x, e.y, e.rotation, e.fout()*14f); Draw.reset(); }), titanshot = new Effect(12f, e -> { - Draw.color(Color.WHITE, lightOrange, e.fout()); - Lines.stroke(e.fin()*7f); - Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*12f); - Lines.stroke(e.fin()*4f); - Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*16f); - Lines.stroke(e.fin()*2f); - Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*18f); + Draw.color(Color.WHITE, lightOrange, e.fin()); + Lines.stroke(e.fout()*7f); + Lines.lineAngle(e.x, e.y, e.rotation, e.fout()*12f); + Lines.stroke(e.fout()*4f); + Lines.lineAngle(e.x, e.y, e.rotation, e.fout()*16f); + Lines.stroke(e.fout()*2f); + Lines.lineAngle(e.x, e.y, e.rotation, e.fout()*18f); Draw.reset(); }), largeCannonShot = new Effect(11f, e -> { - Draw.color(Color.WHITE, whiteYellow, e.fout()); - Lines.stroke(e.fin()*6f); - Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*12f); - Lines.stroke(e.fin()*3f); - Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*16f); - Lines.stroke(e.fin()*1f); - Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*18f); + Draw.color(Color.WHITE, whiteYellow, e.fin()); + Lines.stroke(e.fout()*6f); + Lines.lineAngle(e.x, e.y, e.rotation, e.fout()*12f); + Lines.stroke(e.fout()*3f); + Lines.lineAngle(e.x, e.y, e.rotation, e.fout()*16f); + Lines.stroke(e.fout()*1f); + Lines.lineAngle(e.x, e.y, e.rotation, e.fout()*18f); Draw.reset(); }), shockwave = new Effect(10f, 80f, e -> { - Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fout()); - Lines.stroke(e.fin()*2f + 0.2f); - Lines.circle(e.x, e.y, e.fout()*28f); + Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fin()); + Lines.stroke(e.fout()*2f + 0.2f); + Lines.circle(e.x, e.y, e.fin()*28f); Draw.reset(); }), nuclearShockwave = new Effect(10f, 200f, e -> { - Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fout()); - Lines.stroke(e.fin()*3f + 0.2f); - Lines.poly(e.x, e.y, 40, e.fout()*140f); + Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fin()); + Lines.stroke(e.fout()*3f + 0.2f); + Lines.poly(e.x, e.y, 40, e.fin()*140f); Draw.reset(); }), shockwaveSmall = new Effect(10f, e -> { - Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fout()); - Lines.stroke(e.fin()*2f + 0.1f); - Lines.circle(e.x, e.y, e.fout()*15f); + Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fin()); + Lines.stroke(e.fout()*2f + 0.1f); + Lines.circle(e.x, e.y, e.fin()*15f); Draw.reset(); }), empshockwave = new Effect(7f, e -> { - Draw.color(Color.WHITE, Color.SKY, e.fout()); - Lines.stroke(e.fin()*2f); - Lines.circle(e.x, e.y, e.fout()*40f); + Draw.color(Color.WHITE, Color.SKY, e.fin()); + Lines.stroke(e.fout()*2f); + Lines.circle(e.x, e.y, e.fin()*40f); Draw.reset(); }), empspark = new Effect(13, e -> { - Angles.randLenVectors(e.id, 7, 1f + e.fout()*12f, (x, y)->{ - float len = 1f+e.fin()*6f; + Angles.randLenVectors(e.id, 7, 1f + e.fin()*12f, (x, y)->{ + float len = 1f+e.fout()*6f; Draw.color(Color.SKY); Lines.lineAngle(e.x + x, e.y + y, Mathf.atan2(x, y), len); Draw.reset(); @@ -153,67 +153,67 @@ public class Fx{ }), redgeneratespark = new Effect(18, e -> { - Angles.randLenVectors(e.id, 5, e.fout()*8f, (x, y)->{ - float len = e.fin()*4f; - Draw.color(Color.valueOf("fbb97f"), Color.GRAY, e.fout()); - //Draw.alpha(e.fin()); + Angles.randLenVectors(e.id, 5, e.fin()*8f, (x, y)->{ + float len = e.fout()*4f; + Draw.color(Color.valueOf("fbb97f"), Color.GRAY, e.fin()); + //Draw.alpha(e.fout()); Draw.rect("circle", e.x + x, e.y + y, len, len); Draw.reset(); }); }), generatespark = new Effect(18, e -> { - Angles.randLenVectors(e.id, 5, e.fout()*8f, (x, y)->{ - float len = e.fin()*4f; - Draw.color(Color.valueOf("d2b29c"), Color.GRAY, e.fout()); - //Draw.alpha(e.fin()); + Angles.randLenVectors(e.id, 5, e.fin()*8f, (x, y)->{ + float len = e.fout()*4f; + Draw.color(Color.valueOf("d2b29c"), Color.GRAY, e.fin()); + //Draw.alpha(e.fout()); Draw.rect("circle", e.x + x, e.y + y, len, len); Draw.reset(); }); }), fuelburn = new Effect(23, e -> { - Angles.randLenVectors(e.id, 5, e.fout()*9f, (x, y)->{ - float len = e.fin()*4f; - Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.fout()); - //Draw.alpha(e.fin()); + Angles.randLenVectors(e.id, 5, e.fin()*9f, (x, y)->{ + float len = e.fout()*4f; + Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.fin()); + //Draw.alpha(e.fout()); Draw.rect("circle", e.x + x, e.y + y, len, len); Draw.reset(); }); }), laserspark = new Effect(14, e -> { - Angles.randLenVectors(e.id, 8, 1f + e.fout()*11f, (x, y)->{ - float len = 1f+e.fin()*5f; - Draw.color(Color.WHITE, Color.CORAL, e.fout()); - Draw.alpha(e.fout()/1.3f); + Angles.randLenVectors(e.id, 8, 1f + e.fin()*11f, (x, y)->{ + float len = 1f+e.fout()*5f; + Draw.color(Color.WHITE, Color.CORAL, e.fin()); + Draw.alpha(e.fin()/1.3f); Lines.lineAngle(e.x + x, e.y + y, Mathf.atan2(x, y), len); Draw.reset(); }); }), shellsmoke = new Effect(20, e -> { - Angles.randLenVectors(e.id, 8, 3f + e.fout()*17f, (x, y)->{ - float size = 2f+e.fin()*5f; - Draw.color(Color.LIGHT_GRAY, Color.DARK_GRAY, e.fout()); + Angles.randLenVectors(e.id, 8, 3f + e.fin()*17f, (x, y)->{ + float size = 2f+e.fout()*5f; + Draw.color(Color.LIGHT_GRAY, Color.DARK_GRAY, e.fin()); Draw.rect("circle", e.x + x, e.y + y, size, size); Draw.reset(); }); }), blastsmoke = new Effect(26, e -> { - Angles.randLenVectors(e.id, 12, 1f + e.fout()*23f, (x, y)->{ - float size = 2f+e.fin()*6f; - Draw.color(Color.LIGHT_GRAY, Color.DARK_GRAY, e.fout()); + Angles.randLenVectors(e.id, 12, 1f + e.fin()*23f, (x, y)->{ + float size = 2f+e.fout()*6f; + Draw.color(Color.LIGHT_GRAY, Color.DARK_GRAY, e.fin()); Draw.rect("circle", e.x + x, e.y + y, size, size); Draw.reset(); }); }), lava = new Effect(18, e -> { - Angles.randLenVectors(e.id, 3, 1f + e.fout()*10f, (x, y)->{ + Angles.randLenVectors(e.id, 3, 1f + e.fin()*10f, (x, y)->{ float size = e.finpow()*4f; - Draw.color(Color.ORANGE, Color.GRAY, e.fout()); + Draw.color(Color.ORANGE, Color.GRAY, e.fin()); Draw.rect("circle", e.x + x, e.y + y, size, size); Draw.reset(); }); @@ -222,194 +222,194 @@ public class Fx{ lavabubble = new Effect(45f, e -> { Draw.color(Color.ORANGE); float scl = 0.35f; - Lines.stroke(1f - Mathf.clamp(e.fout() - (1f-scl)) * (1f/scl)); - Lines.circle(e.x, e.y, e.fout()*4f); + Lines.stroke(1f - Mathf.clamp(e.fin() - (1f-scl)) * (1f/scl)); + Lines.circle(e.x, e.y, e.fin()*4f); Draw.reset(); }), oilbubble = new Effect(64f, e -> { Draw.color(Color.DARK_GRAY); float scl = 0.25f; - Lines.stroke(1f - Mathf.clamp(e.fout() - (1f-scl)) * (1f/scl)); - Lines.circle(e.x, e.y, e.fout()*3f); + Lines.stroke(1f - Mathf.clamp(e.fin() - (1f-scl)) * (1f/scl)); + Lines.circle(e.x, e.y, e.fin()*3f); Draw.reset(); }), shellexplosion = new Effect(9, e -> { - Lines.stroke(2f - e.fout()*1.7f); - Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fout()); - Lines.circle(e.x, e.y, 3f + e.fout() * 9f); + Lines.stroke(2f - e.fin()*1.7f); + Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fin()); + Lines.circle(e.x, e.y, 3f + e.fin() * 9f); Draw.reset(); }), blastexplosion = new Effect(14, e -> { - Lines.stroke(1.2f - e.fout()); - Draw.color(Color.WHITE, lightOrange, e.fout()); - Lines.circle(e.x, e.y, 1.5f + e.fout() * 9f); + Lines.stroke(1.2f - e.fin()); + Draw.color(Color.WHITE, lightOrange, e.fin()); + Lines.circle(e.x, e.y, 1.5f + e.fin() * 9f); Draw.reset(); }), place = new Effect(16, e -> { - Lines.stroke(3f - e.fout() * 2f); - Lines.square(e.x, e.y, tilesize / 2f + e.fout() * 3f); + Lines.stroke(3f - e.fin() * 2f); + Lines.square(e.x, e.y, tilesize / 2f + e.fin() * 3f); Draw.reset(); }), dooropen = new Effect(10, e -> { - Lines.stroke(e.fin() * 1.6f); - Lines.square(e.x, e.y, tilesize / 2f + e.fout() * 2f); - Draw.reset(); - }), - - doorclose= new Effect(10, e -> { - Lines.stroke(e.fin() * 1.6f); + Lines.stroke(e.fout() * 1.6f); Lines.square(e.x, e.y, tilesize / 2f + e.fin() * 2f); Draw.reset(); }), + doorclose= new Effect(10, e -> { + Lines.stroke(e.fout() * 1.6f); + Lines.square(e.x, e.y, tilesize / 2f + e.fout() * 2f); + Draw.reset(); + }), + dooropenlarge = new Effect(10, e -> { - Lines.stroke(e.fin() * 1.6f); - Lines.square(e.x, e.y, tilesize + e.fout() * 2f); + Lines.stroke(e.fout() * 1.6f); + Lines.square(e.x, e.y, tilesize + e.fin() * 2f); Draw.reset(); }), doorcloselarge = new Effect(10, e -> { - Lines.stroke(e.fin() * 1.6f); - Lines.square(e.x, e.y, tilesize + e.fin() * 2f); + Lines.stroke(e.fout() * 1.6f); + Lines.square(e.x, e.y, tilesize + e.fout() * 2f); Draw.reset(); }), purify = new Effect(10, e -> { - Draw.color(Color.ROYAL, Color.GRAY, e.fout()); + Draw.color(Color.ROYAL, Color.GRAY, e.fin()); Lines.stroke(2f); - Lines.spikes(e.x, e.y, e.fout() * 4f, 2, 6); + Lines.spikes(e.x, e.y, e.fin() * 4f, 2, 6); Draw.reset(); }), purifyoil = new Effect(10, e -> { - Draw.color(Color.BLACK, Color.GRAY, e.fout()); + Draw.color(Color.BLACK, Color.GRAY, e.fin()); Lines.stroke(2f); - Lines.spikes(e.x, e.y, e.fout() * 4f, 2, 6); + Lines.spikes(e.x, e.y, e.fin() * 4f, 2, 6); Draw.reset(); }), purifystone = new Effect(10, e -> { - Draw.color(Color.ORANGE, Color.GRAY, e.fout()); + Draw.color(Color.ORANGE, Color.GRAY, e.fin()); Lines.stroke(2f); - Lines.spikes(e.x, e.y, e.fout() * 4f, 2, 6); + Lines.spikes(e.x, e.y, e.fin() * 4f, 2, 6); Draw.reset(); }), generate = new Effect(11, e -> { - Draw.color(Color.ORANGE, Color.YELLOW, e.fout()); + Draw.color(Color.ORANGE, Color.YELLOW, e.fin()); Lines.stroke(1f); - Lines.spikes(e.x, e.y, e.fout() * 5f, 2, 8); + Lines.spikes(e.x, e.y, e.fin() * 5f, 2, 8); Draw.reset(); }), spark = new Effect(10, e -> { Lines.stroke(1f); - Draw.color(Color.WHITE, Color.GRAY, e.fout()); - Lines.spikes(e.x, e.y, e.fout() * 5f, 2, 8); + Draw.color(Color.WHITE, Color.GRAY, e.fin()); + Lines.spikes(e.x, e.y, e.fin() * 5f, 2, 8); Draw.reset(); }), sparkbig = new Effect(11, e -> { Lines.stroke(1f); - Draw.color(lightRed, Color.GRAY, e.fout()); - Lines.spikes(e.x, e.y, e.fout() * 5f, 2.3f, 8); + Draw.color(lightRed, Color.GRAY, e.fin()); + Lines.spikes(e.x, e.y, e.fin() * 5f, 2.3f, 8); Draw.reset(); }), smelt = new Effect(10, e -> { Lines.stroke(1f); - Draw.color(Color.YELLOW, Color.RED, e.fout()); - Lines.spikes(e.x, e.y, e.fout() * 5f, 1f, 8); + Draw.color(Color.YELLOW, Color.RED, e.fin()); + Lines.spikes(e.x, e.y, e.fin() * 5f, 1f, 8); Draw.reset(); }), breakBlock = new Effect(12, e -> { Lines.stroke(2f); - Draw.color(Color.WHITE, Colors.get("break"), e.fout()); - Lines.spikes(e.x, e.y, e.fout() * 6f, 2, 5, 90); + Draw.color(Color.WHITE, Colors.get("break"), e.fin()); + Lines.spikes(e.x, e.y, e.fin() * 6f, 2, 5, 90); Draw.reset(); }), hit = new Effect(10, e -> { Lines.stroke(1f); - Draw.color(Color.WHITE, Color.ORANGE, e.fout()); - Lines.spikes(e.x, e.y, e.fout() * 3f, 2, 8); + Draw.color(Color.WHITE, Color.ORANGE, e.fin()); + Lines.spikes(e.x, e.y, e.fin() * 3f, 2, 8); Draw.reset(); }), laserhit = new Effect(10, e -> { Lines.stroke(1f); - Draw.color(Color.WHITE, Color.SKY, e.fout()); - Lines.spikes(e.x, e.y, e.fout() * 2f, 2, 6); + Draw.color(Color.WHITE, Color.SKY, e.fin()); + Lines.spikes(e.x, e.y, e.fin() * 2f, 2, 6); Draw.reset(); }), shieldhit = new Effect(9, e -> { Lines.stroke(1f); - Draw.color(Color.WHITE, Color.SKY, e.fout()); - Lines.spikes(e.x, e.y, e.fout() * 5f, 2, 6); - Lines.stroke(4f*e.fin()); - Lines.circle(e.x, e.y, e.fout()*14f); + Draw.color(Color.WHITE, Color.SKY, e.fin()); + Lines.spikes(e.x, e.y, e.fin() * 5f, 2, 6); + Lines.stroke(4f*e.fout()); + Lines.circle(e.x, e.y, e.fin()*14f); Draw.reset(); }), laserShoot = new Effect(8, e -> { - Draw.color(Color.WHITE, lightOrange, e.fout()); - Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fin(), 6f, 2f, 0.8f); + Draw.color(Color.WHITE, lightOrange, e.fin()); + Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fout(), 6f, 2f, 0.8f); Draw.reset(); }), spreadShoot = new Effect(12, e -> { - Draw.color(Color.WHITE, Color.PURPLE, e.fout()); - Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fin(), 9f, 3.5f, 0.8f); + Draw.color(Color.WHITE, Color.PURPLE, e.fin()); + Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fout(), 9f, 3.5f, 0.8f); Draw.reset(); }), clusterShoot = new Effect(12, e -> { - Draw.color(Color.WHITE, lightOrange, e.fout()); - Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fin(), 10f, 2.5f, 0.7f); + Draw.color(Color.WHITE, lightOrange, e.fin()); + Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fout(), 10f, 2.5f, 0.7f); Draw.reset(); }), vulcanShoot = new Effect(8, e -> { - Draw.color(lighterOrange, lightOrange, e.fout()); - Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fin(), 10f, 2f, 0.7f); + Draw.color(lighterOrange, lightOrange, e.fin()); + Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fout(), 10f, 2f, 0.7f); Draw.reset(); }), shockShoot = new Effect(8, e -> { - Draw.color(Color.WHITE, Color.ORANGE, e.fout()); - Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fin(), 14f, 4f, 0.8f); + Draw.color(Color.WHITE, Color.ORANGE, e.fin()); + Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fout(), 14f, 4f, 0.8f); Draw.reset(); }), beamShoot = new Effect(8, e -> { - Draw.color(beamLight, beam, e.fout()); - Shapes.lineShot(e.x, e.y, e.rotation - 70, 3, e.fin(), 12f, 1f, 0.5f); - Shapes.lineShot(e.x, e.y, e.rotation + 70, 3, e.fin(), 12f, 1f, 0.5f); + Draw.color(beamLight, beam, e.fin()); + Shapes.lineShot(e.x, e.y, e.rotation - 70, 3, e.fout(), 12f, 1f, 0.5f); + Shapes.lineShot(e.x, e.y, e.rotation + 70, 3, e.fout(), 12f, 1f, 0.5f); Draw.reset(); }), beamhit = new Effect(8, e -> { - Draw.color(beamLight, beam, e.fout()); - Lines.stroke(e.fin()*3f+0.5f); - Lines.circle(e.x, e.y, e.fout()*8f); - Lines.spikes(e.x, e.y, e.fout()*6f, 2f, 4, 45); + Draw.color(beamLight, beam, e.fin()); + Lines.stroke(e.fout()*3f+0.5f); + Lines.circle(e.x, e.y, e.fin()*8f); + Lines.spikes(e.x, e.y, e.fin()*6f, 2f, 4, 45); Draw.reset(); }), titanExplosion = new Effect(11, 48f, e -> { - Lines.stroke(2f*e.fin()+0.5f); + Lines.stroke(2f*e.fout()+0.5f); Draw.color(Color.WHITE, Color.DARK_GRAY, e.finpow()); Lines.circle(e.x, e.y, 5f + e.finpow() * 8f); - Draw.color(e.fout() < 0.5f ? whiteOrange : Color.DARK_GRAY); - float rad = e.fin()*10f + 5f; + Draw.color(e.fin() < 0.5f ? whiteOrange : Color.DARK_GRAY); + float rad = e.fout()*10f + 5f; Angles.randLenVectors(e.id, 5, 9f, (x, y)->{ Draw.rect("circle2", e.x + x, e.y + y, rad, rad); }); @@ -418,12 +418,12 @@ public class Fx{ }), explosion = new Effect(11, e -> { - Lines.stroke(2f*e.fin()+0.5f); + Lines.stroke(2f*e.fout()+0.5f); Draw.color(Color.WHITE, Color.DARK_GRAY, e.finpow()); Lines.circle(e.x, e.y, 5f + e.finpow() * 6f); - Draw.color(e.fout() < 0.5f ? Color.WHITE : Color.DARK_GRAY); - float rad = e.fin()*10f + 5f; + Draw.color(e.fin() < 0.5f ? Color.WHITE : Color.DARK_GRAY); + float rad = e.fout()*10f + 5f; Angles.randLenVectors(e.id, 5, 8f, (x, y)->{ Draw.rect("circle2", e.x + x, e.y + y, rad, rad); }); @@ -433,19 +433,19 @@ public class Fx{ blockexplosion = new Effect(13, e -> { - Angles.randLenVectors(e.id+1, 8, 5f + e.fout()*11f, (x, y)->{ - float size = 2f+e.fin()*8f; - Draw.color(Color.LIGHT_GRAY, Color.DARK_GRAY, e.fout()); + Angles.randLenVectors(e.id+1, 8, 5f + e.fin()*11f, (x, y)->{ + float size = 2f+e.fout()*8f; + Draw.color(Color.LIGHT_GRAY, Color.DARK_GRAY, e.fin()); Draw.rect("circle", e.x + x, e.y + y, size, size); Draw.reset(); }); - Lines.stroke(2f*e.fin()+0.4f); + Lines.stroke(2f*e.fout()+0.4f); Draw.color(Color.WHITE, Color.ORANGE, e.finpow()); Lines.circle(e.x, e.y, 2f + e.finpow() * 9f); - Draw.color(e.fout() < 0.5f ? Color.WHITE : Color.DARK_GRAY); - float rad = e.fin()*10f + 2f; + Draw.color(e.fin() < 0.5f ? Color.WHITE : Color.DARK_GRAY); + float rad = e.fout()*10f + 2f; Angles.randLenVectors(e.id, 5, 8f, (x, y)->{ Draw.rect("circle2", e.x + x, e.y + y, rad, rad); }); @@ -454,53 +454,53 @@ public class Fx{ }), clusterbomb = new Effect(10f, e -> { - Draw.color(Color.WHITE, lightOrange, e.fout()); - Lines.stroke(e.fin()*1.5f); - Lines.poly(e.x, e.y, 4, e.fin()*8f); - Lines.circle(e.x, e.y, e.fout()*14f); + Draw.color(Color.WHITE, lightOrange, e.fin()); + Lines.stroke(e.fout()*1.5f); + Lines.poly(e.x, e.y, 4, e.fout()*8f); + Lines.circle(e.x, e.y, e.fin()*14f); Draw.reset(); }), coreexplosion = new Effect(13, e -> { - Lines.stroke(3f-e.fout()*2f); - Draw.color(Color.ORANGE, Color.WHITE, e.fout()); - Lines.spikes(e.x, e.y, 5f + e.fout() * 40f, 6, 6); - Lines.circle(e.x, e.y, 4f + e.fout() * 40f); + Lines.stroke(3f-e.fin()*2f); + Draw.color(Color.ORANGE, Color.WHITE, e.fin()); + Lines.spikes(e.x, e.y, 5f + e.fin() * 40f, 6, 6); + Lines.circle(e.x, e.y, 4f + e.fin() * 40f); Draw.reset(); }), smoke = new Effect(100, e -> { - Draw.color(Color.GRAY, new Color(0.3f, 0.3f, 0.3f, 1f), e.fout()); - float size = 7f-e.fout()*7f; + Draw.color(Color.GRAY, new Color(0.3f, 0.3f, 0.3f, 1f), e.fin()); + float size = 7f-e.fin()*7f; Draw.rect("circle", e.x, e.y, size, size); Draw.reset(); }), railsmoke = new Effect(30, e -> { - Draw.color(Color.LIGHT_GRAY, Color.WHITE, e.fout()); - float size = e.fin()*4f; + Draw.color(Color.LIGHT_GRAY, Color.WHITE, e.fin()); + float size = e.fout()*4f; Draw.rect("circle", e.x, e.y, size, size); Draw.reset(); }), chainsmoke = new Effect(30, e -> { Draw.color(lightGray); - float size = e.fin()*4f; + float size = e.fout()*4f; Draw.rect("circle", e.x, e.y, size, size); Draw.reset(); }), dashsmoke = new Effect(30, e -> { - Draw.color(Color.CORAL, Color.GRAY, e.fout()); - float size = e.fin()*4f; + Draw.color(Color.CORAL, Color.GRAY, e.fin()); + float size = e.fout()*4f; Draw.rect("circle", e.x, e.y, size, size); Draw.reset(); }), spawn = new Effect(23, e -> { Lines.stroke(2f); - Draw.color(Color.DARK_GRAY, Color.SCARLET, e.fout()); - Lines.circle(e.x, e.y, 7f - e.fout() * 6f); + Draw.color(Color.DARK_GRAY, Color.SCARLET, e.fin()); + Lines.circle(e.x, e.y, 7f - e.fin() * 6f); Draw.reset(); }), @@ -512,7 +512,7 @@ public class Fx{ Draw.reset(); }), transfer = new Effect(20, e -> { - Draw.color(Color.SCARLET, Color.CLEAR, e.fin()); + Draw.color(Color.SCARLET, Color.CLEAR, e.fout()); Lines.square(e.x, e.y, 4); Lines.lineAngle(e.x, e.y, e.rotation, 5f); Draw.reset();