it works
This commit is contained in:
@@ -46,17 +46,11 @@
|
||||
I = getPAIHologramIcon(I)
|
||||
return I
|
||||
|
||||
//Errors go to user.
|
||||
/proc/generate_custom_holoform_from_prefs_safe(datum/preferences/prefs, mob/user)
|
||||
if(user)
|
||||
if(user.client.prefs.last_custom_holoform > world.time - CUSTOM_HOLOFORM_DELAY)
|
||||
to_chat(user, "<span class='boldwarning'>You are attempting to set your custom holoform too fast!</span>")
|
||||
return
|
||||
return generate_custom_holoform_from_prefs(prefs, null, null, TRUE, TRUE)
|
||||
|
||||
//Prompts this client for custom holoform parameters.
|
||||
/proc/user_interface_custom_holoform(client/C)
|
||||
message_admins("poge")
|
||||
if(C.prefs.last_custom_holoform > world.time - CUSTOM_HOLOFORM_DELAY)
|
||||
to_chat(C.mob, "<span class='boldwarning'>You are attempting to set your custom holoform too fast!</span>")
|
||||
return
|
||||
var/datum/preferences/target_prefs = C.prefs
|
||||
if(target_prefs.path)
|
||||
var/list/characters = list()
|
||||
@@ -65,14 +59,15 @@
|
||||
var/name
|
||||
var/max_save_slots = C.prefs.max_save_slots
|
||||
for(var/i=1, i<=max_save_slots, i++)
|
||||
S.cd = "/character[i]"
|
||||
S["real_name"] >> name
|
||||
characters[i] = name
|
||||
characters += name
|
||||
var/chosen_name = input(C, "Which character do you wish to use as your appearance.") as anything in characters
|
||||
if(chosen_name)
|
||||
target_prefs = new(C)
|
||||
if(!target_prefs.load_character(characters[chosen_name]))
|
||||
if(!target_prefs.load_character(characters[chosen_name], TRUE))
|
||||
target_prefs = C.prefs
|
||||
|
||||
ASSERT(target_prefs)
|
||||
//In the future, maybe add custom path allowances a la admin create outfit but for now..
|
||||
return generate_custom_holoform_from_prefs_safe(target_prefs, C.mob)
|
||||
return generate_custom_holoform_from_prefs(target_prefs, null, null, TRUE, TRUE)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
return
|
||||
if(client.prefs.last_custom_holoform > world.time - CUSTOM_HOLOFORM_DELAY)
|
||||
to_chat(src, "<span class='warning'>You are attempting to change custom holoforms too fast!</span>")
|
||||
return
|
||||
var/icon/new_holoform = user_interface_custom_holoform(client)
|
||||
if(new_holoform)
|
||||
client.prefs.custom_holoform_icon = new_holoform
|
||||
|
||||
Reference in New Issue
Block a user