Exemplo n.º 1
0
        public static void PatchModule(ModuleDefinition baseModule)
        {
            var type         = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.TeamSelectOverlay");
            var method       = type.Methods.Single(m => m.FullName == "System.Void TowerFall.TeamSelectOverlay::.ctor(TowerFall.CustomMapButton)");
            var instructions = method.Body.Instructions.ToList();

            instructions.ForEach(i => ChangeFoursToEights(i));
        }
Exemplo n.º 2
0
        public static void PatchModule(ModuleDefinition baseModule)
        {
            var type         = baseModule.AllNestedTypes().Single(t => t.FullName == "Monocle.MInput");
            var method       = type.Methods.Single(m => m.FullName == "System.Void Monocle.MInput::UpdateJoysticks()");
            var instructions = method.Body.Instructions.ToList();

            instructions.ForEach(i => ChangeFoursToEights(i));
        }
Exemplo n.º 3
0
        public static void PatchModule(ModuleDefinition baseModule)
        {
            var type         = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.MenuButtons");
            var method       = type.Methods.Single(m => m.FullName == "System.Void TowerFall.MenuButtons::Update()");
            var instructions = method.Body.Instructions.ToList();

            instructions.ForEach(i => ChangeFoursToEights(i));
        }
Exemplo n.º 4
0
        public static void PatchModule(ModuleDefinition baseModule)
        {
            var type         = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.VersusMatchResults");
            var method       = type.Methods.Single(m => m.FullName == "System.Void TowerFall.VersusMatchResults::.ctor(TowerFall.Session,TowerFall.VersusRoundResults)");
            var instructions = method.Body.Instructions.ToList();

            instructions.ForEach(i => ChangeMethod(i));
        }
Exemplo n.º 5
0
        public static void PatchModule(ModuleDefinition baseModule)
        {
            var type         = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.AwardInfo");
            var method       = type.Methods.Single(m => m.FullName == "Monocle.Sprite`1<System.Int32> TowerFall.AwardInfo::GetSprite(System.Boolean)");
            var instructions = method.Body.Instructions.ToList();
            var proc         = method.Body.GetILProcessor();

            instructions.ForEach(i => GetMethod(i, proc, baseModule));
        }
Exemplo n.º 6
0
        public static void PatchModule(ModuleDefinition baseModule)
        {
            var type         = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.PlayerInput");
            var method       = type.Methods.Single(m => m.FullName == "System.Void TowerFall.PlayerInput::AssignInputs()");
            var instructions = method.Body.Instructions.ToList();

            instructions.ForEach(i => ChangeFoursToEights(i));
            instructions.ForEach(i => ChangeThreesToSevens(i));
        }
Exemplo n.º 7
0
        public static void PatchModule(ModuleDefinition baseModule)
        {
            var type         = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.VersusPlayerMatchResults");
            var subType      = type.NestedTypes.Single(st => st.FullName.Contains("TowerFall.VersusPlayerMatchResults/<Sequence>"));
            var method       = subType.Methods.Single(m => m.FullName.Contains("::MoveNext()"));
            var instructions = method.Body.Instructions.ToList();
            var proc         = method.Body.GetILProcessor();

            instructions.ForEach(i => GetMethodPrelim(i, proc, baseModule));
            instructions.ForEach(i => GetMethod(i, proc, baseModule));
        }
Exemplo n.º 8
0
        public static void PatchModule(ModuleDefinition baseModule)
        {
            var type         = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.VersusAwards");
            var method       = type.Methods.Single(m => m.FullName == "System.Void TowerFall.VersusAwards::AssignAward(TowerFall.MatchSettings,TowerFall.AwardInfo)");
            var instructions = method.Body.Instructions.ToList();

            instructions.ForEach(i => ChangeFoursToEights(i));
            method       = type.Methods.Single(m => m.FullName == "System.Collections.Generic.List`1<TowerFall.AwardInfo>[] TowerFall.VersusAwards::GetAwards(TowerFall.MatchSettings,TowerFall.MatchStats[])");
            instructions = method.Body.Instructions.ToList();
            instructions.ForEach(i => ChangeFoursToEights(i));
        }
