Various fixes.

Client Login() now calls ..() before setting up preferences, ensuring a mob has actually been assigned. Fixes #12560 (and probably other somehow subtle sanitation issues).
The alien whitelist now checks the rights of the supplied mob, not usr.
When granting xeno loadout gear the mob's current species must match the gear's whiteliste species.
This commit is contained in:
PsiOmegaDelta
2016-04-08 10:31:51 +02:00
committed by Yoshax
parent a2e50d05ec
commit 4d74a8f5c2
4 changed files with 13 additions and 9 deletions

View File

@@ -52,15 +52,17 @@ var/list/gear_datums = list()
S["gear"] << pref.gear
/datum/category_item/player_setup_item/loadout/proc/valid_gear_choices(var/max_cost)
var/list/valid_gear_choices = list()
. = list()
var/mob/preference_mob = preference_mob()
for(var/gear_name in gear_datums)
var/datum/gear/G = gear_datums[gear_name]
if(G.whitelisted && !is_alien_whitelisted(preference_mob(), all_species[G.whitelisted]))
//if(G.whitelisted && !is_alien_whitelisted(preference_mob(), all_species[G.whitelisted]))
if(G.whitelisted && !is_alien_whitelisted(preference_mob, G.whitelisted))
continue
if(max_cost && G.cost > max_cost)
continue
valid_gear_choices += gear_name
return valid_gear_choices
. += gear_name
/datum/category_item/player_setup_item/loadout/sanitize_character()
if(!islist(pref.gear))