Add lucky/unlucky tracks to Skyfall

This commit is contained in:
Sarah 2017-04-05 04:40:52 +02:00
parent e4b79a3731
commit acd588ff1a
2 changed files with 13 additions and 5 deletions

View File

@ -14,13 +14,8 @@ import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilItem;
import mineplex.core.common.util.UtilMath;
import mineplex.core.loot.ChestLoot;
<<<<<<< .mine
=======
import mineplex.core.titles.tracks.standard.LuckyTrack;
import mineplex.core.titles.tracks.standard.UnluckyTrack;
>>>>>>> .theirs
/**
* The Island Object represents a flying Island <br/>

View File

@ -67,6 +67,8 @@ import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTime;
import mineplex.core.loot.ChestLoot;
import mineplex.core.recharge.Recharge;
import mineplex.core.titles.tracks.standard.LuckyTrack;
import mineplex.core.titles.tracks.standard.UnluckyTrack;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
@ -85,6 +87,7 @@ import nautilus.game.arcade.game.games.skyfall.stats.AeronaughtStatTracker;
import nautilus.game.arcade.game.games.skyfall.stats.RingStatTracker;
import nautilus.game.arcade.game.games.survivalgames.SupplyChestOpenEvent;
import nautilus.game.arcade.game.modules.VersionModule;
import nautilus.game.arcade.game.modules.compass.CompassModule;
import nautilus.game.arcade.kit.Kit;
import nautilus.game.arcade.stats.FirstSupplyDropOpenStatTracker;
import nautilus.game.arcade.stats.KillsWithinTimeLimitStatTracker;
@ -227,6 +230,10 @@ public abstract class Skyfall extends Game
SoupEnabled = true;
StrictAntiHack = false;
new CompassModule()
.setGiveCompassToAlive(true)
.register(this);
SpeedMeasurement = true;
_bigIslandBounds = 25;
@ -704,6 +711,12 @@ public abstract class Skyfall extends Game
}
island.fillLoot(event.getClickedBlock());
if (event.getPlayer() != null && Manager != null && Manager.GetServerConfig().RewardStats)
{
Manager.getTrackManager().getTrack(LuckyTrack.class).handleLoot(event.getPlayer(), ((Chest) event.getClickedBlock().getState()).getBlockInventory());
Manager.getTrackManager().getTrack(UnluckyTrack.class).handleLoot(event.getPlayer(), ((Chest) event.getClickedBlock().getState()).getBlockInventory());
}
}
// I have no clue why, but this is fixing all food issues