mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Fix Records Pics (#29962)
This commit is contained in:
@@ -108,15 +108,14 @@
|
||||
L.fields["enzymes"] = H.dna.SE // Used in respawning
|
||||
L.fields["identity"] = H.dna.UI // "
|
||||
|
||||
H.update_hair() // humans tend to have no hair for some reason when they spawn
|
||||
//spawn(2 SECONDS) // Adding a bit of delay to fix some issues such as hair not being properly generated by thhen
|
||||
H.regenerate_icons() // ensuring that we don't end up with bald default-species humans before taking their picture
|
||||
|
||||
var/icon/I = icon('icons/effects/32x32.dmi', "blank")
|
||||
var/icon/result = icon(I, "")
|
||||
result.Insert(getFlatIconDeluxe(sort_image_datas(get_content_image_datas(H)), override_dir = SOUTH), "", dir = SOUTH)
|
||||
result.Insert(getFlatIconDeluxe(sort_image_datas(get_content_image_datas(H)), override_dir = NORTH), "", dir = NORTH)
|
||||
result.Insert(getFlatIconDeluxe(sort_image_datas(get_content_image_datas(H)), override_dir = EAST), "", dir = EAST)
|
||||
result.Insert(getFlatIconDeluxe(sort_image_datas(get_content_image_datas(H)), override_dir = WEST), "", dir = WEST)
|
||||
result.Insert(getFlatIconDeluxe(sort_image_datas(get_content_image_datas(H)), override_dir = SOUTH, ignore_spawn_items = TRUE), "", dir = SOUTH)
|
||||
result.Insert(getFlatIconDeluxe(sort_image_datas(get_content_image_datas(H)), override_dir = NORTH, ignore_spawn_items = TRUE), "", dir = NORTH)
|
||||
result.Insert(getFlatIconDeluxe(sort_image_datas(get_content_image_datas(H)), override_dir = EAST, ignore_spawn_items = TRUE), "", dir = EAST)
|
||||
result.Insert(getFlatIconDeluxe(sort_image_datas(get_content_image_datas(H)), override_dir = WEST, ignore_spawn_items = TRUE), "", dir = WEST)
|
||||
result.Crop(1,1,32,32)
|
||||
|
||||
G.fields["photo"] = result
|
||||
|
||||
@@ -43,7 +43,7 @@ cons:
|
||||
#define GFI_DX_MAX 12 // Remember to keep this updated should you need to keep track of more variables
|
||||
|
||||
|
||||
proc/getFlatIconDeluxe(list/image_datas, var/turf/center, var/radius = 0, var/override_dir = 0)
|
||||
proc/getFlatIconDeluxe(list/image_datas, var/turf/center, var/radius = 0, var/override_dir = 0, var/ignore_spawn_items = FALSE)
|
||||
|
||||
var/icon/flat = icon('icons/effects/224x224.dmi',"empty") // Final flattened icon
|
||||
var/icon/add // Icon of overlay being added
|
||||
@@ -52,9 +52,22 @@ proc/getFlatIconDeluxe(list/image_datas, var/turf/center, var/radius = 0, var/ov
|
||||
if (!data[GFI_DX_ICON] && !data[GFI_DX_STATE]) // no icon nor icon_state? we're probably not meant to draw that. Possibly a blank icon while we're only interested in its overlays.
|
||||
continue
|
||||
|
||||
if (override_dir) // looks like we're getting some reference pics for an ID picture, let's ignore some of the items
|
||||
if(data[GFI_DX_STATE] == "plasticbag" || data[GFI_DX_STATE] == "bookVirologyGuide")
|
||||
if (ignore_spawn_items)
|
||||
// looks like we're getting some reference pics for an ID picture, let's ignore the items held on spawn
|
||||
var/list/icon_states_to_ignore = list(
|
||||
"plasticbag",
|
||||
"bookVirologyGuide",
|
||||
"firstaid",
|
||||
"clipboard",
|
||||
"handdrill",
|
||||
"toolbox_blue",
|
||||
"briefcase-centcomm",
|
||||
"thurible",
|
||||
)
|
||||
if(data[GFI_DX_STATE] in icon_states_to_ignore)
|
||||
continue
|
||||
|
||||
if (override_dir)
|
||||
data[GFI_DX_DIR] = override_dir
|
||||
|
||||
CHECK_TICK
|
||||
|
||||
Reference in New Issue
Block a user