Skip to content

Commit

Permalink
Add unique icon for powerups
Browse files Browse the repository at this point in the history
  • Loading branch information
dyceron committed Jul 18, 2024
1 parent 9e09193 commit a06344f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
11 changes: 10 additions & 1 deletion src/open_samus_returns_rando/files/custom/sprites_texturehud.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Game.ImportLibrary("gui/scripts/sprites_texturehud_original.lua")

GUI.AddSpriteSheetItem("item_powerup", "gui/textures/texturehud.bctex", {
GUI.AddSpriteSheetItem("item_nothing", "gui/textures/texturehud.bctex", {
TextureWidth = "512",
TextureHeight = "256",
UPixelOffset = "144",
Expand All @@ -9,6 +9,15 @@ GUI.AddSpriteSheetItem("item_powerup", "gui/textures/texturehud.bctex", {
VPixelScale = "8",
AngleOffset = "0"
})
GUI.AddSpriteSheetItem("item_powerup", "gui/textures/texturehud.bctex", {
TextureWidth = "512",
TextureHeight = "256",
UPixelOffset = "96",
VPixelOffset = "40",
UPixelScale = "8",
VPixelScale = "8",
AngleOffset = "0"
})
GUI.AddSpriteSheetItem("item_offworld", "gui/textures/texturehud.bctex", {
TextureWidth = "512",
TextureHeight = "256",
Expand Down
Binary file not shown.
7 changes: 5 additions & 2 deletions src/open_samus_returns_rando/pickups/pickup.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,15 +328,18 @@ def patch_minimap(self, editor: PatcherEditor, scenario_name: str, actor_name: s
pickup_tile_icon.icon = "itemenabledheat"
else:
pickup_tile_icon.icon = "itemenabled"
# Powerups and Nothing items use a "custom" itemsphere so they update on the map
elif "itemsphere" in pickup_model or "powerup" in pickup_model or "babyhatchling" in pickup_model:
# Powerups use a modified Samus helmet icon
elif "powerup" in pickup_model or "babyhatchling" in pickup_model:
pickup_tile_icon.icon = "item_powerup"
# DNA uses a custom icon
elif "adn" in pickup_model:
pickup_tile_icon.icon = "item_adn"
# Offworld powerups use the offworld model
elif "offworld" in pickup_model:
pickup_tile_icon.icon = "item_offworld"
# Nothing items use an "updated" itemsphere icon so they update on the map
elif "itemsphere" in pickup_model:
pickup_tile_icon.icon = "item_nothing"
else:
# Tanks use their respective tank icon
pickup_tile_icon.icon = pickup_model
Expand Down

0 comments on commit a06344f

Please sign in to comment.