mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user