removes var/ inside all procs (#19450)

* removes var/ inside all procs

* .

* ugh
This commit is contained in:
Kashargul
2026-05-05 10:55:17 +02:00
committed by GitHub
parent 13162d13a2
commit 5926589c16
1987 changed files with 7376 additions and 7377 deletions
@@ -48,7 +48,7 @@
* var/datum/signal/signal - a telecomms signal
* Returns: None
*/
/datum/TCS_Compiler/proc/Run(var/datum/signal/signal)
/datum/TCS_Compiler/proc/Run(datum/signal/signal)
if(!ready)
return
@@ -215,7 +215,7 @@
/* -- Actual language proc code -- */
/datum/signal/proc/mem(var/address, var/value)
/datum/signal/proc/mem(address, value)
if(istext(address))
var/obj/machinery/telecomms/server/S = data["server"]
@@ -227,7 +227,7 @@
S.memory[address] = value
/datum/signal/proc/tcombroadcast(var/message, var/freq, var/source, var/job)
/datum/signal/proc/tcombroadcast(message, freq, source, job)
var/datum/signal/newsign = new
var/obj/machinery/telecomms/server/S = data["server"]
@@ -24,7 +24,7 @@
return pick(finalpick)
// Clone of list[]
/proc/n_listpos(var/list/L, var/pos, var/value)
/proc/n_listpos(list/L, pos, value)
if(!istype(L, /list)) return
if(isnum(pos))
if(!value)
@@ -40,7 +40,7 @@
L[pos] = value
// Clone of list.Copy()
/proc/n_listcopy(var/list/L, var/start, var/end)
/proc/n_listcopy(list/L, start, end)
if(!istype(L, /list)) return
return L.Copy(start, end)
@@ -73,33 +73,33 @@
chosenlist.Remove(e)
// Clone of list.Cut()
/proc/n_listcut(var/list/L, var/start, var/end)
/proc/n_listcut(list/L, start, end)
if(!istype(L, /list)) return
return L.Cut(start, end)
// Clone of list.Swap()
/proc/n_listswap(var/list/L, var/firstindex, var/secondindex)
/proc/n_listswap(list/L, firstindex, secondindex)
if(!istype(L, /list)) return
if(L.len >= secondindex && L.len >= firstindex)
return L.Swap(firstindex, secondindex)
// Clone of list.Insert()
/proc/n_listinsert(var/list/L, var/index, var/element)
/proc/n_listinsert(list/L, index, element)
if(!istype(L, /list)) return
return L.Insert(index, element)
// --- Miscellaneous functions ---
// Clone of sleep()
/proc/delay(var/time)
/proc/delay(time)
sleep(time)
// Clone of prob()
/proc/prob_chance(var/chance)
/proc/prob_chance(chance)
return prob(chance)
// Merge of list.Find() and findtext()
/proc/smartfind(var/haystack, var/needle, var/start = 1, var/end = 0)
/proc/smartfind(haystack, needle, start = 1, end = 0)
if(haystack && needle)
if(isobject(haystack))
if(istype(haystack, /list))
@@ -113,31 +113,31 @@
return findtext(haystack, needle, start, end)
// Clone of copytext()
/proc/docopytext(var/string, var/start = 1, var/end = 0)
/proc/docopytext(string, start = 1, end = 0)
if(istext(string) && isnum(start) && isnum(end))
if(start > 0)
return copytext(string, start, end)
// Clone of length()
/proc/smartlength(var/container)
/proc/smartlength(container)
if(container)
if(istype(container, /list) || istext(container))
return length(container)
// BY DONKIE~
// String stuff
/proc/n_lower(var/string)
/proc/n_lower(string)
if(istext(string))
return lowertext(string)
/proc/n_upper(var/string)
/proc/n_upper(string)
if(istext(string))
return uppertext(string)
/*
//Makes a list where all indicies in a string is a seperate index in the list
// JUST A HELPER DON'T ADD TO NTSCRIPT
/proc/string_tolist(var/string)
/proc/string_tolist(string)
var/list/L = new/list()
var/i
@@ -146,7 +146,7 @@
return L
/proc/string_explode(var/string, var/separator)
/proc/string_explode(string, separator)
if(istext(string))
if(istext(separator) && separator == "")
return string_tolist(string)
@@ -165,11 +165,11 @@
Just found out there was already a string explode function, did some benchmarking, and that function were a bit faster, sticking to that.
*/
/proc/string_explode(var/string, var/separator)
/proc/string_explode(string, separator)
if(istext(string) && istext(separator))
return splittext(string, separator)
/proc/n_repeat(var/string, var/amount)
/proc/n_repeat(string, amount)
if(istext(string) && isnum(amount))
var/i
var/newstring = ""
@@ -182,7 +182,7 @@ Just found out there was already a string explode function, did some benchmarkin
return newstring
/proc/n_reverse(var/string)
/proc/n_reverse(string)
if(istext(string))
var/newstring = ""
var/i
@@ -194,44 +194,44 @@ Just found out there was already a string explode function, did some benchmarkin
return newstring
// I don't know if it's neccesary to make my own proc, but I think I have to to be able to check for istext.
/proc/n_str2num(var/string)
/proc/n_str2num(string)
if(istext(string))
return text2num(string)
// Number shit
/proc/n_num2str(var/num)
/proc/n_num2str(num)
if(isnum(num))
return num2text(num)
// Squareroot
/proc/n_sqrt(var/num)
/proc/n_sqrt(num)
if(isnum(num))
return sqrt(num)
// Magnitude of num
/proc/n_abs(var/num)
/proc/n_abs(num)
if(isnum(num))
return abs(num)
// Round down
/proc/n_floor(var/num)
/proc/n_floor(num)
if(isnum(num))
return round(num)
// Round up
/proc/n_ceil(var/num)
/proc/n_ceil(num)
if(isnum(num))
return round(num)+1
// Round to nearest integer
/proc/n_round(var/num)
/proc/n_round(num)
if(isnum(num))
if(num-round(num)<0.5)
return round(num)
return n_ceil(num)
// Clamps N between min and max
/proc/n_clamp(var/num, var/min=-1, var/max=1)
/proc/n_clamp(num, min=-1, max=1)
if(isnum(num)&&isnum(min)&&isnum(max))
if(num<=min)
return min
@@ -240,14 +240,14 @@ Just found out there was already a string explode function, did some benchmarkin
return num
// Returns 1 if N is inbetween Min and Max
/proc/n_inrange(var/num, var/min=-1, var/max=1)
/proc/n_inrange(num, min=-1, max=1)
if(isnum(num)&&isnum(min)&&isnum(max))
return ((min <= num) && (num <= max))
// END OF BY DONKIE :(
// Non-recursive
// Imported from Mono string.ReplaceUnchecked
/proc/string_replacetext(var/haystack,var/a,var/b)
/proc/string_replacetext(haystack,a,b)
if(istext(haystack)&&istext(a)&&istext(b))
var/i = 1
var/lenh=length(haystack)