Skip to content

Commit

Permalink
Fix #47: Integrate individual option inventory sprites
Browse files Browse the repository at this point in the history
  • Loading branch information
cheeeeeeeeeen committed Oct 10, 2019
1 parent 3fef486 commit a817002
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 4 deletions.
17 changes: 17 additions & 0 deletions Items/Accessories/Options/Freeze/FreezeOptionBase.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
using Terraria;
using Terraria.DataStructures;

namespace ChensGradiusMod.Items.Accessories.Options.Freeze
{
public abstract class FreezeOptionBase : OptionBase
{
public override void SetStaticDefaults()
{
base.SetStaticDefaults();
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(6, 6));
}

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

item.width = 48;
item.height = 60;
}

public override string Texture => $"ChensGradiusMod/Sprites/FreezeInv{OptionPosition}";

protected override string OptionTooltip =>
"Deploys an Option type Freeze.\n" +
"Some projectiles you create are copied by the drone.\n" +
Expand Down
8 changes: 4 additions & 4 deletions Items/Accessories/Options/OptionBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ public abstract class OptionBase : ParentGradiusAccessory
public override void SetStaticDefaults()
{
Tooltip.SetDefault(OptionTooltip);
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(5, 9));
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(10, 5));
}

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

item.width = 28;
item.height = 20;
item.width = 44;
item.height = 52;
}

public override string Texture => "ChensGradiusMod/Sprites/OptionSheet";
public override string Texture => $"ChensGradiusMod/Sprites/OptionInv{OptionPosition}";

public override void UpdateAccessory(Player player, bool hideVisual)
{
Expand Down
9 changes: 9 additions & 0 deletions Items/Accessories/Options/Rotate/RotateOptionBase.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Terraria;
using Terraria.DataStructures;

namespace ChensGradiusMod.Items.Accessories.Options.Rotate
{
Expand All @@ -10,6 +11,14 @@ public enum States : int { Following, Grouping, Rotating, Recovering };
public const float Speed = 10f;
public const float AcceptedThreshold = .01f;

public override void SetStaticDefaults()
{
base.SetStaticDefaults();
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(4, 6));
}

public override string Texture => $"ChensGradiusMod/Sprites/RotateInv{OptionPosition}";

protected override string OptionTooltip =>
"Deploys an Option type Rotate.\n" +
"Some projectiles you create are copied by the drone.\n" +
Expand Down
Binary file added Sprites/FreezeInv1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/FreezeInv2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/FreezeInv3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/FreezeInv4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/FreezeSheet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/OptionInv1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/OptionInv2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/OptionInv3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/OptionInv4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/RotateInv1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/RotateInv2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/RotateInv3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Sprites/RotateInv4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions description.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ The mod is quite young, so the mod will focus in implementing features rather th

Changelogs:

0.6.4
- Update Option inventory sprites

0.6.3
- Fix a bug where melee interactions with Moais are misbehaving and not functioning properly
- Optimize Moai code to improve multiplayer behavior
Expand Down

0 comments on commit a817002

Please sign in to comment.