Skip to content

Commit

Permalink
Draw Master Ball item as fullbright
Browse files Browse the repository at this point in the history
  • Loading branch information
JamzOJamz committed Jan 10, 2025
1 parent 29d4724 commit 091ec46
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Content/Commands/PCCommand.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Terraria.Localization;

namespace Terramon.Content.Commands;

public class PCCommand : DebugCommand
{
public override CommandType Type => CommandType.Chat;

public override string Command => "pc";

public override string Description => Language.GetTextValue("Mods.Terramon.Commands.PC.Description");

public override string Usage => Language.GetTextValue("Mods.Terramon.Commands.PC.Usage");
}
11 changes: 11 additions & 0 deletions Content/Items/PokeBalls/MasterBall.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ public override void SetStaticDefaults()
TerramonItemAPI.Sets.Unobtainable.Add(Type);
CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
}

public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale,
int whoAmI)
{
Main.GetItemDrawFrame(Item.type, out var itemTexture, out var itemFrame);
var drawOrigin = itemFrame.Size() / 2f;
var drawPosition = Item.Bottom - Main.screenPosition - new Vector2(0, drawOrigin.Y);
spriteBatch.Draw(itemTexture, drawPosition, itemFrame, Color.White, rotation, drawOrigin, scale, SpriteEffects.None, 0);

return false;
}
}

public class MasterBallTile : BasePkballTile
Expand Down
5 changes: 5 additions & 0 deletions Localization/de-DE/de-DE_Mods.Terramon.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ Commands: {
// Success: Cleared {0} Pokémon NPC(s)
// SuccessByPlayer: "{0} cleared {1} Pokémon NPC(s)"
}

PC: {
// Description: Opens the Pokémon Storage System from anywhere
// Usage: /pc
}
}

Configs: {
Expand Down
5 changes: 5 additions & 0 deletions Localization/en-US/en-US_Mods.Terramon.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ Commands: {
Success: Cleared {0} Pokémon NPC(s)
SuccessByPlayer: "{0} cleared {1} Pokémon NPC(s)"
}

PC: {
Description: Opens the Pokémon Storage System from anywhere
Usage: /pc
}
}

Configs: {
Expand Down
5 changes: 5 additions & 0 deletions Localization/es-ES/es-ES_Mods.Terramon.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ Commands: {
Success: "{0} NPCs Pokémon fueron eliminados"
SuccessByPlayer: "{0} eliminó {1} NPCs Pokémon"
}

PC: {
// Description: Opens the Pokémon Storage System from anywhere
// Usage: /pc
}
}

Configs: {
Expand Down
5 changes: 5 additions & 0 deletions Localization/fr-FR/fr-FR_Mods.Terramon.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ Commands: {
// Success: Cleared {0} Pokémon NPC(s)
// SuccessByPlayer: "{0} cleared {1} Pokémon NPC(s)"
}

PC: {
// Description: Opens the Pokémon Storage System from anywhere
// Usage: /pc
}
}

Configs: {
Expand Down
5 changes: 5 additions & 0 deletions Localization/it-IT/it-IT_Mods.Terramon.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ Commands: {
// Success: Cleared {0} Pokémon NPC(s)
// SuccessByPlayer: "{0} cleared {1} Pokémon NPC(s)"
}

PC: {
// Description: Opens the Pokémon Storage System from anywhere
// Usage: /pc
}
}

Configs: {
Expand Down
5 changes: 5 additions & 0 deletions Localization/ru-RU/ru-RU_Mods.Terramon.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ Commands: {
// Success: Cleared {0} Pokémon NPC(s)
// SuccessByPlayer: "{0} cleared {1} Pokémon NPC(s)"
}

PC: {
// Description: Opens the Pokémon Storage System from anywhere
// Usage: /pc
}
}

Configs: {
Expand Down
5 changes: 5 additions & 0 deletions Localization/zh-Hans/zh-Hans_Mods.Terramon.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ Commands: {
// Success: Cleared {0} Pokémon NPC(s)
// SuccessByPlayer: "{0} cleared {1} Pokémon NPC(s)"
}

PC: {
// Description: Opens the Pokémon Storage System from anywhere
// Usage: /pc
}
}

Configs: {
Expand Down

0 comments on commit 091ec46

Please sign in to comment.