proc/CreateHair(STATE,MASK_STATE,ALPHA,SIZE,ANGLE,PX,PY)
var masked_object/mo = new
mo.icon = 'icons/hair.dmi'
mo.icon_state = "[STATE]"
mo.overlays += new/mask(MASK_STATE,ALPHA,SIZE,ANGLE,PX,PY)
mo.color = "#F00"
return mo
masked_object
parent_type = /obj
appearance_flags = KEEP_TOGETHER
mask
parent_type = /obj
icon = 'icons/_masks.dmi'
appearance_flags = RESET_COLOR
blend_mode = BLEND_INSET_OVERLAY
New(MASK_STATE,ALPHA=255,SIZE=1.0,ANGLE=45,PX,PY)
transform = turn(matrix()*SIZE,ANGLE)
icon_state = "[MASK_STATE]"
alpha = ALPHA
pixel_x = PX
pixel_y = PY
color = "#FF0"
mob/Login()
vis_contents.Add(
CreateHair(1,1,255,0.2,45,0,5),
CreateHair(1,1,255,0.35,13,0,5),
CreateHair(1,1,255,1.0,0,0,0),
CreateHair(1,1,255,0.1,45,0,8),
)
..()
animate(vis_contents[1],pixel_x=0,pixel_y=0)
animate(vis_contents[2],pixel_x=32,pixel_y=0)
animate(vis_contents[3],pixel_x=0,pixel_y=32)
animate(vis_contents[4],pixel_x=32,pixel_y=32)
Problem description:
I'm trying to give the mask its own color but since the main icon uses KEEP_TOGETHER not even RESET_COLOR on the mask is resetting its color.