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:
Aylong
2024-09-24 00:04:37 +03:00
committed by GitHub
parent f830f8c70c
commit 9d968e6ba9
27 changed files with 526 additions and 244 deletions
+7 -1
View File
@@ -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