Merge pull request #8222 from Incoming5643/I_dont_even_know_who_I_am_anymore

Magic Mania 1.855: Appearances are everything
This commit is contained in:
Cheridan
2015-03-13 23:01:34 -05:00
4 changed files with 118 additions and 18 deletions
+93 -1
View File
@@ -100,4 +100,96 @@
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
shatter()
shatter()
/obj/structure/mirror/magic
name = "magic mirror"
desc = "Turn and face the strange... face."
icon_state = "magic_mirror"
/obj/structure/mirror/magic/attack_hand(mob/user as mob)
if(!ishuman(user))
return
var/mob/living/carbon/human/H = user
var/choice = input(user, "Something to change?", "Magical Grooming") as null|anything in list("name", "race", "gender", "hair", "eyes")
switch(choice)
if("name")
var/newname = copytext(sanitize(input(H, "Who are we again?", "Name change", H.name) as null|text),1,MAX_NAME_LEN)
if(!newname)
return
H.real_name = newname
H.name = newname
if(H.mind)
H.mind.name = newname
if("race")
var/newrace
var/racechoice = input(H, "What are we again?", "Race change") as null|anything in species_list
newrace = species_list[racechoice]
if(!newrace || !H.dna)
return
H.dna.species = new newrace
if(H.dna.species.use_skintones)
var/new_s_tone = input(user, "What are we again?", "Race change") as null|anything in skin_tones
if(new_s_tone)
H.skin_tone = new_s_tone
if(MUTCOLORS in H.dna.species.specflags)
var/new_mutantcolor = input(user, "Choose your skin color:", "Race change") as color|null
if(new_mutantcolor)
var/temp_hsv = RGBtoHSV(new_mutantcolor)
if(ReadHSV(temp_hsv)[3] >= ReadHSV("#7F7F7F")[3]) // mutantcolors must be bright
H.dna.mutant_color = sanitize_hexcolor(new_mutantcolor)
else
H << "<span class='notice'>Invalid color. Your color is not bright enough.</span>"
H.regenerate_icons()
if("gender")
if(!(H.gender in list("male", "female"))) //blame the patriarchy
return
if(H.gender == "male")
if(alert(H, "Become a Witch?", "Confirmation", "Yes", "No") == "Yes")
H.gender = "female"
H << "<span class='notice'>Man, you feel like a woman!</span>"
H.regenerate_icons()
else
if(alert(H, "Become a Warlock?", "Confirmation", "Yes", "No") == "Yes")
H.gender = "male"
H << "<span class='notice'>Whoa man, you feel like a man!</span>"
H.regenerate_icons()
if("hair")
var/hairchoice = alert(H, "Hair style or hair color?", "Change Hair", "Style", "Color")
if(hairchoice == "Style") //So you just want to use a mirror then?
..()
else
var/new_hair_color = input(H, "Choose your hair color", "Hair Color") as null|color
if(new_hair_color)
H.hair_color = sanitize_hexcolor(new_hair_color)
if(H.gender == "male")
var/new_face_color = input(H, "Choose your facial hair color", "Hair Color") as null|color
if(new_face_color)
H.facial_hair_color = sanitize_hexcolor(new_face_color)
H.update_hair()
if("eyes")
var/new_eye_color = input(H, "Choose your eye color", "Eye Color") as null|color
if(new_eye_color)
H.eye_color = sanitize_hexcolor(new_eye_color)
H.update_body()