fixes preview icon runtimes+ (#304)

This commit is contained in:
TalkingCactus
2017-03-21 22:22:47 -04:00
committed by Poojawa
parent f67e9f6d87
commit fcc5e0e2f5

View File

@@ -5,9 +5,6 @@
gender = gender_override
else
gender = pick(MALE,FEMALE)
underwear = random_underwear(gender)
undershirt = random_undershirt(gender)
socks = random_socks()
skin_tone = random_skin_tone()
hair_style = random_hair_style(gender)
facial_hair_style = random_facial_hair_style(gender)
@@ -20,7 +17,12 @@
features = random_features()
age = rand(AGE_MIN,AGE_MAX)
/datum/preferences/proc/update_preview_icon()
/datum/preferences/proc/update_preview_icon(nude = 0)
var/wide_icon = 0
var/stamp_x = 0
var/stamp_y = 1
if(features["taur"] != "None")
wide_icon = 1
// Silicons only need a very basic preview since there is no customization for them.
if(job_engsec_high)
switch(job_engsec_high)
@@ -57,28 +59,40 @@
previewJob = job
break
if(previewJob)
if(previewJob && !nude)
mannequin.job = previewJob.title
previewJob.equip(mannequin, TRUE)
CHECK_TICK
preview_icon = icon('icons/effects/effects.dmi', "nothing")
preview_icon.Scale(48+32, 16+32)
preview_icon.Scale((112), (32))
CHECK_TICK
mannequin.setDir(NORTH)
var/icon/stamp = getFlatIcon(mannequin)
CHECK_TICK
preview_icon.Blend(stamp, ICON_OVERLAY, 25, 17)
if(wide_icon)
stamp_x = 16
else
stamp_x = 32
preview_icon.Blend(stamp, ICON_OVERLAY, stamp_x, stamp_y)
CHECK_TICK
mannequin.setDir(WEST)
stamp = getFlatIcon(mannequin)
CHECK_TICK
preview_icon.Blend(stamp, ICON_OVERLAY, 1, 9)
if(wide_icon)
stamp_x = 48
else
stamp_x = 64
preview_icon.Blend(stamp, ICON_OVERLAY, stamp_x, stamp_y)
CHECK_TICK
mannequin.setDir(SOUTH)
stamp = getFlatIcon(mannequin)
CHECK_TICK
preview_icon.Blend(stamp, ICON_OVERLAY, 49, 1)
if(wide_icon)
stamp_x = -15
else
stamp_x = 1
preview_icon.Blend(stamp, ICON_OVERLAY, stamp_x, stamp_y)
CHECK_TICK
preview_icon.Scale(preview_icon.Width() * 2, preview_icon.Height() * 2) // Scaling here to prevent blurring in the browser.
CHECK_TICK