diff --git a/BetterPaintMod.cs b/BetterPaintMod.cs index 81952b3..4c5eb3a 100644 --- a/BetterPaintMod.cs +++ b/BetterPaintMod.cs @@ -1,6 +1,9 @@ using BetterPaint.Items; using BetterPaint.Painting; +using HamstarHelpers.DebugHelpers; +using HamstarHelpers.TmlHelpers; using HamstarHelpers.Utilities.Config; +using HamstarHelpers.Utilities.Messages; using System; using System.Collections.Generic; using System.IO; @@ -63,6 +66,20 @@ public override void Load() { BetterPaintMod.Instance = this; this.LoadConfig(); + + TmlLoadHelpers.AddPostWorldLoadEachPromise( () => { + string intro1 = "1 of 5 - Eager to try out better painting? You'll need a Paint Blaster, crafted via Clentaminator, Flamethrower, and Paint Sprayer at a Tinkerer's Workshop."; + string intro2 = "2 of 5 - To make paint, you'll need a Paint Mixer, crafted via Dye Vat" + ( this.Config.PaintMixerRecipeBlendOMatic ? ", Blend-O-Matic, " : " " ) + "and Extractinator at a Tinkerer's Workshop."; + string intro3 = "3 of 5 - To paint, you'll need Color Cartridges, crafted via colored Paints (any " + this.Config.PaintRecipePaints + ") and Gel (" + this.Config.PaintRecipeGels + ") at a Paint Mixer."; + string post_intro = "4 of 5 - Use the Control Panel (single player only) to configure settings, including whether the Painter NPC should sell Better Paint items, if crafting isn't your cup of tea."; + string pander = "5 of 5 - If you enjoy this mod and want to see more, please give your support at: https://www.patreon.com/hamstar0"; + + InboxMessages.SetMessage( "BetterPaintIntro1", intro1, false ); + InboxMessages.SetMessage( "BetterPaintIntro2", intro2, false ); + InboxMessages.SetMessage( "BetterPaintIntro3", intro3, false ); + InboxMessages.SetMessage( "BetterPaintPostIntro", post_intro, false ); + InboxMessages.SetMessage( "BetterPaintPander", pander, false ); + } ); } private void LoadConfig() { diff --git a/BetterPaintPlayer.cs b/BetterPaintPlayer.cs index 95328fc..84debc8 100644 --- a/BetterPaintPlayer.cs +++ b/BetterPaintPlayer.cs @@ -1,6 +1,5 @@ using BetterPaint.Items; using BetterPaint.NetProtocols; -using HamstarHelpers.Utilities.Messages; using HamstarHelpers.Utilities.Network; using Terraria; using Terraria.ModLoader; @@ -18,14 +17,6 @@ public override void OnEnterWorld( Player player ) { } else if( Main.netMode == 1 ) { PacketProtocol.QuickRequestToServer(); } - - string intro = "Eager to try out better painting? You'll need a Paint Blaster, crafted via Clentaminator, Flamethrower, and Paint Sprayer at a Tinkerer's Workshop. To make blaster paint, you'll need a Paint Mixer, crafted via Dye Vat" + ( mymod.Config.PaintMixerRecipeBlendOMatic ? ", Blend-O-Matic, " : " " ) + "and Extractinator at a Tinkerer's Workshop. To paint, you'll need Color Cartridges, crafted via colored Paints (any " + mymod.Config.PaintRecipePaints + ") and Gel (" + mymod.Config.PaintRecipeGels + ") at a Paint Mixer."; - string post_intro = "Use the Control Panel (single player only) to configure settings, including whether the Painter NPC should sell Better Paint items, if crafting isn't your cup of tea."; - string pander = "If you enjoy this mod and want to see more, please give your support at: https://www.patreon.com/hamstar0"; - - InboxMessages.SetMessage( "BetterPaintIntro", intro, false ); - InboxMessages.SetMessage( "BetterPaintPostIntro", post_intro, false ); - InboxMessages.SetMessage( "BetterPaintPander", pander, false ); } diff --git a/Items/PaintBlasterHUD/PaintBlasterHUD.cs b/Items/PaintBlasterHUD/PaintBlasterHUD.cs index a23f91b..6ab1c7a 100644 --- a/Items/PaintBlasterHUD/PaintBlasterHUD.cs +++ b/Items/PaintBlasterHUD/PaintBlasterHUD.cs @@ -64,8 +64,15 @@ public void DrawHUD( BetterPaintMod mymod, SpriteBatch sb, PaintBlasterItem mybl if( Main.mouseY >= y && Main.mouseY < ( y + PaintBlasterHUD.AmmoCan.Height ) ) { string percent_str = capacity_percent.ToString( "P", CultureInfo.InvariantCulture ); - Utils.DrawBorderStringFourWay( sb, Main.fontMouseText, percent_str, Main.mouseX-40, Main.mouseY+20, Color.White, Color.Black, default(Vector2), 1f ); - //sb.DrawString( Main.fontMouseText, percent_str, new Vector2(Main.mouseX, Main.mouseY), Color.White ); + Utils.DrawBorderStringFourWay( sb, Main.fontMouseText, percent_str, Main.mouseX-40, Main.mouseY+16, Color.White, Color.Black, default(Vector2), 1f ); + } + } + } else { + if( Main.mouseX >= x && Main.mouseX < ( x + PaintBlasterHUD.AmmoCan.Width ) ) { + if( Main.mouseY >= y && Main.mouseY < ( y + PaintBlasterHUD.AmmoCan.Height ) ) { + string str = "Color Cartridge needed"; + + Utils.DrawBorderStringFourWay( sb, Main.fontMouseText, str, Main.mouseX - 160, Main.mouseY + 16, Color.White, Color.Black, default( Vector2 ), 1f ); } } } diff --git a/Items/PaintBlasterUI/PaintBlasterUI_Draw.cs b/Items/PaintBlasterUI/PaintBlasterUI_Draw.cs index 10ace33..f502e1a 100644 --- a/Items/PaintBlasterUI/PaintBlasterUI_Draw.cs +++ b/Items/PaintBlasterUI/PaintBlasterUI_Draw.cs @@ -1,5 +1,4 @@ using HamstarHelpers.HudHelpers; -using HamstarHelpers.PlayerHelpers; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; diff --git a/Items/PaintBlasterUI/PaintBlasterUI_DrawBrushes.cs b/Items/PaintBlasterUI/PaintBlasterUI_DrawBrushes.cs index 4031302..6c7ed14 100644 --- a/Items/PaintBlasterUI/PaintBlasterUI_DrawBrushes.cs +++ b/Items/PaintBlasterUI/PaintBlasterUI_DrawBrushes.cs @@ -3,10 +3,7 @@ using HamstarHelpers.Utilities.AnimatedColor; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using ReLogic.Graphics; -using System; using Terraria; -using Terraria.ID; namespace BetterPaint.Items {