Tweaks
This commit is contained in:
1 parent
50ab9e2dc1
commit
ca6ceea4e4
2 files changed
+8
-7
No files matched your search
@@ -433,7 +433,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
|
||||
float angleToUpright = (Player.Center - p.Center).AngleBetween(-Vector2.UnitY);
|
||||
if (angleToUpright > MathHelper.PiOver4) // Don't do any jump stuff if the player is jumping from above the hook.
|
||||
if (angleToUpright > MathHelper.PiOver4 * 0.45f) // Don't do any jump stuff if the player is jumping from above the hook.
|
||||
{
|
||||
Vector2 velocityBoost = Vector2.Zero;
|
||||
|
||||
@@ -451,6 +451,7 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
|
||||
Player.velocity += velocityBoost;
|
||||
Player.jump = Player.jumpHeight / 2;
|
||||
}
|
||||
|
||||
else
|
||||
@@ -459,9 +460,6 @@ namespace CalamityMod.Items.Accessories
|
||||
Player.releaseJump = false;
|
||||
}
|
||||
|
||||
|
||||
Player.jump = Player.jumpHeight / 2;
|
||||
|
||||
SoundEngine.PlaySound(WulfrumAcrobaticsPack.ReleaseSound, p.Center);
|
||||
p.Kill();
|
||||
|
||||
|
||||
@@ -3,13 +3,14 @@ using System.IO;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
||||
using static CalamityMod.CalamityUtils;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
using Terraria.GameContent;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
@@ -26,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
public static float MaxDamageFalloff = 0.9f;
|
||||
public static int BulletCount = 6;
|
||||
|
||||
public static int ScrapPerItem = 5;
|
||||
public static int ScrapPerItem = 30;
|
||||
public int storedScrap = 0;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
@@ -172,13 +173,15 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
var barBG = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/GenericBarBack").Value;
|
||||
var barFG = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/GenericBarFront").Value;
|
||||
|
||||
Vector2 drawPos = position + Vector2.UnitY * (frame.Height - 2) * scale + Vector2.UnitX * (frame.Width - barBG.Width * barScale) * scale * 0.5f;
|
||||
Vector2 drawPos = position + Vector2.UnitY * (frame.Height - 2 + 6f) * scale + Vector2.UnitX * (frame.Width - barBG.Width * barScale) * scale * 0.5f;
|
||||
Rectangle frameCrop = new Rectangle(0, 0, (int)(storedScrap / (float)ScrapPerItem * barFG.Width), barFG.Height);
|
||||
Color colorBG = Color.RoyalBlue;
|
||||
Color colorFG = Color.Lerp(Color.Teal, Color.YellowGreen, storedScrap / (float)ScrapPerItem);
|
||||
|
||||
spriteBatch.Draw(barBG, drawPos, null, colorBG, 0f, origin, scale * barScale, 0f, 0f);
|
||||
spriteBatch.Draw(barFG, drawPos, frameCrop, colorFG * 0.8f, 0f, origin, scale * barScale, 0f, 0f);
|
||||
|
||||
DrawBorderStringEightWay(spriteBatch, FontAssets.MouseText.Value, storedScrap.ToString(), drawPos + new Vector2(-3, -3) * scale, Color.GreenYellow, Color.Black, scale);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
Reference in new issue
Block a user