Changes all .len to length() where applicable (#25174)

* Globals work

* Double access works

* All other things

* Revert "All other things"

This reverts commit 6574442eb6.

* More changes that compile and work

* IT WORKS AAAAAA

* Changes even more .len to length()

* Apply suggestions from code review

* Update code/datums/mind.dm

* Update code/__HELPERS/sorts/InsertSort.dm

Co-authored-by: Deniz <66401072+Oyu07@users.noreply.github.com>

* Update code/__HELPERS/sanitize_values.dm

Co-authored-by: Deniz <66401072+Oyu07@users.noreply.github.com>

---------

Co-authored-by: FunnyMan3595 (Charlie Nolan) <funnyman@google.com>
Co-authored-by: Deniz <66401072+Oyu07@users.noreply.github.com>
This commit is contained in:
DGamerL
2024-04-19 17:32:09 +00:00
committed by GitHub
co-authored by Deniz FunnyMan3595
parent bdd417ada0
commit bad8b31afa
369 changed files with 1162 additions and 1163 deletions
@@ -74,7 +74,7 @@ Note: Must be placed within 3 tiles of the R&D Console
to_chat(user, "<span class='warning'>This doesn't seem to have a tech origin!</span>")
return
var/list/temp_tech = ConvertReqString2List(O.origin_tech)
if(temp_tech.len == 0)
if(length(temp_tech) == 0)
to_chat(user, "<span class='warning'>You cannot deconstruct this item!</span>")
return
if(!user.drop_item())
+3 -3
View File
@@ -119,7 +119,7 @@
to_chat(user, "<span class='warning'>This doesn't seem to have a tech origin!</span>")
return
var/list/temp_tech = ConvertReqString2List(O.origin_tech)
if(temp_tech.len == 0)
if(length(temp_tech) == 0)
to_chat(user, "<span class='warning'>You cannot experiment on this item!</span>")
return
if(!user.drop_item())
@@ -229,7 +229,7 @@
if(prob(probtocheck))
result = TRUE
return from[counter+1]
if(counter + 2 < from.len)
if(counter + 2 < length(from))
counter = counter + 2
else
counter = 1
@@ -458,7 +458,7 @@
for(var/atom/movable/AM in oview(7,src))
if(!AM.anchored)
throwAt.Add(AM)
for(var/counter = 1, counter < throwAt.len, ++counter)
for(var/counter = 1, counter < length(throwAt), ++counter)
var/atom/movable/cast = throwAt[counter]
spawn(0)
cast.throw_at(pick(throwAt),10,1)
+1 -1
View File
@@ -385,7 +385,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
message_admins("[machine] exploit attempted by [key_name(usr, TRUE)]!")
return
if(being_built.make_reagents.len) // build_type should equal BIOGENERATOR though..
if(length(being_built.make_reagents)) // build_type should equal BIOGENERATOR though..
return
var/max_amount = is_lathe ? 10 : 1
+2 -2
View File
@@ -77,7 +77,7 @@ research holder datum.
//Checks to see if tech has all the required pre-reqs.
//Input: datum/tech; Output: 0/1 (false/true)
/datum/research/proc/TechHasReqs(datum/tech/T)
if(T.req_tech.len == 0)
if(length(T.req_tech) == 0)
return TRUE
for(var/req in T.req_tech)
var/datum/tech/known = known_tech[req]
@@ -92,7 +92,7 @@ research holder datum.
return FALSE
if(D.requires_whitelist && !(known_designs[D.id]))
return FALSE
if(D.req_tech.len == 0)
if(length(D.req_tech) == 0)
return TRUE
for(var/req in D.req_tech)
var/datum/tech/known = known_tech[req]
+2 -2
View File
@@ -59,12 +59,12 @@
if(!files)
files = new /datum/research(src)
var/list/temp_list
if(!id_with_upload.len)
if(!length(id_with_upload))
temp_list = list()
temp_list = splittext(id_with_upload_string, ";")
for(var/N in temp_list)
id_with_upload += text2num(N)
if(!id_with_download.len)
if(!length(id_with_download))
temp_list = list()
temp_list = splittext(id_with_download_string, ";")
for(var/N in temp_list)
@@ -239,7 +239,7 @@
if(QDELETED(src) || QDELETED(SM))
return
if(candidates.len)
if(length(candidates))
var/mob/C = pick(candidates)
SM.key = C.key
dust_if_respawnable(C)