redid capture display. much less annoying.
This commit is contained in:
parent
07098b0b82
commit
b8e573e8f8
@ -5,8 +5,8 @@
|
||||
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/httpcore-4.2.jar"/>
|
||||
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/httpclient-4.2.jar"/>
|
||||
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/commons-codec-1.6.jar"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/Mineplex.Core.Common"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/Nautilus.Core.CraftBukkit"/>
|
||||
<classpathentry kind="var" path="REPO_DIR/Plugins/bin/craftbukkit.jar"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/Mineplex.Core.Common"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
@ -130,7 +130,7 @@ public class Domination extends TeamGame
|
||||
if (!IsLive())
|
||||
return;
|
||||
|
||||
if (event.getType() == UpdateType.FASTER)
|
||||
if (event.getType() == UpdateType.FAST)
|
||||
for (CapturePoint cur : _points)
|
||||
cur.Update();
|
||||
|
||||
|
@ -3,8 +3,10 @@ package nautilus.game.arcade.game.games.common.dominate_data;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.games.common.Domination;
|
||||
@ -17,6 +19,7 @@ import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.FireworkEffect.Type;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@ -42,6 +45,9 @@ public class CapturePoint
|
||||
|
||||
private int _indicatorTick = 0;
|
||||
|
||||
private ChatColor _scoreboardColor = ChatColor.WHITE;
|
||||
private int _scoreboardTick = 0;
|
||||
|
||||
public CapturePoint(Domination host, String name, Location loc)
|
||||
{
|
||||
Host = host;
|
||||
@ -107,7 +113,7 @@ public class CapturePoint
|
||||
if (!_captured)
|
||||
return;
|
||||
|
||||
Host.AddScore(_owner, 2);
|
||||
Host.AddScore(_owner, 4);
|
||||
}
|
||||
|
||||
private void CaptureUpdate()
|
||||
@ -236,6 +242,8 @@ public class CapturePoint
|
||||
|
||||
public void Capture(GameTeam team, int count, Collection<Player> capturers)
|
||||
{
|
||||
_scoreboardColor = team.GetColor();
|
||||
|
||||
//Decay Delay
|
||||
_decayDelay = System.currentTimeMillis();
|
||||
|
||||
@ -307,6 +315,16 @@ public class CapturePoint
|
||||
|
||||
_captureAmount = Math.max(0, (_captureAmount - ((_captureRate*count)+bonus)));
|
||||
|
||||
//Announce
|
||||
if (_owner != null && _captureFloor.size() >= 24)
|
||||
{
|
||||
for (Player player : _owner.GetPlayers(false))
|
||||
{
|
||||
UtilPlayer.message(player, C.Bold + _name + " is being captured...");
|
||||
player.playSound(player.getLocation(), Sound.CAT_MEOW, 1f, 1f);
|
||||
}
|
||||
}
|
||||
|
||||
//Floor Color
|
||||
while ((double)_captureFloor.size()/((double)_captureFloor.size() + (double)_floor.size()) > _captureAmount/_captureMax)
|
||||
{
|
||||
@ -358,20 +376,46 @@ public class CapturePoint
|
||||
|
||||
public void Indicate(Color color)
|
||||
{
|
||||
//Effect
|
||||
for (Block block : _indicators)
|
||||
if (color == Color.RED)
|
||||
block.getWorld().playEffect(block.getLocation(), Effect.STEP_SOUND, 14);
|
||||
else
|
||||
block.getWorld().playEffect(block.getLocation(), Effect.STEP_SOUND, 11);
|
||||
|
||||
//for (Block block : _indicators)
|
||||
Firework(_indicators.get(_indicatorTick).getLocation().add(0.5, 0.5, 0.5), color, false);
|
||||
//Firework(_indicators.get(_indicatorTick).getLocation().add(0.5, 0.5, 0.5), color, false);
|
||||
|
||||
_indicatorTick = (_indicatorTick + 1)%_indicators.size();
|
||||
}
|
||||
|
||||
public String GetScoreboardName()
|
||||
{
|
||||
_scoreboardTick = (_scoreboardTick + 1)%2;
|
||||
|
||||
String out = "";
|
||||
|
||||
if (_scoreboardColor != null && _scoreboardTick == 0)
|
||||
{
|
||||
if (_scoreboardColor == ChatColor.BLUE)
|
||||
_scoreboardColor = ChatColor.AQUA;
|
||||
|
||||
out = _scoreboardColor + C.Bold + _name;
|
||||
_scoreboardColor = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_captured)
|
||||
{
|
||||
if (_owner.GetColor() == ChatColor.BLUE)
|
||||
out = ChatColor.AQUA + _name;
|
||||
else
|
||||
out = _owner.GetColor() + _name;
|
||||
}
|
||||
|
||||
else
|
||||
out = _name;
|
||||
|
||||
}
|
||||
|
||||
if (out.length() > 16)
|
||||
out = out.substring(0, 16);
|
||||
|
Loading…
Reference in New Issue
Block a user