Demodularizing the gear loadout code a little. (#12261)
This commit is contained in:
@@ -14,17 +14,6 @@
|
||||
features["mcolor2"] = sanitize_hexcolor(features["mcolor2"], 3, 0)
|
||||
features["mcolor3"] = sanitize_hexcolor(features["mcolor3"], 3, 0)
|
||||
|
||||
//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/cit_character_pref_save(savefile/S)
|
||||
//ipcs
|
||||
@@ -47,10 +36,3 @@
|
||||
//flavor text
|
||||
WRITE_FILE(S["feature_flavor_text"], features["flavor_text"])
|
||||
|
||||
//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