repace lentext with length procs

This commit is contained in:
Kyle2143
2019-12-08 20:43:40 -05:00
parent 73bce6a90c
commit 45130a1d79
17 changed files with 47 additions and 47 deletions
@@ -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
@@ -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
@@ -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)