Overhaul, adds color2R/G/B helper procs, adds marking/head accessory/body accessory (colours included) randomization in char prefs.

Color2R/G/B helper procs and PR overhaul suggested/co-authored by Krausus.
This commit is contained in:
KasparoVy
2016-08-12 22:23:17 -04:00
parent 9554428c59
commit a5722fdfc4
26 changed files with 485 additions and 471 deletions
+6 -13
View File
@@ -47,8 +47,7 @@
to_chat(user, "<span class= 'notice'>[target] has no skin, how do you expect to tattoo them?</span>")
return
var/list/marking_styles = params2list(target.m_styles)
if(marking_styles["body"] != "None")
if(target.m_styles["body"] != "None")
to_chat(user, "<span class= 'notice'>[target] already has body markings, any more would look silly!</span>")
return
@@ -67,14 +66,8 @@
user.visible_message("<span class='notice'>[user] finishes the [tattoo_name] on [target].</span>", "<span class='notice'>You finish the [tattoo_name].</span>")
if(!used) // No exploiting do_after to tattoo multiple folks.
var/list/marking_colours = params2list(target.m_colours)
marking_styles["body"] = tattoo_icon
marking_colours["body"] = "#[num2hex(tattoo_r,2)][num2hex(tattoo_g,2)][num2hex(tattoo_b,2)]"
target.m_styles = list2params(marking_styles)
target.m_colours = list2params(marking_colours)
target.update_markings()
target.change_markings(tattoo_icon, "body")
target.change_marking_color(rgb(tattoo_r, tattoo_g, tattoo_b), "body")
playsound(src.loc, 'sound/items/Welder2.ogg', 20, 1)
used = 1
@@ -106,9 +99,9 @@
if(!used)
var/ink_color = input("Please select an ink color.", "Tattoo Ink Color", rgb(tattoo_r, tattoo_g, tattoo_b)) as color|null
if(ink_color && !(user.incapacitated() || used) )
tattoo_r = hex2num(copytext(ink_color, 2, 4))
tattoo_g = hex2num(copytext(ink_color, 4, 6))
tattoo_b = hex2num(copytext(ink_color, 6, 8))
tattoo_r = color2R(ink_color)
tattoo_g = color2G(ink_color)
tattoo_b = color2B(ink_color)
to_chat(user, "<span class='notice'>You change the color setting on the [src].</span>")