mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 14:08:31 +01:00
Restores the Persistent Scars preference (#65358)
* Restores the Persistant Scars preference I also had to remove some raw READ_FILE()s because that was now useless. I was thus able to remove the persistent_scars variable from the prefs, as it is now a standalone preference. * I forgor...
This commit is contained in:
@@ -57,8 +57,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/hearted
|
||||
///If we have a hearted commendations, we honor it every time the player loads preferences until this time has been passed
|
||||
var/hearted_until
|
||||
/// If we have persistent scars enabled
|
||||
var/persistent_scars = TRUE
|
||||
///What outfit typepaths we've favorited in the SelectEquipment menu
|
||||
var/list/favorite_outfits = list()
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/datum/preference/toggle/persistent_scars
|
||||
category = PREFERENCE_CATEGORY_NON_CONTEXTUAL
|
||||
savefile_key = "persistent_scars"
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
|
||||
/datum/preference/toggle/persistent_scars/apply_to_human(mob/living/carbon/human/target, value)
|
||||
// This proc doesn't do anything, due to the nature of persistent scars, we ALWAYS need to have a client to be able to use them properly. Or at the very least, a ckey.
|
||||
// So we don't need to store this anywhere else, we simply search the preference when we need it.
|
||||
return
|
||||
@@ -307,7 +307,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
|
||||
//Character
|
||||
READ_FILE(S["randomise"], randomise)
|
||||
READ_FILE(S["persistent_scars"] , persistent_scars)
|
||||
|
||||
//Load prefs
|
||||
READ_FILE(S["job_preferences"], job_preferences)
|
||||
@@ -323,7 +322,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
//Sanitize
|
||||
randomise = SANITIZE_LIST(randomise)
|
||||
|
||||
persistent_scars = sanitize_integer(persistent_scars)
|
||||
|
||||
//Validate job prefs
|
||||
for(var/j in job_preferences)
|
||||
@@ -367,7 +365,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
|
||||
//Character
|
||||
WRITE_FILE(S["randomise"] , randomise)
|
||||
WRITE_FILE(S["persistent_scars"] , persistent_scars)
|
||||
|
||||
//Write prefs
|
||||
WRITE_FILE(S["job_preferences"] , job_preferences)
|
||||
|
||||
Reference in New Issue
Block a user