initial commit - initial pref edits and file copypasting from hippie
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
/datum/preferences/proc/hippie_character_pref_load(savefile/S)
|
||||
//gear loadout
|
||||
var/text_to_load
|
||||
S["loadout"] >> text_to_load
|
||||
var/list/saved_loadout_paths = splittext(text_to_load, "|")
|
||||
LAZYCLEARLIST(chosen_gear)
|
||||
gear_points = initial(gear_points)
|
||||
for(var/i in saved_loadout_paths)
|
||||
var/datum/gear/path = text2path(i)
|
||||
if(path)
|
||||
LAZYADD(chosen_gear, path)
|
||||
gear_points -= initial(path.cost)
|
||||
|
||||
/datum/preferences/proc/hippie_character_pref_save(savefile/S)
|
||||
//gear loadout
|
||||
if(islist(chosen_gear))
|
||||
if(chosen_gear.len)
|
||||
var/text_to_save = chosen_gear.Join("|")
|
||||
S["loadout"] << text_to_save
|
||||
else
|
||||
S["loadout"] << "" //empty string to reset the value
|
||||
Reference in New Issue
Block a user