mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 04:57:12 +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
@@ -165,11 +165,11 @@ GLOBAL_LIST_INIT(maploader_typecache, typecacheof(/obj/effect/landmark/map_loade
|
||||
SSatoms.InitializeAtoms(our_atoms, FALSE)
|
||||
log_debug("Primary initialization finished in [stop_watch(watch)]s.")
|
||||
our_atoms.Cut()
|
||||
if(pipes.len)
|
||||
if(length(pipes))
|
||||
do_pipes(pipes)
|
||||
if(cables.len)
|
||||
if(length(cables))
|
||||
do_cables(cables)
|
||||
if(late_maps.len)
|
||||
if(length(late_maps))
|
||||
do_late_maps(late_maps)
|
||||
|
||||
/datum/space_level/proc/do_pipes(list/pipes)
|
||||
|
||||
@@ -200,8 +200,8 @@
|
||||
/datum/spacewalk_grid/Destroy()
|
||||
for(var/datum/point/P in filled_nodes)
|
||||
release_node(P)
|
||||
if(available_nodes.len > 1)
|
||||
log_debug("Multiple nodes left behind after SW grid qdel: [available_nodes.len]")
|
||||
if(length(available_nodes) > 1)
|
||||
log_debug("Multiple nodes left behind after SW grid qdel: [length(available_nodes)]")
|
||||
for(var/datum/point/P in available_nodes)
|
||||
log_debug("([P.x],[P.y])")
|
||||
return ..()
|
||||
@@ -337,7 +337,7 @@
|
||||
|
||||
// Now, we pop entries in a random order from our list of space levels
|
||||
// and assign its connections based on the grid
|
||||
while(crosslinks.len)
|
||||
while(length(crosslinks))
|
||||
D = pick(crosslinks)
|
||||
crosslinks.Remove(D)
|
||||
// Add it to our space grid
|
||||
|
||||
@@ -17,7 +17,7 @@ GLOBAL_DATUM_INIT(space_manager, /datum/zlev_manager, new())
|
||||
// Populate our space level list
|
||||
// and prepare space transitions
|
||||
/datum/zlev_manager/proc/initialize()
|
||||
var/num_official_z_levels = GLOB.map_transition_config.len
|
||||
var/num_official_z_levels = length(GLOB.map_transition_config)
|
||||
var/k = 1
|
||||
|
||||
// First take care of "Official" z levels, without visiting levels outside of the list
|
||||
@@ -146,9 +146,9 @@ GLOBAL_DATUM_INIT(space_manager, /datum/zlev_manager, new())
|
||||
/datum/zlev_manager/proc/allocate_space(width, height)
|
||||
if(width > world.maxx || height > world.maxy)
|
||||
throw EXCEPTION("Too much space requested! \[[width],[height]\]")
|
||||
if(!heaps.len)
|
||||
if(!length(heaps))
|
||||
heaps.len++
|
||||
heaps[heaps.len] = add_new_heap()
|
||||
heaps[length(heaps)] = add_new_heap()
|
||||
var/datum/space_level/heap/our_heap
|
||||
var/weve_got_vacancy = 0
|
||||
for(our_heap in heaps)
|
||||
@@ -160,7 +160,7 @@ GLOBAL_DATUM_INIT(space_manager, /datum/zlev_manager, new())
|
||||
if(!weve_got_vacancy)
|
||||
heaps.len++
|
||||
our_heap = add_new_heap()
|
||||
heaps[heaps.len] = our_heap
|
||||
heaps[length(heaps)] = our_heap
|
||||
return our_heap.allocate(width, height)
|
||||
|
||||
/datum/zlev_manager/proc/free_space(datum/space_chunk/C)
|
||||
|
||||
Reference in New Issue
Block a user