Skip to content

Commit

Permalink
Update patches to 0.11.8.6
Browse files Browse the repository at this point in the history
  • Loading branch information
TheStachelfisch committed Jan 21, 2022
1 parent eaf1e56 commit 182d1ef
Show file tree
Hide file tree
Showing 38 changed files with 164 additions and 13 deletions.
10 changes: 5 additions & 5 deletions patches/64bit/Terraria.ModLoader.Engine/InstallVerifier.cs.patch
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@
+ steamAPIPath = "./steam_api64.dll";
- steamAPIHash = ToByteArray("7B857C897BC69313E4936DC3DCCE5193");
+ steamAPIHash = ToByteArray("8AFDE2D19C89D0BF1A9F6EC475AA0EBB".ToUpper());
gogHash = ToByteArray("a198ff662df47b20ef1d1436c5d80f67"); // Don't forget to update CheckExe in CheckGoG
steamHash = ToByteArray("3f1fb331d23db8d6cb9584afa4e5e1a9");
gogHash = ToByteArray("6352ded8d64d0f67fdf10ff2a6f9e51f"); // Don't forget to update CheckExe in CheckGoG
steamHash = ToByteArray("201707bba92e27f09d05529e2f051c60");
}
- else if (Platform.IsOSX) {
+ else if (PlatformUtilities.IsOSX) {
steamAPIPath = "osx/libsteam_api.dylib";
steamAPIHash = ToByteArray("4EECD26A0CDF89F90D4FF26ECAD37BE0");
gogHash = ToByteArray("2d877e9d74d0a382e45d75ff008969d3");
steamHash = ToByteArray("291b15544aff1e1226ebff119066537d");
gogHash = ToByteArray("7b8d96e0ef583164d565dc01be4b5627");
steamHash = ToByteArray("0b253fbe529ea3e2ac61a0658f43af94");
}
- else if (Platform.IsLinux) {
+ else if (PlatformUtilities.IsLinux) {
steamAPIPath = "lib/libsteam_api.so";
steamAPIHash = ToByteArray("7B74FD4C207D22DB91B4B649A44467F6");
gogHash = ToByteArray("a37d05f005181bd1bacaa5b82d6fab0d");
gogHash = ToByteArray("fa53f0a39be5698da7a15a1cc9e56689");
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria.DataStructures;

namespace Terraria.ModLoader.Default.Patreon
{
internal class AlejandroAkbal_Head : PatreonItem
{
public override string SetName => "AlejandroAkbal";
public override EquipType ItemEquipType => EquipType.Head;

public override void SetDefaults() {
base.SetDefaults();
item.width = 34;
item.height = 22;
}
}

// female sprite was pretty much the same and made it difficult to support, so ommitted.
internal class AlejandroAkbal_Body : PatreonItem
{
public override string SetName => "AlejandroAkbal";
public override EquipType ItemEquipType => EquipType.Body;

public override void SetDefaults() {
base.SetDefaults();
item.width = 42;
item.height = 24;
}
}

internal class AlejandroAkbal_Legs : PatreonItem
{
public override string SetName => "AlejandroAkbal";
public override EquipType ItemEquipType => EquipType.Legs;

public override void SetDefaults() {
base.SetDefaults();
item.width = 22;
item.height = 18;
}
}

internal class AlejandroAkbal_Back : PatreonItem
{
public override string SetName => "AlejandroAkbal";
public override EquipType ItemEquipType => EquipType.Back;

public override void SetDefaults() {
base.SetDefaults();
item.width = 22;
item.height = 18;
item.accessory = true;
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ public static PatronModPlayer Player(Player player)

public bool OrianSet;
public bool GuildpackSet;
public bool SaetharSet;

public override void ResetEffects() {
OrianSet = false;
GuildpackSet = false;
SaetharSet = false;
}

public override void PostUpdate() {
Expand Down Expand Up @@ -65,6 +67,11 @@ public override void ModifyDrawLayers(List<PlayerLayer> layers) {
if (headLayerIndex != -1)
layers.Insert(headLayerIndex + 1, Guildpack_Head.EyeGlow);
}
if (SaetharSet) {
int headLayerIndex = layers.FindIndex(x => x == PlayerLayer.Head);
if (headLayerIndex != -1)
layers.Insert(headLayerIndex + 1, Saethar_Head.EyeGlow);
}
}
}
}
22 changes: 22 additions & 0 deletions patches/tModLoader/Terraria.ModLoader.Default.Patreon/Saethar.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria.DataStructures;

namespace Terraria.ModLoader.Default.Patreon
{
Expand All @@ -7,10 +10,29 @@ internal class Saethar_Head : PatreonItem
public override string SetName => "Saethar";
public override EquipType ItemEquipType => EquipType.Head;

public override bool IsVanitySet(int head, int body, int legs) {
return head == mod.GetEquipSlot($"{SetName}_{EquipType.Head}", EquipType.Head)
&& body == mod.GetEquipSlot($"{SetName}_{EquipType.Body}", EquipType.Body)
&& legs == mod.GetEquipSlot($"{SetName}_{EquipType.Legs}", EquipType.Legs);
}

public override void UpdateVanitySet(Player player) {
PatronModPlayer.Player(player).SaetharSet = true;
}

public override void SetDefaults() {
base.SetDefaults();
item.Size = new Vector2(34);
}

public static readonly PlayerLayer EyeGlow = new PlayerLayer("ModLoader", "EyeGlow", PlayerLayer.Head, delegate (PlayerDrawInfo drawInfo) {
Player drawPlayer = drawInfo.drawPlayer;
Mod mod = ModLoader.GetMod("ModLoader");
Texture2D texture = mod.GetTexture("Patreon.Saethar_Head_Glow");
DrawData data = new DrawData(texture,
new Vector2((int)(drawInfo.position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2)), (int)(drawInfo.position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f)) + drawPlayer.headPosition + drawInfo.headOrigin, drawPlayer.bodyFrame, Color.White, drawPlayer.headRotation, drawInfo.headOrigin, 1f, drawInfo.spriteEffects, 0);
Main.playerDrawData.Add(data);
});
}

internal class Saethar_Body : PatreonItem
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions patches/tModLoader/Terraria.ModLoader.Default.Patreon/dschosen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria.DataStructures;

namespace Terraria.ModLoader.Default.Patreon
{
internal class dschosen_Head : PatreonItem
{
public override string SetName => "dschosen";
public override EquipType ItemEquipType => EquipType.Head;

public override void SetDefaults() {
base.SetDefaults();
item.width = 34;
item.height = 22;
}
}

// female sprite was pretty much the same and made it difficult to support, so ommitted.
internal class dschosen_Body : PatreonItem
{
public override string SetName => "dschosen";
public override EquipType ItemEquipType => EquipType.Body;

public override void SetDefaults() {
base.SetDefaults();
item.width = 42;
item.height = 24;
}
}

internal class dschosen_Legs : PatreonItem
{
public override string SetName => "dschosen";
public override EquipType ItemEquipType => EquipType.Legs;

public override void SetDefaults() {
base.SetDefaults();
item.width = 22;
item.height = 18;
}
}

internal class dschosen_Wings : PatreonItem
{
public override string SetName => "dschosen";
public override EquipType ItemEquipType => EquipType.Wings;

public override void SetDefaults() {
base.SetDefaults();
item.vanity = false;
item.width = 24;
item.height = 8;
item.accessory = true;
}

public override void UpdateAccessory(Player player, bool hideVisual) {
player.wingTimeMax = 150;
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions patches/tModLoader/Terraria.ModLoader.Default/ModLoaderMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ private void AddPatronSets() {
new PatreonItem[] { new Sailing_Squid_Head(), new Sailing_Squid_Body(), new Sailing_Squid_Legs(), new Sailing_Squid_Wings() },
new PatreonItem[] { new Coolmike5000_Head(), new Coolmike5000_Body(), new Coolmike5000_Legs(), new Coolmike5000_Wings() },
new PatreonItem[] { new Zeph_Head(), new Zeph_Body(), new Zeph_Legs(), new Zeph_Wings() },
new PatreonItem[] { new dschosen_Head(), new dschosen_Body(), new dschosen_Legs(), new dschosen_Wings() },
new PatreonItem[] { new AlejandroAkbal_Head(), new AlejandroAkbal_Body(), new AlejandroAkbal_Legs(), new AlejandroAkbal_Back() },
};

foreach (var patronItem in PatronSets.SelectMany(x => x)) {
Expand All @@ -83,6 +85,7 @@ private void AddPatronSets() {
{
AddTexture($"Patreon.Guildpack_Aura", ReadTexture($"Patreon.Guildpack_Aura"));
AddTexture($"Patreon.Guildpack_Head_Glow", ReadTexture($"Patreon.Guildpack_Head_Glow"));
AddTexture($"Patreon.Saethar_Head_Glow", ReadTexture($"Patreon.Saethar_Head_Glow"));
}
}

Expand Down
14 changes: 7 additions & 7 deletions patches/tModLoader/Terraria.ModLoader.Engine/InstallVerifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ static InstallVerifier()
if (Platform.IsWindows) {
steamAPIPath = "steam_api.dll";
steamAPIHash = ToByteArray("7B857C897BC69313E4936DC3DCCE5193");
gogHash = ToByteArray("a198ff662df47b20ef1d1436c5d80f67"); // Don't forget to update CheckExe in CheckGoG
steamHash = ToByteArray("3f1fb331d23db8d6cb9584afa4e5e1a9");
gogHash = ToByteArray("6352ded8d64d0f67fdf10ff2a6f9e51f"); // Don't forget to update CheckExe in CheckGoG
steamHash = ToByteArray("201707bba92e27f09d05529e2f051c60");
}
else if (Platform.IsOSX) {
steamAPIPath = "osx/libsteam_api.dylib";
steamAPIHash = ToByteArray("4EECD26A0CDF89F90D4FF26ECAD37BE0");
gogHash = ToByteArray("2d877e9d74d0a382e45d75ff008969d3");
steamHash = ToByteArray("291b15544aff1e1226ebff119066537d");
gogHash = ToByteArray("7b8d96e0ef583164d565dc01be4b5627");
steamHash = ToByteArray("0b253fbe529ea3e2ac61a0658f43af94");
}
else if (Platform.IsLinux) {
steamAPIPath = "lib/libsteam_api.so";
steamAPIHash = ToByteArray("7B74FD4C207D22DB91B4B649A44467F6");
gogHash = ToByteArray("a37d05f005181bd1bacaa5b82d6fab0d");
steamHash = ToByteArray("15eb9336a908769ffba388549020a083");
gogHash = ToByteArray("fa53f0a39be5698da7a15a1cc9e56689");
steamHash = ToByteArray("ab57cfd9076ab0c0eab9f46a412b8422");
}
else {
string message = Language.GetTextValue("tModLoader.UnknownVerificationOS");
Expand Down Expand Up @@ -122,7 +122,7 @@ private static bool CheckGoG()
IsGoG = true;

const string DefaultExe = "Terraria.exe";
string CheckExe = $"Terraria_1.4.2.3.exe"; // This should match the hashes. {Main.versionNumber}
string CheckExe = $"Terraria_1.4.3.2.exe"; // This should match the hashes. {Main.versionNumber}
string vanillaPath = File.Exists(CheckExe) ? CheckExe : DefaultExe;

// If .exe not present, check Terraria directory (Side-by-Side Manual Install)
Expand Down
2 changes: 1 addition & 1 deletion patches/tModLoader/Terraria.ModLoader/ModLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace Terraria.ModLoader
/// </summary>
public static class ModLoader
{
public static readonly Version version = new Version(0, 11, 8, 5);
public static readonly Version version = new Version(0, 11, 8, 6);
// Stores the most recent version of tModLoader launched. Can be used for migration.
public static Version LastLaunchedTModLoaderVersion;
// public static bool ShowWhatsNew;
Expand Down

0 comments on commit 182d1ef

Please sign in to comment.