Fixed disguises in bacon brawl

This commit is contained in:
Chiss 2013-09-23 16:00:35 +10:00
parent eae38dfa22
commit ce89108aea
7 changed files with 12 additions and 6 deletions

View File

@ -20,6 +20,7 @@ import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.GameType;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.events.PlayerStateChangeEvent;
import nautilus.game.arcade.game.Game.GameState;
import nautilus.game.arcade.game.GameTeam.PlayerState;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.kit.KitAvailability;
@ -158,6 +159,8 @@ public abstract class Game implements Listener
public boolean DisplayLobbySide = true;
public boolean AutoStart = true;
public GameState KitRegisterState = GameState.Live;
//Addons
public boolean CompassEnabled = false;

View File

@ -82,7 +82,7 @@ public class BaconBrawl extends SoloGame
if (player.getFoodLevel() <= 0)
{
Manager.GetDamage().NewDamageEvent(player, null, null,
DamageCause.STARVATION, 1, false, true, false,
DamageCause.STARVATION, 4, false, true, false,
"Starvation", GetName());
}

View File

@ -45,6 +45,7 @@ public class KitBabyPig extends Kit
DisguiseChicken disguise = new DisguiseChicken(player);
disguise.SetName(C.cYellow + player.getName());
disguise.SetCustomNameVisible(true);
disguise.setBaby();
Manager.GetDisguise().disguise(disguise);
}
}

View File

@ -13,7 +13,7 @@ import org.bukkit.inventory.ItemStack;
import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.disguise.disguises.DisguisePig;
import mineplex.core.disguise.disguises.DisguiseSheep;
import mineplex.core.itemstack.ItemStackFactory;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.kit.Kit;
@ -49,9 +49,10 @@ public class KitSheepPig extends Kit
C.cYellow + C.Bold + "Right-Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Cloak"));
//Disguise
DisguisePig disguise = new DisguisePig(player);
DisguiseSheep disguise = new DisguiseSheep(player);
disguise.SetName(C.cYellow + player.getName());
disguise.SetCustomNameVisible(true);
disguise.setColor(DyeColor.PINK);
Manager.GetDisguise().disguise(disguise);
}

View File

@ -50,6 +50,7 @@ public class SquidShooter extends SoloGame
this.PrepareFreeze = false;
this.SpawnDistanceRequirement = 16;
this.CompassEnabled = true;
this.KitRegisterState = GameState.Prepare;
}
@EventHandler(priority = EventPriority.HIGH)
@ -143,7 +144,7 @@ public class SquidShooter extends SoloGame
@EventHandler
public void AirDamage(UpdateEvent event)
{
if (event.getType() != UpdateType.FASTER)
if (event.getType() != UpdateType.FASTEST)
return;
if (!IsLive())

View File

@ -598,7 +598,7 @@ public class GameFlagManager implements Listener
if (!game.PrepareFreeze)
return;
if (UtilMath.offset(event.getFrom(), event.getTo()) <= 0)
if (UtilMath.offset2d(event.getFrom(), event.getTo()) <= 0)
return;
event.getFrom().setPitch(event.getTo().getPitch());

View File

@ -210,7 +210,7 @@ public class GameManager implements Listener
@EventHandler
public void KitRegister(GameStateChangeEvent event)
{
if (event.GetState() != GameState.Live)
if (event.GetState() != event.GetGame().KitRegisterState)
return;
event.GetGame().RegisterKits();