mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
Makes the code pass dreamchecker (#13161)
* Initial Commit - Trying to add DC to Travis * Forgot to chmod * This took too long * Farie Fixes * Fixes new code * Job factions are fucking smelly * Loadouts work again * Runtime fixes
This commit is contained in:
@@ -200,7 +200,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
|
||||
var/unlock_content = 0
|
||||
|
||||
//Gear stuff
|
||||
var/list/gear = list()
|
||||
var/list/loadout_gear = list()
|
||||
var/gear_tab = "General"
|
||||
// Parallax
|
||||
var/parallax = PARALLAX_HIGH
|
||||
@@ -508,9 +508,9 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
|
||||
if(TAB_GEAR)
|
||||
var/total_cost = 0
|
||||
var/list/type_blacklist = list()
|
||||
if(gear && gear.len)
|
||||
for(var/i = 1, i <= gear.len, i++)
|
||||
var/datum/gear/G = GLOB.gear_datums[gear[i]]
|
||||
if(loadout_gear && loadout_gear.len)
|
||||
for(var/i = 1, i <= loadout_gear.len, i++)
|
||||
var/datum/gear/G = GLOB.gear_datums[loadout_gear[i]]
|
||||
if(G)
|
||||
if(!G.subtype_cost_overlap)
|
||||
if(G.subtype_path in type_blacklist)
|
||||
@@ -543,7 +543,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
|
||||
dat += "<tr><td colspan=4><hr></td></tr>"
|
||||
for(var/gear_name in LC.gear)
|
||||
var/datum/gear/G = LC.gear[gear_name]
|
||||
var/ticked = (G.display_name in gear)
|
||||
var/ticked = (G.display_name in loadout_gear)
|
||||
if(G.donator_tier > user.client.donator_level)
|
||||
dat += "<tr style='vertical-align:top;'><td width=15%><B>[G.display_name]</B></td>"
|
||||
else
|
||||
@@ -576,10 +576,10 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
|
||||
|
||||
|
||||
/datum/preferences/proc/get_gear_metadata(var/datum/gear/G)
|
||||
. = gear[G.display_name]
|
||||
. = loadout_gear[G.display_name]
|
||||
if(!.)
|
||||
. = list()
|
||||
gear[G.display_name] = .
|
||||
loadout_gear[G.display_name] = .
|
||||
|
||||
/datum/preferences/proc/get_tweak_metadata(var/datum/gear/G, var/datum/gear_tweak/tweak)
|
||||
var/list/metadata = get_gear_metadata(G)
|
||||
@@ -721,7 +721,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
|
||||
HTML += "</td></tr>"
|
||||
|
||||
for(var/i = 1, i < (limit - index), i += 1) // Finish the column so it is even
|
||||
HTML += "<tr bgcolor='[lastJob.selection_color]'><td width='60%' align='right'> </td><td> </td></tr>"
|
||||
HTML += "<tr bgcolor='[lastJob ? lastJob.selection_color : "#ffffff"]'><td width='60%' align='right'> </td><td> </td></tr>"
|
||||
|
||||
HTML += "</td'></tr></table>"
|
||||
|
||||
@@ -1162,15 +1162,15 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
|
||||
if(href_list["preference"] == "gear")
|
||||
if(href_list["toggle_gear"])
|
||||
var/datum/gear/TG = GLOB.gear_datums[href_list["toggle_gear"]]
|
||||
if(TG.display_name in gear)
|
||||
gear -= TG.display_name
|
||||
if(TG.display_name in loadout_gear)
|
||||
loadout_gear -= TG.display_name
|
||||
else
|
||||
if(TG.donator_tier && user.client.donator_level < TG.donator_tier)
|
||||
to_chat(user, "<span class='warning'>That gear is only available at a higher donation tier than you are on.</span>")
|
||||
return
|
||||
var/total_cost = 0
|
||||
var/list/type_blacklist = list()
|
||||
for(var/gear_name in gear)
|
||||
for(var/gear_name in loadout_gear)
|
||||
var/datum/gear/G = GLOB.gear_datums[gear_name]
|
||||
if(istype(G))
|
||||
if(!G.subtype_cost_overlap)
|
||||
@@ -1180,7 +1180,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
|
||||
total_cost += G.cost
|
||||
|
||||
if((total_cost + TG.cost) <= max_gear_slots)
|
||||
gear += TG.display_name
|
||||
loadout_gear += TG.display_name
|
||||
|
||||
else if(href_list["gear"] && href_list["tweak"])
|
||||
var/datum/gear/gear = GLOB.gear_datums[href_list["gear"]]
|
||||
@@ -1194,7 +1194,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
|
||||
else if(href_list["select_category"])
|
||||
gear_tab = href_list["select_category"]
|
||||
else if(href_list["clear_loadout"])
|
||||
gear.Cut()
|
||||
loadout_gear.Cut()
|
||||
|
||||
ShowChoices(user)
|
||||
return
|
||||
|
||||
@@ -259,7 +259,7 @@
|
||||
//socks
|
||||
socks = query.item[49]
|
||||
body_accessory = query.item[50]
|
||||
gear = params2list(query.item[51])
|
||||
loadout_gear = params2list(query.item[51])
|
||||
autohiss_mode = text2num(query.item[52])
|
||||
|
||||
//Sanitize
|
||||
@@ -318,7 +318,7 @@
|
||||
if(!player_alt_titles) player_alt_titles = new()
|
||||
if(!organ_data) src.organ_data = list()
|
||||
if(!rlimb_data) src.rlimb_data = list()
|
||||
if(!gear) gear = list()
|
||||
if(!loadout_gear) loadout_gear = list()
|
||||
|
||||
return 1
|
||||
|
||||
@@ -336,8 +336,8 @@
|
||||
rlimblist = list2params(rlimb_data)
|
||||
if(!isemptylist(player_alt_titles))
|
||||
playertitlelist = list2params(player_alt_titles)
|
||||
if(!isemptylist(gear))
|
||||
gearlist = list2params(gear)
|
||||
if(!isemptylist(loadout_gear))
|
||||
gearlist = list2params(loadout_gear)
|
||||
|
||||
var/DBQuery/firstquery = GLOB.dbcon.NewQuery("SELECT slot FROM [format_table_name("characters")] WHERE ckey='[C.ckey]' ORDER BY slot")
|
||||
firstquery.Execute()
|
||||
@@ -493,7 +493,8 @@
|
||||
|
||||
/datum/preferences/proc/SetChangelog(client/C,hash)
|
||||
lastchangelog=hash
|
||||
if(GLOB.preferences_datums[C.ckey].toggles & UI_DARKMODE)
|
||||
var/datum/preferences/P = GLOB.preferences_datums[C.ckey]
|
||||
if(P.toggles & UI_DARKMODE)
|
||||
winset(C, "rpane.changelog", "background-color=#40628a;font-color=#ffffff;font-style=none")
|
||||
else
|
||||
winset(C, "rpane.changelog", "background-color=none;font-style=none")
|
||||
|
||||
Reference in New Issue
Block a user