04-21-2016, 01:30 PM
Code:
else if (istype(module, /obj/item/clothing/mask/moustache/))
for (var/mob/living/silicon/ai/M in mobs)
M.moustache_mode = 1
user.visible_message("<span style=\"color:red\"><b>[user.name]</b> uploads a moustache to [M.name]!</span>")
M.update_appearance()
Code:
if (src.moustache_mode == 1)
src.UpdateOverlays(SafeGetOverlayImage("moustache", 'icons/mob/ai.dmi', "moustache", src.layer+0.3), "moustache")
else
src.UpdateOverlays(null, "moustache")
/mob/living/silicon/ai/proc/get_image(var/icon_state)
if(!cached_image)
cached_image = image('icons/mob/ai.dmi', "moustache")
cached_image.icon_state = icon_state
return cached_image
Here's the relevant code. For those of you who can't read that, it works by overlaying a picture of a mustache onto the AI as a special case. I could MAYBE add a few more as a patch, but getting the layering right would be tricky and it would be better practice coding-wise to redo how clothing works for non-humans.