mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
fixed several linter warnings (#26977)
This commit is contained in:
@@ -228,8 +228,6 @@ var/forum_authenticated_group = "10"
|
|||||||
var/fileaccess_timer = 0
|
var/fileaccess_timer = 0
|
||||||
var/custom_event_msg = null
|
var/custom_event_msg = null
|
||||||
|
|
||||||
#define MIDNIGHT_ROLLOVER 864000 //number of deciseconds in a day
|
|
||||||
|
|
||||||
//Recall time limit: 2 hours
|
//Recall time limit: 2 hours
|
||||||
var/recall_time_limit = 72000
|
var/recall_time_limit = 72000
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#define PROFILE_START ;PROFILE_STORE = list();PROFILE_SET;
|
#define LINE_PROFILE_START ;PROFILE_STORE = list();PROFILE_SET;
|
||||||
#define PROFILE_STOP ;PROFILE_STORE = null;
|
#define LINE_PROFILE_STOP ;PROFILE_STORE = null;
|
||||||
|
|
||||||
#define PROFILE_SET ;PROFILE_TIME = world.tick_usage; PROFILE_LINE = __LINE__; PROFILE_FILE = __FILE__; PROFILE_SLEEPCHECK = world.time;
|
#define PROFILE_SET ;PROFILE_TIME = world.tick_usage; PROFILE_LINE = __LINE__; PROFILE_FILE = __FILE__; PROFILE_SLEEPCHECK = world.time;
|
||||||
|
|
||||||
@@ -26,4 +26,4 @@
|
|||||||
|
|
||||||
#define PROFILE_ITEM_LEN 2
|
#define PROFILE_ITEM_LEN 2
|
||||||
#define PROFILE_ITEM_TIME 1
|
#define PROFILE_ITEM_TIME 1
|
||||||
#define PROFILE_ITEM_COUNT 2
|
#define PROFILE_ITEM_COUNT 2
|
||||||
|
|||||||
@@ -1,16 +1,5 @@
|
|||||||
#define HTMLTAB " "
|
#define HTMLTAB " "
|
||||||
#define string2charlist(string) (splittext(string, regex("(.)")) - splittext(string, ""))
|
#define string2charlist(string) (splittext(string, regex("(.)")) - splittext(string, ""))
|
||||||
//Loops through every line in (text). The 'line' variable holds the current line
|
|
||||||
//Example use:
|
|
||||||
/*
|
|
||||||
var/text = {"Line 1
|
|
||||||
Line 2
|
|
||||||
Line 3
|
|
||||||
"}
|
|
||||||
forLineInText(text)
|
|
||||||
world.log << line
|
|
||||||
*/
|
|
||||||
#define forLineInText(text) for({var/__index=1;var/line=copytext(text, __index, findtext(text, "\n", __index))} ; {__index != 0} ; {__index = findtext(text, "\n", __index+1) ; line = copytext(text, __index+1, findtext(text, "\n", __index+1))})
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Holds procs designed to help with filtering text
|
* Holds procs designed to help with filtering text
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/world/proc/_BSQL_Internal_Call(func, ...)
|
/world/proc/_BSQL_Internal_Call(func, ...)
|
||||||
var/list/call_args = args.Copy(2)
|
var/list/call_args = args.Copy(2)
|
||||||
BSQL_Debug("[.....]: [args[1]]([call_args.Join(", ")])")
|
BSQL_Debug("_BSQL_Internal_Call: [args[1]]([call_args.Join(", ")])")
|
||||||
. = call(_BSQL_Library_Path(), func)(arglist(call_args))
|
. = call(_BSQL_Library_Path(), func)(arglist(call_args))
|
||||||
BSQL_Debug("Result: [. == null ? "NULL" : "\"[.]\""]")
|
BSQL_Debug("Result: [. == null ? "NULL" : "\"[.]\""]")
|
||||||
|
|
||||||
|
|||||||
@@ -1377,7 +1377,7 @@ client/proc/check_convertables()
|
|||||||
set name = "Start line profiling"
|
set name = "Start line profiling"
|
||||||
set desc = "Starts tracking line by line profiling for code lines that support it"
|
set desc = "Starts tracking line by line profiling for code lines that support it"
|
||||||
|
|
||||||
PROFILE_START
|
LINE_PROFILE_START
|
||||||
|
|
||||||
message_admins("<span class='adminnotice'>[key_name_admin(src)] started line by line profiling.</span>")
|
message_admins("<span class='adminnotice'>[key_name_admin(src)] started line by line profiling.</span>")
|
||||||
feedback_add_details("admin_verb","Start line profiling")
|
feedback_add_details("admin_verb","Start line profiling")
|
||||||
@@ -1388,7 +1388,7 @@ client/proc/check_convertables()
|
|||||||
set name = "Stop line profiling"
|
set name = "Stop line profiling"
|
||||||
set desc = "Stops tracking line by line profiling for code lines that support it"
|
set desc = "Stops tracking line by line profiling for code lines that support it"
|
||||||
|
|
||||||
PROFILE_STOP
|
LINE_PROFILE_STOP
|
||||||
|
|
||||||
message_admins("<span class='adminnotice'>[key_name_admin(src)] stopped line by line profiling.</span>")
|
message_admins("<span class='adminnotice'>[key_name_admin(src)] stopped line by line profiling.</span>")
|
||||||
feedback_add_details("admin_verb","Stop line profiling")
|
feedback_add_details("admin_verb","Stop line profiling")
|
||||||
|
|||||||
@@ -412,7 +412,7 @@
|
|||||||
if(mask_charge >= word_cost)
|
if(mask_charge >= word_cost)
|
||||||
mask_charge -= word_cost
|
mask_charge -= word_cost
|
||||||
playsound(src, "sound/vox_hecu/[words_to_say[i]]!.wav", 30)
|
playsound(src, "sound/vox_hecu/[words_to_say[i]]!.wav", 30)
|
||||||
sleep word_delay
|
sleep(word_delay)
|
||||||
words_to_say.Cut()
|
words_to_say.Cut()
|
||||||
|
|
||||||
/obj/item/clothing/mask/gas/hecu/equipped(var/mob/user, var/slot)
|
/obj/item/clothing/mask/gas/hecu/equipped(var/mob/user, var/slot)
|
||||||
@@ -423,4 +423,4 @@
|
|||||||
/obj/item/clothing/mask/gas/hecu/unequipped(var/mob/user, var/slot)
|
/obj/item/clothing/mask/gas/hecu/unequipped(var/mob/user, var/slot)
|
||||||
if(slot == slot_wear_mask)
|
if(slot == slot_wear_mask)
|
||||||
on_face = 0
|
on_face = 0
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -569,8 +569,7 @@ var/global/list/loopModeNames=list(
|
|||||||
var/success = 0
|
var/success = 0
|
||||||
var/error = 0
|
var/error = 0
|
||||||
|
|
||||||
//Loop through each line
|
for(var/line in splittext(choice, "\n"))
|
||||||
forLineInText(choice)
|
|
||||||
var/list/L = params2list(line)
|
var/list/L = params2list(line)
|
||||||
if(L.len >= 3)
|
if(L.len >= 3)
|
||||||
var/list/params = list()
|
var/list/params = list()
|
||||||
|
|||||||
@@ -268,7 +268,7 @@
|
|||||||
var/spin_delay = 1 SECONDS //let's not get crazy
|
var/spin_delay = 1 SECONDS //let's not get crazy
|
||||||
gun_flags = EMPTYCASINGS | CHAMBERSPENT
|
gun_flags = EMPTYCASINGS | CHAMBERSPENT
|
||||||
|
|
||||||
./obj/item/weapon/gun/projectile/colt/examine(mob/user)
|
/obj/item/weapon/gun/projectile/colt/examine(mob/user)
|
||||||
..()
|
..()
|
||||||
if(user.is_holding_item(src))
|
if(user.is_holding_item(src))
|
||||||
to_chat(user,"<span class='info'>Alt-click to spin the gun.</span>")
|
to_chat(user,"<span class='info'>Alt-click to spin the gun.</span>")
|
||||||
|
|||||||
@@ -209,7 +209,7 @@
|
|||||||
var/datum/stack/val = new
|
var/datum/stack/val = new
|
||||||
src.expecting = VALUE
|
src.expecting = VALUE
|
||||||
var/loop = 0
|
var/loop = 0
|
||||||
for()
|
while(TRUE)
|
||||||
loop++
|
loop++
|
||||||
if(loop > 800)
|
if(loop > 800)
|
||||||
errors += new/datum/scriptError("Too many nested tokens.")
|
errors += new/datum/scriptError("Too many nested tokens.")
|
||||||
@@ -327,7 +327,7 @@
|
|||||||
NextToken() //skip open parenthesis, already found
|
NextToken() //skip open parenthesis, already found
|
||||||
var/loops = 0
|
var/loops = 0
|
||||||
|
|
||||||
for()
|
while(TRUE)
|
||||||
loops++
|
loops++
|
||||||
if(loops >= 800)
|
if(loops >= 800)
|
||||||
errors += new/datum/scriptError("Too many nested expressions.")
|
errors += new/datum/scriptError("Too many nested expressions.")
|
||||||
@@ -368,4 +368,4 @@
|
|||||||
*/
|
*/
|
||||||
/datum/n_Parser/nS_Parser/proc/ParseParamExpression(var/check_functions = 0)
|
/datum/n_Parser/nS_Parser/proc/ParseParamExpression(var/check_functions = 0)
|
||||||
var/cf = check_functions
|
var/cf = check_functions
|
||||||
return ParseExpression(list(",", ")"), check_functions = cf)
|
return ParseExpression(list(",", ")"), check_functions = cf)
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ var/const/Represents a special statement in the code triggered by a keyword.
|
|||||||
if(!parser.CheckToken("(", /datum/token/symbol))
|
if(!parser.CheckToken("(", /datum/token/symbol))
|
||||||
return KW_FAIL
|
return KW_FAIL
|
||||||
|
|
||||||
for() //for now parameters can be separated by whitespace - they don't need a comma in between
|
while(TRUE) //for now parameters can be separated by whitespace - they don't need a comma in between
|
||||||
if(istype(parser.curToken, /datum/token/symbol))
|
if(istype(parser.curToken, /datum/token/symbol))
|
||||||
switch(parser.curToken.value)
|
switch(parser.curToken.value)
|
||||||
if(",")
|
if(",")
|
||||||
|
|||||||
@@ -185,7 +185,7 @@
|
|||||||
if(!CheckToken("(", /datum/token/symbol)) //Check for and skip open parenthesis
|
if(!CheckToken("(", /datum/token/symbol)) //Check for and skip open parenthesis
|
||||||
return
|
return
|
||||||
var/loops = 0
|
var/loops = 0
|
||||||
for()
|
while(TRUE)
|
||||||
loops++
|
loops++
|
||||||
if(loops >= 800)
|
if(loops >= 800)
|
||||||
errors +=new/datum/scriptError("Cannot find ending params.")
|
errors +=new/datum/scriptError("Cannot find ending params.")
|
||||||
|
|||||||
Reference in New Issue
Block a user