Fix [message]s without an image not working

This commit is contained in:
Bär Halberkamp 2016-07-17 19:49:29 -04:00
parent 63e0303c00
commit 0a83e2e6b6

View file

@ -16,6 +16,10 @@ local function get_image(cfg, speaker)
image = speaker.portrait
end
if image == "none" or image == nil then
return "", true
end
-- Note: This is deprecated except for use to set default alignment in portraits
-- (Move it into the above if statement later)
if image:find("~RIGHT%(%)") then
@ -32,10 +36,6 @@ local function get_image(cfg, speaker)
helper.wml_error('Invalid [message]image_pos - should be left or right')
end
if image == "none" or image == nil then
return "", true
end
return image, left_side
end