Exemplo n.º 9
0
        public static void PatchModule(ModuleDefinition baseModule)
        {
            var type         = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.Session");
            var method       = type.Methods.Single(m => m.FullName == "System.Void TowerFall.Session::.ctor(TowerFall.MatchSettings)");
            var instructions = method.Body.Instructions.ToList();

            instructions.ForEach(i => ChangeFoursToEights(i));
            method       = type.Methods.Single(m => m.FullName == "System.Void TowerFall.Session::EndRound()");
            instructions = method.Body.Instructions.ToList();
            instructions.ForEach(i => ChangeFoursToEights(i));
        }
Exemplo n.º 10
0
        public static void PatchModule(ModuleDefinition baseModule)
        {
            var type         = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.VersusRoundResults");
            var method       = type.Methods.Single(m => m.FullName == "System.Collections.IEnumerator TowerFall.VersusRoundResults::Sequence(System.Collections.Generic.List`1<TowerFall.EventLog>)");
            var instructions = method.Body.Instructions.ToList();

            instructions.ForEach(i => ChangeThreesToSevens(i));
            var subType = type.NestedTypes.Single(st => st.FullName.Contains("TowerFall.VersusRoundResults/<Sequence>"));

            method       = subType.Methods.Single(m => m.FullName.Contains("::MoveNext()"));
            instructions = method.Body.Instructions.ToList();
            instructions.ForEach(i => ChangeThreeToSeven(i));
        }
Exemplo n.º 11
0
        public static void CleanModule(ModuleDefinition baseModule)
        {
            var type              = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.VersusPlayerMatchResults");
            var method            = type.Methods.Single(m => m.FullName == "System.Void TowerFall.VersusPlayerMatchResults::.ctor(TowerFall.Session,TowerFall.VersusMatchResults,System.Int32,Microsoft.Xna.Framework.Vector2,Microsoft.Xna.Framework.Vector2,System.Collections.Generic.List`1<TowerFall.AwardInfo>)");
            var firstInstruction  = method.Body.Instructions.First();
            var secondInstruction = method.Body.Instructions[1];
            var lastInstruction   = method.Body.Instructions.Last();

            method.Body.Instructions.Clear();
            method.Body.Instructions.Add(firstInstruction);
            method.Body.Instructions.Add(secondInstruction);
            method.Body.Instructions.Add(lastInstruction);
        }
Exemplo n.º 12
0
        public static void CleanModule(ModuleDefinition baseModule)
        {
            var type              = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.VariantPerPlayer");
            var method            = type.Methods.Single(m => m.FullName == "System.Void TowerFall.VariantPerPlayer::.ctor(TowerFall.VariantToggle,Microsoft.Xna.Framework.Vector2)");
            var firstInstruction  = method.Body.Instructions.First();
            var secondInstruction = method.Body.Instructions[1];
            var thirdInstruction  = method.Body.Instructions[2];
            var lastInstruction   = method.Body.Instructions.Last();

            method.Body.Instructions.Clear();
            method.Body.Instructions.Add(firstInstruction);
            method.Body.Instructions.Add(secondInstruction);
            method.Body.Instructions.Add(thirdInstruction);
            method.Body.Instructions.Add(lastInstruction);
        }
Exemplo n.º 13
0
        public static void CleanModule(ModuleDefinition baseModule)
        {
            var type         = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.VersusMatchResults");
            var method       = type.Methods.Single(m => m.FullName == "System.Void TowerFall.VersusMatchResults::.ctor(TowerFall.Session,TowerFall.VersusRoundResults)");
            var instructions = method.Body.Instructions.ToList();

            instructions.ForEach(i => GetMethod(i));
            var firstInstruction  = method.Body.Instructions.First();
            var secondInstruction = method.Body.Instructions[1];
            var lastInstruction   = method.Body.Instructions.Last();

            method.Body.Instructions.Clear();
            method.Body.Instructions.Add(firstInstruction);
            method.Body.Instructions.Add(secondInstruction);
            method.Body.Instructions.Add(lastInstruction);
        }
Exemplo n.º 14
0
        public static void PatchModule(ModuleDefinition baseModule)
        {
            var type = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.TFCommands");

            Mono.Cecil.MethodDefinition method;
            try {
                method = type.Methods.Single(m => m.FullName.Contains("System.Void TowerFall.TFCommands::<Init>b__4(System.String[])"));
            }
            catch (System.InvalidOperationException)
            {
                var subType = type.NestedTypes.Single(st => st.FullName == "TowerFall.TFCommands/<>c");
                method = subType.Methods.Single(m => m.FullName.Contains("System.Void TowerFall.TFCommands/<>c::<Init>b__0_4(System.String[])"));
            }
            var instructions = method.Body.Instructions.ToList();

            instructions.ForEach(i => ChangeFoursToEights(i));
        }
