From bdce391bdf777869a644fb550d75519d1f175861 Mon Sep 17 00:00:00 2001 From: Sebastian Ullrich Date: Tue, 12 May 2015 22:21:54 +0200 Subject: [PATCH] Update to Dark World --- DevMod/DevMod.cs | 4 ++-- Mod/GameModes.cs | 13 +++++++------ Mod/Variants.cs | 4 ++-- Patcher/Program.cs | 9 +++++---- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/DevMod/DevMod.cs b/DevMod/DevMod.cs index 109a8b6..441edca 100644 --- a/DevMod/DevMod.cs +++ b/DevMod/DevMod.cs @@ -9,8 +9,8 @@ namespace DevMod [Patch] public class MyPlayer : Player { - public MyPlayer(int playerIndex, Vector2 position, Allegiance allegiance, Allegiance teamColor, PlayerInventory inventory, Player.HatState hatState, bool frozen = true) - : base(playerIndex, position, allegiance, teamColor, inventory, hatState, frozen) + public MyPlayer(int playerIndex, Vector2 position, Allegiance allegiance, Allegiance teamColor, PlayerInventory inventory, Player.HatStates hatState, bool frozen, bool flash, bool indicator) + : base(playerIndex, position, allegiance, teamColor, inventory, hatState, frozen, flash, indicator) { } diff --git a/Mod/GameModes.cs b/Mod/GameModes.cs index 684b192..9477714 100644 --- a/Mod/GameModes.cs +++ b/Mod/GameModes.cs @@ -146,8 +146,8 @@ public class MyVersusRoundResults : VersusRoundResults { private Modes _oldMode; - public MyVersusRoundResults(Session session) - : base(session) + public MyVersusRoundResults(Session session, List events) + : base(session, events) { this._oldMode = session.MatchSettings.Mode; if (this._oldMode == RespawnRoundLogic.Mode || this._oldMode == MobRoundLogic.Mode) @@ -189,7 +189,7 @@ public override void OnLevelLoadFinish() base.Players = base.SpawnPlayersFFA(); } - public override bool CheckForAllButOneDead() + public override bool FFACheckForAllButOneDead() { return false; } @@ -211,7 +211,8 @@ protected Player RespawnPlayer(int playerIndex) List spawnPositions = this.Session.CurrentLevel.GetXMLPositions("PlayerSpawn"); var player = new Player(playerIndex, new Random().Choose(spawnPositions), Allegiance.Neutral, Allegiance.Neutral, - this.Session.GetPlayerInventory(playerIndex), this.Session.GetSpawnHatState(playerIndex), frozen: false); + this.Session.GetPlayerInventory(playerIndex), this.Session.GetSpawnHatState(playerIndex), + frozen: false, flash: false, indicator: true); this.Session.CurrentLevel.Add(player); player.Flash(120, null); Alarm.Set(player, 60, player.RemoveIndicator, Alarm.AlarmMode.Oneshot); @@ -310,9 +311,9 @@ public MyPlayerGhost(PlayerCorpse corpse) this.corpse = corpse; } - public override void Die(int killerIndex, Arrow arrow, Explosion explosion) + public override void Die(int killerIndex, Arrow arrow, Explosion explosion, ShockCircle circle) { - base.Die(killerIndex, arrow, explosion); + base.Die(killerIndex, arrow, explosion, circle); var mobLogic = this.Level.Session.RoundLogic as MobRoundLogic; if (mobLogic != null) { mobLogic.OnPlayerDeath( diff --git a/Mod/Variants.cs b/Mod/Variants.cs index 5629231..6a121c8 100644 --- a/Mod/Variants.cs +++ b/Mod/Variants.cs @@ -35,8 +35,8 @@ public MyMatchVariants() [Patch] public class MyPlayer : Player { - public MyPlayer(int playerIndex, Vector2 position, Allegiance allegiance, Allegiance teamColor, PlayerInventory inventory, Player.HatState hatState, bool frozen = true) - : base(playerIndex, position, allegiance, teamColor, inventory, hatState, frozen) + public MyPlayer(int playerIndex, Vector2 position, Allegiance allegiance, Allegiance teamColor, PlayerInventory inventory, Player.HatStates hatState, bool frozen, bool flash, bool indicator) + : base(playerIndex, position, allegiance, teamColor, inventory, hatState, frozen, flash, indicator) { } diff --git a/Patcher/Program.cs b/Patcher/Program.cs index 5aac2bb..0856a4b 100644 --- a/Patcher/Program.cs +++ b/Patcher/Program.cs @@ -208,7 +208,8 @@ public static void PatchResources() var xml = XElement.Load(Path.Combine("Original", atlasPath + ".xml")); string[] files = Directory.GetFiles(atlasPath, "*.png", SearchOption.AllDirectories); - int x = 700; + int x = 1720; + int y = 1700; using (var baseImage = Bitmap.FromFile(Path.Combine("Original", atlasPath + ".png"))) { using (var g = Graphics.FromImage(baseImage)) @@ -216,15 +217,15 @@ public static void PatchResources() using (var image = Bitmap.FromFile(file)) { string name = file.Substring(atlasPath.Length + 1).Replace(Path.DirectorySeparatorChar, '/'); name = name.Substring(0, name.Length - ".png".Length); - g.DrawImage(image, x, 1700); + g.DrawImage(image, x, y); xml.Add(new XElement("SubTexture", new XAttribute("name", name), new XAttribute("x", x), - new XAttribute("y", 1700), + new XAttribute("y", y), new XAttribute("width", image.Width), new XAttribute("height", image.Height) )); - x += image.Width; + y += image.Height; } baseImage.Save(atlasPath + ".png"); }