mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 14:08:31 +01:00
Adjacency checks
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user