mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 03:25:49 +01:00
Port DmIcon & Image components from TG (#26623)
* Port DmIcon & Image components from TG * Documentation * Uh oh * I hate it * I will bang you
This commit is contained in:
@@ -271,12 +271,18 @@
|
||||
|
||||
/obj/item/stack/proc/build_recipe_data(datum/stack_recipe/recipe)
|
||||
var/list/data = list()
|
||||
var/obj/result = recipe.result_type
|
||||
|
||||
data["uid"] = recipe.UID()
|
||||
data["required_amount"] = recipe.req_amount
|
||||
data["result_amount"] = recipe.res_amount
|
||||
data["max_result_amount"] = recipe.max_res_amount
|
||||
data["image"] = recipe.image
|
||||
data["icon"] = result.icon
|
||||
data["icon_state"] = result.icon_state
|
||||
|
||||
// DmIcon cannot paint images. So, if we have grayscale sprite, we need ready base64 image.
|
||||
if(recipe.result_image)
|
||||
data["image"] = recipe.result_image
|
||||
|
||||
return data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user