diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 14d772437d6..766149d4123 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -342,11 +342,13 @@ var/global/datum/controller/occupations/job_master else permitted = 1 - if(G.whitelisted && !is_alien_whitelisted(H, all_species[G.whitelisted])) + //if(G.whitelisted && !is_alien_whitelisted(H, all_species[G.whitelisted])) + + if(G.whitelisted && (G.whitelisted != H.species.name || !is_alien_whitelisted(H, G.whitelisted))) permitted = 0 if(!permitted) - H << "Your current job or whitelist status does not permit you to spawn with [thing]!" + H << "Your current species, job or whitelist status does not permit you to spawn with [thing]!" continue if(G.slot && !(G.slot in custom_equip_slots)) diff --git a/code/game/jobs/whitelist.dm b/code/game/jobs/whitelist.dm index 4d7106d2134..9a13e066a54 100644 --- a/code/game/jobs/whitelist.dm +++ b/code/game/jobs/whitelist.dm @@ -75,7 +75,7 @@ var/list/whitelist = list() /proc/whitelist_overrides(mob/M) if(!config.usealienwhitelist) return 1 - if(check_rights(R_ADMIN, 0)) + if(check_rights(R_ADMIN, 0, M)) return 1 return 0 diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 0962d540611..4463209157b 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -131,6 +131,7 @@ prefs.last_id = computer_id //these are gonna be used for banning . = ..() //calls mob.Login() + prefs.sanitize_preferences() if(custom_event_msg && custom_event_msg != "") src << "

Custom Event

" diff --git a/code/modules/client/preference_setup/loadout/loadout.dm b/code/modules/client/preference_setup/loadout/loadout.dm index 31b510ef1a8..4bee6c65663 100644 --- a/code/modules/client/preference_setup/loadout/loadout.dm +++ b/code/modules/client/preference_setup/loadout/loadout.dm @@ -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)) diff --git a/code/modules/client/preference_setup/loadout/loadout_xeno.dm b/code/modules/client/preference_setup/loadout/loadout_xeno.dm index 9f814743aea..80e6bb8ebf8 100644 --- a/code/modules/client/preference_setup/loadout/loadout_xeno.dm +++ b/code/modules/client/preference_setup/loadout/loadout_xeno.dm @@ -2,14 +2,12 @@ /datum/gear/suit/zhan_furs display_name = "Zhan-Khazan furs (Tajara)" path = /obj/item/clothing/suit/tajaran/furs - whitelisted = "Tajara" sort_category = "Xenowear" /datum/gear/suit/unathi_mantle display_name = "hide mantle (Unathi)" path = /obj/item/clothing/suit/unathi/mantle cost = 1 - whitelisted = "Unathi" sort_category = "Xenowear" /datum/gear/ears/skrell/chains //Chains @@ -25,7 +23,7 @@ var/obj/item/clothing/ears/skrell/chain/chain = chain_style chaintypes[initial(chain.name)] = chain gear_tweaks += new/datum/gear_tweak/path(sortAssoc(chaintypes)) - + /datum/gear/ears/skrell/bands display_name = "headtail band selection (Skrell)" path = /obj/item/clothing/ears/skrell/band @@ -39,7 +37,7 @@ var/obj/item/clothing/ears/skrell/band/band = band_style bandtypes[initial(band.name)] = band gear_tweaks += new/datum/gear_tweak/path(sortAssoc(bandtypes)) - + /datum/gear/ears/skrell/cloth/male display_name = "male headtail cloth selection (Skrell)" path = /obj/item/clothing/ears/skrell/cloth_male @@ -73,17 +71,17 @@ path = /obj/item/clothing/ears/skrell/colored/band sort_category = "Xenowear" whitelisted = "Skrell" - + /datum/gear/ears/skrell/colored/band/New() ..() gear_tweaks = list(gear_tweak_free_color_choice) - + /datum/gear/ears/skrell/colored/chain display_name = "Colored chain (Skrell)" path = /obj/item/clothing/ears/skrell/colored/chain sort_category = "Xenowear" whitelisted = "Skrell" - + /datum/gear/ears/skrell/colored/chain/New() ..() gear_tweaks = list(gear_tweak_free_color_choice) diff --git a/code/modules/client/preference_setup/preference_setup.dm b/code/modules/client/preference_setup/preference_setup.dm index 832d529d7c1..f72ff0645c0 100644 --- a/code/modules/client/preference_setup/preference_setup.dm +++ b/code/modules/client/preference_setup/preference_setup.dm @@ -129,8 +129,6 @@ // Need due to, for example, the 01_basic module relying on species having been loaded to sanitize correctly but that isn't loaded until module 03_body. for(var/datum/category_item/player_setup_item/PI in items) PI.load_character(S) - for(var/datum/category_item/player_setup_item/PI in items) - PI.sanitize_character() /datum/category_group/player_setup_category/proc/save_character(var/savefile/S) // Sanitize all data, then save it @@ -142,8 +140,6 @@ /datum/category_group/player_setup_category/proc/load_preferences(var/savefile/S) for(var/datum/category_item/player_setup_item/PI in items) PI.load_preferences(S) - for(var/datum/category_item/player_setup_item/PI in items) - PI.sanitize_preferences() /datum/category_group/player_setup_category/proc/save_preferences(var/savefile/S) for(var/datum/category_item/player_setup_item/PI in items) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 4aeaf7c800d..db12940bd9a 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -237,12 +237,14 @@ datum/preferences else if(href_list["reload"]) load_preferences() load_character() + sanitize_preferences() else if(href_list["load"]) if(!IsGuestKey(usr.key)) open_load_dialog(usr) return 1 else if(href_list["changeslot"]) load_character(text2num(href_list["changeslot"])) + sanitize_preferences() close_load_dialog(usr) else return 0 diff --git a/html/changelogs/Yoshax - Xeno.yml b/html/changelogs/Yoshax - Xeno.yml new file mode 100644 index 00000000000..d456954c721 --- /dev/null +++ b/html/changelogs/Yoshax - Xeno.yml @@ -0,0 +1,36 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +################################# + +# Your name. +author: Yoshax + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Xeno loadout items will now properly be reloaded into a slot when the server restarts."