Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
48ed5e2cba
@ -207,6 +207,8 @@ public abstract class Game implements Listener
|
|||||||
public boolean EloRanking = false;
|
public boolean EloRanking = false;
|
||||||
public int EloStart = 1000;
|
public int EloStart = 1000;
|
||||||
|
|
||||||
|
public boolean CanAddStats = true;
|
||||||
|
|
||||||
public ArrayList<String> GemBoosters = new ArrayList<String>();
|
public ArrayList<String> GemBoosters = new ArrayList<String>();
|
||||||
private final Set<StatTracker<? extends Game>> _statTrackers = new HashSet<>();
|
private final Set<StatTracker<? extends Game>> _statTrackers = new HashSet<>();
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ public class Micro extends TeamGame
|
|||||||
if (_blocks.isEmpty())
|
if (_blocks.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
TimingManager.start("Block Fall");
|
//TimingManager.start("Block Fall");
|
||||||
|
|
||||||
for (int i = 0 ; i < 3 ; i++)
|
for (int i = 0 ; i < 3 ; i++)
|
||||||
{
|
{
|
||||||
@ -134,7 +134,7 @@ public class Micro extends TeamGame
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TimingManager.stop("Block Fall");
|
//TimingManager.stop("Block Fall");
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
@ -95,9 +95,9 @@ public class GameAchievementManager implements Listener
|
|||||||
boolean displayDesc = true;
|
boolean displayDesc = true;
|
||||||
|
|
||||||
//Completed Achievement
|
//Completed Achievement
|
||||||
if (data.getLevel() == type.getMaxLevel())
|
if (data.getLevel() >= type.getMaxLevel())
|
||||||
{
|
{
|
||||||
//Finishing for the first time
|
//Finishing for the first time
|
||||||
if (!Manager.GetTaskManager().hasCompletedTask(player, type.getName()))
|
if (!Manager.GetTaskManager().hasCompletedTask(player, type.getName()))
|
||||||
{
|
{
|
||||||
UtilPlayer.message(player, nameLevel + " " + F.elem(C.cAqua + C.Bold + "Completed!") +
|
UtilPlayer.message(player, nameLevel + " " + F.elem(C.cAqua + C.Bold + "Completed!") +
|
||||||
|
@ -271,6 +271,20 @@ public class GameManager implements Listener
|
|||||||
event.GetGame().DeregisterKits();
|
event.GetGame().DeregisterKits();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void StatEnableDisable(GameStateChangeEvent event)
|
||||||
|
{
|
||||||
|
if (event.GetState() != GameState.Live)
|
||||||
|
return;
|
||||||
|
|
||||||
|
int requirement = (int)((double)event.GetGame().Manager.GetPlayerFull() * 0.75d);
|
||||||
|
|
||||||
|
event.GetGame().CanAddStats = (double)event.GetGame().GetPlayers(true).size() >= requirement;
|
||||||
|
|
||||||
|
if (!event.GetGame().CanAddStats)
|
||||||
|
event.GetGame().Announce(C.Bold + "Stats/Achievements Disabled. Requires " + requirement + " Players.");
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void StatRegister(GameStateChangeEvent event)
|
public void StatRegister(GameStateChangeEvent event)
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,7 @@ public class StatTracker<G extends Game> implements Listener
|
|||||||
|
|
||||||
public boolean canAddStats()
|
public boolean canAddStats()
|
||||||
{
|
{
|
||||||
return getGame().GetPlayers(false).size() * 4 >= 3 * getGame().Manager.GetPlayerFull();
|
return getGame().CanAddStats;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addStat(Player player, String stat, int value, boolean limitTo1, boolean global)
|
public void addStat(Player player, String stat, int value, boolean limitTo1, boolean global)
|
||||||
|
Loading…
Reference in New Issue
Block a user