Adjacency checks

This commit is contained in:
KorPhaeron
2016-02-24 13:20:12 -06:00
parent 66689856d3
commit 62ce96e20e
2 changed files with 14 additions and 7 deletions
+13 -4
View File
@@ -159,13 +159,17 @@
var/choice = input(user, "Something to change?", "Magical Grooming") as null|anything in list("name", "race", "gender", "hair", "eyes")
if(!Adjacent(user))
return
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
if(!Adjacent(user))
return
H.real_name = newname
H.name = newname
if(H.dna)
@@ -180,7 +184,8 @@
if(!newrace)
return
if(!Adjacent(user))
return
H.set_species(newrace, icon_update=0)
if(H.dna.species.use_skintones)
@@ -209,7 +214,8 @@
if("gender")
if(!(H.gender in list("male", "female"))) //blame the patriarchy
return
if(!Adjacent(user))
return
if(H.gender == "male")
if(alert(H, "Become a Witch?", "Confirmation", "Yes", "No") == "Yes")
H.gender = "female"
@@ -229,7 +235,8 @@
if("hair")
var/hairchoice = alert(H, "Hair style or hair color?", "Change Hair", "Style", "Color")
if(!Adjacent(user))
return
if(hairchoice == "Style") //So you just want to use a mirror then?
..()
else
@@ -246,6 +253,8 @@
if("eyes")
var/new_eye_color = input(H, "Choose your eye color", "Eye Color") as null|color
if(!Adjacent(user))
return
if(new_eye_color)
H.eye_color = sanitize_hexcolor(new_eye_color)
H.dna.update_ui_block(DNA_EYE_COLOR_BLOCK)
+1 -3
View File
@@ -42,8 +42,6 @@
return
if(in_use)
return
if(!ishuman(user))
return
in_use = TRUE
user << "<span class='danger'><B>You feel your very life draining away as you pull the lever...it'll be worth it though, right?</B></span>"
user.adjustCloneLoss(20)
@@ -85,7 +83,7 @@
//Pride
/obj/structure/mirror/magic
/obj/structure/mirror/magic/pride
name = "pride's mirror"
desc = "Pride cometh before the..."
icon_state = "magic_mirror"