mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Remove atom creation in vending machine icon generation
This commit is contained in:
@@ -676,28 +676,22 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
/datum/asset/spritesheet/vending/register()
|
||||
for (var/k in GLOB.vending_products)
|
||||
var/atom/item = k
|
||||
|
||||
|
||||
var/icon_file
|
||||
var/icon_state
|
||||
var/icon/I
|
||||
|
||||
|
||||
if (!ispath(item, /atom))
|
||||
continue
|
||||
|
||||
icon_file = initial(item.icon)
|
||||
icon_state = initial(item.icon_state)
|
||||
var/icon_file = initial(item.icon)
|
||||
var/icon_state = initial(item.icon_state)
|
||||
var/icon/I
|
||||
|
||||
if(icon_state in icon_states(icon_file))
|
||||
var/icon_states_list = icon_states(icon_file)
|
||||
if(icon_state in icon_states_list)
|
||||
I = icon(icon_file, icon_state, SOUTH)
|
||||
var/c = initial(item.color)
|
||||
if (!isnull(c) && c != "#FFFFFF")
|
||||
I.Blend(initial(c), ICON_MULTIPLY)
|
||||
I.Blend(c, ICON_MULTIPLY)
|
||||
else
|
||||
item = new item()
|
||||
I = icon(item.icon, item.icon_state, SOUTH)
|
||||
qdel(item)
|
||||
stack_trace("[item] does not have a valid icon state, icon=[icon_file], icon_state=[json_encode(icon_state)], icon_states=[json_encode(icon_states_list)]")
|
||||
I = icon('icons/turf/floors.dmi', "", SOUTH)
|
||||
|
||||
var/imgid = replacetext(replacetext("[item]", "/obj/item/", ""), "/", "-")
|
||||
|
||||
@@ -709,4 +703,4 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
"dna_discovered.png" = 'html/dna_discovered.png',
|
||||
"dna_undiscovered.png" = 'html/dna_undiscovered.png',
|
||||
"dna_extra.png" = 'html/dna_extra.png'
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user