initial commit - initial pref edits and file copypasting from hippie

This commit is contained in:
deathride58
2018-01-13 15:45:08 -05:00
parent 5bb87e6778
commit 036dc82e12
10 changed files with 441 additions and 1 deletions
@@ -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