Skip to content

Commit

Permalink
Patron sets for HER0zero and Mayne; adjusted rates for patron/dev sets
Browse files Browse the repository at this point in the history
  • Loading branch information
blushiemagic committed Jul 3, 2023
1 parent 3195f53 commit 1ccac01
Show file tree
Hide file tree
Showing 29 changed files with 267 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,9 @@
// "ModLoader.Items.Guildpack_Body.DisplayName": "Guildpack's Body",
// "ModLoader.Items.Guildpack_Head.DisplayName": "Guildpack's Head",
// "ModLoader.Items.Guildpack_Legs.DisplayName": "Guildpack's Legs",
// "ModLoader.Items.HER0zero_Body.DisplayName": "HER0zero's Body",
// "ModLoader.Items.HER0zero_Head.DisplayName": "HER0zero's Head",
// "ModLoader.Items.HER0zero_Legs.DisplayName": "HER0zero's Legs",
// "ModLoader.Items.KittyKitCatCat_Body.DisplayName": "KittyKitCatCat's Body",
// "ModLoader.Items.KittyKitCatCat_Head.DisplayName": "KittyKitCatCat's Head",
// "ModLoader.Items.KittyKitCatCat_Legs.DisplayName": "KittyKitCatCat's Legs",
Expand All @@ -875,6 +878,10 @@
// "ModLoader.Items.Linus_Legs.Tooltip": "'One of the standard articles of hunter attire, fashioned at the workshop.\nAllows one to stalk beasts unannounced, by cover of night.'",
// "ModLoader.Items.Linus_Wings.DisplayName": "A Call Beyond",
// "ModLoader.Items.Linus_Wings.Tooltip": "'One of the secret rites of the Choir.\nBut it seems to have been repurposed by Linus.'",
// "ModLoader.Items.Mayne_Body.DisplayName": "Mayne's Body",
// "ModLoader.Items.Mayne_Head.DisplayName": "Mayne's Head",
// "ModLoader.Items.Mayne_Legs.DisplayName": "Mayne's Legs",
// "ModLoader.Items.Mayne_Wings.DisplayName": "Mayne's Wings",
// "ModLoader.Items.Orian_Body.DisplayName": "Orian's Body",
// "ModLoader.Items.Orian_Head.DisplayName": "Orian's Head",
// "ModLoader.Items.Orian_Legs.DisplayName": "Orian's Legs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,9 @@
"ModLoader.Items.Guildpack_Body.DisplayName": "Guildpack's Body",
"ModLoader.Items.Guildpack_Head.DisplayName": "Guildpack's Head",
"ModLoader.Items.Guildpack_Legs.DisplayName": "Guildpack's Legs",
"ModLoader.Items.HER0zero_Body.DisplayName": "HER0zero's Body",
"ModLoader.Items.HER0zero_Head.DisplayName": "HER0zero's Head",
"ModLoader.Items.HER0zero_Legs.DisplayName": "HER0zero's Legs",
"ModLoader.Items.KittyKitCatCat_Body.DisplayName": "KittyKitCatCat's Body",
"ModLoader.Items.KittyKitCatCat_Head.DisplayName": "KittyKitCatCat's Head",
"ModLoader.Items.KittyKitCatCat_Legs.DisplayName": "KittyKitCatCat's Legs",
Expand All @@ -875,6 +878,10 @@
"ModLoader.Items.Linus_Legs.Tooltip": "'One of the standard articles of hunter attire, fashioned at the workshop.\nAllows one to stalk beasts unannounced, by cover of night.'",
"ModLoader.Items.Linus_Wings.DisplayName": "A Call Beyond",
"ModLoader.Items.Linus_Wings.Tooltip": "'One of the secret rites of the Choir.\nBut it seems to have been repurposed by Linus.'",
"ModLoader.Items.Mayne_Body.DisplayName": "Mayne's Body",
"ModLoader.Items.Mayne_Head.DisplayName": "Mayne's Head",
"ModLoader.Items.Mayne_Legs.DisplayName": "Mayne's Legs",
"ModLoader.Items.Mayne_Wings.DisplayName": "Mayne's Wings",
"ModLoader.Items.Orian_Body.DisplayName": "Orian's Body",
"ModLoader.Items.Orian_Head.DisplayName": "Orian's Head",
"ModLoader.Items.Orian_Legs.DisplayName": "Orian's Legs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,9 @@
// "ModLoader.Items.Guildpack_Body.DisplayName": "Guildpack's Body",
// "ModLoader.Items.Guildpack_Head.DisplayName": "Guildpack's Head",
// "ModLoader.Items.Guildpack_Legs.DisplayName": "Guildpack's Legs",
// "ModLoader.Items.HER0zero_Body.DisplayName": "HER0zero's Body",
// "ModLoader.Items.HER0zero_Head.DisplayName": "HER0zero's Head",
// "ModLoader.Items.HER0zero_Legs.DisplayName": "HER0zero's Legs",
// "ModLoader.Items.KittyKitCatCat_Body.DisplayName": "KittyKitCatCat's Body",
// "ModLoader.Items.KittyKitCatCat_Head.DisplayName": "KittyKitCatCat's Head",
// "ModLoader.Items.KittyKitCatCat_Legs.DisplayName": "KittyKitCatCat's Legs",
Expand All @@ -875,6 +878,10 @@
// "ModLoader.Items.Linus_Legs.Tooltip": "'One of the standard articles of hunter attire, fashioned at the workshop.\nAllows one to stalk beasts unannounced, by cover of night.'",
// "ModLoader.Items.Linus_Wings.DisplayName": "A Call Beyond",
// "ModLoader.Items.Linus_Wings.Tooltip": "'One of the secret rites of the Choir.\nBut it seems to have been repurposed by Linus.'",
// "ModLoader.Items.Mayne_Body.DisplayName": "Mayne's Body",
// "ModLoader.Items.Mayne_Head.DisplayName": "Mayne's Head",
// "ModLoader.Items.Mayne_Legs.DisplayName": "Mayne's Legs",
// "ModLoader.Items.Mayne_Wings.DisplayName": "Mayne's Wings",
// "ModLoader.Items.Orian_Body.DisplayName": "Orian's Body",
// "ModLoader.Items.Orian_Head.DisplayName": "Orian's Head",
// "ModLoader.Items.Orian_Legs.DisplayName": "Orian's Legs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,9 @@
// "ModLoader.Items.Guildpack_Body.DisplayName": "Guildpack's Body",
// "ModLoader.Items.Guildpack_Head.DisplayName": "Guildpack's Head",
// "ModLoader.Items.Guildpack_Legs.DisplayName": "Guildpack's Legs",
// "ModLoader.Items.HER0zero_Body.DisplayName": "HER0zero's Body",
// "ModLoader.Items.HER0zero_Head.DisplayName": "HER0zero's Head",
// "ModLoader.Items.HER0zero_Legs.DisplayName": "HER0zero's Legs",
// "ModLoader.Items.KittyKitCatCat_Body.DisplayName": "KittyKitCatCat's Body",
// "ModLoader.Items.KittyKitCatCat_Head.DisplayName": "KittyKitCatCat's Head",
// "ModLoader.Items.KittyKitCatCat_Legs.DisplayName": "KittyKitCatCat's Legs",
Expand All @@ -875,6 +878,10 @@
// "ModLoader.Items.Linus_Legs.Tooltip": "'One of the standard articles of hunter attire, fashioned at the workshop.\nAllows one to stalk beasts unannounced, by cover of night.'",
// "ModLoader.Items.Linus_Wings.DisplayName": "A Call Beyond",
// "ModLoader.Items.Linus_Wings.Tooltip": "'One of the secret rites of the Choir.\nBut it seems to have been repurposed by Linus.'",
// "ModLoader.Items.Mayne_Body.DisplayName": "Mayne's Body",
// "ModLoader.Items.Mayne_Head.DisplayName": "Mayne's Head",
// "ModLoader.Items.Mayne_Legs.DisplayName": "Mayne's Legs",
// "ModLoader.Items.Mayne_Wings.DisplayName": "Mayne's Wings",
// "ModLoader.Items.Orian_Body.DisplayName": "Orian's Body",
// "ModLoader.Items.Orian_Head.DisplayName": "Orian's Head",
// "ModLoader.Items.Orian_Legs.DisplayName": "Orian's Legs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,9 @@
// "ModLoader.Items.Guildpack_Body.DisplayName": "Guildpack's Body",
// "ModLoader.Items.Guildpack_Head.DisplayName": "Guildpack's Head",
// "ModLoader.Items.Guildpack_Legs.DisplayName": "Guildpack's Legs",
// "ModLoader.Items.HER0zero_Body.DisplayName": "HER0zero's Body",
// "ModLoader.Items.HER0zero_Head.DisplayName": "HER0zero's Head",
// "ModLoader.Items.HER0zero_Legs.DisplayName": "HER0zero's Legs",
// "ModLoader.Items.KittyKitCatCat_Body.DisplayName": "KittyKitCatCat's Body",
// "ModLoader.Items.KittyKitCatCat_Head.DisplayName": "KittyKitCatCat's Head",
// "ModLoader.Items.KittyKitCatCat_Legs.DisplayName": "KittyKitCatCat's Legs",
Expand All @@ -877,6 +880,10 @@
// "ModLoader.Items.Linus_Legs.Tooltip": "'One of the standard articles of hunter attire, fashioned at the workshop.\nAllows one to stalk beasts unannounced, by cover of night.'",
// "ModLoader.Items.Linus_Wings.DisplayName": "A Call Beyond",
// "ModLoader.Items.Linus_Wings.Tooltip": "'One of the secret rites of the Choir.\nBut it seems to have been repurposed by Linus.'",
// "ModLoader.Items.Mayne_Body.DisplayName": "Mayne's Body",
// "ModLoader.Items.Mayne_Head.DisplayName": "Mayne's Head",
// "ModLoader.Items.Mayne_Legs.DisplayName": "Mayne's Legs",
// "ModLoader.Items.Mayne_Wings.DisplayName": "Mayne's Wings",
// "ModLoader.Items.Orian_Body.DisplayName": "Orian's Body",
// "ModLoader.Items.Orian_Head.DisplayName": "Orian's Head",
// "ModLoader.Items.Orian_Legs.DisplayName": "Orian's Legs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,9 @@
// "ModLoader.Items.Guildpack_Body.DisplayName": "Guildpack's Body",
// "ModLoader.Items.Guildpack_Head.DisplayName": "Guildpack's Head",
// "ModLoader.Items.Guildpack_Legs.DisplayName": "Guildpack's Legs",
// "ModLoader.Items.HER0zero_Body.DisplayName": "HER0zero's Body",
// "ModLoader.Items.HER0zero_Head.DisplayName": "HER0zero's Head",
// "ModLoader.Items.HER0zero_Legs.DisplayName": "HER0zero's Legs",
// "ModLoader.Items.KittyKitCatCat_Body.DisplayName": "KittyKitCatCat's Body",
// "ModLoader.Items.KittyKitCatCat_Head.DisplayName": "KittyKitCatCat's Head",
// "ModLoader.Items.KittyKitCatCat_Legs.DisplayName": "KittyKitCatCat's Legs",
Expand All @@ -875,6 +878,10 @@
// "ModLoader.Items.Linus_Legs.Tooltip": "'One of the standard articles of hunter attire, fashioned at the workshop.\nAllows one to stalk beasts unannounced, by cover of night.'",
// "ModLoader.Items.Linus_Wings.DisplayName": "A Call Beyond",
// "ModLoader.Items.Linus_Wings.Tooltip": "'One of the secret rites of the Choir.\nBut it seems to have been repurposed by Linus.'",
// "ModLoader.Items.Mayne_Body.DisplayName": "Mayne's Body",
// "ModLoader.Items.Mayne_Head.DisplayName": "Mayne's Head",
// "ModLoader.Items.Mayne_Legs.DisplayName": "Mayne's Legs",
// "ModLoader.Items.Mayne_Wings.DisplayName": "Mayne's Wings",
// "ModLoader.Items.Orian_Body.DisplayName": "Orian's Body",
// "ModLoader.Items.Orian_Head.DisplayName": "Orian's Head",
// "ModLoader.Items.Orian_Legs.DisplayName": "Orian's Legs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,9 @@
"ModLoader.Items.Guildpack_Body.DisplayName": "Corpo de Guildpack",
"ModLoader.Items.Guildpack_Head.DisplayName": "Cabeça de Guildpack",
"ModLoader.Items.Guildpack_Legs.DisplayName": "Pernas de Guildpack",
// "ModLoader.Items.HER0zero_Body.DisplayName": "HER0zero's Body",
// "ModLoader.Items.HER0zero_Head.DisplayName": "HER0zero's Head",
// "ModLoader.Items.HER0zero_Legs.DisplayName": "HER0zero's Legs",
"ModLoader.Items.KittyKitCatCat_Body.DisplayName": "Corpo de KittyKitCatCat",
"ModLoader.Items.KittyKitCatCat_Head.DisplayName": "Cabeça de KittyKitCatCat",
"ModLoader.Items.KittyKitCatCat_Legs.DisplayName": "Pernas de KittyKitCatCat",
Expand All @@ -875,6 +878,10 @@
"ModLoader.Items.Linus_Legs.Tooltip": "'Um dos artigos padrão do traje de caçador, confeccionado na oficina.\nPermite que alguém persiga feras sem ser percebido, na calada da noite.'",
"ModLoader.Items.Linus_Wings.DisplayName": "Uma Chamada do Além",
"ModLoader.Items.Linus_Wings.Tooltip": "'Um dos ritos secretos do Coro.\nMas parece ter sido reaproveitado por Linus.'",
// "ModLoader.Items.Mayne_Body.DisplayName": "Mayne's Body",
// "ModLoader.Items.Mayne_Head.DisplayName": "Mayne's Head",
// "ModLoader.Items.Mayne_Legs.DisplayName": "Mayne's Legs",
// "ModLoader.Items.Mayne_Wings.DisplayName": "Mayne's Wings",
"ModLoader.Items.Orian_Body.DisplayName": "Corpo de Orian",
"ModLoader.Items.Orian_Head.DisplayName": "Cabeça de Orian",
"ModLoader.Items.Orian_Legs.DisplayName": "Pernas de Orian",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,9 @@
"ModLoader.Items.Guildpack_Body.DisplayName": "Тело Guildpack",
"ModLoader.Items.Guildpack_Head.DisplayName": "Голова Guildpack",
"ModLoader.Items.Guildpack_Legs.DisplayName": "Ноги Guildpack",
// "ModLoader.Items.HER0zero_Body.DisplayName": "HER0zero's Body",
// "ModLoader.Items.HER0zero_Head.DisplayName": "HER0zero's Head",
// "ModLoader.Items.HER0zero_Legs.DisplayName": "HER0zero's Legs",
"ModLoader.Items.KittyKitCatCat_Body.DisplayName": "Тело KittyKitCatCat",
"ModLoader.Items.KittyKitCatCat_Head.DisplayName": "Голова KittyKitCatCat",
"ModLoader.Items.KittyKitCatCat_Legs.DisplayName": "Ноги KittyKitCatCat",
Expand All @@ -875,6 +878,10 @@
"ModLoader.Items.Linus_Legs.Tooltip": "'Один из стандартных предметов охотничьей одежды, изготовленный в мастерской\nПозволяет скрытно преследовать чудовищ под покровом ночи'",
"ModLoader.Items.Linus_Wings.DisplayName": "Зов вовне",
"ModLoader.Items.Linus_Wings.Tooltip": "'Один из тайных ритуалов Хора\nНо кажется, что их переделал Linus'",
// "ModLoader.Items.Mayne_Body.DisplayName": "Mayne's Body",
// "ModLoader.Items.Mayne_Head.DisplayName": "Mayne's Head",
// "ModLoader.Items.Mayne_Legs.DisplayName": "Mayne's Legs",
// "ModLoader.Items.Mayne_Wings.DisplayName": "Mayne's Wings",
"ModLoader.Items.Orian_Body.DisplayName": "Тело Orian",
"ModLoader.Items.Orian_Head.DisplayName": "Голова Orian",
"ModLoader.Items.Orian_Legs.DisplayName": "Ноги Orian",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,9 @@
"ModLoader.Items.Guildpack_Body.DisplayName": "Guildpack之铠",
"ModLoader.Items.Guildpack_Head.DisplayName": "Guildpack之盔",
"ModLoader.Items.Guildpack_Legs.DisplayName": "Guildpack护腿",
// "ModLoader.Items.HER0zero_Body.DisplayName": "HER0zero's Body",
// "ModLoader.Items.HER0zero_Head.DisplayName": "HER0zero's Head",
// "ModLoader.Items.HER0zero_Legs.DisplayName": "HER0zero's Legs",
"ModLoader.Items.KittyKitCatCat_Body.DisplayName": "KittyKitCatCat之铠",
"ModLoader.Items.KittyKitCatCat_Head.DisplayName": "KittyKitCatCat之盔",
"ModLoader.Items.KittyKitCatCat_Legs.DisplayName": "KittyKitCatCat护腿",
Expand All @@ -876,6 +879,10 @@
"ModLoader.Items.Linus_Legs.Tooltip": "'工坊的标准猎人装备之一。可以在夜色的掩护下悄悄地追踪野兽。'",
"ModLoader.Items.Linus_Wings.DisplayName": "遥远的呼唤",
"ModLoader.Items.Linus_Wings.Tooltip": "'唱诗班的秘密仪式之一,不过已经被Linus发掘出新的用途'",
// "ModLoader.Items.Mayne_Body.DisplayName": "Mayne's Body",
// "ModLoader.Items.Mayne_Head.DisplayName": "Mayne's Head",
// "ModLoader.Items.Mayne_Legs.DisplayName": "Mayne's Legs",
// "ModLoader.Items.Mayne_Wings.DisplayName": "Mayne's Wings",
"ModLoader.Items.Orian_Body.DisplayName": "Orian之铠",
"ModLoader.Items.Orian_Head.DisplayName": "Orian之盔",
"ModLoader.Items.Orian_Legs.DisplayName": "Orian护腿",
Expand Down
4 changes: 2 additions & 2 deletions patches/tModLoader/Terraria/ModLoader/Default/ModLoaderMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ internal class ModLoaderMod : Mod
{
private static PatreonItem[][] PatronSets;
private static DeveloperItem[][] DeveloperSets;
private const int ChanceToGetPatreonArmor = 20;
private const int ChanceToGetDevArmor = 30;
private const int ChanceToGetPatreonArmor = 14;
private const int ChanceToGetDevArmor = 50;

internal const byte AccessorySlotPacket = 0;
internal const byte StatResourcesPacket = 1;
Expand Down
95 changes: 95 additions & 0 deletions patches/tModLoader/Terraria/ModLoader/Default/Patreon/HER0zero.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Content;
using Terraria.DataStructures;
using Terraria.ID;

namespace Terraria.ModLoader.Default.Patreon
{
[AutoloadEquip(EquipType.Head)]
internal class HER0zero_Head : PatreonItem
{
public override void SetDefaults() {
base.SetDefaults();

Item.width = 30;
Item.height = 20;
}
}

[AutoloadEquip(EquipType.Body)]
internal class HER0zero_Body : PatreonItem
{
public override void SetDefaults() {
base.SetDefaults();

Item.width = 32;
Item.height = 20;
}

public override bool IsVanitySet(int head, int body, int legs) {
return head == EquipLoader.GetEquipSlot(Mod, "HER0zero_Head", EquipType.Head)
&& body == EquipLoader.GetEquipSlot(Mod, "HER0zero_Body", EquipType.Body)
&& legs == EquipLoader.GetEquipSlot(Mod, "HER0zero_Legs", EquipType.Legs);
}

public override void UpdateVanitySet(Player player) {
player.GetModPlayer<HER0zeroPlayer>().glowEffect = true;
}
}

[AutoloadEquip(EquipType.Legs)]
internal class HER0zero_Legs : PatreonItem
{
public override void SetDefaults() {
base.SetDefaults();

Item.width = 24;
Item.height = 16;
}
}

internal class HER0zeroPlayer : ModPlayer
{
public bool glowEffect = false;

public override void ResetEffects() {
glowEffect = false;
}
}

internal class HER0zeroGlowEffect : PlayerDrawLayer
{
private Asset<Texture2D>? textureAsset;

public override Position GetDefaultPosition() {
return new BeforeParent(PlayerDrawLayers.JimsCloak); // Preferably before everything
}

public override bool GetDefaultVisibility(PlayerDrawSet drawInfo) {
return drawInfo.drawPlayer.TryGetModPlayer(out HER0zeroPlayer modPlayer) && modPlayer.glowEffect;
}

protected override void Draw(ref PlayerDrawSet drawInfo)
{
if (drawInfo.shadow != 0f) {
return;
}

textureAsset ??= ModContent.Request<Texture2D>("ModLoader/Patreon.HER0zero_Effect");

if (!textureAsset.IsLoaded || textureAsset.Value is not Texture2D texture) {
return;
}

Player player = drawInfo.drawPlayer;
int frameSize = texture.Height / 4;
int frame = (player.miscCounter % 40) / 10;
float alpha = 0.5f;
Vector2 position = (drawInfo.Position + (player.Size * 0.5f) - Main.screenPosition).ToPoint().ToVector2();
Rectangle srcRect = new Rectangle(0, frameSize * frame, texture.Width, frameSize);

drawInfo.DrawDataCache.Add(new DrawData(texture, position, srcRect, Color.White * alpha, 0f, new Vector2(texture.Width, frameSize) * 0.5f, 1f, drawInfo.playerEffect, 0));
}
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
98 changes: 98 additions & 0 deletions patches/tModLoader/Terraria/ModLoader/Default/Patreon/Mayne.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Content;
using Terraria.DataStructures;
using Terraria.ID;

namespace Terraria.ModLoader.Default.Patreon
{
[AutoloadEquip(EquipType.Head)]
internal class Mayne_Head : PatreonItem
{
public override void SetDefaults() {
base.SetDefaults();

Item.width = 28;
Item.height = 18;
}
}

[AutoloadEquip(EquipType.Body)]
internal class Mayne_Body : PatreonItem
{
public override void SetDefaults() {
base.SetDefaults();

Item.width = 26;
Item.height = 26;
}
}

[AutoloadEquip(EquipType.Legs)]
internal class Mayne_Legs : PatreonItem
{
public override void SetDefaults() {
base.SetDefaults();

Item.width = 20;
Item.height = 16;
}
}

[AutoloadEquip(EquipType.Wings)]
internal class Mayne_Wings : PatreonItem
{
public override void SetStaticDefaults() {
base.SetStaticDefaults();

ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(150, 7f);
}

public override void SetDefaults() {
base.SetDefaults();

Item.vanity = false;
Item.width = 34;
Item.height = 20;
Item.accessory = true;
}
}

internal class MayneWingLayer : PlayerDrawLayer
{
public override Position GetDefaultPosition() {
return new AfterParent(PlayerDrawLayers.Wings);
}

public override bool GetDefaultVisibility(PlayerDrawSet drawInfo) {
return drawInfo.drawPlayer.wings == EquipLoader.GetEquipSlot(Mod, "Mayne_Wings", EquipType.Wings);
}

protected override void Draw(ref PlayerDrawSet drawInfo) {
if (drawInfo.drawPlayer.dead) {
return;
}
DrawData? wingData = null;
foreach (DrawData data in drawInfo.DrawDataCache) {
if (data.texture == ModContent.Request<Texture2D>("ModLoader/Patreon.Mayne_Wings_Wings", AssetRequestMode.ImmediateLoad).Value) {
wingData = data;
}
}
if (wingData.HasValue) {
DrawData glow = new DrawData(
texture: ModContent.Request<Texture2D>("ModLoader/Patreon.Mayne_Wings_Wings_Glow", AssetRequestMode.ImmediateLoad).Value,
color: Color.White * drawInfo.stealth * (1f - drawInfo.shadow),
position: wingData.Value.position,
sourceRect: wingData.Value.sourceRect,
rotation: wingData.Value.rotation,
origin: wingData.Value.origin,
scale: wingData.Value.scale,
effect: wingData.Value.effect,
inactiveLayerDepth: 0
);
glow.shader = wingData.Value.shader;
drawInfo.DrawDataCache.Add(glow);
}
}
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1ccac01

Please sign in to comment.