mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
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:
co-authored by
Deniz
FunnyMan3595
parent
bdd417ada0
commit
bad8b31afa
@@ -236,7 +236,7 @@
|
||||
|
||||
/obj/effect/decal/cleanable/blood/writing/Initialize(mapload)
|
||||
. = ..()
|
||||
if(random_icon_states.len)
|
||||
if(length(random_icon_states))
|
||||
for(var/obj/effect/decal/cleanable/blood/writing/W in loc)
|
||||
random_icon_states.Remove(W.icon_state)
|
||||
icon_state = pick(random_icon_states)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
bloodiness -= add_blood
|
||||
S.bloody_shoes[blood_state] = min(MAX_SHOE_BLOODINESS, S.bloody_shoes[blood_state] + add_blood)
|
||||
S.bloody_shoes[BLOOD_BASE_ALPHA] = BLOODY_FOOTPRINT_BASE_ALPHA * (alpha/255)
|
||||
if(blood_DNA && blood_DNA.len)
|
||||
if(blood_DNA && length(blood_DNA))
|
||||
S.add_blood(H.blood_DNA, basecolor)
|
||||
S.blood_state = blood_state
|
||||
S.blood_color = basecolor
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
if(direction & i)
|
||||
dirList += i
|
||||
|
||||
if(dirList.len)
|
||||
if(length(dirList))
|
||||
var/newDir = pick(dirList)
|
||||
if(newDir == 16)
|
||||
floor = 1
|
||||
|
||||
@@ -416,7 +416,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/newplayer_start) //Without this you sp
|
||||
/obj/effect/landmark/costume/random/Initialize(mapload) //costume spawner, selects a random subclass and disappears
|
||||
. = ..()
|
||||
var/list/options = (typesof(/obj/effect/landmark/costume) - /obj/effect/landmark/costume/random)
|
||||
var/PICK= options[rand(1,options.len)]
|
||||
var/PICK= options[rand(1,length(options))]
|
||||
new PICK(src.loc)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
@@ -580,7 +580,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/newplayer_start) //Without this you sp
|
||||
var/datum/map_template/ruin/ruin_template
|
||||
|
||||
/obj/effect/landmark/ruin/New(loc, my_ruin_template)
|
||||
name = "ruin_[GLOB.ruin_landmarks.len + 1]"
|
||||
name = "ruin_[length(GLOB.ruin_landmarks) + 1]"
|
||||
..(loc)
|
||||
ruin_template = my_ruin_template
|
||||
GLOB.ruin_landmarks |= src
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in entry_vent.parent.other_atmosmch)
|
||||
vents.Add(temp_vent)
|
||||
if(!vents.len)
|
||||
if(!length(vents))
|
||||
entry_vent = null
|
||||
return
|
||||
var/obj/machinery/atmospherics/unary/vent_pump/exit_vent = pick(vents)
|
||||
|
||||
Reference in New Issue
Block a user