mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +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:
@@ -122,6 +122,8 @@
|
||||
admins += src
|
||||
holder.owner = src
|
||||
|
||||
. = ..() //calls mob.Login()
|
||||
|
||||
//preferences datum - also holds some persistant data for the client (because we may as well keep these datums to a minimum)
|
||||
prefs = preferences_datums[ckey]
|
||||
if(!prefs)
|
||||
@@ -130,8 +132,6 @@
|
||||
prefs.last_ip = address //these are gonna be used for banning
|
||||
prefs.last_id = computer_id //these are gonna be used for banning
|
||||
|
||||
. = ..() //calls mob.Login()
|
||||
|
||||
if(custom_event_msg && custom_event_msg != "")
|
||||
src << "<h1 class='alert'>Custom Event</h1>"
|
||||
src << "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>"
|
||||
|
||||
@@ -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