diff --git a/code/WorkInProgress/SpyGuyStuff.dm b/code/WorkInProgress/SpyGuyStuff.dm index 695ae45..8950c34 100644 --- a/code/WorkInProgress/SpyGuyStuff.dm +++ b/code/WorkInProgress/SpyGuyStuff.dm @@ -277,7 +277,7 @@ proc/Create_Tommyname() var/hash = md5("AReally[id]ShittySalt") var/listPos = calc_start_point(hash) - for(var/i=1, i <= lentext(hash), i+=2) + for(var/i=1, i <= length(hash), i+=2) var/block = copytext(hash, i, i+2) if (isnull(base["[listPos]"])) base["[listPos]"] = hex2num(block) @@ -288,7 +288,7 @@ proc/Create_Tommyname() //So is this proc/calc_start_point(var/hash) - for(var/i = 1; i <= lentext(hash); i++) + for(var/i = 1; i <= length(hash); i++) var/temp = copytext(hash, i, i+1) temp = hex2num(temp) . += temp diff --git a/code/WorkInProgress/WiresStuff.dm b/code/WorkInProgress/WiresStuff.dm index d3968db..fa2332b 100644 --- a/code/WorkInProgress/WiresStuff.dm +++ b/code/WorkInProgress/WiresStuff.dm @@ -35,7 +35,7 @@ ldata[index] = base64str(ldata[index]) return ldata - var/field = copytext(index, lentext(num)+1, 0) //grab the field name e.g. [ckey] + var/field = copytext(index, length(num)+1, 0) //grab the field name e.g. [ckey] field = copytext(field, 2, -1) //convert [ckey] to ckey var/val = base64str(ldata[index]) //the actual value e.g. blah diff --git a/code/WorkInProgress/pathology/newpath/pathogen.dm b/code/WorkInProgress/pathology/newpath/pathogen.dm index a605a4d..dcf2a4e 100644 --- a/code/WorkInProgress/pathology/newpath/pathogen.dm +++ b/code/WorkInProgress/pathology/newpath/pathogen.dm @@ -1511,7 +1511,7 @@ proc/num2hexoc(num, pad) // One's complement reverse engineering of a hexadecimal one's complement representation to a base 10 signed number proc/hex2numoc(var/num) - var/len = lentext(num) + var/len = length(num) var/max = 7 for (var/i = len - 1, i > 0, i--) max = max * 16 + 15 diff --git a/code/WorkInProgress/pathology/newpath/pathogen_dna.dm b/code/WorkInProgress/pathology/newpath/pathogen_dna.dm index d7900f8..99d3d36 100644 --- a/code/WorkInProgress/pathology/newpath/pathogen_dna.dm +++ b/code/WorkInProgress/pathology/newpath/pathogen_dna.dm @@ -145,7 +145,7 @@ datum/pathogendna proc/explode() var/list/ret = new/list() var/pos = 1 - while (pos < lentext(seqsplice)) + while (pos < length(seqsplice)) if (copytext(seqsplice, pos, pos + 1) != "|") ret += copytext(seqsplice, pos, pos + 3) pos += 3 diff --git a/code/WorkInProgress/pathology/newpath/pathogen_machines.dm b/code/WorkInProgress/pathology/newpath/pathogen_machines.dm index 384915e..3fc3d7a 100644 --- a/code/WorkInProgress/pathology/newpath/pathogen_machines.dm +++ b/code/WorkInProgress/pathology/newpath/pathogen_machines.dm @@ -475,8 +475,8 @@ if(src.manip.splicesource && src.manip.slots[src.manip.splicesource]) var/datum/pathogendna/P = src.manip.slots[src.manip.splicesource] sOut = P.seqsplice - tOut = lentext(tOut) > 0 ? "\"[tOut]\"" : "null" - sOut = lentext(sOut) > 0 ? "\"[sOut]\"" : "null" + tOut = length(tOut) > 0 ? "\"[tOut]\"" : "null" + sOut = length(sOut) > 0 ? "\"[sOut]\"" : "null" gui.sendToSubscribers({"{"splice":{"source":[sOut],"target":[tOut],"pred":[predictive_data],"selSource":[src.manip.sel_source],"selTarget":[src.manip.sel_target],"selected":[src.manip.splicesource]}}"}, "setUIState") @@ -558,7 +558,7 @@ sendAnalysisData() if (href_list["analysisappend"]) - if (lentext(src.manip.analysis) >= 15) + if (length(src.manip.analysis) >= 15) return var/id = text2num(href_list["analysisappend"]) @@ -576,7 +576,7 @@ if (href_list["analysisdo"]) if (!src.manip.analysis) return - var/tlen = lentext(src.manip.analysis) + var/tlen = length(src.manip.analysis) if (tlen < 3) return var/analyzed = src.manip.analysis @@ -602,11 +602,11 @@ for (var/i = 1, i <= bits, i++) var/curr = copytext(analyzed, (i - 1) * 3 + 1, i * 3 + 1) acc += curr - var/acc_len = lentext(acc) + var/acc_len = length(acc) var/total = 0 var/match = 0 for (var/dna in pathogen_controller.UID_to_symptom) - var/dnalen = lentext(dna) + var/dnalen = length(dna) if (dnalen >= acc_len) total++ if (dnalen == acc_len) diff --git a/code/WorkInProgress/previouslyKeelinsStuff.dm b/code/WorkInProgress/previouslyKeelinsStuff.dm index 4ca735d..1212db7 100644 --- a/code/WorkInProgress/previouslyKeelinsStuff.dm +++ b/code/WorkInProgress/previouslyKeelinsStuff.dm @@ -282,7 +282,7 @@ var/reverse_mode = 0 /proc/reverse_text(var/string) var/new_string="" - for(var/i=lentext(string)+1, i>0, i--) + for(var/i=length(string)+1, i>0, i--) new_string += copytext(string,i,i+1) return new_string diff --git a/code/datums/chemistry/chemicompiler_core.dm b/code/datums/chemistry/chemicompiler_core.dm index b46f641..d84620f 100644 --- a/code/datums/chemistry/chemicompiler_core.dm +++ b/code/datums/chemistry/chemicompiler_core.dm @@ -191,7 +191,7 @@ /datum/chemicompiler_core/proc/parseCBF(var/string, var/button) var/list/tokens = list(">", "<", "+", "-", ".", "\[", "]", "{", "}", "(", ")", "^", "'", "$", "@") - var/l = lentext(string) + var/l = length(string) var/list/inst = new var/tmp/token @@ -300,7 +300,7 @@ if(data.len < dp + 1) data.len = dp + 1 - if(lentext(textBuffer) > 80) + if(length(textBuffer) > 80) output += "[textBuffer]
" textBuffer = "" updatePanel() diff --git a/code/datums/gamemodes/construction.dm b/code/datums/gamemodes/construction.dm index 2eaf0ca..f6caea6 100644 --- a/code/datums/gamemodes/construction.dm +++ b/code/datums/gamemodes/construction.dm @@ -404,7 +404,7 @@ /proc/debug_supply_pack() var/thepath = input("Path", "Path", "/datum/supply_packs") as text - if (!lentext(thepath)) + if (!length(thepath)) return var/therealpath = text2path(thepath) if (therealpath) diff --git a/code/datums/genetics/bioHolder.dm b/code/datums/genetics/bioHolder.dm index 55df458..e2773a4 100644 --- a/code/datums/genetics/bioHolder.dm +++ b/code/datums/genetics/bioHolder.dm @@ -173,7 +173,7 @@ var/list/datum/bioEffect/bioEffectList = list() E.holder = src E.activated_from_pool = 1 E.OnAdd() - if(lentext(E.msgGain) > 0) + if(length(E.msgGain) > 0) if (E.isBad) boutput(owner, "[E.msgGain]") else @@ -403,7 +403,7 @@ var/list/datum/bioEffect/bioEffectList = list() newEffect.OnAdd() src.genetic_stability -= newEffect.stability_loss src.genetic_stability = max(0,min(src.genetic_stability,100)) - if(lentext(newEffect.msgGain) > 0) + if(length(newEffect.msgGain) > 0) if (newEffect.isBad) boutput(owner, "[newEffect.msgGain]") else @@ -425,7 +425,7 @@ var/list/datum/bioEffect/bioEffectList = list() BE.OnAdd() src.genetic_stability -= BE.stability_loss src.genetic_stability = max(0,min(src.genetic_stability,100)) - if(lentext(BE.msgGain) > 0) + if(length(BE.msgGain) > 0) if (BE.isBad) boutput(owner, "[BE.msgGain]") else @@ -443,7 +443,7 @@ var/list/datum/bioEffect/bioEffectList = list() if (!D.activated_from_pool) src.genetic_stability += D.stability_loss src.genetic_stability = max(0,min(src.genetic_stability,100)) - if(owner && lentext(D.msgLose) > 0) + if(owner && length(D.msgLose) > 0) if (D.isBad) boutput(owner, "[D.msgLose]") else diff --git a/code/datums/genetics/geneticsMachines.dm b/code/datums/genetics/geneticsMachines.dm index 0feb2cb..0c774b6 100644 --- a/code/datums/genetics/geneticsMachines.dm +++ b/code/datums/genetics/geneticsMachines.dm @@ -802,7 +802,7 @@ var/list/genetics_computers = list() boutput(usr, "SCANNER ALERT: No automatic decryptions available.") return - if(lentext(code) != lentext(bp.lockcode)) + if(length(code) != length(bp.lockcode)) boutput(usr, "SCANNER ALERT: Invalid code length.") return if (code == bp.lockcode) @@ -822,7 +822,7 @@ var/list/genetics_computers = list() boutput(usr, "SCANNER ALERT: Decryption failed. Base pair encryption code has mutated.") else bp.locktries-- - var/length = lentext(bp.lockcode) + var/length = length(bp.lockcode) var/list/lockcode_list = list() for(var/i=0,i < length,i++) diff --git a/code/datums/vote.dm b/code/datums/vote.dm index 77756ea..478b9dd 100644 --- a/code/datums/vote.dm +++ b/code/datums/vote.dm @@ -132,7 +132,7 @@ for(var/w in winners) - if(lentext(ret) > 0) + if(length(ret) > 0) ret += "/" if(w=="default") winners = list("default") diff --git a/code/obj/item/device/pda2/game.dm b/code/obj/item/device/pda2/game.dm index 2ee285c..876ac0a 100644 --- a/code/obj/item/device/pda2/game.dm +++ b/code/obj/item/device/pda2/game.dm @@ -566,7 +566,7 @@ src.temp = "Illegal move." src.master.updateSelfDialog() return - if(lentext(attempt) != lentext(src.solution)) + if(length(attempt) != length(src.solution)) src.temp = "Illegal move." src.master.updateSelfDialog() return @@ -580,7 +580,7 @@ else src.attempts-- - var/length = lentext(src.solution) + var/length = length(src.solution) var/list/lockcode_list = list() for(var/i=0,i < length,i++) diff --git a/code/obj/machinery/manufacturer.dm b/code/obj/machinery/manufacturer.dm index 181f35c..4f895a6 100644 --- a/code/obj/machinery/manufacturer.dm +++ b/code/obj/machinery/manufacturer.dm @@ -476,7 +476,7 @@ if (href_list["search"]) src.search = input("Enter text to search for in schematics.","Manufacturing Unit") as null|text - if (lentext(src.search) == 0) + if (length(src.search) == 0) src.search = null if (href_list["category"]) diff --git a/code/obj/machinery/status_display.dm b/code/obj/machinery/status_display.dm index 7a2761c..8ef210e 100644 --- a/code/obj/machinery/status_display.dm +++ b/code/obj/machinery/status_display.dm @@ -88,7 +88,7 @@ var/list/status_display_text_images = list() displayloc = "ETA " var/displaytime = get_shuttle_timer() - if(lentext(displaytime) > 5) + if(length(displaytime) > 5) displaytime = "**~**" update_display_lines(displayloc, displaytime) @@ -102,7 +102,7 @@ var/list/status_display_text_images = list() var/disp2 if(supply_shuttle_moving) disp1 = get_supply_shuttle_timer() - if(lentext(disp1) > 5) + if(length(disp1) > 5) disp1 = "**~**" disp2 = null @@ -128,14 +128,14 @@ var/list/status_display_text_images = list() line1 = message1 else line1 = copytext(message1+message1, index1, index1+5) - if(index1++ > (lentext(message1))) + if(index1++ > (length(message1))) index1 = 1 if(!index2) line2 = message2 else line2 = copytext(message2+message2, index2, index2+5) - if(index2++ > (lentext(message2))) + if(index2++ > (length(message2))) index2 = 1 update_display(line1, line2) @@ -158,14 +158,14 @@ var/list/status_display_text_images = list() proc/set_message(var/m1, var/m2) if(m1) - index1 = (lentext(m1) > 5) + index1 = (length(m1) > 5) message1 = uppertext(m1) else message1 = "" index1 = 0 if(m2) - index2 = (lentext(m2) > 5) + index2 = (length(m2) > 5) message2 = uppertext(m2) else message2 = null @@ -181,15 +181,15 @@ var/list/status_display_text_images = list() proc/calculate_message_images() text_ticker.len = 0 - var/target = max(lentext(message1), lentext(message2)) + var/target = max(length(message1), length(message2)) //No sense repeatedly concatenating the message var/dmessage1 = "" - if(lentext(message1)>MAX_LEN) + if(length(message1)>MAX_LEN) dmessage1 = message1+message1 var/dmessage2 = "" - if(lentext(message2)>MAX_LEN) + if(length(message2)>MAX_LEN) dmessage2 = message2+message2 for(var/I = 1; I <= target; I++) @@ -197,13 +197,13 @@ var/list/status_display_text_images = list() var/line2 var/image/temp = image('icons/obj/status_display.dmi') if(dmessage1) //If there is a double message then line1 > MAX_LEN - var/len = lentext(message1) + var/len = length(message1) line1 = copytext(dmessage1, (I % len)+1 , ((I % len) + MAX_LEN ) + 1) else line1 = message1 if(dmessage2) //If there is a double message then line1 > MAX_LEN - var/len = lentext(message2) + var/len = length(message2) line2 = copytext(dmessage2, (I % len)+1 , ((I + MAX_LEN) % len) + 1) else //Otherwise show entire message line2 = message2 @@ -226,14 +226,14 @@ var/list/status_display_text_images = list() line1 = message1 else line1 = copytext(message1+message1, index1, index1+5) - if(index1++ > (lentext(message1))) + if(index1++ > (length(message1))) index1 = 1 if(!index2) line2 = message2 else line2 = copytext(message2+message2, index2, index2+5) - if(index2++ > (lentext(message2))) + if(index2++ > (length(message2))) index2 = 1 */ @@ -298,7 +298,7 @@ var/list/status_display_text_images = list() proc/texticon(var/tn, var/px = 0, var/py = 0) if(!temp_image) temp_image = image('icons/obj/status_display.dmi', "blank") - var/len = lentext(tn) + var/len = length(tn) temp_image.overlays.Cut() for(var/d = 1 to len) diff --git a/code/procs/helpers.dm b/code/procs/helpers.dm index e2d047b..8ac67a1 100644 --- a/code/procs/helpers.dm +++ b/code/procs/helpers.dm @@ -1683,7 +1683,7 @@ proc/RarityClassRoll(var/scalemax = 100, var/mod = 0, var/list/category_boundari /proc/is_valid_color_string(var/string) if (!istext(string)) return 0 - if (lentext(string) != 7) + if (length(string) != 7) return 0 if (copytext(string,1,2) != "#") return 0 diff --git a/code/unused/_debug.dm b/code/unused/_debug.dm index c7d1fff..b5310bb 100644 --- a/code/unused/_debug.dm +++ b/code/unused/_debug.dm @@ -100,12 +100,12 @@ Doing this because FindTurfs() isn't even used if(Debug) var/image/I = image('icons/misc/mark.dmi', "blank") - if(lentext(tn)>8) + if(length(tn)>8) tn = "*" - var/len = lentext(tn) + var/len = length(tn) - for(var/d = 1 to lentext(tn)) + for(var/d = 1 to length(tn)) var/char = copytext(tn, len-d+1, len-d+2) diff --git a/code/util/var_dump.dm b/code/util/var_dump.dm index 07fe29e..33a269e 100644 --- a/code/util/var_dump.dm +++ b/code/util/var_dump.dm @@ -471,7 +471,7 @@ var_dump _savefileinfo(savefile/S, link = 0) var/output = "savefile([S.name])" - var/valid_link = copytext("\ref[S]", 2, lentext("\ref[S]")) + var/valid_link = copytext("\ref[S]", 2, length("\ref[S]")) if(link) // Make link return output + " \ref[S]" @@ -484,7 +484,7 @@ var_dump _datuminfo(datum/D, type, link = 0) - var/valid_link = copytext("\ref[D]", 2, lentext("\ref[D]")) + var/valid_link = copytext("\ref[D]", 2, length("\ref[D]")) if(link) // Make link @@ -527,7 +527,7 @@ var_dump _savefileinfo(savefile/S, link = 0) var/output = "savefile([S.name])" - var/valid_link = copytext("\ref[S]", 2, lentext("\ref[S]")) + var/valid_link = copytext("\ref[S]", 2, length("\ref[S]")) if(link) // Make link return output + " \ref[S]" + ascii2text(13) + ascii2text(10) @@ -540,7 +540,7 @@ var_dump _datuminfo(datum/D, type, link = 0) - var/valid_link = copytext("\ref[D]", 2, lentext("\ref[D]")) + var/valid_link = copytext("\ref[D]", 2, length("\ref[D]")) if(link) // Make link