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
+2 -2
View File
@@ -49,7 +49,7 @@
if(clear)
L+=T
if(!L.len)
if(!length(L))
to_chat(usr, "The spell matrix was unable to locate a suitable teleport destination for an unknown reason. Sorry.")
return
@@ -62,7 +62,7 @@
var/list/tempL = L
var/attempt = null
var/success = 0
while(tempL.len)
while(length(tempL))
attempt = pick(tempL)
success = target.Move(attempt)
if(!success)
+1 -1
View File
@@ -20,7 +20,7 @@
if(L.pulling && (isliving(L.pulling)))
var/mob/living/M = L.pulling
if(M.mob_spell_list.len != 0 || (M.mind && M.mind.spell_list.len != 0))
if(length(M.mob_spell_list) != 0 || (M.mind && length(M.mind.spell_list) != 0))
for(var/datum/spell/S in M.mob_spell_list)
S.cooldown_handler.revert_cast()
if(M.mind)
+1 -1
View File
@@ -30,7 +30,7 @@
if(delay <= 0 || do_after(user, delay, target = user))
for(var/i=0,i<summon_amt,i++)
if(!targets.len)
if(!length(targets))
break
var/summoned_object_type = pick(summon_type)
var/spawn_place = pick(targets)
+1 -1
View File
@@ -22,7 +22,7 @@
/datum/spell/horsemask/cast(list/targets, mob/user = usr)
if(!targets.len)
if(!length(targets))
to_chat(user, "<span class='notice'>No target found in range.</span>")
return
+4 -4
View File
@@ -50,18 +50,18 @@ Also, you never added distance checking after target is selected. I've went ahea
var/mob/living/caster = user//The wizard/whomever doing the body transferring.
//MIND TRANSFER BEGIN
if(caster.mind.special_verbs.len)//If the caster had any special verbs, remove them from the mob verb list.
if(length(caster.mind.special_verbs))//If the caster had any special verbs, remove them from the mob verb list.
for(var/V in caster.mind.special_verbs)//Since the caster is using an object spell system, this is mostly moot.
remove_verb(caster, V) //But a safety nontheless.
if(victim.mind.special_verbs.len)//Now remove all of the victim's verbs.
if(length(victim.mind.special_verbs))//Now remove all of the victim's verbs.
for(var/V in victim.mind.special_verbs)
remove_verb(victim, V)
var/mob/dead/observer/ghost = victim.ghostize(0)
caster.mind.transfer_to(victim)
if(victim.mind.special_verbs.len)//To add all the special verbs for the original caster.
if(length(victim.mind.special_verbs))//To add all the special verbs for the original caster.
for(var/V in caster.mind.special_verbs)//Not too important but could come into play.
add_verb(caster, V)
@@ -71,7 +71,7 @@ Also, you never added distance checking after target is selected. I've went ahea
caster.key = ghost.key //have to transfer the key since the mind was not active
qdel(ghost)
if(caster.mind.special_verbs.len)//If they had any special verbs, we add them here.
if(length(caster.mind.special_verbs))//If they had any special verbs, we add them here.
for(var/V in caster.mind.special_verbs)
add_verb(caster, V)
//MIND TRANSFER END
+1 -1
View File
@@ -35,7 +35,7 @@
continue
turfs += T
if(!turfs.len)
if(!length(turfs))
var/list/turfs_to_pick_from = list()
for(var/turf/T in orange(target,outer_tele_radius))
if(!(T in orange(target,inner_tele_radius)))