-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patron sets for HER0zero and Mayne; adjusted rates for patron/dev sets
- Loading branch information
1 parent
3195f53
commit 1ccac01
Showing
29 changed files
with
267 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 95 additions & 0 deletions
95
patches/tModLoader/Terraria/ModLoader/Default/Patreon/HER0zero.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)); | ||
} | ||
} | ||
} |
Binary file added
BIN
+564 Bytes
patches/tModLoader/Terraria/ModLoader/Default/Patreon/HER0zero_Body.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.87 KB
patches/tModLoader/Terraria/ModLoader/Default/Patreon/HER0zero_Body_Body.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.02 KB
patches/tModLoader/Terraria/ModLoader/Default/Patreon/HER0zero_Effect.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+498 Bytes
patches/tModLoader/Terraria/ModLoader/Default/Patreon/HER0zero_Head.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.15 KB
patches/tModLoader/Terraria/ModLoader/Default/Patreon/HER0zero_Head_Head.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+336 Bytes
patches/tModLoader/Terraria/ModLoader/Default/Patreon/HER0zero_Legs.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.79 KB
patches/tModLoader/Terraria/ModLoader/Default/Patreon/HER0zero_Legs_Legs.png
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
98
patches/tModLoader/Terraria/ModLoader/Default/Patreon/Mayne.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} | ||
} |
Binary file added
BIN
+396 Bytes
patches/tModLoader/Terraria/ModLoader/Default/Patreon/Mayne_Body.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.24 KB
patches/tModLoader/Terraria/ModLoader/Default/Patreon/Mayne_Body_Body.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+600 Bytes
patches/tModLoader/Terraria/ModLoader/Default/Patreon/Mayne_Head.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.31 KB
patches/tModLoader/Terraria/ModLoader/Default/Patreon/Mayne_Head_Head.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+255 Bytes
patches/tModLoader/Terraria/ModLoader/Default/Patreon/Mayne_Legs.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.28 KB
patches/tModLoader/Terraria/ModLoader/Default/Patreon/Mayne_Legs_Legs.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+375 Bytes
patches/tModLoader/Terraria/ModLoader/Default/Patreon/Mayne_Wings.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.37 KB
patches/tModLoader/Terraria/ModLoader/Default/Patreon/Mayne_Wings_Wings.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.41 KB
patches/tModLoader/Terraria/ModLoader/Default/Patreon/Mayne_Wings_Wings_Glow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.