Merge pull request #34829 from AnturK/photosnotmovies
Removes animation from photos
This commit is contained in:
committed by
CitadelStationBot
parent
f4a817be01
commit
0b2f1c2826
@@ -714,7 +714,7 @@ The _flatIcons list is a cache for generated icon files.
|
||||
*/
|
||||
|
||||
// Creates a single icon from a given /atom or /image. Only the first argument is required.
|
||||
/proc/getFlatIcon(image/A, defdir, deficon, defstate, defblend, start = TRUE)
|
||||
/proc/getFlatIcon(image/A, defdir, deficon, defstate, defblend, start = TRUE, no_anim = FALSE)
|
||||
// We start with a blank canvas, otherwise some icon procs crash silently
|
||||
var/icon/flat = icon('icons/effects/effects.dmi', "nothing") // Final flattened icon
|
||||
if(!A)
|
||||
@@ -867,7 +867,7 @@ The _flatIcons list is a cache for generated icon files.
|
||||
curblend = BLEND_OVERLAY
|
||||
add = icon(I.icon, I.icon_state, base_icon_dir)
|
||||
else // 'I' is an appearance object.
|
||||
add = getFlatIcon(new/image(I), curdir, curicon, curstate, curblend, FALSE)
|
||||
add = getFlatIcon(new/image(I), curdir, curicon, curstate, curblend, FALSE, no_anim)
|
||||
|
||||
// Find the new dimensions of the flat icon to fit the added overlay
|
||||
addX1 = min(flatX1, I.pixel_x+1)
|
||||
@@ -889,7 +889,10 @@ The _flatIcons list is a cache for generated icon files.
|
||||
if(A.alpha < 255)
|
||||
flat.Blend(rgb(255, 255, 255, A.alpha), ICON_MULTIPLY)
|
||||
|
||||
return icon(flat, "", SOUTH)
|
||||
if(no_anim)
|
||||
return icon(flat, "", SOUTH, frame=1)
|
||||
else
|
||||
return icon(flat, "", SOUTH)
|
||||
|
||||
/proc/getIconMask(atom/A)//By yours truly. Creates a dynamic mask for a mob/whatever. /N
|
||||
var/icon/alpha_mask = new(A.icon,A.icon_state)//So we want the default icon and icon state of A.
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
var/icon/res = icon('icons/effects/96x96.dmi', "")
|
||||
|
||||
for(var/atom/A in sorted)
|
||||
var/icon/img = getFlatIcon(A)
|
||||
var/icon/img = getFlatIcon(A, no_anim = TRUE)
|
||||
if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
if(L.lying)
|
||||
@@ -237,7 +237,7 @@
|
||||
for(var/turf/T in turfs)
|
||||
var/area/A = T.loc
|
||||
if(A.icon_state)//There's actually something to blend in.
|
||||
res.Blend(getFlatIcon(A), blendMode2iconMode(A.blend_mode), world.icon_size * (T.x - center.x) + 33, world.icon_size * (T.y - center.y) + 33)
|
||||
res.Blend(getFlatIcon(A,no_anim = TRUE), blendMode2iconMode(A.blend_mode), world.icon_size * (T.x - center.x) + 33, world.icon_size * (T.y - center.y) + 33)
|
||||
|
||||
return res
|
||||
|
||||
|
||||
Reference in New Issue
Block a user