From c318f05cfd150c8a62a0fd8dae7602f9ed7df3f4 Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 16 Oct 2018 17:46:44 -0400 Subject: [PATCH] Minor lightning visual change / Hid PvP mode on web --- core/src/io/anuke/mindustry/content/Mechs.java | 2 +- core/src/io/anuke/mindustry/ui/dialogs/CustomGameDialog.java | 2 +- .../src/io/anuke/mindustry/world/blocks/defense/ShockMine.java | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/io/anuke/mindustry/content/Mechs.java b/core/src/io/anuke/mindustry/content/Mechs.java index 5a37fac3d5..3ea05099ed 100644 --- a/core/src/io/anuke/mindustry/content/Mechs.java +++ b/core/src/io/anuke/mindustry/content/Mechs.java @@ -96,7 +96,7 @@ public class Mechs implements ContentList{ Effects.shake(1f, 1f, player); Effects.effect(UnitFx.landShock, player); for(int i = 0; i < 8; i++){ - Timers.run(Mathf.random(8f), () -> Lightning.create(player.getTeam(), player.getTeam().color, 17f, player.x, player.y, Mathf.random(360f), 14)); + Timers.run(Mathf.random(8f), () -> Lightning.create(player.getTeam(), Palette.lancerLaser, 17f, player.x, player.y, Mathf.random(360f), 14)); } } } diff --git a/core/src/io/anuke/mindustry/ui/dialogs/CustomGameDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/CustomGameDialog.java index 329eead0d2..cfc87d4e67 100644 --- a/core/src/io/anuke/mindustry/ui/dialogs/CustomGameDialog.java +++ b/core/src/io/anuke/mindustry/ui/dialogs/CustomGameDialog.java @@ -48,7 +48,7 @@ public class CustomGameDialog extends FloatingDialog{ modes.marginBottom(5); for(GameMode mode : GameMode.values()){ - if(mode.hidden) continue; + if(mode.hidden || (mode.isPvp && gwt)) continue; modes.addButton("$mode." + mode.name() + ".name", "toggle", () -> state.mode = mode) .update(b -> b.setChecked(state.mode == mode)).group(group).size(140f, 54f).padBottom(-5); diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/ShockMine.java b/core/src/io/anuke/mindustry/world/blocks/defense/ShockMine.java index 9b668969be..46a13ec978 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/ShockMine.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/ShockMine.java @@ -3,6 +3,7 @@ package io.anuke.mindustry.world.blocks.defense; import io.anuke.mindustry.entities.Unit; import io.anuke.mindustry.entities.effect.Lightning; import io.anuke.mindustry.graphics.Layer; +import io.anuke.mindustry.graphics.Palette; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.Tile; import io.anuke.ucore.graphics.Draw; @@ -46,7 +47,7 @@ public class ShockMine extends Block{ public void unitOn(Tile tile, Unit unit){ if(unit.getTeam() != tile.getTeam() && tile.entity.timer.get(timerDamage, cooldown)){ for(int i = 0; i < tendrils; i++){ - Lightning.create(tile.getTeam(), tile.getTeam().color, damage, tile.drawx(), tile.drawy(), Mathf.random(360f), length); + Lightning.create(tile.getTeam(), Palette.lancerLaser, damage, tile.drawx(), tile.drawy(), Mathf.random(360f), length); } tile.entity.damage(tileDamage); }