Character slot fixes

Fixes "Randomized Character Slot" not working at all and the slot load
list running 20x as many SQL queries as it should
This commit is contained in:
Krausus
2017-01-16 13:15:37 -05:00
parent e62c3eb0f1
commit 6f96d0bae2
4 changed files with 32 additions and 20 deletions
@@ -25,6 +25,8 @@
/mob/new_player/proc/new_player_panel_proc()
var/real_name = client.prefs.real_name
if(client.prefs.randomslot)
real_name = "Random Character Slot"
var/output = "<center><p><a href='byond://?src=[UID()];show_preferences=1'>Setup Character</A><br /><i>[real_name]</i></p>"
if(!ticker || ticker.current_state <= GAME_STATE_PREGAME)
@@ -169,6 +171,9 @@
to_chat(usr, "\blue There is an administrative lock on entering the game!")
return
if(client.prefs.randomslot)
client.prefs.load_random_character_slot(client)
if(client.prefs.species in whitelisted_species)
if(!is_alien_whitelisted(src, client.prefs.species) && config.usealienwhitelist)
to_chat(src, alert("You are currently not whitelisted to play [client.prefs.species]."))