Skip to content

Commit

Permalink
AetherBreaker and Sailing_Squid vanity sets, quick fix for wizard hat…
Browse files Browse the repository at this point in the history
… cutoff
  • Loading branch information
JavidPack committed Feb 5, 2021
1 parent a0bc25e commit d322b8d
Show file tree
Hide file tree
Showing 25 changed files with 145 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria.DataStructures;

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

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

internal class WitchDaggah_Head : PatreonItem
{
public override string SetName => "WitchDaggah";
public override EquipType ItemEquipType => EquipType.Head;

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

internal class AetherBreaker_Body : PatreonItem
{
public override string SetName => "AetherBreaker";
public override EquipType ItemEquipType => EquipType.Body;

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

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

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

internal class AetherBreaker_Wings : PatreonItem
{
public override string SetName => "AetherBreaker";
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.
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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria.DataStructures;

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

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

internal class Sailing_Squid_Body : PatreonItem
{
public override string SetName => "Sailing_Squid";
public override EquipType ItemEquipType => EquipType.Body;

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

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

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

internal class Sailing_Squid_Wings : PatreonItem
{
public override string SetName => "Sailing_Squid";
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.
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.
2 changes: 2 additions & 0 deletions patches/tModLoader/Terraria.ModLoader.Default/ModLoaderMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ private void AddPatronSets() {
new PatreonItem[] { new POCKETS_Head(), new POCKETS_Body(), new POCKETS_Legs(), new POCKETS_Wings() },
new PatreonItem[] { new Guildpack_Head(), new Guildpack_Body(), new Guildpack_Legs() },
new PatreonItem[] { new Elfinlocks_Head(), new Elfinlocks_Body(), new Elfinlocks_Legs() },
new PatreonItem[] { new AetherBreaker_Head(), new AetherBreaker_Body(), new AetherBreaker_Legs(), new AetherBreaker_Wings() , new WitchDaggah_Head() },
new PatreonItem[] { new Sailing_Squid_Head(), new Sailing_Squid_Body(), new Sailing_Squid_Legs(), new Sailing_Squid_Wings() },
};

foreach (var patronItem in PatronSets.SelectMany(x => x)) {
Expand Down
9 changes: 9 additions & 0 deletions patches/tModLoader/Terraria/Main.cs.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3390,6 +3390,15 @@
if (drawPlayer.head == 23) {
if (!drawPlayer.invis) {
value = new DrawData(playerHairTexture[drawPlayer.hair], new Vector2((int)(Position.X - screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2)), (int)(Position.Y - screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f)) + drawPlayer.headPosition + vector3, bodyFrame, color, drawPlayer.headRotation, vector3, 1f, spriteEffects, 0);
@@ -26816,7 +_,7 @@
value.shader = num5;
playerDrawData.Add(value);
}
- else if (drawPlayer.head == 14 || drawPlayer.head == 56 || drawPlayer.head == 114 || drawPlayer.head == 158 || drawPlayer.head == 69 || drawPlayer.head == 180) {
+ else if (drawPlayer.head == 14 || drawPlayer.head == 56 || drawPlayer.head == 114 || drawPlayer.head == 158 || drawPlayer.head == 69 || drawPlayer.head == 180 || drawPlayer.head == ModLoader.Default.ModLoaderMod.Instance.GetEquipSlot("WitchDaggah_Head", EquipType.Head) || drawPlayer.head == ModLoader.Default.ModLoaderMod.Instance.GetEquipSlot("Elfinlocks_Head", EquipType.Head)) { // TODO: This probably needs a field or hook
Microsoft.Xna.Framework.Rectangle bodyFrame3 = drawPlayer.bodyFrame;
Vector2 origin2 = vector3;
if (drawPlayer.gravDir == 1f) {
@@ -26836,7 +_,7 @@
value.shader = num5;
playerDrawData.Add(value);
Expand Down

0 comments on commit d322b8d

Please sign in to comment.