Skip to content

Commit

Permalink
Merge pull request tgstation#6389 from HippieStation/upstream-merge-3…
Browse files Browse the repository at this point in the history
…5171

[MIRROR] Cleans up single frame get flat icon.
  • Loading branch information
Pyko authored Feb 1, 2018
2 parents 4f56738 + d797a16 commit 0f61250
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion code/__HELPERS/icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,10 @@ The _flatIcons list is a cache for generated icon files.
flat.Blend(rgb(255, 255, 255, A.alpha), ICON_MULTIPLY)

if(no_anim)
return icon(flat, "", SOUTH, frame=1)
//Clean up repeated frames
var/icon/cleaned = new /icon()
cleaned.Insert(flat, "", SOUTH, 1, 0)
return cleaned
else
return icon(flat, "", SOUTH)

Expand Down
6 changes: 4 additions & 2 deletions code/game/machinery/newscaster.dm
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,10 @@ GLOBAL_LIST_EMPTY(allCasters)
/datum/newscaster/feed_network/proc/save_photo(icon/photo)
var/photo_file = copytext(md5("\icon[photo]"), 1, 6)
if(!fexists("[GLOB.log_directory]/photos/[photo_file].png"))
var/icon/p = icon(photo, frame = 1)
fcopy(p, "[GLOB.log_directory]/photos/[photo_file].png")
//Clean up repeated frames
var/icon/clean = new /icon()
clean.Insert(photo, "", SOUTH, 1, 0)
fcopy(clean, "[GLOB.log_directory]/photos/[photo_file].png")
return photo_file

/obj/item/wallframe/newscaster
Expand Down

0 comments on commit 0f61250

Please sign in to comment.