edit appearance admin verb ported from old code

This commit is contained in:
Tastyfish
2011-12-24 02:38:21 -05:00
parent ea755d98a8
commit 3f1d378f13

View File

@@ -213,7 +213,7 @@
verbs += /proc/possess
verbs += /proc/release
verbs += /client/proc/toggleprayers
verbs += /client/proc/editappear
if (holder.level >= 2)//Admin Candidate********************************************************************
verbs += /client/proc/cmd_admin_add_random_ai_law
@@ -394,6 +394,7 @@
verbs -= /client/proc/play_local_sound
verbs -= /client/proc/enable_mapping_debug
verbs -= /client/proc/toggleprayers
verbs -= /client/proc/editappear
verbs -= /client/proc/jump_to_dead_group
verbs -= /client/proc/Blobize
verbs -= /client/proc/toggle_clickproc //TODO ERRORAGE (Temporary proc while the enw clickproc is being tested)
@@ -758,3 +759,53 @@
log_admin("[key_name(usr)] has toggled [key_name(M)]'s nodamage to [(M.nodamage ? "On" : "Off")]")
message_admins("[key_name_admin(usr)] has toggled [key_name_admin(M)]'s nodamage to [(M.nodamage ? "On" : "Off")]", 1)
/client/proc/editappear(mob/living/carbon/human/M as mob in world)
set name = "Edit Appearance"
if(!istype(M, /mob/living/carbon/human))
usr << "\red You can only do this to humans!"
return
var/new_facial = input("Please select facial hair color.", "Character Generation") as color
if(new_facial)
M.r_facial = hex2num(copytext(new_facial, 2, 4))
M.g_facial = hex2num(copytext(new_facial, 4, 6))
M.b_facial = hex2num(copytext(new_facial, 6, 8))
var/new_hair = input("Please select hair color.", "Character Generation") as color
if(new_facial)
M.r_hair = hex2num(copytext(new_hair, 2, 4))
M.g_hair = hex2num(copytext(new_hair, 4, 6))
M.b_hair = hex2num(copytext(new_hair, 6, 8))
var/new_eyes = input("Please select eye color.", "Character Generation") as color
if(new_eyes)
M.r_eyes = hex2num(copytext(new_eyes, 2, 4))
M.g_eyes = hex2num(copytext(new_eyes, 4, 6))
M.b_eyes = hex2num(copytext(new_eyes, 6, 8))
var/new_tone = input("Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation") as text
if (new_tone)
M.s_tone = max(min(round(text2num(new_tone)), 220), 1)
M.s_tone = -M.s_tone + 35
var/new_style = input("Please select hair style", "Character Generation") as null|anything in list( "Cut Hair", "Short Hair", "Long Hair", "Mohawk", "Balding", "Wave", "Bedhead", "Dreadlocks", "Ponytail", "Bald" )
if (new_style)
M.h_style = new_style
new_style = input("Please select facial style", "Character Generation") as null|anything in list("Watson", "Chaplin", "Selleck", "Full Beard", "Long Beard", "Neckbeard", "Van Dyke", "Elvis", "Abe", "Chinstrap", "Hipster", "Goatee", "Hogan", "Shaved")
if (new_style)
M.f_style = new_style
var/new_gender = alert(usr, "Please select gender.", "Character Generation", "Male", "Female")
if (new_gender)
if(new_gender == "Male")
M.gender = MALE
else
M.gender = FEMALE
M.update_body()
M.update_face()
M.update_clothing()