mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
[MIRROR] Make the microwave preview what it'll (probably) create (#9565)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
5c782d3a36
commit
91f903f9d3
26
code/modules/asset_cache/assets/kitchen_recipes.dm
Normal file
26
code/modules/asset_cache/assets/kitchen_recipes.dm
Normal file
@@ -0,0 +1,26 @@
|
||||
/datum/asset/spritesheet/kitchen_recipes
|
||||
name = "kitchen_recipes"
|
||||
|
||||
/datum/asset/spritesheet/kitchen_recipes/create_spritesheets()
|
||||
for(var/datum/recipe/R as anything in subtypesof(/datum/recipe))
|
||||
add_atom_icon(R.result, sanitize_css_class_name("[R.type]"))
|
||||
|
||||
/datum/asset/spritesheet/kitchen_recipes/proc/add_atom_icon(typepath, id)
|
||||
var/icon_file
|
||||
var/icon_state
|
||||
var/obj/preview_item = typepath
|
||||
|
||||
// if(ispath(ingredient_typepath, /datum/reagent))
|
||||
// var/datum/reagent/reagent = ingredient_typepath
|
||||
// preview_item = initial(reagent.default_container)
|
||||
// var/datum/glass_style/style = GLOB.glass_style_singletons[preview_item]?[reagent]
|
||||
// if(istype(style))
|
||||
// icon_file = style.icon
|
||||
// icon_state = style.icon_state
|
||||
|
||||
// icon_file ||= initial(preview_item.icon_preview) || initial(preview_item.icon)
|
||||
// icon_state ||= initial(preview_item.icon_state_preview) || initial(preview_item.icon_state)
|
||||
icon_file = initial(preview_item.icon)
|
||||
icon_state = initial(preview_item.icon_state)
|
||||
|
||||
Insert("[id]", icon_file, icon_state)
|
||||
Reference in New Issue
Block a user