Skip to content

Commit

Permalink
Handle weapon camos in vendors (#7906)
Browse files Browse the repository at this point in the history
# About the pull request

This PR makes it so weapons use their map camo when displayed in
vendors.

# Explain why it's good for the game


![image](https://github.com/user-attachments/assets/b119ee83-473c-4eb7-95fe-1a7bbcbf31b3)

# Changelog
:cl: Drathek
add: Weapons now display their map camo in vendors
/:cl:

Co-authored-by: kiVts <48099872+kiVts@users.noreply.github.com>
  • Loading branch information
Drulikar and kiVts authored Dec 28, 2024
1 parent 76a77d8 commit 50a297a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions code/modules/asset_cache/asset_list_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@
/obj/item/storage/backpack/general_belt,
/obj/item/storage/belt,
/obj/item/storage/pill_bottle,
/obj/item/weapon,
)

/datum/asset/spritesheet/vending_products/register()
Expand All @@ -316,13 +317,19 @@
if(icon_state in icon_states(icon_file))
if(is_path_in_list(current_product, additional_preload_icons))
item = new current_product()
new_icon = getFlatIcon(item)
new_icon.Scale(32,32)
if(ispath(current_product, /obj/item/weapon))
new_icon = icon(item.icon, item.icon_state, SOUTH)
var/new_color = initial(item.color)
if(!isnull(new_color) && new_color != "#FFFFFF")
new_icon.Blend(new_color, ICON_MULTIPLY)
else
new_icon = getFlatIcon(item)
new_icon.Scale(32,32)
qdel(item)
else
new_icon = icon(icon_file, icon_state, SOUTH)
var/new_color = initial(item.color)
if (!isnull(new_color) && new_color != "#FFFFFF")
if(!isnull(new_color) && new_color != "#FFFFFF")
new_icon.Blend(new_color, ICON_MULTIPLY)
else
if(ispath(current_product, /obj/effect/essentials_set))
Expand Down

0 comments on commit 50a297a

Please sign in to comment.