Skip to content
This repository has been archived by the owner on Mar 2, 2024. It is now read-only.

Commit

Permalink
asset moving
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexejhero committed Jul 21, 2018
1 parent 3e2afc4 commit a1f3f7f
Show file tree
Hide file tree
Showing 23 changed files with 26 additions and 7 deletions.
Binary file added Assets/Main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Main.psd
Binary file not shown.
File renamed without changes.
Binary file added Assets/Other/Built for.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Other/Installer-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Other/Installer-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Other/Installer-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Other/Screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
Binary file added Assets/Other/watermark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Installer/QModInstaller.dll
Binary file not shown.
Binary file modified Installer/QModManager.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion Installer/QModsInstallerScript.iss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#define MyAppName "QModManager (TerraTech)"
#define MyAppVersion "1.3"
#define MyAppPublisher "AlexejheroYTB"
#define MyAppPublisher "AlexejheroYTB, Aceba1 & weskey007"
#define MyAppURL "https://github.com/AlexejheroYTB/TerraTech-QModManager"

[Setup]
Expand Down
Binary file modified Installer/TerraTechQMMSetup.exe
Binary file not shown.
31 changes: 25 additions & 6 deletions QModInstaller/QModPatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using System.Reflection;
using System.Reflection.Emit;
using UnityEngine.UI;
using UnityEngine;

namespace QModInstaller
{
Expand Down Expand Up @@ -179,7 +178,7 @@ public static void Patch()
internal static Version version = new Version(1, 3);

internal static string GetModsLine()
=> $"This game is modded! Using QModManager {version}, amount of mods loaded: {loadedMods.Count} (Check the output log for a complete list of installed mods and respective their load times)";
=> $"This game is modded! Using QModManager {version}, with {loadedMods.Count} loaded mods. (Check the output log for a complete list of installed mods and respective their load times)";

internal static void FlagGame()
{
Expand All @@ -189,8 +188,23 @@ internal static void FlagGame()
sw.Start();

string Id = "ttqmm.internal.modflag";
string Name = "Internal Flagging";
HarmonyInstance.Create(Id).PatchAll(Assembly.GetExecutingAssembly());
string Name = "Game Flagging";

try
{
HarmonyInstance.Create(Id).PatchAll(Assembly.GetExecutingAssembly());
}
catch (Exception e)
{
AddLog("EXCEPTION CAUGHT!");
AddLog(e.Message);
AddLog(e.StackTrace);
if (e.InnerException != null)
{
AddLog(e.InnerException.Message);
AddLog(e.InnerException.StackTrace);
}
}

sw.Stop();

Expand Down Expand Up @@ -372,7 +386,6 @@ internal static void Prefix(UIScreenBugReport __instance)
[HarmonyPatch]
internal static class UIScreenBugReport_PostIt
{
[HarmonyTargetMethod]
internal static MethodInfo TargetMethod()
=> AccessTools.FirstInner(typeof(UIScreenBugReport), (type) => type.Name.Contains("<PostIt>")).GetMethod("MoveNext", AccessTools.all);

Expand All @@ -382,6 +395,8 @@ internal static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruct
{
var codes = new List<CodeInstruction>(instructions);
var codesToInsert = new List<CodeInstruction>();
//for (int i = 0; i < codes.Count; i++)
// Console.WriteLine($"[IL-DEBUG] {i}: {codes[i].opcode} : {codes[i].operand}");

int platformStringIndex = -1;
int callIndex = -1;
Expand Down Expand Up @@ -418,9 +433,13 @@ internal static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruct
}
else
{
QModPatcher.AddLog($"Couldn't find it | DEBUG | platformStringIndex: {platformStringIndex} | callIndex: {callIndex} | ldargs0Index: {ldarg0Index}");
QModPatcher.AddLog($"ERROR! Could not patch UIScreenBugReport.PostIt!");
QModPatcher.AddLog($"platformStringIndex: {platformStringIndex}, callIndex: {callIndex}, ldargs0Index: {ldarg0Index}");
}

//for (int i = 0; i < codes.Count; i++)
// Console.WriteLine($"[IL-DEBUG] {i}: {codes[i].opcode} : {codes[i].operand}");

return codes;
}

Expand Down

0 comments on commit a1f3f7f

Please sign in to comment.