diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index add1dfbf02..acb568c6d8 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -660,16 +660,16 @@ var/global/datum/controller/occupations/job_master fail_deadly = J?.offmap_spawn //Spawn them at their preferred one - if(C && C.prefs.read_preference(/datum/preference/choiced/human/spawnpoint)) - if(!(C.prefs.read_preference(/datum/preference/choiced/human/spawnpoint) in using_map.allowed_spawns)) + if(C && C.prefs.read_preference(/datum/preference/choiced/living/spawnpoint)) + if(!(C.prefs.read_preference(/datum/preference/choiced/living/spawnpoint) in using_map.allowed_spawns)) if(fail_deadly) to_chat(C, span_warning("Your chosen spawnpoint is unavailable for this map and your job requires a specific spawnpoint. Please correct your spawn point choice.")) return else - to_chat(C, span_warning("Your chosen spawnpoint ([C.prefs.read_preference(/datum/preference/choiced/human/spawnpoint)]) is unavailable for the current map. Spawning you at one of the enabled spawn points instead.")) + to_chat(C, span_warning("Your chosen spawnpoint ([C.prefs.read_preference(/datum/preference/choiced/living/spawnpoint)]) is unavailable for the current map. Spawning you at one of the enabled spawn points instead.")) spawnpos = null else - spawnpos = spawntypes[C.prefs.read_preference(/datum/preference/choiced/human/spawnpoint)] + spawnpos = spawntypes[C.prefs.read_preference(/datum/preference/choiced/living/spawnpoint)] //We will return a list key'd by "turf" and "msg" . = list("turf","msg") diff --git a/code/modules/client/preference_setup/general/01_basic.dm b/code/modules/client/preference_setup/general/01_basic.dm index ebd7563b74..93523ff3c5 100644 --- a/code/modules/client/preference_setup/general/01_basic.dm +++ b/code/modules/client/preference_setup/general/01_basic.dm @@ -63,7 +63,7 @@ . += span_bold("Biological Sex:") + " [gender2text(pref.biological_gender)]
" . += span_bold("Pronouns:") + " [gender2text(pref.identifying_gender)]
" . += span_bold("Age:") + " [pref.read_preference(/datum/preference/numeric/human/age)] Birthday: [pref.read_preference(/datum/preference/numeric/human/bday_month)]/[pref.read_preference(/datum/preference/numeric/human/bday_day)] - Announce?: [pref.read_preference(/datum/preference/toggle/human/bday_announce) ? "Yes" : "No"]
" - . += span_bold("Spawn Point:") + " [pref.read_preference(/datum/preference/choiced/human/spawnpoint)]
" + . += span_bold("Spawn Point:") + " [pref.read_preference(/datum/preference/choiced/living/spawnpoint)]
" if(CONFIG_GET(flag/allow_metadata)) . += span_bold("OOC Notes: EditLikesDislikes") + "
" . = jointext(.,null) @@ -183,7 +183,7 @@ spawnkeys += spawntype var/choice = tgui_input_list(user, "Where would you like to spawn when late-joining?", "Late-Join Choice", spawnkeys) if(!choice || !spawntypes[choice] || !CanUseTopic(user)) return TOPIC_NOACTION - pref.update_preference_by_type(/datum/preference/choiced/human/spawnpoint, choice) + pref.update_preference_by_type(/datum/preference/choiced/living/spawnpoint, choice) return TOPIC_REFRESH else if(href_list["edit_ooc_notes"]) diff --git a/code/modules/client/preferences/types/character/general/01_basic.dm b/code/modules/client/preferences/types/character/general/01_basic.dm index 3449486c23..b156f7a3ae 100644 --- a/code/modules/client/preferences/types/character/general/01_basic.dm +++ b/code/modules/client/preferences/types/character/general/01_basic.dm @@ -159,17 +159,17 @@ /datum/preference/toggle/human/name_is_always_random/apply_to_human(mob/living/carbon/human/target, value) return // handled in copy_to -/datum/preference/choiced/human/spawnpoint +/datum/preference/choiced/living/spawnpoint category = PREFERENCE_CATEGORY_MANUALLY_RENDERED savefile_key = "spawnpoint" savefile_identifier = PREFERENCE_CHARACTER can_randomize = FALSE -/datum/preference/choiced/human/spawnpoint/init_possible_values() +/datum/preference/choiced/living/spawnpoint/init_possible_values() var/list/spawnkeys = list() - for(var/spawntype in spawntypes) + for(var/spawntype in get_spawn_points()) spawnkeys += spawntype return spawnkeys -/datum/preference/choiced/human/spawnpoint/apply_to_human(mob/living/carbon/human/target, value) +/datum/preference/choiced/living/spawnpoint/apply_to_living(mob/living/target, value) return // handled in job_controller diff --git a/code/modules/client/preferences/types/character/general/03_body.dm b/code/modules/client/preferences/types/character/general/03_body.dm index 8037bbe21a..1e4215b516 100644 --- a/code/modules/client/preferences/types/character/general/03_body.dm +++ b/code/modules/client/preferences/types/character/general/03_body.dm @@ -56,7 +56,7 @@ /datum/preference/color/human/synth_color category = PREFERENCE_CATEGORY_MANUALLY_RENDERED savefile_identifier = PREFERENCE_CHARACTER - savefile_key = "synth_color" + savefile_key = "synth_color_rgb" can_randomize = FALSE /datum/preference/color/human/synth_color/apply_to_human(mob/living/carbon/human/target, value) diff --git a/code/modules/client/preferences_spawnpoints.dm b/code/modules/client/preferences_spawnpoints.dm index 6078808c30..14789bf17b 100644 --- a/code/modules/client/preferences_spawnpoints.dm +++ b/code/modules/client/preferences_spawnpoints.dm @@ -6,6 +6,11 @@ var/list/spawntypes = list() var/datum/spawnpoint/S = new type() spawntypes[S.display_name] = S +/proc/get_spawn_points() + if(!LAZYLEN(spawntypes)) + populate_spawn_points() + return spawntypes + /datum/spawnpoint var/msg //Message to display on the arrivals computer. var/list/turfs //List of turfs to spawn on. @@ -103,4 +108,4 @@ var/global/list/latejoin_tram = list() /datum/spawnpoint/tram/New() ..() - turfs = latejoin_tram \ No newline at end of file + turfs = latejoin_tram diff --git a/code/modules/tgui/modules/late_choices.dm b/code/modules/tgui/modules/late_choices.dm index e7a93b41ac..88096bea22 100644 --- a/code/modules/tgui/modules/late_choices.dm +++ b/code/modules/tgui/modules/late_choices.dm @@ -134,4 +134,4 @@ tgui_alert_async(new_user,"Your current species, [new_user.client.prefs.species], is not available for play on the station.") return 0 - new_user.AttemptLateSpawn(job, new_user.read_preference(/datum/preference/choiced/human/spawnpoint)) + new_user.AttemptLateSpawn(job, new_user.read_preference(/datum/preference/choiced/living/spawnpoint)) diff --git a/code/modules/vore/persist/persist_vr.dm b/code/modules/vore/persist/persist_vr.dm index 9733dcaafe..f405a8617e 100644 --- a/code/modules/vore/persist/persist_vr.dm +++ b/code/modules/vore/persist/persist_vr.dm @@ -91,7 +91,7 @@ // Okay we can start saving the data if(new_spawn_point_type && prefs.persistence_settings & PERSIST_SPAWN) - prefs.update_preference_by_type(/datum/preference/choiced/human/spawnpoint, initial(new_spawn_point_type.display_name)) + prefs.update_preference_by_type(/datum/preference/choiced/living/spawnpoint, initial(new_spawn_point_type.display_name)) if(ishuman(occupant) && occupant.stat != DEAD) var/mob/living/carbon/human/H = occupant testing("Persist (PID): Saving stuff from [H] to [prefs] (\ref[prefs]).")