Adds a magic mirror to the wizards shuttle. The magic mirror has greatly expanded functionality compared to the normal one, and can additionally change a wizards name, gender, race, hair color and eye color.

Additionally this fixes up some rogue simulated airless tiles on the wizards shuttle (these tiles were why the creature would always end up dead)
This commit is contained in:
Incoming
2015-03-08 04:24:04 -04:00
parent 7488c47e7a
commit 9384d44ee5
2 changed files with 108 additions and 18 deletions
+92 -1
View File
@@ -100,4 +100,95 @@
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."
/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()