mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
Fixes custom vendors not displaying custom item names (#88985)
## About The Pull Request Something that's really bugged me for a while, custom vendors don't display custom names on items. Nobody cared enough to fix this but me. Guess you can count on me, eh? Tested this on my own private server, worked fine. The items still technically merge by type, so if you place one item with a custom name first, then another of the same type with no custom name OR with a different custom name, the newly inserted item's listed name will override the other until it's bought. ## Why It's Good For The Game Fixes https://github.com/tgstation/tgstation/issues/84937 / https://github.com/tgstation/tgstation/issues/83151 (technically) ## Changelog 🆑 fix: A single enthusiastic chemist hell-bent on selling chemicals to his co-workers single-handedly solved a programming issue with our custom vendors. They'll begin displaying custom names (such as those provided by labels) once more. /🆑
This commit is contained in:
@@ -1760,9 +1760,11 @@ GLOBAL_LIST_EMPTY(vending_machines_to_restock)
|
||||
if(vending_machine_input[stocked_item] > 0)
|
||||
var/base64
|
||||
var/price = 0
|
||||
var/itemname = initial(stocked_item.name)
|
||||
for(var/obj/item/stored_item in contents)
|
||||
if(stored_item.type == stocked_item)
|
||||
price = stored_item.custom_price
|
||||
itemname = stored_item.name
|
||||
if(!base64) //generate an icon of the item to use in UI
|
||||
if(base64_cache[stored_item.type])
|
||||
base64 = base64_cache[stored_item.type]
|
||||
@@ -1772,7 +1774,7 @@ GLOBAL_LIST_EMPTY(vending_machines_to_restock)
|
||||
break
|
||||
var/list/data = list(
|
||||
path = stocked_item,
|
||||
name = initial(stocked_item.name),
|
||||
name = itemname,
|
||||
price = price,
|
||||
img = base64,
|
||||
amount = vending_machine_input[stocked_item],
|
||||
|
||||
Reference in New Issue
Block a user