From 7268ac98f884153b8cd6f4598abf35462651167f Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 6 Apr 2022 17:17:47 -0400 Subject: [PATCH] Removed team light drawing --- core/assets/bundles/bundle.properties | 1 - core/src/mindustry/content/Fx.java | 5 +-- core/src/mindustry/content/Items.java | 2 + core/src/mindustry/content/UnitTypes.java | 1 - .../mindustry/entities/bullet/BulletType.java | 2 +- .../bullet/ContinuousFlameBulletType.java | 2 +- .../bullet/ContinuousLaserBulletType.java | 2 +- .../entities/bullet/LaserBulletType.java | 2 +- .../entities/bullet/SapBulletType.java | 4 +- .../entities/bullet/ShrapnelBulletType.java | 2 +- .../mindustry/entities/comp/BuildingComp.java | 2 +- .../mindustry/entities/comp/MinerComp.java | 2 +- core/src/mindustry/game/Rules.java | 3 -- core/src/mindustry/graphics/Drawf.java | 42 +++++++------------ core/src/mindustry/type/Item.java | 6 +++ core/src/mindustry/type/Liquid.java | 3 +- core/src/mindustry/type/UnitType.java | 2 +- .../ui/dialogs/CustomRulesDialog.java | 1 - .../world/blocks/defense/MendProjector.java | 2 +- .../blocks/defense/OverdriveProjector.java | 2 +- .../defense/turrets/TractorBeamTurret.java | 2 +- .../world/blocks/power/BeamNode.java | 2 +- .../world/blocks/power/ConsumeGenerator.java | 2 +- .../world/blocks/power/ImpactReactor.java | 2 +- .../world/blocks/power/LightBlock.java | 2 +- .../world/blocks/power/NuclearReactor.java | 2 +- .../world/blocks/power/PowerNode.java | 2 +- .../world/blocks/power/ThermalGenerator.java | 2 +- .../world/blocks/production/BeamDrill.java | 4 +- .../world/blocks/storage/CoreBlock.java | 2 +- .../world/blocks/units/RepairPoint.java | 4 +- core/src/mindustry/world/draw/DrawFlame.java | 2 +- 32 files changed, 53 insertions(+), 63 deletions(-) diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index 66fe68c31d..b8408137de 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -1087,7 +1087,6 @@ rules.title.environment = Environment rules.title.teams = Teams rules.title.planet = Planet rules.lighting = Lighting -rules.enemyLights = Enemy Lights rules.fire = Fire rules.explosions = Block/Unit Explosion Damage rules.ambientlight = Ambient Light diff --git a/core/src/mindustry/content/Fx.java b/core/src/mindustry/content/Fx.java index 9376b85acf..7728afeefe 100644 --- a/core/src/mindustry/content/Fx.java +++ b/core/src/mindustry/content/Fx.java @@ -8,7 +8,6 @@ import arc.math.geom.*; import arc.struct.*; import arc.util.*; import mindustry.entities.*; -import mindustry.game.*; import mindustry.gen.*; import mindustry.graphics.*; import mindustry.type.*; @@ -155,7 +154,7 @@ public class Fx{ Draw.color(e.color, e.fout()); Lines.stroke(1.5f); Lines.line(e.x, e.y, pos.getX(), pos.getY()); - Drawf.light(null, e.x, e.y, pos.getX(), pos.getY(), 20f, e.color, 0.6f * e.fout()); + Drawf.light(e.x, e.y, pos.getX(), pos.getY(), 20f, e.color, 0.6f * e.fout()); }), pointHit = new Effect(8f, e -> { @@ -1038,7 +1037,7 @@ public class Fx{ color(); - Drawf.light(Team.derelict, e.x, e.y, 20f * e.fslope(), Pal.lightFlame, 0.5f); + Drawf.light(e.x, e.y, 20f * e.fslope(), Pal.lightFlame, 0.5f); }), fireHit = new Effect(35f, e -> { diff --git a/core/src/mindustry/content/Items.java b/core/src/mindustry/content/Items.java index f27b3f550a..318bf4912f 100644 --- a/core/src/mindustry/content/Items.java +++ b/core/src/mindustry/content/Items.java @@ -128,10 +128,12 @@ public class Items{ fissileMatter = new Item("fissile-matter", Color.valueOf("5e988d")){{ radioactivity = 1.5f; + hidden = true; }}; dormantCyst = new Item("dormant-cyst", Color.valueOf("df824d")){{ flammability = 0.1f; + hidden = true; }}; serpuloItems.addAll( diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index d1971683d5..12f0be5d9c 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -3149,7 +3149,6 @@ public class UnitTypes{ itemCapacity = 0; setEnginesMirror( - //new UnitEngine(34 / 4f, 31 / 4f, 3f, 45f), new UnitEngine(35 / 4f, -38 / 4f, 3f, 315f), new UnitEngine(39 / 4f, -16 / 4f, 3f, 315f) ); diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index adeb370738..b2c58b7998 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -382,7 +382,7 @@ public class BulletType extends Content implements Cloneable{ public void drawLight(Bullet b){ if(lightOpacity <= 0f || lightRadius <= 0f) return; - Drawf.light(b.team, b, lightRadius, lightColor, lightOpacity); + Drawf.light(b, lightRadius, lightColor, lightOpacity); } public void init(Bullet b){ diff --git a/core/src/mindustry/entities/bullet/ContinuousFlameBulletType.java b/core/src/mindustry/entities/bullet/ContinuousFlameBulletType.java index 1fd4e2bfa7..feafb17a39 100644 --- a/core/src/mindustry/entities/bullet/ContinuousFlameBulletType.java +++ b/core/src/mindustry/entities/bullet/ContinuousFlameBulletType.java @@ -87,7 +87,7 @@ public class ContinuousFlameBulletType extends ContinuousBulletType{ } } - Drawf.light(b.team, b.x, b.y, b.x + Tmp.v1.x, b.y + Tmp.v1.y, lightStroke, lightColor, 0.7f); + Drawf.light(b.x, b.y, b.x + Tmp.v1.x, b.y + Tmp.v1.y, lightStroke, lightColor, 0.7f); Draw.reset(); } diff --git a/core/src/mindustry/entities/bullet/ContinuousLaserBulletType.java b/core/src/mindustry/entities/bullet/ContinuousLaserBulletType.java index a2a654058e..9809b43255 100644 --- a/core/src/mindustry/entities/bullet/ContinuousLaserBulletType.java +++ b/core/src/mindustry/entities/bullet/ContinuousLaserBulletType.java @@ -58,7 +58,7 @@ public class ContinuousLaserBulletType extends ContinuousBulletType{ Tmp.v1.trns(b.rotation(), baseLen * 1.1f); - Drawf.light(b.team, b.x, b.y, b.x + Tmp.v1.x, b.y + Tmp.v1.y, lightStroke, lightColor, 0.7f); + Drawf.light(b.x, b.y, b.x + Tmp.v1.x, b.y + Tmp.v1.y, lightStroke, lightColor, 0.7f); Draw.reset(); } diff --git a/core/src/mindustry/entities/bullet/LaserBulletType.java b/core/src/mindustry/entities/bullet/LaserBulletType.java index 67b5966069..ec0eb2274f 100644 --- a/core/src/mindustry/entities/bullet/LaserBulletType.java +++ b/core/src/mindustry/entities/bullet/LaserBulletType.java @@ -116,7 +116,7 @@ public class LaserBulletType extends BulletType{ Draw.reset(); Tmp.v1.trns(b.rotation(), baseLen * 1.1f); - Drawf.light(b.team, b.x, b.y, b.x + Tmp.v1.x, b.y + Tmp.v1.y, width * 1.4f * b.fout(), colors[0], 0.6f); + Drawf.light(b.x, b.y, b.x + Tmp.v1.x, b.y + Tmp.v1.y, width * 1.4f * b.fout(), colors[0], 0.6f); } @Override diff --git a/core/src/mindustry/entities/bullet/SapBulletType.java b/core/src/mindustry/entities/bullet/SapBulletType.java index b0bca23f85..70892cb59a 100644 --- a/core/src/mindustry/entities/bullet/SapBulletType.java +++ b/core/src/mindustry/entities/bullet/SapBulletType.java @@ -37,12 +37,12 @@ public class SapBulletType extends BulletType{ Tmp.v1.set(data).lerp(b, b.fin()); Draw.color(color); - Drawf.laser(b.team, Core.atlas.find("laser"), Core.atlas.find("laser-end"), + Drawf.laser(Core.atlas.find("laser"), Core.atlas.find("laser-end"), b.x, b.y, Tmp.v1.x, Tmp.v1.y, width * b.fout()); Draw.reset(); - Drawf.light(b.team, b.x, b.y, Tmp.v1.x, Tmp.v1.y, 15f * b.fout(), lightColor, lightOpacity); + Drawf.light(b.x, b.y, Tmp.v1.x, Tmp.v1.y, 15f * b.fout(), lightColor, lightOpacity); } } diff --git a/core/src/mindustry/entities/bullet/ShrapnelBulletType.java b/core/src/mindustry/entities/bullet/ShrapnelBulletType.java index 34b42719f7..76182222bd 100644 --- a/core/src/mindustry/entities/bullet/ShrapnelBulletType.java +++ b/core/src/mindustry/entities/bullet/ShrapnelBulletType.java @@ -66,6 +66,6 @@ public class ShrapnelBulletType extends BulletType{ Drawf.tri(b.x, b.y, width * b.fout(), 10f, b.rotation() + 180f); Draw.reset(); - Drawf.light(b.team, b.x, b.y, b.x + Angles.trnsx(rot, realLength), b.y + Angles.trnsy(rot, realLength), width * 2.5f * b.fout(), toColor, lightOpacity); + Drawf.light(b.x, b.y, b.x + Angles.trnsx(rot, realLength), b.y + Angles.trnsy(rot, realLength), width * 2.5f * b.fout(), toColor, lightOpacity); } } diff --git a/core/src/mindustry/entities/comp/BuildingComp.java b/core/src/mindustry/entities/comp/BuildingComp.java index 1e3f1a6479..5c561c5f19 100644 --- a/core/src/mindustry/entities/comp/BuildingComp.java +++ b/core/src/mindustry/entities/comp/BuildingComp.java @@ -1157,7 +1157,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, float fract = 1f; float opacity = color.a * fract; if(opacity > 0.001f){ - Drawf.light(team, x, y, block.size * 30f * fract, color, opacity); + Drawf.light(x, y, block.size * 30f * fract, color, opacity); } } } diff --git a/core/src/mindustry/entities/comp/MinerComp.java b/core/src/mindustry/entities/comp/MinerComp.java index 495c03283d..fbb1ae1c20 100644 --- a/core/src/mindustry/entities/comp/MinerComp.java +++ b/core/src/mindustry/entities/comp/MinerComp.java @@ -141,7 +141,7 @@ abstract class MinerComp implements Itemsc, Posc, Teamc, Rotc, Drawc{ Draw.color(Color.lightGray, Color.white, 1f - flashScl + Mathf.absin(Time.time, 0.5f, flashScl)); - Drawf.laser(team(), Core.atlas.find("minelaser"), Core.atlas.find("minelaser-end"), px, py, ex, ey, 0.75f); + Drawf.laser(Core.atlas.find("minelaser"), Core.atlas.find("minelaser-end"), px, py, ex, ey, 0.75f); if(isLocal()){ Lines.stroke(1f, Pal.accent); diff --git a/core/src/mindustry/game/Rules.java b/core/src/mindustry/game/Rules.java index f405ebf4c8..1b51b16b16 100644 --- a/core/src/mindustry/game/Rules.java +++ b/core/src/mindustry/game/Rules.java @@ -123,9 +123,6 @@ public class Rules{ public Color dynamicColor = new Color(0f, 0f, 0f, 0.5f); /** Whether ambient lighting is enabled. */ public boolean lighting = false; - /** Whether enemy lighting is visible. - * If lighting is enabled and this is false, a fog-of-war effect is partially achieved. */ - public boolean enemyLights = true; /** Ambient light color, used when lighting is enabled. */ public Color ambientLight = new Color(0.01f, 0.01f, 0.04f, 0.99f); /** team of the player by default. */ diff --git a/core/src/mindustry/graphics/Drawf.java b/core/src/mindustry/graphics/Drawf.java index ef2d7087f2..8d52f5403f 100644 --- a/core/src/mindustry/graphics/Drawf.java +++ b/core/src/mindustry/graphics/Drawf.java @@ -6,9 +6,7 @@ import arc.math.*; import arc.math.geom.*; import arc.struct.*; import arc.util.*; -import mindustry.*; import mindustry.ctype.*; -import mindustry.game.*; import mindustry.gen.*; import mindustry.world.*; @@ -210,28 +208,20 @@ public class Drawf{ renderer.lights.add(x, y, radius, color, opacity); } - public static void light(Team team, float x, float y, float radius, Color color, float opacity){ - if(allowLight(team)) renderer.lights.add(x, y, radius, color, opacity); + public static void light(Position pos, float radius, Color color, float opacity){ + light(pos.getX(), pos.getY(), radius, color, opacity); } - public static void light(Team team, Position pos, float radius, Color color, float opacity){ - light(team, pos.getX(), pos.getY(), radius, color, opacity); + public static void light(float x, float y, TextureRegion region, Color color, float opacity){ + renderer.lights.add(x, y, region, color, opacity); } - public static void light(Team team, float x, float y, TextureRegion region, Color color, float opacity){ - if(allowLight(team)) renderer.lights.add(x, y, region, color, opacity); + public static void light(float x, float y, float x2, float y2){ + renderer.lights.line(x, y, x2, y2, 30, Color.orange, 0.3f); } - public static void light(Team team, float x, float y, float x2, float y2){ - if(allowLight(team)) renderer.lights.line(x, y, x2, y2, 30, Color.orange, 0.3f); - } - - public static void light(Team team, float x, float y, float x2, float y2, float stroke, Color tint, float alpha){ - if(allowLight(team)) renderer.lights.line(x, y, x2, y2, stroke, tint, alpha); - } - - private static boolean allowLight(Team team){ - return renderer != null && (team == Team.derelict || team == Vars.player.team() || state.rules.enemyLights); + public static void light(float x, float y, float x2, float y2, float stroke, Color tint, float alpha){ + renderer.lights.line(x, y, x2, y2, stroke, tint, alpha); } public static void selected(Building tile, Color color){ @@ -365,19 +355,19 @@ public class Drawf{ Draw.color(); } - public static void laser(Team team, TextureRegion line, TextureRegion edge, float x, float y, float x2, float y2){ - laser(team, line, edge, edge, x, y, x2, y2, 1f); + public static void laser(TextureRegion line, TextureRegion edge, float x, float y, float x2, float y2){ + laser(line, edge, edge, x, y, x2, y2, 1f); } - public static void laser(Team team, TextureRegion line, TextureRegion start, TextureRegion end, float x, float y, float x2, float y2){ - laser(team, line, start, end, x, y, x2, y2, 1f); + public static void laser(TextureRegion line, TextureRegion start, TextureRegion end, float x, float y, float x2, float y2){ + laser(line, start, end, x, y, x2, y2, 1f); } - public static void laser(Team team, TextureRegion line, TextureRegion edge, float x, float y, float x2, float y2, float scale){ - laser(team, line, edge, edge, x, y, x2, y2, scale); + public static void laser(TextureRegion line, TextureRegion edge, float x, float y, float x2, float y2, float scale){ + laser(line, edge, edge, x, y, x2, y2, scale); } - public static void laser(Team team, TextureRegion line, TextureRegion start, TextureRegion end, float x, float y, float x2, float y2, float scale){ + public static void laser(TextureRegion line, TextureRegion start, TextureRegion end, float x, float y, float x2, float y2, float scale){ float scl = 8f * scale * Draw.scl, rot = Mathf.angle(x2 - x, y2 - y); float vx = Mathf.cosDeg(rot) * scl, vy = Mathf.sinDeg(rot) * scl; @@ -388,7 +378,7 @@ public class Drawf{ Lines.line(line, x + vx, y + vy, x2 - vx, y2 - vy, false); Lines.stroke(1f); - light(team, x, y, x2, y2); + light(x, y, x2, y2); } public static void tri(float x, float y, float width, float length, float rotation){ diff --git a/core/src/mindustry/type/Item.java b/core/src/mindustry/type/Item.java index 28407605eb..bb481dfb09 100644 --- a/core/src/mindustry/type/Item.java +++ b/core/src/mindustry/type/Item.java @@ -46,6 +46,7 @@ public class Item extends UnlockableContent implements Senseable{ public float frameTime = 5f; /** If true, this material is used by buildings. If false, this material will be incinerated in certain cores. */ public boolean buildable = true; + public boolean hidden = false; public Item(String name, Color color){ super(name); @@ -56,6 +57,11 @@ public class Item extends UnlockableContent implements Senseable{ this(name, new Color(Color.black)); } + @Override + public boolean isHidden(){ + return hidden; + } + @Override public void loadIcon(){ super.loadIcon(); diff --git a/core/src/mindustry/type/Liquid.java b/core/src/mindustry/type/Liquid.java index c7d9a2f9bc..7a45caee2a 100644 --- a/core/src/mindustry/type/Liquid.java +++ b/core/src/mindustry/type/Liquid.java @@ -7,7 +7,6 @@ import arc.util.*; import mindustry.content.*; import mindustry.ctype.*; import mindustry.entities.*; -import mindustry.game.*; import mindustry.gen.*; import mindustry.graphics.*; import mindustry.logic.*; @@ -137,7 +136,7 @@ public class Liquid extends UnlockableContent implements Senseable{ Draw.color(); if(lightColor.a > 0.001f && f > 0){ - Drawf.light(Team.derelict, x, y, 30f * f, lightColor, color.a * f * 0.8f); + Drawf.light(x, y, 30f * f, lightColor, color.a * f * 0.8f); } } diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index 248ea8d4c8..69a3e9e6f3 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -1104,7 +1104,7 @@ public class UnitType extends UnlockableContent{ public void drawLight(Unit unit){ if(lightRadius > 0){ - Drawf.light(unit.team, unit.x, unit.y, lightRadius, lightColor, lightOpacity); + Drawf.light(unit.x, unit.y, lightRadius, lightColor, lightOpacity); } } diff --git a/core/src/mindustry/ui/dialogs/CustomRulesDialog.java b/core/src/mindustry/ui/dialogs/CustomRulesDialog.java index 902e78eeb4..ff22c29bcb 100644 --- a/core/src/mindustry/ui/dialogs/CustomRulesDialog.java +++ b/core/src/mindustry/ui/dialogs/CustomRulesDialog.java @@ -191,7 +191,6 @@ public class CustomRulesDialog extends BaseDialog{ check("@rules.explosions", b -> rules.damageExplosions = b, () -> rules.damageExplosions); check("@rules.fire", b -> rules.fire = b, () -> rules.fire); check("@rules.lighting", b -> rules.lighting = b, () -> rules.lighting); - check("@rules.enemyLights", b -> rules.enemyLights = b, () -> rules.enemyLights); if(experimental){ check("@rules.limitarea", b -> rules.limitMapArea = b, () -> rules.limitMapArea); diff --git a/core/src/mindustry/world/blocks/defense/MendProjector.java b/core/src/mindustry/world/blocks/defense/MendProjector.java index f6e062996a..724be7ff81 100644 --- a/core/src/mindustry/world/blocks/defense/MendProjector.java +++ b/core/src/mindustry/world/blocks/defense/MendProjector.java @@ -133,7 +133,7 @@ public class MendProjector extends Block{ @Override public void drawLight(){ - Drawf.light(team, x, y, lightRadius * smoothEfficiency, baseColor, 0.7f * smoothEfficiency); + Drawf.light(x, y, lightRadius * smoothEfficiency, baseColor, 0.7f * smoothEfficiency); } @Override diff --git a/core/src/mindustry/world/blocks/defense/OverdriveProjector.java b/core/src/mindustry/world/blocks/defense/OverdriveProjector.java index 6917f36aff..ed821f34e7 100644 --- a/core/src/mindustry/world/blocks/defense/OverdriveProjector.java +++ b/core/src/mindustry/world/blocks/defense/OverdriveProjector.java @@ -92,7 +92,7 @@ public class OverdriveProjector extends Block{ @Override public void drawLight(){ - Drawf.light(team, x, y, lightRadius * smoothEfficiency, baseColor, 0.7f * smoothEfficiency); + Drawf.light(x, y, lightRadius * smoothEfficiency, baseColor, 0.7f * smoothEfficiency); } @Override diff --git a/core/src/mindustry/world/blocks/defense/turrets/TractorBeamTurret.java b/core/src/mindustry/world/blocks/defense/turrets/TractorBeamTurret.java index 48f18c32ae..4b523b37a5 100644 --- a/core/src/mindustry/world/blocks/defense/turrets/TractorBeamTurret.java +++ b/core/src/mindustry/world/blocks/defense/turrets/TractorBeamTurret.java @@ -150,7 +150,7 @@ public class TractorBeamTurret extends BaseTurret{ Draw.mixcol(laserColor, Mathf.absin(4f, 0.6f)); - Drawf.laser(team, laser, laserStart, laserEnd, + Drawf.laser(laser, laserStart, laserEnd, x + Angles.trnsx(ang, shootLength), y + Angles.trnsy(ang, shootLength), lastX, lastY, strength * efficiency * laserWidth); diff --git a/core/src/mindustry/world/blocks/power/BeamNode.java b/core/src/mindustry/world/blocks/power/BeamNode.java index d9308d0185..0cda217dd2 100644 --- a/core/src/mindustry/world/blocks/power/BeamNode.java +++ b/core/src/mindustry/world/blocks/power/BeamNode.java @@ -122,7 +122,7 @@ public class BeamNode extends PowerBlock{ if(dst > 1 + size/2){ var point = Geometry.d4[i]; float poff = tilesize/2f; - Drawf.laser(team, laser, laserEnd, x + poff*size*point.x, y + poff*size*point.y, dests[i].worldx() - poff*point.x, dests[i].worldy() - poff*point.y, w); + Drawf.laser(laser, laserEnd, x + poff*size*point.x, y + poff*size*point.y, dests[i].worldx() - poff*point.x, dests[i].worldy() - poff*point.y, w); } } } diff --git a/core/src/mindustry/world/blocks/power/ConsumeGenerator.java b/core/src/mindustry/world/blocks/power/ConsumeGenerator.java index 71572ab953..8e59702727 100644 --- a/core/src/mindustry/world/blocks/power/ConsumeGenerator.java +++ b/core/src/mindustry/world/blocks/power/ConsumeGenerator.java @@ -133,7 +133,7 @@ public class ConsumeGenerator extends PowerGenerator{ //??? drawer.drawLight(this); //TODO hard coded - Drawf.light(team, x, y, (60f + Mathf.absin(10f, 5f)) * size, Color.orange, 0.5f * warmup); + Drawf.light(x, y, (60f + Mathf.absin(10f, 5f)) * size, Color.orange, 0.5f * warmup); } } } diff --git a/core/src/mindustry/world/blocks/power/ImpactReactor.java b/core/src/mindustry/world/blocks/power/ImpactReactor.java index 2443633c1c..c5ef7f8d54 100644 --- a/core/src/mindustry/world/blocks/power/ImpactReactor.java +++ b/core/src/mindustry/world/blocks/power/ImpactReactor.java @@ -133,7 +133,7 @@ public class ImpactReactor extends PowerGenerator{ @Override public void drawLight(){ - Drawf.light(team, x, y, (110f + Mathf.absin(5, 5f)) * warmup, Tmp.c1.set(plasma2).lerp(plasma1, Mathf.absin(7f, 0.2f)), 0.8f * warmup); + Drawf.light(x, y, (110f + Mathf.absin(5, 5f)) * warmup, Tmp.c1.set(plasma2).lerp(plasma1, Mathf.absin(7f, 0.2f)), 0.8f * warmup); } @Override diff --git a/core/src/mindustry/world/blocks/power/LightBlock.java b/core/src/mindustry/world/blocks/power/LightBlock.java index be212448a2..12191f572d 100644 --- a/core/src/mindustry/world/blocks/power/LightBlock.java +++ b/core/src/mindustry/world/blocks/power/LightBlock.java @@ -94,7 +94,7 @@ public class LightBlock extends Block{ @Override public void drawLight(){ - Drawf.light(team, x, y, lightRadius * Math.min(smoothTime, 2f), Tmp.c1.set(color), brightness * efficiency); + Drawf.light(x, y, lightRadius * Math.min(smoothTime, 2f), Tmp.c1.set(color), brightness * efficiency); } @Override diff --git a/core/src/mindustry/world/blocks/power/NuclearReactor.java b/core/src/mindustry/world/blocks/power/NuclearReactor.java index 38b440c5a1..12fec02fa1 100644 --- a/core/src/mindustry/world/blocks/power/NuclearReactor.java +++ b/core/src/mindustry/world/blocks/power/NuclearReactor.java @@ -143,7 +143,7 @@ public class NuclearReactor extends PowerGenerator{ @Override public void drawLight(){ float fract = productionEfficiency; - Drawf.light(team, x, y, (90f + Mathf.absin(5, 5f)) * fract, Tmp.c1.set(lightColor).lerp(Color.scarlet, heat), 0.6f * fract); + Drawf.light(x, y, (90f + Mathf.absin(5, 5f)) * fract, Tmp.c1.set(lightColor).lerp(Color.scarlet, heat), 0.6f * fract); } @Override diff --git a/core/src/mindustry/world/blocks/power/PowerNode.java b/core/src/mindustry/world/blocks/power/PowerNode.java index 1eefee5061..9e7ec4cc2a 100644 --- a/core/src/mindustry/world/blocks/power/PowerNode.java +++ b/core/src/mindustry/world/blocks/power/PowerNode.java @@ -182,7 +182,7 @@ public class PowerNode extends PowerBlock{ vx = Mathf.cosDeg(angle1), vy = Mathf.sinDeg(angle1), len1 = size1 * tilesize / 2f - 1.5f, len2 = size2 * tilesize / 2f - 1.5f; - Drawf.laser(team, laser, laserEnd, x1 + vx*len1, y1 + vy*len1, x2 - vx*len2, y2 - vy*len2, laserScale); + Drawf.laser(laser, laserEnd, x1 + vx*len1, y1 + vy*len1, x2 - vx*len2, y2 - vy*len2, laserScale); } protected boolean overlaps(float srcx, float srcy, Tile other, Block otherBlock, float range){ diff --git a/core/src/mindustry/world/blocks/power/ThermalGenerator.java b/core/src/mindustry/world/blocks/power/ThermalGenerator.java index e06ac92e69..6757b47046 100644 --- a/core/src/mindustry/world/blocks/power/ThermalGenerator.java +++ b/core/src/mindustry/world/blocks/power/ThermalGenerator.java @@ -109,7 +109,7 @@ public class ThermalGenerator extends PowerGenerator{ @Override public void drawLight(){ - Drawf.light(team, x, y, (40f + Mathf.absin(10f, 5f)) * Math.min(productionEfficiency, 2f) * size, Color.scarlet, 0.4f); + Drawf.light(x, y, (40f + Mathf.absin(10f, 5f)) * Math.min(productionEfficiency, 2f) * size, Color.scarlet, 0.4f); } @Override diff --git a/core/src/mindustry/world/blocks/production/BeamDrill.java b/core/src/mindustry/world/blocks/production/BeamDrill.java index 8ffbe9cd45..d822a6c6c0 100644 --- a/core/src/mindustry/world/blocks/production/BeamDrill.java +++ b/core/src/mindustry/world/blocks/production/BeamDrill.java @@ -313,12 +313,12 @@ public class BeamDrill extends Block{ if(boostWarmup < 0.99f){ Draw.alpha(1f - boostWarmup); - Drawf.laser(team, laser, laserEnd, lsx, lsy, lx, ly, width); + Drawf.laser(laser, laserEnd, lsx, lsy, lx, ly, width); } if(boostWarmup > 0.001f){ Draw.alpha(boostWarmup); - Drawf.laser(team, laserBoost, laserEndBoost, lsx, lsy, lx, ly, width); + Drawf.laser(laserBoost, laserEndBoost, lsx, lsy, lx, ly, width); } } Draw.color(); diff --git a/core/src/mindustry/world/blocks/storage/CoreBlock.java b/core/src/mindustry/world/blocks/storage/CoreBlock.java index 7daf4d0e27..4c35723103 100644 --- a/core/src/mindustry/world/blocks/storage/CoreBlock.java +++ b/core/src/mindustry/world/blocks/storage/CoreBlock.java @@ -340,7 +340,7 @@ public class CoreBlock extends StorageBlock{ @Override public void drawLight(){ - Drawf.light(team, x, y, lightRadius, Pal.accent, 0.65f + Mathf.absin(20f, 0.1f)); + Drawf.light(x, y, lightRadius, Pal.accent, 0.65f + Mathf.absin(20f, 0.1f)); } @Override diff --git a/core/src/mindustry/world/blocks/units/RepairPoint.java b/core/src/mindustry/world/blocks/units/RepairPoint.java index 2cf2a2b714..4c13a157b9 100644 --- a/core/src/mindustry/world/blocks/units/RepairPoint.java +++ b/core/src/mindustry/world/blocks/units/RepairPoint.java @@ -137,10 +137,10 @@ public class RepairPoint extends Block{ Lines.circle(lastEnd.x, lastEnd.y, 1f + f * pulseRadius); Draw.color(laserColor); - Drawf.laser(team, laser, laserEnd, originX, originY, lastEnd.x, lastEnd.y, strength * beamWidth); + Drawf.laser(laser, laserEnd, originX, originY, lastEnd.x, lastEnd.y, strength * beamWidth); Draw.z(Layer.flyingUnit + 1.1f); Draw.color(laserTopColor); - Drawf.laser(team, laserTop, laserTopEnd, originX, originY, lastEnd.x, lastEnd.y, strength * beamWidth); + Drawf.laser(laserTop, laserTopEnd, originX, originY, lastEnd.x, lastEnd.y, strength * beamWidth); Draw.color(); } } diff --git a/core/src/mindustry/world/draw/DrawFlame.java b/core/src/mindustry/world/draw/DrawFlame.java index 21c359aa44..6a678f4ede 100644 --- a/core/src/mindustry/world/draw/DrawFlame.java +++ b/core/src/mindustry/world/draw/DrawFlame.java @@ -54,6 +54,6 @@ public class DrawFlame extends DrawBlock{ @Override public void drawLight(Building build){ - Drawf.light(build.team, build.x, build.y, (lightRadius + Mathf.absin(lightSinScl, lightSinMag)) * build.warmup() * build.block.size, flameColor, lightAlpha); + Drawf.light(build.x, build.y, (lightRadius + Mathf.absin(lightSinScl, lightSinMag)) * build.warmup() * build.block.size, flameColor, lightAlpha); } }