mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 13:39:16 +01:00
Fix synth_color not working (#16866)
* Fix synth_color not working * Fix spawnpoint pref * living * oups --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
co-authored by
Kashargul
parent
2da235c4a7
commit
42b7bd89f0
@@ -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")
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
. += span_bold("Biological Sex:") + " <a href='byond://?src=\ref[src];bio_gender=1'><b>[gender2text(pref.biological_gender)]</b></a><br>"
|
||||
. += span_bold("Pronouns:") + " <a href='byond://?src=\ref[src];id_gender=1'><b>[gender2text(pref.identifying_gender)]</b></a><br>"
|
||||
. += span_bold("Age:") + " <a href='byond://?src=\ref[src];age=1'>[pref.read_preference(/datum/preference/numeric/human/age)]</a> <b>Birthday:</b> <a href='byond://?src=\ref[src];bday_month=1'>[pref.read_preference(/datum/preference/numeric/human/bday_month)]</a><b>/</b><a href='byond://?src=\ref[src];bday_day=1'>[pref.read_preference(/datum/preference/numeric/human/bday_day)]</a> - <b>Announce?:</b> <a href='byond://?src=\ref[src];bday_announce=1'>[pref.read_preference(/datum/preference/toggle/human/bday_announce) ? "Yes" : "No"]</a><br>"
|
||||
. += span_bold("Spawn Point:") + " <a href='byond://?src=\ref[src];spawnpoint=1'>[pref.read_preference(/datum/preference/choiced/human/spawnpoint)]</a><br>"
|
||||
. += span_bold("Spawn Point:") + " <a href='byond://?src=\ref[src];spawnpoint=1'>[pref.read_preference(/datum/preference/choiced/living/spawnpoint)]</a><br>"
|
||||
if(CONFIG_GET(flag/allow_metadata))
|
||||
. += span_bold("OOC Notes: <a href='byond://?src=\ref[src];edit_ooc_notes=1'>Edit</a><a href='byond://?src=\ref[src];edit_ooc_note_likes=1'>Likes</a><a href='byond://?src=\ref[src];edit_ooc_note_dislikes=1'>Dislikes</a>") + "<br>"
|
||||
. = 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"])
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
turfs = latejoin_tram
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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]).")
|
||||
|
||||
Reference in New Issue
Block a user