BRUTAL Part 1 - No proc var/ in procs

This commit is contained in:
AffectedArc07
2021-02-01 14:10:08 +00:00
parent 1d89138436
commit f5f97882cf
533 changed files with 1558 additions and 1554 deletions
+5 -5
View File
@@ -28,7 +28,7 @@ You can set verify to TRUE if you want send() to sleep until the client has the
//This proc sends the asset to the client, but only if it needs it.
//This proc blocks(sleeps) unless verify is set to false
/proc/send_asset(var/client/client, var/asset_name, var/verify = TRUE)
/proc/send_asset(client/client, asset_name, verify = TRUE)
if(!istype(client))
if(ismob(client))
var/mob/M = client
@@ -73,7 +73,7 @@ You can set verify to TRUE if you want send() to sleep until the client has the
return 1
//This proc blocks(sleeps) unless verify is set to false
/proc/send_asset_list(var/client/client, var/list/asset_list, var/verify = TRUE)
/proc/send_asset_list(client/client, list/asset_list, verify = TRUE)
if(!istype(client))
if(ismob(client))
var/mob/M = client
@@ -124,7 +124,7 @@ You can set verify to TRUE if you want send() to sleep until the client has the
//This proc will download the files without clogging up the browse() queue, used for passively sending files on connection start.
//The proc calls procs that sleep for long times.
/proc/getFilesSlow(var/client/client, var/list/files, var/register_asset = TRUE)
/proc/getFilesSlow(client/client, list/files, register_asset = TRUE)
var/concurrent_tracker = 1
for(var/file in files)
if(!client)
@@ -141,7 +141,7 @@ You can set verify to TRUE if you want send() to sleep until the client has the
//This proc "registers" an asset, it adds it to the cache for further use, you cannot touch it from this point on or you'll fuck things up.
//if it's an icon or something be careful, you'll have to copy it before further use.
/proc/register_asset(var/asset_name, var/asset)
/proc/register_asset(asset_name, asset)
SSassets.cache[asset_name] = asset
//These datums are used to populate the asset cache, the proc "register()" does this.
@@ -150,7 +150,7 @@ You can set verify to TRUE if you want send() to sleep until the client has the
GLOBAL_LIST_EMPTY(asset_datums)
//get a assetdatum or make a new one
/proc/get_asset_datum(var/type)
/proc/get_asset_datum(type)
if(!(type in GLOB.asset_datums))
return new type()
return GLOB.asset_datums[type]
+1 -1
View File
@@ -211,7 +211,7 @@
/client/proc/setDir(newdir)
dir = newdir
/client/proc/handle_spam_prevention(var/message, var/mute_type, var/throttle = 0)
/client/proc/handle_spam_prevention(message, mute_type, throttle = 0)
if(throttle)
if((last_message_time + throttle > world.time) && !check_rights(R_ADMIN, 0))
var/wait_time = round(((last_message_time + throttle) - world.time) / 10, 1)
+1 -1
View File
@@ -1,6 +1,6 @@
GLOBAL_LIST_EMPTY(clientmessages)
/proc/addclientmessage(var/ckey, var/message)
/proc/addclientmessage(ckey, message)
ckey = ckey(ckey)
if(!ckey || !message)
return
@@ -1,16 +1,16 @@
/datum/gear_tweak/proc/get_contents(var/metadata)
/datum/gear_tweak/proc/get_contents(metadata)
return
/datum/gear_tweak/proc/get_metadata(var/user, var/metadata)
/datum/gear_tweak/proc/get_metadata(user, metadata)
return
/datum/gear_tweak/proc/get_default()
return
/datum/gear_tweak/proc/tweak_gear_data(var/metadata, var/datum/gear_data)
/datum/gear_tweak/proc/tweak_gear_data(metadata, datum/gear_data)
return
/datum/gear_tweak/proc/tweak_item(var/obj/item/I, var/metadata)
/datum/gear_tweak/proc/tweak_item(obj/item/I, metadata)
return
/*
@@ -21,22 +21,22 @@ GLOBAL_DATUM_INIT(gear_tweak_free_color_choice, /datum/gear_tweak/color, new())
/datum/gear_tweak/color
var/list/valid_colors
/datum/gear_tweak/color/New(var/list/colors)
/datum/gear_tweak/color/New(list/colors)
valid_colors = colors
..()
/datum/gear_tweak/color/get_contents(var/metadata)
/datum/gear_tweak/color/get_contents(metadata)
return "Color: <font color='[metadata]'>&#9899;</font>"
/datum/gear_tweak/color/get_default()
return valid_colors ? valid_colors[1] : COLOR_GRAY
/datum/gear_tweak/color/get_metadata(var/user, var/metadata)
/datum/gear_tweak/color/get_metadata(user, metadata)
if(valid_colors)
return input(user, "Choose an item color.", "Character Preference", metadata) as null|anything in valid_colors
return input(user, "Choose an item color.", "Global Preference", metadata) as color|null
/datum/gear_tweak/color/tweak_item(var/obj/item/I, var/metadata)
/datum/gear_tweak/color/tweak_item(obj/item/I, metadata)
if(valid_colors && !(metadata in valid_colors))
return
I.color = metadata
@@ -48,20 +48,20 @@ GLOBAL_DATUM_INIT(gear_tweak_free_color_choice, /datum/gear_tweak/color, new())
/datum/gear_tweak/path
var/list/valid_paths
/datum/gear_tweak/path/New(var/list/paths)
/datum/gear_tweak/path/New(list/paths)
valid_paths = paths
..()
/datum/gear_tweak/path/get_contents(var/metadata)
/datum/gear_tweak/path/get_contents(metadata)
return "Type: [metadata]"
/datum/gear_tweak/path/get_default()
return valid_paths[1]
/datum/gear_tweak/path/get_metadata(var/user, var/metadata)
/datum/gear_tweak/path/get_metadata(user, metadata)
return input(user, "Choose a type.", "Character Preference", metadata) as null|anything in valid_paths
/datum/gear_tweak/path/tweak_gear_data(var/metadata, var/datum/gear_data/gear_data)
/datum/gear_tweak/path/tweak_gear_data(metadata, datum/gear_data/gear_data)
if(!(metadata in valid_paths))
return
gear_data.path = valid_paths[metadata]
@@ -77,7 +77,7 @@ GLOBAL_DATUM_INIT(gear_tweak_free_color_choice, /datum/gear_tweak/color, new())
valid_contents = args.Copy()
..()
/datum/gear_tweak/contents/get_contents(var/metadata)
/datum/gear_tweak/contents/get_contents(metadata)
return "Contents: [english_list(metadata, and_text = ", ")]"
/datum/gear_tweak/contents/get_default()
@@ -85,7 +85,7 @@ GLOBAL_DATUM_INIT(gear_tweak_free_color_choice, /datum/gear_tweak/color, new())
for(var/i = 1 to valid_contents.len)
. += "Random"
/datum/gear_tweak/contents/get_metadata(var/user, var/list/metadata)
/datum/gear_tweak/contents/get_metadata(user, list/metadata)
. = list()
for(var/i = metadata.len to valid_contents.len)
metadata += "Random"
@@ -96,7 +96,7 @@ GLOBAL_DATUM_INIT(gear_tweak_free_color_choice, /datum/gear_tweak/color, new())
else
return metadata
/datum/gear_tweak/contents/tweak_item(var/obj/item/I, var/list/metadata)
/datum/gear_tweak/contents/tweak_item(obj/item/I, list/metadata)
if(metadata.len != valid_contents.len)
return
for(var/i = 1 to valid_contents.len)
@@ -49,7 +49,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
return max(0, minimal_player_age_antag - C.player_age)
/proc/check_client_age(client/C, var/days) // If days isn't provided, returns the age of the client. If it is provided, it returns the days until the player_age is equal to or greater than the days variable
/proc/check_client_age(client/C, days) // If days isn't provided, returns the age of the client. If it is provided, it returns the days until the player_age is equal to or greater than the days variable
if(!days)
return C.player_age
else
@@ -570,20 +570,20 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
popup.open(0)
/datum/preferences/proc/get_gear_metadata(var/datum/gear/G)
/datum/preferences/proc/get_gear_metadata(datum/gear/G)
. = loadout_gear[G.display_name]
if(!.)
. = list()
loadout_gear[G.display_name] = .
/datum/preferences/proc/get_tweak_metadata(var/datum/gear/G, var/datum/gear_tweak/tweak)
/datum/preferences/proc/get_tweak_metadata(datum/gear/G, datum/gear_tweak/tweak)
var/list/metadata = get_gear_metadata(G)
. = metadata["[tweak]"]
if(!.)
. = tweak.get_default()
metadata["[tweak]"] = .
/datum/preferences/proc/set_tweak_metadata(var/datum/gear/G, var/datum/gear_tweak/tweak, var/new_metadata)
/datum/preferences/proc/set_tweak_metadata(datum/gear/G, datum/gear_tweak/tweak, new_metadata)
var/list/metadata = get_gear_metadata(G)
metadata["[tweak]"] = new_metadata
@@ -752,7 +752,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
popup.open(0)
return
/datum/preferences/proc/SetJobPreferenceLevel(var/datum/job/job, var/level)
/datum/preferences/proc/SetJobPreferenceLevel(datum/job/job, level)
if(!job)
return 0
@@ -975,7 +975,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
job_karma_low = 0
/datum/preferences/proc/GetJobDepartment(var/datum/job/job, var/level)
/datum/preferences/proc/GetJobDepartment(datum/job/job, level)
if(!job || !level) return 0
switch(job.department_flag)
if(JOBCAT_SUPPORT)
@@ -1012,7 +1012,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
return job_karma_low
return 0
/datum/preferences/proc/SetJobDepartment(var/datum/job/job, var/level)
/datum/preferences/proc/SetJobDepartment(datum/job/job, level)
if(!job || !level) return 0
switch(level)
if(1)//Only one of these should ever be active at once so clear them all here