fixes
This commit is contained in:
@@ -675,7 +675,7 @@ SUBSYSTEM_DEF(job)
|
|||||||
if(!ishuman(M))//no silicons allowed
|
if(!ishuman(M))//no silicons allowed
|
||||||
return
|
return
|
||||||
for(var/i in chosen_gear)
|
for(var/i in chosen_gear)
|
||||||
var/datum/gear/G = text2path(i[LOADOUT_ITEM])
|
var/datum/gear/G = istext(i[LOADOUT_ITEM]) ? text2path(i[LOADOUT_ITEM]) : i[LOADOUT_ITEM]
|
||||||
message_admins("category [initial(G.category)] and subcategory [initial(G.subcategory)] and name [initial(G.name)]")
|
message_admins("category [initial(G.category)] and subcategory [initial(G.subcategory)] and name [initial(G.name)]")
|
||||||
G = GLOB.loadout_items[initial(G.category)][initial(G.subcategory)][initial(G.name)]
|
G = GLOB.loadout_items[initial(G.category)][initial(G.subcategory)][initial(G.name)]
|
||||||
if(!G)
|
if(!G)
|
||||||
|
|||||||
@@ -895,7 +895,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
|||||||
if(donoritem && !gear.donator_ckey_check(user.ckey))
|
if(donoritem && !gear.donator_ckey_check(user.ckey))
|
||||||
continue
|
continue
|
||||||
var/class_link = ""
|
var/class_link = ""
|
||||||
var/list/loadout_item = has_loadout_gear(loadout_slot, gear.type)
|
var/list/loadout_item = has_loadout_gear(loadout_slot, "[gear.type]")
|
||||||
var/extra_color_data = ""
|
var/extra_color_data = ""
|
||||||
if(loadout_item)
|
if(loadout_item)
|
||||||
class_link = "style='white-space:normal;' class='linkOn' href='?_src_=prefs;preference=gear;toggle_gear_path=[html_encode(name)];toggle_gear=0'"
|
class_link = "style='white-space:normal;' class='linkOn' href='?_src_=prefs;preference=gear;toggle_gear_path=[html_encode(name)];toggle_gear=0'"
|
||||||
@@ -2641,9 +2641,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
|||||||
if(!G)
|
if(!G)
|
||||||
return
|
return
|
||||||
var/toggle = text2num(href_list["toggle_gear"])
|
var/toggle = text2num(href_list["toggle_gear"])
|
||||||
if(!toggle && has_loadout_gear(loadout_slot, G.type))//toggling off and the item effectively is in chosen gear)
|
if(!toggle && has_loadout_gear(loadout_slot, "[G.type]"))//toggling off and the item effectively is in chosen gear)
|
||||||
remove_gear_from_loadout(loadout_slot, G.type)
|
remove_gear_from_loadout(loadout_slot, "[G.type]")
|
||||||
else if(toggle && !(has_loadout_gear(loadout_slot, G.type)))
|
else if(toggle && !(has_loadout_gear(loadout_slot, "[G.type]")))
|
||||||
if(!is_loadout_slot_available(G.category))
|
if(!is_loadout_slot_available(G.category))
|
||||||
to_chat(user, "<span class='danger'>You cannot take this loadout, as you've already chosen too many of the same category!</span>")
|
to_chat(user, "<span class='danger'>You cannot take this loadout, as you've already chosen too many of the same category!</span>")
|
||||||
return
|
return
|
||||||
@@ -2651,7 +2651,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
|||||||
to_chat(user, "<span class='danger'>This is an item intended for donator use only. You are not authorized to use this item.</span>")
|
to_chat(user, "<span class='danger'>This is an item intended for donator use only. You are not authorized to use this item.</span>")
|
||||||
return
|
return
|
||||||
if(gear_points >= initial(G.cost))
|
if(gear_points >= initial(G.cost))
|
||||||
var/list/new_loadout_data = list(LOADOUT_ITEM = G.type)
|
var/list/new_loadout_data = list(LOADOUT_ITEM = "[G.type]")
|
||||||
if(length(G.loadout_initial_colors))
|
if(length(G.loadout_initial_colors))
|
||||||
new_loadout_data[LOADOUT_COLOR] = G.loadout_initial_colors
|
new_loadout_data[LOADOUT_COLOR] = G.loadout_initial_colors
|
||||||
if(loadout_data["SAVE_[loadout_slot]"])
|
if(loadout_data["SAVE_[loadout_slot]"])
|
||||||
@@ -2663,7 +2663,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
|||||||
var/datum/gear/G = GLOB.loadout_items[gear_category][gear_subcategory][name]
|
var/datum/gear/G = GLOB.loadout_items[gear_category][gear_subcategory][name]
|
||||||
if(!G)
|
if(!G)
|
||||||
return
|
return
|
||||||
var/user_gear = has_loadout_gear(loadout_slot, G.type)
|
var/user_gear = has_loadout_gear(loadout_slot, "[G.type]")
|
||||||
if(!user_gear)
|
if(!user_gear)
|
||||||
return
|
return
|
||||||
message_admins("the gear is of length [length(user_gear)]")
|
message_admins("the gear is of length [length(user_gear)]")
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
// You do not need to raise this if you are adding new values that have sane defaults.
|
// You do not need to raise this if you are adding new values that have sane defaults.
|
||||||
// Only raise this value when changing the meaning/format/name/layout of an existing value
|
// Only raise this value when changing the meaning/format/name/layout of an existing value
|
||||||
// where you would want the updater procs below to run
|
// where you would want the updater procs below to run
|
||||||
#define SAVEFILE_VERSION_MAX 40
|
#define SAVEFILE_VERSION_MAX 46
|
||||||
|
|
||||||
/*
|
/*
|
||||||
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
|
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
|
||||||
@@ -226,9 +226,10 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
|||||||
left_eye_color = "#BAB99E"
|
left_eye_color = "#BAB99E"
|
||||||
right_eye_color = "#BAB99E"
|
right_eye_color = "#BAB99E"
|
||||||
|
|
||||||
if(current_version < 40) //loadout save gets changed to json
|
if(current_version < 45) //loadout save gets changed to json
|
||||||
var/text_to_load
|
var/text_to_load
|
||||||
S["loadout"] >> text_to_load
|
S["loadout"] >> text_to_load
|
||||||
|
message_admins("we're trying to load [text_to_load]")
|
||||||
var/list/saved_loadout_paths = splittext(text_to_load, "|")
|
var/list/saved_loadout_paths = splittext(text_to_load, "|")
|
||||||
//MAXIMUM_LOADOUT_SAVES save slots per loadout now
|
//MAXIMUM_LOADOUT_SAVES save slots per loadout now
|
||||||
for(var/i=1, i<= MAXIMUM_LOADOUT_SAVES, i++)
|
for(var/i=1, i<= MAXIMUM_LOADOUT_SAVES, i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user