Exemplo n.º 15
0
        public static void PatchModule(ModuleDefinition baseModule)
        {
            var type         = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.RoundLogic");
            var method       = type.Methods.Single(m => m.FullName == "System.Void TowerFall.RoundLogic::.ctor(TowerFall.Session,System.Boolean)");
            var instructions = method.Body.Instructions.ToList();

            instructions.ForEach(i => ChangeFoursToEights(i));
            method       = type.Methods.Single(m => m.FullName == "System.Void TowerFall.RoundLogic::FinalKillTeams(TowerFall.PlayerCorpse,TowerFall.Allegiance)");
            instructions = method.Body.Instructions.ToList();
            instructions.ForEach(i => ChangeFoursToEights(i));
            method       = type.Methods.Single(m => m.FullName == "System.Int32 TowerFall.RoundLogic::SpawnPlayersFFA()");
            instructions = method.Body.Instructions.ToList();
            instructions.ForEach(i => ChangeFoursToEights(i));
            method       = type.Methods.Single(m => m.FullName == "System.Void TowerFall.RoundLogic::SpawnPlayersTeams()");
            instructions = method.Body.Instructions.ToList();
            instructions.ForEach(i => ChangeFoursToEights(i));
        }
Exemplo n.º 16
0
        public static void PatchModule(ModuleDefinition baseModule)
        {
            var type         = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.TFGame");
            var method       = type.Methods.Single(m => m.FullName == "System.Void TowerFall.TFGame::.cctor()");
            var instructions = method.Body.Instructions.ToList();

            instructions.ForEach(i => ChangeFoursToEights(i));
            method       = type.Methods.Single(m => m.FullName == "System.Boolean TowerFall.TFGame::CharacterTaken(System.Int32)");
            instructions = method.Body.Instructions.ToList();
            instructions.ForEach(i => ChangeFoursToEights(i));
            method       = type.Methods.Single(m => m.FullName == "System.Void TowerFall.TFGame::Initialize()");
            instructions = method.Body.Instructions.ToList();
            instructions.ForEach(i => ChangeFoursToEights(i));
            method       = type.Methods.Single(m => m.FullName == "System.Void TowerFall.TFGame::Load()");
            instructions = method.Body.Instructions.ToList();
            instructions.ForEach(i => ChangeFoursToEights(i));
            method       = type.Methods.Single(m => m.FullName == "System.Int32 TowerFall.TFGame::get_FirstPlayer()");
            instructions = method.Body.Instructions.ToList();
            instructions.ForEach(i => ChangeFoursToEights(i));
        }
Exemplo n.º 17
0
        public static void PatchModule(ModuleDefinition baseModule)
        {
            var type         = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.Variant");
            var method       = type.Methods.Single(m => m.FullName == "System.Void TowerFall.Variant::.ctor(Monocle.Subtexture,System.String,System.String,TowerFall.Pickups[],System.Boolean,System.String,System.Nullable`1<TowerFall.UnlockData/Unlocks>,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Int32)");
            var instructions = method.Body.Instructions.ToList();

            instructions.ForEach(i => ChangeFoursToEights(i));
            method       = type.Methods.Single(m => m.FullName == "System.Void TowerFall.Variant::Clean(System.Int32)");
            instructions = method.Body.Instructions.ToList();
            instructions.ForEach(i => ChangeFoursToEights(i));
            method       = type.Methods.Single(m => m.FullName == "System.Boolean TowerFall.Variant::get_AllTrue()");
            instructions = method.Body.Instructions.ToList();
            instructions.ForEach(i => ChangeFoursToEights(i));
            method       = type.Methods.Single(m => m.FullName == "System.Int32 TowerFall.Variant::get_Players()");
            instructions = method.Body.Instructions.ToList();
            instructions.ForEach(i => ChangeFoursToEights(i));
            method       = type.Methods.Single(m => m.FullName == "System.Void TowerFall.Variant::set_Value(System.Boolean)");
            instructions = method.Body.Instructions.ToList();
            instructions.ForEach(i => ChangeFoursToEights(i));
            method       = type.Methods.Single(m => m.FullName == "System.Boolean TowerFall.Variant::get_Value()");
            instructions = method.Body.Instructions.ToList();
            instructions.ForEach(i => ChangeFoursToEights(i));
        }