Skip to content

Commit

Permalink
Merge pull request #133 from Nerev4r/permittingthis
Browse files Browse the repository at this point in the history
Trusting You With Something Because I Love You (Permissive Name Formatting)
  • Loading branch information
Ephemeralis authored Oct 11, 2024
2 parents 2954303 + 4afdb94 commit deeda54
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions code/modules/client/preferences/names.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
var/group

/// Whether or not to allow numbers in the person's name
var/allow_numbers = FALSE
var/allow_numbers = TRUE //DOPPLER EDIT - For clones and robots and shiz.

/// If the highest priority job matches this, will prioritize this name in the UI
var/relevant_job
Expand All @@ -24,17 +24,17 @@


/datum/preference/name/deserialize(input, datum/preferences/preferences)
return reject_bad_name("[input]", allow_numbers)
return permissive_sanitize_name("[input]", allow_numbers) // DOPPLER EDIT CHANGE - ORIGINAL: return reject_bad_name


/datum/preference/name/serialize(input)
// `is_valid` should always be run before `serialize`, so it should not
// be possible for this to return `null`.
return reject_bad_name(input, allow_numbers)
return permissive_sanitize_name(input, allow_numbers) // DOPPLER EDIT CHANGE - ORIGINAL: return reject_bad_name


/datum/preference/name/is_valid(value)
return istext(value) && !isnull(reject_bad_name(value, allow_numbers))
return istext(value) && !isnull(permissive_sanitize_name(value, allow_numbers)) // DOPPLER EDIT CHANGE - ORIGINAL: !isnull(reject_bad_name(value, allow_numbers))


/// A character's real name
Expand Down Expand Up @@ -68,7 +68,7 @@
else if(first_space == length(input))
input += "[pick(GLOB.last_names)]"

return reject_bad_name(input, allow_numbers)
return permissive_sanitize_name(input, allow_numbers) //DOPPLER EDIT CHANGE- Original: return reject_bad_name(input, allow_numbers)

/// The name for a backup human, when nonhumans are made into head of staff
/datum/preference/name/backup_human
Expand Down

0 comments on commit deeda54

Please sign in to comment.