From 6574442eb651a79ec87c63b37034b2a70e693a79 Mon Sep 17 00:00:00 2001 From: DGamerL <108773801+DGamerL@users.noreply.github.com> Date: Thu, 18 Apr 2024 03:04:47 +0200 Subject: [PATCH] All other things --- code/__HELPERS/heap.dm | 2 +- code/__HELPERS/lists.dm | 24 +++++------ code/__HELPERS/verb_helpers.dm | 4 +- code/_onclick/hud/radial.dm | 2 +- code/controllers/globals.dm | 2 +- code/controllers/subsystem/SSacid.dm | 2 +- code/controllers/subsystem/SSair.dm | 30 ++++++------- code/controllers/subsystem/SSfires.dm | 2 +- code/controllers/subsystem/SSgarbage.dm | 2 +- code/controllers/subsystem/SSicon_smooth.dm | 2 +- code/controllers/subsystem/SSidlenpcpool.dm | 2 +- code/controllers/subsystem/SSjobs.dm | 4 +- code/controllers/subsystem/SSmachinery.dm | 8 ++-- code/controllers/subsystem/SSmobs.dm | 2 +- code/controllers/subsystem/SSnpcpool.dm | 2 +- code/controllers/subsystem/SSparallax.dm | 2 +- code/controllers/subsystem/SSping.dm | 2 +- code/controllers/subsystem/SSspacedrift.dm | 2 +- code/controllers/subsystem/SSstatpanel.dm | 8 ++-- code/controllers/subsystem/SStgui.dm | 2 +- code/controllers/subsystem/SSthrowing.dm | 2 +- .../subsystem/processing/processing.dm | 2 +- code/datums/ai_laws_datums.dm | 2 +- code/datums/cache/air_alarm.dm | 4 +- code/datums/cache/apc_cache.dm | 2 +- code/datums/cache/crew.dm | 2 +- code/datums/cache/powermonitor.dm | 2 +- code/datums/datacore.dm | 18 ++++---- code/datums/datumvars.dm | 10 ++--- code/datums/diseases/advance/advance.dm | 2 +- .../diseases/advance/symptoms/symptoms.dm | 2 +- code/datums/helper_datums/async_input.dm | 4 +- .../helper_datums/construction_datum.dm | 4 +- code/datums/radio_frequency.dm | 2 +- code/game/dna/dna_modifier.dm | 2 +- code/game/dna/mutations/disabilities.dm | 2 +- code/game/dna/mutations/mutation_powers.dm | 4 +- .../miniantags/guardian/types/assassin.dm | 2 +- .../guardian/types/explosive_guardian.dm | 2 +- .../miniantags/guardian/types/healer.dm | 4 +- code/game/gamemodes/miniantags/morph/morph.dm | 2 +- .../miniantags/pulsedemon/pulsedemon.dm | 12 +++--- .../gamemodes/miniantags/revenant/revenant.dm | 6 +-- code/game/gamemodes/setupgame.dm | 2 +- code/game/gamemodes/wizard/artefact.dm | 2 +- code/game/gamemodes/wizard/spellbook.dm | 2 +- code/game/gamemodes/wizard/wizard.dm | 2 +- code/game/machinery/autolathe.dm | 6 +-- code/game/machinery/camera/tracking.dm | 2 +- code/game/machinery/computer/brigcells.dm | 2 +- .../game/machinery/computer/communications.dm | 2 +- .../machinery/computer/medical_records.dm | 42 +++++++++---------- .../machinery/computer/security_records.dm | 2 +- .../mecha/equipment/tools/medical_tools.dm | 4 +- code/game/mecha/mecha_topic.dm | 6 +-- code/game/mecha/working/ripley.dm | 2 +- code/game/objects/items/devices/uplinks.dm | 4 +- code/game/objects/items/mixing_bowl.dm | 2 +- .../objects/items/weapons/storage/fancy.dm | 4 +- .../items/weapons/storage/storage_base.dm | 2 +- code/game/objects/structures/bedsheet_bin.dm | 4 +- code/game/objects/structures/safe.dm | 2 +- code/game/turfs/simulated/walls.dm | 2 +- code/modules/admin/verbs/SDQL2/SDQL_2.dm | 4 +- .../admin/verbs/SDQL2/SDQL_2_parser.dm | 22 +++++----- code/modules/admin/verbs/diagnostics.dm | 2 +- code/modules/admin/verbs/massmodvar.dm | 8 ++-- code/modules/admin/verbs/one_click_antag.dm | 8 ++-- .../atmospherics/machinery/airalarm.dm | 24 +++++------ .../atmospherics/machinery/datum_pipeline.dm | 6 +-- code/modules/awaymissions/maploader/reader.dm | 2 +- code/modules/client/client_procs.dm | 2 +- code/modules/clothing/clothing.dm | 2 +- code/modules/events/blob/overmind.dm | 4 +- .../food_and_drinks/drinks/bottler/bottler.dm | 10 ++--- .../food_and_drinks/food/foods/pizza.dm | 8 ++-- code/modules/hydroponics/beekeeping/beebox.dm | 2 +- code/modules/instruments/songs/play_legacy.dm | 4 +- .../instruments/songs/play_synthesized.dm | 2 +- .../mob/dead/observer/observer_base.dm | 2 +- code/modules/mob/living/brain/living_brain.dm | 4 +- .../mob/living/carbon/alien/alien_base.dm | 4 +- .../mob/living/carbon/alien/larva/larva.dm | 2 +- .../modules/mob/living/carbon/carbon_procs.dm | 2 +- .../mob/living/carbon/human/human_mob.dm | 22 +++++----- code/modules/mob/living/silicon/ai/ai_mob.dm | 6 +-- code/modules/mob/living/silicon/pai/pai.dm | 2 +- .../living/silicon/pai/software/pai_apps.dm | 6 +-- .../mob/living/silicon/robot/robot_mob.dm | 6 +-- .../modules/mob/living/silicon/silicon_mob.dm | 2 +- .../hostile/terror_spiders/mother.dm | 2 +- .../hostile/terror_spiders/purple.dm | 8 ++-- .../hostile/terror_spiders/terror_spiders.dm | 4 +- .../mob/living/simple_animal/parrot.dm | 2 +- .../mob/living/simple_animal/simple_animal.dm | 2 +- .../living/simple_animal/slime/slime_mob.dm | 6 +-- code/modules/mob/mob.dm | 4 +- code/modules/mob/mob_say_base.dm | 4 +- code/modules/mob/new_player/new_player.dm | 10 ++--- code/modules/paperwork/paperbin.dm | 4 +- code/modules/paperwork/photocopier.dm | 2 +- code/modules/paperwork/photography.dm | 4 +- code/modules/pda/cart_apps.dm | 26 ++++++------ code/modules/pda/messenger.dm | 2 +- code/modules/power/generators/solar.dm | 2 +- code/modules/projectiles/guns/energy_guns.dm | 2 +- .../projectiles/guns/grenade_launcher.dm | 4 +- .../projectiles/guns/projectile/sniper.dm | 2 +- code/modules/projectiles/projectile_base.dm | 2 +- .../chemistry/machinery/chem_master.dm | 4 +- .../reagents/reagent_containers/spray.dm | 2 +- code/modules/research/experimentor.dm | 2 +- code/modules/research/rdconsole.dm | 42 +++++++++---------- code/modules/response_team/ert.dm | 2 +- code/modules/shuttle/emergency.dm | 4 +- code/modules/shuttle/shuttle.dm | 2 +- .../space_management/space_transition.dm | 2 +- .../space_management/zlevel_manager.dm | 4 +- code/modules/station_goals/bluespace_tap.dm | 2 +- code/modules/telesci/telesci_computer.dm | 2 +- code/modules/tgs/v3210/v3_api.dm | 4 +- code/modules/tgui/modules/law_manager.dm | 6 +-- 122 files changed, 317 insertions(+), 317 deletions(-) diff --git a/code/__HELPERS/heap.dm b/code/__HELPERS/heap.dm index c9ad037755f..8711ff6f3de 100644 --- a/code/__HELPERS/heap.dm +++ b/code/__HELPERS/heap.dm @@ -27,7 +27,7 @@ return null . = L[1] - L[1] = L[L.len] + L[1] = L[length(L)] L.Cut(L.len) Sink(1) diff --git a/code/__HELPERS/lists.dm b/code/__HELPERS/lists.dm index 7a90a0543e5..c82a2944f43 100644 --- a/code/__HELPERS/lists.dm +++ b/code/__HELPERS/lists.dm @@ -276,7 +276,7 @@ //Returns the top(last) element from the list and removes it from the list (typical stack function) /proc/pop(list/L) if(L.len) - . = L[L.len] + . = L[length(L)] L.len-- /proc/popleft(list/L) @@ -293,7 +293,7 @@ /proc/reverselist(list/L) var/list/output = list() if(L) - for(var/i = L.len; i >= 1; i--) + for(var/i = length(L); i >= 1; i--) output += L[i] return output @@ -303,7 +303,7 @@ return L = L.Copy() - for(var/i=1, i= i && possible_symptoms.len; i++) + for(var/i = 1; number_of >= i && length(possible_symptoms); i++) generated += pick_n_take(possible_symptoms) return generated diff --git a/code/datums/diseases/advance/symptoms/symptoms.dm b/code/datums/diseases/advance/symptoms/symptoms.dm index 8f72de7f599..454f71fc8bf 100644 --- a/code/datums/diseases/advance/symptoms/symptoms.dm +++ b/code/datums/diseases/advance/symptoms/symptoms.dm @@ -18,7 +18,7 @@ GLOBAL_LIST_INIT(list_symptoms, subtypesof(/datum/symptom)) /datum/symptom/New() var/list/S = GLOB.list_symptoms - for(var/i = 1; i <= S.len; i++) + for(var/i = 1; i <= length(S); i++) if(type == S[i]) id = "[i]" return diff --git a/code/datums/helper_datums/async_input.dm b/code/datums/helper_datums/async_input.dm index e25fd0ac3e0..44fa7162cb7 100644 --- a/code/datums/helper_datums/async_input.dm +++ b/code/datums/helper_datums/async_input.dm @@ -110,7 +110,7 @@ /datum/async_input/ranked/render_choices() var/dat = "
" dat += "" - for(var/i = 1, i <= choices.len, i++) + for(var/i = 1, i <= length(choices), i++) var/choice = choices[i] dat += "" dat += "" @@ -157,7 +157,7 @@ ..() popup.add_script("autocomplete.js", 'html/browser/autocomplete.js') - for(var/i=1, i <= choices.len, i++) + for(var/i=1, i <= length(choices), i++) var/C = choices[choices[i]] choices[i] = url_encode(choices[i], TRUE) choices[choices[i]] = C diff --git a/code/datums/helper_datums/construction_datum.dm b/code/datums/helper_datums/construction_datum.dm index 5b534b848b9..3e554b107ff 100644 --- a/code/datums/helper_datums/construction_datum.dm +++ b/code/datums/helper_datums/construction_datum.dm @@ -37,7 +37,7 @@ return 0 /datum/construction/proc/is_right_key(atom/used_atom) // returns current step num if used_atom is of the right type. - var/list/L = steps[steps.len] + var/list/L = steps[length(steps)] if(do_tool_or_atom_check(used_atom, L["key"])) return steps.len return 0 @@ -67,7 +67,7 @@ return 1 /datum/construction/proc/check_all_steps(atom/used_atom,mob/user as mob) //check all steps, remove matching one. - for(var/i=1;i<=steps.len;i++) + for(var/i=1;i<=length(steps);i++) var/list/L = steps[i] if(do_tool_or_atom_check(used_atom, L["key"]) && custom_action(i, used_atom, user)) steps[i]=null;//stupid byond list from list removal... diff --git a/code/datums/radio_frequency.dm b/code/datums/radio_frequency.dm index 71e891ed3ce..2c4b278537b 100644 --- a/code/datums/radio_frequency.dm +++ b/code/datums/radio_frequency.dm @@ -48,7 +48,7 @@ devices_line += device // var/list/obj/devices_line___ = devices[filter_str] // var/l = devices_line___.len - //log_admin("DEBUG: devices_line.len=[devices_line.len]") + //log_admin("DEBUG: devices_line.len=[length(devices_line)]") //log_admin("DEBUG: devices(filter_str).len=[l]") /datum/radio_frequency/proc/remove_listener(obj/device) diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index cfb8f17e08a..e964c8804cd 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -351,7 +351,7 @@ /obj/machinery/computer/scan_consolenew/proc/all_dna_blocks(list/buffer) var/list/arr = list() - for(var/i = 1, i <= buffer.len, i++) + for(var/i = 1, i <= length(buffer), i++) arr += "[i]:[EncodeDNABlock(buffer[i])]" return arr diff --git a/code/game/dna/mutations/disabilities.dm b/code/game/dna/mutations/disabilities.dm index f6b570d6f4d..c0140fcb7ca 100644 --- a/code/game/dna/mutations/disabilities.dm +++ b/code/game/dna/mutations/disabilities.dm @@ -435,7 +435,7 @@ var/list/words = splittext(message," ") var/list/rearranged = list() - for(var/i=1;i<=words.len;i++) + for(var/i=1;i<=length(words);i++) var/cword = pick(words) words.Remove(cword) var/suffix = copytext(cword,length(cword)-1,length(cword)) diff --git a/code/game/dna/mutations/mutation_powers.dm b/code/game/dna/mutations/mutation_powers.dm index e7238f0b627..42636df0528 100644 --- a/code/game/dna/mutations/mutation_powers.dm +++ b/code/game/dna/mutations/mutation_powers.dm @@ -700,8 +700,8 @@ if(H.mind && H.mind.initial_account) numbers += H.mind.initial_account.account_number numbers += H.mind.initial_account.account_pin - if(numbers.len>0) - to_chat(user, "Numbers: You sense the number[numbers.len>1?"s":""] [english_list(numbers)] [numbers.len>1?"are":"is"] important to [M.name].") + if(length(numbers)>0) + to_chat(user, "Numbers: You sense the number[length(numbers)>1?"s":""] [english_list(numbers)] [length(numbers)>1?"are":"is"] important to [M.name].") to_chat(user, "Thoughts: [M.name] is currently [thoughts].") if(M.dna?.GetSEState(GLOB.empathblock)) diff --git a/code/game/gamemodes/miniantags/guardian/types/assassin.dm b/code/game/gamemodes/miniantags/guardian/types/assassin.dm index 0af404e1db7..fb539100f0b 100644 --- a/code/game/gamemodes/miniantags/guardian/types/assassin.dm +++ b/code/game/gamemodes/miniantags/guardian/types/assassin.dm @@ -29,7 +29,7 @@ var/list/status_tab_data = ..() . = status_tab_data if(stealthcooldown >= world.time) - status_tab_data[++status_tab_data.len] = list("Stealth Cooldown Remaining:", "[max(round((stealthcooldown - world.time) * 0.1, 0.1), 0)] seconds") + status_tab_data[++length(status_tab_data)] = list("Stealth Cooldown Remaining:", "[max(round((stealthcooldown - world.time) * 0.1, 0.1), 0)] seconds") /mob/living/simple_animal/hostile/guardian/assassin/AttackingTarget() . = ..() diff --git a/code/game/gamemodes/miniantags/guardian/types/explosive_guardian.dm b/code/game/gamemodes/miniantags/guardian/types/explosive_guardian.dm index 4952cf1e36d..73c72ad02d7 100644 --- a/code/game/gamemodes/miniantags/guardian/types/explosive_guardian.dm +++ b/code/game/gamemodes/miniantags/guardian/types/explosive_guardian.dm @@ -14,7 +14,7 @@ var/list/status_tab_data = ..() . = status_tab_data if(bomb_cooldown >= world.time) - status_tab_data[++status_tab_data.len] = list("Bomb Cooldown Remaining:", "[max(round((bomb_cooldown - world.time) * 0.1, 0.1), 0)] seconds") + status_tab_data[++length(status_tab_data)] = list("Bomb Cooldown Remaining:", "[max(round((bomb_cooldown - world.time) * 0.1, 0.1), 0)] seconds") /mob/living/simple_animal/hostile/guardian/bomb/AltClickOn(atom/movable/A) if(!istype(A)) diff --git a/code/game/gamemodes/miniantags/guardian/types/healer.dm b/code/game/gamemodes/miniantags/guardian/types/healer.dm index f073bd8935d..0177150ee20 100644 --- a/code/game/gamemodes/miniantags/guardian/types/healer.dm +++ b/code/game/gamemodes/miniantags/guardian/types/healer.dm @@ -51,9 +51,9 @@ var/list/status_tab_data = ..() . = status_tab_data if(beacon_cooldown >= world.time) - status_tab_data[++status_tab_data.len] = list("Bluespace Beacon Cooldown Remaining:", "[max(round((beacon_cooldown - world.time) * 0.1, 0.1), 0)] seconds") + status_tab_data[++length(status_tab_data)] = list("Bluespace Beacon Cooldown Remaining:", "[max(round((beacon_cooldown - world.time) * 0.1, 0.1), 0)] seconds") if(surgical_cooldown >= world.time) - status_tab_data[++status_tab_data.len] = list("Surgical Cooldown Remaining:", "[max(round((surgical_cooldown - world.time) * 0.1, 0.1), 0)] seconds") + status_tab_data[++length(status_tab_data)] = list("Surgical Cooldown Remaining:", "[max(round((surgical_cooldown - world.time) * 0.1, 0.1), 0)] seconds") /mob/living/simple_animal/hostile/guardian/healer/AttackingTarget() . = ..() diff --git a/code/game/gamemodes/miniantags/morph/morph.dm b/code/game/gamemodes/miniantags/morph/morph.dm index e6582468518..0f3d6ef123b 100644 --- a/code/game/gamemodes/miniantags/morph/morph.dm +++ b/code/game/gamemodes/miniantags/morph/morph.dm @@ -74,7 +74,7 @@ /mob/living/simple_animal/hostile/morph/get_status_tab_items() var/list/status_tab_data = ..() . = status_tab_data - status_tab_data[++status_tab_data.len] = list("Food Stored:", "[gathered_food]") + status_tab_data[++length(status_tab_data)] = list("Food Stored:", "[gathered_food]") /mob/living/simple_animal/hostile/morph/wizard name = "magical morph" diff --git a/code/game/gamemodes/miniantags/pulsedemon/pulsedemon.dm b/code/game/gamemodes/miniantags/pulsedemon/pulsedemon.dm index fd11e7048cf..153c67b1f24 100644 --- a/code/game/gamemodes/miniantags/pulsedemon/pulsedemon.dm +++ b/code/game/gamemodes/miniantags/pulsedemon/pulsedemon.dm @@ -268,12 +268,12 @@ /mob/living/simple_animal/demon/pulse_demon/get_status_tab_items() var/list/status_tab_data = ..() . = status_tab_data - status_tab_data[++status_tab_data.len] = list("Charge:", "[format_si_suffix(charge)]W") - status_tab_data[++status_tab_data.len] = list("Maximum Charge:", "[format_si_suffix(maxcharge)]W") - status_tab_data[++status_tab_data.len] = list("Drained Charge:", "[format_si_suffix(charge_drained)]W") - status_tab_data[++status_tab_data.len] = list("Hijacked APCs:", "[length(hijacked_apcs)]") - status_tab_data[++status_tab_data.len] = list("Drain Rate:", "[format_si_suffix(power_drain_rate)]W") - status_tab_data[++status_tab_data.len] = list("Hijack Time:", "[hijack_time / 10] seconds") + status_tab_data[++length(status_tab_data)] = list("Charge:", "[format_si_suffix(charge)]W") + status_tab_data[++length(status_tab_data)] = list("Maximum Charge:", "[format_si_suffix(maxcharge)]W") + status_tab_data[++length(status_tab_data)] = list("Drained Charge:", "[format_si_suffix(charge_drained)]W") + status_tab_data[++length(status_tab_data)] = list("Hijacked APCs:", "[length(hijacked_apcs)]") + status_tab_data[++length(status_tab_data)] = list("Drain Rate:", "[format_si_suffix(power_drain_rate)]W") + status_tab_data[++length(status_tab_data)] = list("Hijack Time:", "[hijack_time / 10] seconds") /mob/living/simple_animal/demon/pulse_demon/dust() return death() diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm index 790fa4ee447..039cafebcfa 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant.dm @@ -127,9 +127,9 @@ /mob/living/simple_animal/revenant/get_status_tab_items() var/list/status_tab_data = ..() . = status_tab_data - status_tab_data[++status_tab_data.len] = list("Current essence:", "[essence]/[essence_regen_cap]E") - status_tab_data[++status_tab_data.len] = list("Stolen essence:", "[essence_accumulated]E") - status_tab_data[++status_tab_data.len] = list("Stolen perfect souls:", "[perfectsouls]") + status_tab_data[++length(status_tab_data)] = list("Current essence:", "[essence]/[essence_regen_cap]E") + status_tab_data[++length(status_tab_data)] = list("Stolen essence:", "[essence_accumulated]E") + status_tab_data[++length(status_tab_data)] = list("Stolen perfect souls:", "[perfectsouls]") /mob/living/simple_animal/revenant/New() ..() diff --git a/code/game/gamemodes/setupgame.dm b/code/game/gamemodes/setupgame.dm index 66cd614b966..c8a5bf4fc6c 100644 --- a/code/game/gamemodes/setupgame.dm +++ b/code/game/gamemodes/setupgame.dm @@ -129,4 +129,4 @@ warning("DNA2: Mutation [mutation.name] trying to add to already assigned gene block list (used by [english_list(GLOB.assigned_mutation_blocks[block])])") GLOB.assigned_mutation_blocks[block] = mutation - //testing("DNA2: [numsToAssign.len] blocks are unused: [english_list(numsToAssign)]") + //testing("DNA2: [length(numsToAssign)] blocks are unused: [english_list(numsToAssign)]") diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 3074242b50a..cab01a98aa2 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -691,7 +691,7 @@ GLOBAL_LIST_EMPTY(multiverse) spooky_scaries |= M to_chat(M, "You have been revived by [user.real_name]!") to_chat(M, "[user.p_theyre(TRUE)] your master now, assist them even if it costs you your new life!") - desc = "A shard capable of resurrecting humans as skeleton thralls[unlimited ? "." : ", [spooky_scaries.len]/3 active thralls."]" + desc = "A shard capable of resurrecting humans as skeleton thralls[unlimited ? "." : ", [length(spooky_scaries)]/3 active thralls."]" /obj/item/necromantic_stone/proc/check_spooky() if(unlimited) //no point, the list isn't used. diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index ccff189cb7c..815a964a87f 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -881,7 +881,7 @@ dat += "" var/datum/spellbook_entry/E - for(var/i=1,i<=entries.len,i++) + for(var/i=1,i<=length(entries),i++) var/spell_info = "" E = entries[i] spell_info += E.GetInfo() diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index c0aacd4cf8e..3bdd8468ded 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -67,7 +67,7 @@ /datum/game_mode/wizard/declare_completion(ragin = 0) if(finished && !ragin) SSticker.mode_result = "wizard loss - wizard killed" - to_chat(world, " The wizard[(wizards.len>1)?"s":""] has been killed by the crew! The Space Wizards Federation has been taught a lesson they will not soon forget!") + to_chat(world, " The wizard[(length(wizards)>1)?"s":""] has been killed by the crew! The Space Wizards Federation has been taught a lesson they will not soon forget!") ..() return TRUE diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 46228977536..76b57c8832a 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -238,8 +238,8 @@ if(D.materials[MAT_GLASS] && (materials.amount(MAT_GLASS) < (D.materials[MAT_GLASS] / coeff))) has_glass = 0 - data[++data.len] = list("name" = "metal", "amount" = D.materials[MAT_METAL] / coeff, "is_red" = !has_metal) - data[++data.len] = list("name" = "glass", "amount" = D.materials[MAT_GLASS] / coeff, "is_red" = !has_glass) + data[++length(data)] = list("name" = "metal", "amount" = D.materials[MAT_METAL] / coeff, "is_red" = !has_metal) + data[++length(data)] = list("name" = "glass", "amount" = D.materials[MAT_GLASS] / coeff, "is_red" = !has_glass) return data @@ -253,7 +253,7 @@ for(var/list/L in queue) var/datum/design/D = L[1] var/list/LL = get_design_cost_as_list(D, L[2]) - data_queue[++data_queue.len] = list("name" = initial(D.name), "can_build" = can_build(D, L[2], temp_metal, temp_glass), "multiplier" = L[2]) + data_queue[++length(data_queue)] = list("name" = initial(D.name), "can_build" = can_build(D, L[2], temp_metal, temp_glass), "multiplier" = L[2]) temp_metal = max(temp_metal - LL[1], 1) temp_glass = max(temp_glass - LL[2], 1) data["queue"] = data_queue diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index 9d7e884319d..0f246b5c797 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -195,7 +195,7 @@ var/obj/machinery/camera/a var/obj/machinery/camera/b - for(var/i = L.len, i > 0, i--) + for(var/i = length(L), i > 0, i--) for(var/j = 1 to i - 1) a = L[j] b = L[j + 1] diff --git a/code/game/machinery/computer/brigcells.dm b/code/game/machinery/computer/brigcells.dm index 07a84e492f0..d419a575eb3 100644 --- a/code/game/machinery/computer/brigcells.dm +++ b/code/game/machinery/computer/brigcells.dm @@ -43,7 +43,7 @@ timer["time_set_seconds"] = round(T.timetoset / 10, 1) timer["time_left_seconds"] = round(T.timeleft(), 1) timer["ref"] = "\ref[T]" - timers[++timers.len] += timer + timers[++length(timers)] += timer timers = sortByKey(timers, "cell_id") data["cells"] = timers return data diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index d374fada3cf..854e307fd60 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -475,7 +475,7 @@ data["str_security_level"] = capitalize(SSsecurity_level.get_current_level_as_text()) var/list/msg_data = list() - for(var/i = 1; i <= messagetext.len; i++) + for(var/i = 1; i <= length(messagetext); i++) msg_data.Add(list(list("title" = messagetitle[i], "body" = messagetext[i], "id" = i))) data["messages"] = msg_data diff --git a/code/game/machinery/computer/medical_records.dm b/code/game/machinery/computer/medical_records.dm index 1c9e8a78768..0481eb62e7a 100644 --- a/code/game/machinery/computer/medical_records.dm +++ b/code/game/machinery/computer/medical_records.dm @@ -101,7 +101,7 @@ var/list/records = list() data["records"] = records for(var/datum/data/record/R in sortRecord(GLOB.data_core.general)) - records[++records.len] = list( + records[++length(records)] = list( "ref" = "\ref[R]", "name" = R.fields["name"], "id" = R.fields["id"], @@ -114,17 +114,17 @@ if(istype(active1, /datum/data/record) && GLOB.data_core.general.Find(active1)) var/list/fields = list() general["fields"] = fields - fields[++fields.len] = FIELD("Name", active1.fields["name"], null) - fields[++fields.len] = FIELD("ID", active1.fields["id"], null) - fields[++fields.len] = FIELD("Sex", active1.fields["sex"], "sex") - fields[++fields.len] = FIELD("Age", active1.fields["age"], "age") - fields[++fields.len] = FIELD("Fingerprint", active1.fields["fingerprint"], "fingerprint") - fields[++fields.len] = FIELD("Physical Status", active1.fields["p_stat"], "p_stat") - fields[++fields.len] = FIELD("Mental Status", active1.fields["m_stat"], "m_stat") + fields[++length(fields)] = FIELD("Name", active1.fields["name"], null) + fields[++length(fields)] = FIELD("ID", active1.fields["id"], null) + fields[++length(fields)] = FIELD("Sex", active1.fields["sex"], "sex") + fields[++length(fields)] = FIELD("Age", active1.fields["age"], "age") + fields[++length(fields)] = FIELD("Fingerprint", active1.fields["fingerprint"], "fingerprint") + fields[++length(fields)] = FIELD("Physical Status", active1.fields["p_stat"], "p_stat") + fields[++length(fields)] = FIELD("Mental Status", active1.fields["m_stat"], "m_stat") var/list/photos = list() general["photos"] = photos - photos[++photos.len] = active1.fields["photo-south"] - photos[++photos.len] = active1.fields["photo-west"] + photos[++length(photos)] = active1.fields["photo-south"] + photos[++length(photos)] = active1.fields["photo-west"] general["has_photos"] = (active1.fields["photo-south"] || active1.fields["photo-west"] ? 1 : 0) general["empty"] = 0 else @@ -135,17 +135,17 @@ if(istype(active2, /datum/data/record) && GLOB.data_core.medical.Find(active2)) var/list/fields = list() medical["fields"] = fields - fields[++fields.len] = MED_FIELD("Blood Type", active2.fields["blood_type"], "blood_type", FALSE) - fields[++fields.len] = MED_FIELD("DNA", active2.fields["b_dna"], "b_dna", TRUE) - fields[++fields.len] = MED_FIELD("Minor Disabilities", active2.fields["mi_dis"], "mi_dis", FALSE) - fields[++fields.len] = MED_FIELD("Details", active2.fields["mi_dis_d"], "mi_dis_d", FALSE) - fields[++fields.len] = MED_FIELD("Major Disabilities", active2.fields["ma_dis"], "ma_dis", FALSE) - fields[++fields.len] = MED_FIELD("Details", active2.fields["ma_dis_d"], "ma_dis_d", TRUE) - fields[++fields.len] = MED_FIELD("Allergies", active2.fields["alg"], "alg", FALSE) - fields[++fields.len] = MED_FIELD("Details", active2.fields["alg_d"], "alg_d", FALSE) - fields[++fields.len] = MED_FIELD("Current Diseases", active2.fields["cdi"], "cdi", FALSE) - fields[++fields.len] = MED_FIELD("Details", active2.fields["cdi_d"], "cdi_d", TRUE) - fields[++fields.len] = MED_FIELD("Important Notes", active2.fields["notes"], "notes", FALSE) + fields[++length(fields)] = MED_FIELD("Blood Type", active2.fields["blood_type"], "blood_type", FALSE) + fields[++length(fields)] = MED_FIELD("DNA", active2.fields["b_dna"], "b_dna", TRUE) + fields[++length(fields)] = MED_FIELD("Minor Disabilities", active2.fields["mi_dis"], "mi_dis", FALSE) + fields[++length(fields)] = MED_FIELD("Details", active2.fields["mi_dis_d"], "mi_dis_d", FALSE) + fields[++length(fields)] = MED_FIELD("Major Disabilities", active2.fields["ma_dis"], "ma_dis", FALSE) + fields[++length(fields)] = MED_FIELD("Details", active2.fields["ma_dis_d"], "ma_dis_d", TRUE) + fields[++length(fields)] = MED_FIELD("Allergies", active2.fields["alg"], "alg", FALSE) + fields[++length(fields)] = MED_FIELD("Details", active2.fields["alg_d"], "alg_d", FALSE) + fields[++length(fields)] = MED_FIELD("Current Diseases", active2.fields["cdi"], "cdi", FALSE) + fields[++length(fields)] = MED_FIELD("Details", active2.fields["cdi_d"], "cdi_d", TRUE) + fields[++length(fields)] = MED_FIELD("Important Notes", active2.fields["notes"], "notes", FALSE) if(!active2.fields["comments"] || !islist(active2.fields["comments"])) active2.fields["comments"] = list() medical["comments"] = active2.fields["comments"] diff --git a/code/game/machinery/computer/security_records.dm b/code/game/machinery/computer/security_records.dm index c983a221219..ff5efbbb8bc 100644 --- a/code/game/machinery/computer/security_records.dm +++ b/code/game/machinery/computer/security_records.dm @@ -104,7 +104,7 @@ var/list/record_line = list("uid_gen" = G.UID(), "id" = G.fields["id"], "name" = G.fields["name"], "rank" = G.fields["rank"], "fingerprint" = G.fields["fingerprint"]) record_line["status"] = S?.fields["criminal"] || "No record" record_line["uid_sec"] = S?.UID() // So we don't have to perform the search through a for loop again later - records[++records.len] = record_line + records[++length(records)] = record_line if(SEC_DATA_RECORD) var/list/general = list() data["general"] = general diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index 0a8558fbc03..14dda8b777d 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -276,7 +276,7 @@ /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/get_equip_info() var/output = ..() if(output) - return "[output] \[[mode? "Analyze" : "Launch"]\]
\[Syringes: [syringes.len]/[max_syringes] | Reagents: [reagents.total_volume]/[reagents.maximum_volume]\]
Reagents list" + return "[output] \[[mode? "Analyze" : "Launch"]\]
\[Syringes: [length(syringes)]/[max_syringes] | Reagents: [reagents.total_volume]/[reagents.maximum_volume]\]
Reagents list" /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/action(atom/movable/target) if(!action_checks(target)) @@ -442,7 +442,7 @@ return output || "None" /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/load_syringe(obj/item/reagent_containers/syringe/S) - if(syringes.len= 2) occupant_message("The syringe is too far away.") return FALSE diff --git a/code/game/mecha/mecha_topic.dm b/code/game/mecha/mecha_topic.dm index da1893c5a76..c8113cd4414 100644 --- a/code/game/mecha/mecha_topic.dm +++ b/code/game/mecha/mecha_topic.dm @@ -137,7 +137,7 @@ . += "" /obj/mecha/proc/get_equipment_list() //outputs mecha equipment list in html @@ -229,11 +229,11 @@ /obj/mecha/proc/log_message(message as text,red=null) log.len++ - log[log.len] = list("time"=world.timeofday,"message"="[red?"":null][message][red?"":null]") + log[length(log)] = list("time"=world.timeofday,"message"="[red?"":null][message][red?"":null]") return log.len /obj/mecha/proc/log_append_to_last(message as text,red=null) - var/list/last_entry = log[log.len] + var/list/last_entry = log[length(log)] last_entry["message"] += "
[red?"":null][message][red?"":null]" return diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index 6fd31c92744..d2672e7d983 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -155,7 +155,7 @@ var/turf/T = get_turf(O) if(T) T.Entered(O) - log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - cargo.len]") + log_message("Unloaded [O]. Cargo compartment capacity: [cargo_capacity - length(cargo)]") return diff --git a/code/game/objects/items/devices/uplinks.dm b/code/game/objects/items/devices/uplinks.dm index 522ee656d72..a66de1eb7f9 100644 --- a/code/game/objects/items/devices/uplinks.dm +++ b/code/game/objects/items/devices/uplinks.dm @@ -62,7 +62,7 @@ GLOBAL_LIST_EMPTY(world_uplinks) var/list/cats = list() for(var/category in uplink_items) - cats[++cats.len] = list("cat" = category, "items" = list()) + cats[++length(cats)] = list("cat" = category, "items" = list()) for(var/datum/uplink_item/I in uplink_items[category]) if(I.job && I.job.len) if(!(I.job.Find(job)) && uplink_type != UPLINK_TYPE_ADMIN) @@ -70,7 +70,7 @@ GLOBAL_LIST_EMPTY(world_uplinks) if(length(I.species)) if(!(I.species.Find(species)) && uplink_type != UPLINK_TYPE_ADMIN) continue - cats[cats.len]["items"] += list(list( + cats[length(cats)]["items"] += list(list( "name" = sanitize(I.name), "desc" = sanitize(I.description()), "cost" = I.cost, diff --git a/code/game/objects/items/mixing_bowl.dm b/code/game/objects/items/mixing_bowl.dm index 286e68e3088..60c85c54e4f 100644 --- a/code/game/objects/items/mixing_bowl.dm +++ b/code/game/objects/items/mixing_bowl.dm @@ -26,7 +26,7 @@ to_chat(user, "You should clean [src] before you use it for food prep.") return 0 if(is_type_in_list(I, GLOB.cooking_ingredients[RECIPE_MICROWAVE]) || is_type_in_list(I, GLOB.cooking_ingredients[RECIPE_GRILL]) || is_type_in_list(I, GLOB.cooking_ingredients[RECIPE_OVEN]) || is_type_in_list(I, GLOB.cooking_ingredients[RECIPE_CANDY])) - if(contents.len>=max_n_of_items) + if(length(contents)>=max_n_of_items) to_chat(user, "This [src] is full of ingredients, you cannot put more.") return 1 if(istype(I, /obj/item/stack)) diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index 24fcd542715..301d8e844a3 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -232,7 +232,7 @@ new cigarette_type(src) /obj/item/storage/fancy/cigarettes/update_icon_state() - icon_state = "[initial(icon_state)][contents.len]" + icon_state = "[initial(icon_state)][length(contents)]" /obj/item/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) if(!ismob(M)) @@ -240,7 +240,7 @@ if(istype(M) && M == user && user.zone_selected == "mouth" && contents.len > 0 && !user.wear_mask) var/got_cig = 0 - for(var/num=1, num <= contents.len, num++) + for(var/num=1, num <= length(contents), num++) var/obj/item/I = contents[num] if(istype(I, /obj/item/clothing/mask/cigarette)) var/obj/item/clothing/mask/cigarette/C = I diff --git a/code/game/objects/items/weapons/storage/storage_base.dm b/code/game/objects/items/weapons/storage/storage_base.dm index 80f1531cee3..cfb1b6015dc 100644 --- a/code/game/objects/items/weapons/storage/storage_base.dm +++ b/code/game/objects/items/weapons/storage/storage_base.dm @@ -722,7 +722,7 @@ // But then again a tesseract would destroy the server anyways // Also I wish I could just insert a list instead of it reading it the wrong way content_list.len++ - content_list[content_list.len] = AM.serialize() + content_list[length(content_list)] = AM.serialize() return data /obj/item/storage/deserialize(list/data) diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 2153082219c..2171b24cfc2 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -340,7 +340,7 @@ LINEN BINS var/obj/item/bedsheet/B if(sheets.len > 0) - B = sheets[sheets.len] + B = sheets[length(sheets)] sheets.Remove(B) else @@ -365,7 +365,7 @@ LINEN BINS var/obj/item/bedsheet/B if(sheets.len > 0) - B = sheets[sheets.len] + B = sheets[length(sheets)] sheets.Remove(B) else diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index bb77fd7f3e4..937b4128b29 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -246,7 +246,7 @@ GLOBAL_LIST_EMPTY(safes) var/list/contents_names = list() data["contents"] = contents_names for(var/obj/O in contents) - contents_names[++contents_names.len] = list("name" = O.name, "sprite" = O.icon_state) + contents_names[++length(contents_names)] = list("name" = O.name, "sprite" = O.icon_state) user << browse_rsc(icon(O.icon, O.icon_state), "[O.icon_state].png") return data diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 8dab455021b..32987aee3cc 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -129,7 +129,7 @@ /turf/simulated/wall/proc/generate_overlays() var/alpha_inc = 256 / damage_overlays.len - for(var/i = 1; i <= damage_overlays.len; i++) + for(var/i = 1; i <= length(damage_overlays); i++) var/image/img = image(icon = 'icons/turf/walls.dmi', icon_state = "overlay_damage") img.blend_mode = BLEND_MULTIPLY img.alpha = (i * alpha_inc) - 1 diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm index 204385167c7..9b48cdaec63 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm @@ -282,7 +282,7 @@ var/result = 0 var/val - for(var/i = start, i <= expression.len, i++) + for(var/i = start, i <= length(expression), i++) var/op = "" if(i > start) @@ -441,7 +441,7 @@ /proc/SDQL_function(datum/object, procname, list/arguments, source) var/list/new_args = list() for(var/arg in arguments) - new_args[++new_args.len] = SDQL_expression(source, arg) + new_args[++length(new_args)] = SDQL_expression(source, arg) if(object == world) // Global proc. return (WrapAdminProcCall(GLOBAL_PROC, procname, new_args)) diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2_parser.dm b/code/modules/admin/verbs/SDQL2/SDQL_2_parser.dm index 98334649315..bb0f297351a 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2_parser.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2_parser.dm @@ -301,7 +301,7 @@ var/list/bool = list() i = expression(i, bool) - node[++node.len] = bool + node[++length(node)] = bool if(tokenl(i) in boolean_operators) i = bool_operator(i, node) @@ -332,7 +332,7 @@ //variable: | '.' variable /datum/SDQL_parser/proc/variable(i, list/node) var/list/L = list(token(i)) - node[++node.len] = L + node[++length(node)] = L if(token(i) == "\[") L += token(i + 1) @@ -349,7 +349,7 @@ var/list/arguments = list() i = call_function(i, null, arguments) L += ":" - L[++L.len] = arguments + L[++length(L)] = arguments else if(token(i + 1) == "\[") // list index var/list/expression = list() @@ -358,7 +358,7 @@ parse_error("Missing ] at the end of list access.") L += "\[" - L[++L.len] = expression + L[++length(L)] = expression i++ else @@ -431,15 +431,15 @@ i = expression(i + 1, temp_expression_list) if(token(i) == ",") - expression_list[++expression_list.len] = temp_expression_list + expression_list[++length(expression_list)] = temp_expression_list temp_expression_list = list() while(token(i) && token(i) != "}") - expression_list[++expression_list.len] = temp_expression_list + expression_list[++length(expression_list)] = temp_expression_list else i++ - node[++node.len] = expression_list + node[++length(node)] = expression_list return i + 1 //call_function: ['(' [arguments] ')'] @@ -494,7 +494,7 @@ else i++ - node[++node.len] = expr + node[++length(node)] = expr else i = value(i, node) @@ -509,7 +509,7 @@ var/list/rhs = list() i = expression(i, rhs) - node[++node.len] = rhs + node[++length(node)] = rhs return i @@ -538,12 +538,12 @@ else i++ - unary_exp[++unary_exp.len] = expr + unary_exp[++length(unary_exp)] = expr else i = value(i, unary_exp) - node[++node.len] = unary_exp + node[++length(node)] = unary_exp else diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm index af538663c44..3d672ab6ef3 100644 --- a/code/modules/admin/verbs/diagnostics.dm +++ b/code/modules/admin/verbs/diagnostics.dm @@ -92,7 +92,7 @@ if(!f) output += "  [filters[filter]]: ERROR
" continue - output += "  [filters[filter]]: [f.len]
" + output += "  [filters[filter]]: [length(f)]
" for(var/device in f) if(isobj(device)) output += "    [device] ([device:x],[device:y],[device:z] in area [get_area(device:loc)])
" diff --git a/code/modules/admin/verbs/massmodvar.dm b/code/modules/admin/verbs/massmodvar.dm index 38cf541e001..fd9923e5f65 100644 --- a/code/modules/admin/verbs/massmodvar.dm +++ b/code/modules/admin/verbs/massmodvar.dm @@ -111,7 +111,7 @@ if(VV_RESTORE_DEFAULT) to_chat(src, "Finding items...") var/list/items = get_all_of_type(O.type, method) - to_chat(src, "Changing [items.len] items...") + to_chat(src, "Changing [length(items)] items...") for(var/thing in items) if(!thing) continue @@ -137,7 +137,7 @@ to_chat(src, "Finding items...") var/list/items = get_all_of_type(O.type, method) - to_chat(src, "Changing [items.len] items...") + to_chat(src, "Changing [length(items)] items...") for(var/thing in items) if(!thing) continue @@ -165,7 +165,7 @@ var/type = value["type"] to_chat(src, "Finding items...") var/list/items = get_all_of_type(O.type, method) - to_chat(src, "Changing [items.len] items...") + to_chat(src, "Changing [length(items)] items...") for(var/thing in items) if(!thing) continue @@ -183,7 +183,7 @@ else to_chat(src, "Finding items...") var/list/items = get_all_of_type(O.type, method) - to_chat(src, "Changing [items.len] items...") + to_chat(src, "Changing [length(items)] items...") for(var/thing in items) if(!thing) continue diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index 72f5de0b056..3fff40898cb 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -61,7 +61,7 @@ candidates += applicant if(candidates.len) - var/numTraitors = min(candidates.len, antnum) + var/numTraitors = min(length(candidates), antnum) for(var/i = 0, i0) + while(length(possible_expansions)>0) for(var/obj/machinery/atmospherics/borderline in possible_expansions) var/list/result = borderline.pipeline_expansion(src) - if(result.len>0) + if(length(result)>0) for(var/obj/machinery/atmospherics/P in result) if(istype(P, /obj/machinery/atmospherics/pipe)) var/obj/machinery/atmospherics/pipe/item = P @@ -186,7 +186,7 @@ var/list/datum/pipeline/PL = list() PL += src - for(var/i=1;i<=PL.len;i++) + for(var/i=1;i<=length(PL);i++) var/datum/pipeline/P = PL[i] if(!P) return diff --git a/code/modules/awaymissions/maploader/reader.dm b/code/modules/awaymissions/maploader/reader.dm index ae543a4f967..50436e0a73a 100644 --- a/code/modules/awaymissions/maploader/reader.dm +++ b/code/modules/awaymissions/maploader/reader.dm @@ -105,7 +105,7 @@ GLOBAL_DATUM_INIT(_preloader, /datum/dmm_suite/preloader, new()) if(!gridLines.len) // Skip it if only blank lines exist. continue - if(gridLines.len && gridLines[gridLines.len] == "") + if(gridLines.len && gridLines[length(gridLines)] == "") gridLines.Cut(gridLines.len) // Remove only one blank line at the end. bounds[MAP_MINY] = min(bounds[MAP_MINY], ycrd) diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 6330afcfa70..e3901630d83 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -1206,7 +1206,7 @@ if(!istext(verb_to_init.category)) continue panel_tabs |= verb_to_init.category - verblist[++verblist.len] = list(verb_to_init.category, verb_to_init.name) + verblist[++length(verblist)] = list(verb_to_init.category, verb_to_init.name) src.stat_panel.send_message("init_verbs", list(panel_tabs = panel_tabs, verblist = verblist)) /client/proc/check_panel_loaded() diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 56b896f9379..5f230c1a48e 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -826,7 +826,7 @@ data["accessories"] = accessories_list for(var/obj/item/clothing/accessory/A in accessories) accessories_list.len++ - accessories_list[accessories_list.len] = A.serialize() + accessories_list[length(accessories_list)] = A.serialize() return data diff --git a/code/modules/events/blob/overmind.dm b/code/modules/events/blob/overmind.dm index 026712d5ec2..1e64fd34e0f 100644 --- a/code/modules/events/blob/overmind.dm +++ b/code/modules/events/blob/overmind.dm @@ -112,8 +112,8 @@ var/list/status_tab_data = ..() . = status_tab_data if(blob_core) - status_tab_data[++status_tab_data.len] = list("Core Health:", "[blob_core.obj_integrity]") - status_tab_data[++status_tab_data.len] = list("Power Stored:", "[blob_points]/[max_blob_points]") + status_tab_data[++length(status_tab_data)] = list("Core Health:", "[blob_core.obj_integrity]") + status_tab_data[++length(status_tab_data)] = list("Power Stored:", "[blob_points]/[max_blob_points]") /mob/camera/blob/Move(NewLoc, Dir = 0) var/obj/structure/blob/B = locate() in range("3x3", NewLoc) diff --git a/code/modules/food_and_drinks/drinks/bottler/bottler.dm b/code/modules/food_and_drinks/drinks/bottler/bottler.dm index b07b53e79e3..d9c7654729b 100644 --- a/code/modules/food_and_drinks/drinks/bottler/bottler.dm +++ b/code/modules/food_and_drinks/drinks/bottler/bottler.dm @@ -95,7 +95,7 @@ to_chat(user, "[src] is full, please remove or process the contents first.") return var/slot_inserted = 0 - for(var/i = 1, i <= slots.len, i++) + for(var/i = 1, i <= length(slots), i++) if(!slots[i]) slots[i] = O slot_inserted = i @@ -111,7 +111,7 @@ /obj/machinery/bottler/proc/eject_items(slot) var/obj/item/O = null if(!slot) - for(var/i = 1, i <= slots.len, i++) + for(var/i = 1, i <= length(slots), i++) if(slots[i]) O = slots[i] O.forceMove(loc) @@ -205,7 +205,7 @@ /obj/machinery/bottler/proc/select_recipe() for(var/datum/bottler_recipe/recipe in available_recipes) var/number_matches = 0 - for(var/i = 1, i <= slots.len, i++) + for(var/i = 1, i <= length(slots), i++) var/obj/item/O = slots[i] if(istype(O, recipe.ingredients[i])) number_matches++ @@ -335,7 +335,7 @@ dat += "
" dat += "" - for(var/i = 1, i <= slots.len, i++) + for(var/i = 1, i <= length(slots), i++) var/obj/O = slots[i] if(O) dat += "" @@ -349,7 +349,7 @@ dat += "" dat += "" - for(var/i = 1, i <= slots.len, i++) + for(var/i = 1, i <= length(slots), i++) if(slots[i]) dat += "" else diff --git a/code/modules/food_and_drinks/food/foods/pizza.dm b/code/modules/food_and_drinks/food/foods/pizza.dm index d2bda7925fb..f1ed7d05b32 100644 --- a/code/modules/food_and_drinks/food/foods/pizza.dm +++ b/code/modules/food_and_drinks/food/foods/pizza.dm @@ -270,7 +270,7 @@ desc = "A box suited for pizzas. It appears to have a [pizza.name] inside." else if(boxes.len > 0) desc = "A pile of boxes suited for pizzas. There appears to be [boxes.len + 1] boxes in the pile." - var/obj/item/pizzabox/top_box = boxes[boxes.len] + var/obj/item/pizzabox/top_box = boxes[length(boxes)] var/top_tag = top_box.box_tag if(top_tag != "") desc = "[desc] The box on top has a tag, it reads: '[top_tag]'." @@ -299,7 +299,7 @@ // Stupid code because byondcode sucks var/set_tag = TRUE if(boxes.len > 0) - var/obj/item/pizzabox/top_box = boxes[boxes.len] + var/obj/item/pizzabox/top_box = boxes[length(boxes)] if(top_box.box_tag != "") set_tag = TRUE else @@ -322,7 +322,7 @@ if(user.is_in_inactive_hand(src)) ..() return - var/obj/item/pizzabox/box = boxes[boxes.len] + var/obj/item/pizzabox/box = boxes[length(boxes)] boxes -= box user.put_in_hands(box) to_chat(user, "You remove the topmost [src] from your hand.") @@ -390,7 +390,7 @@ return var/obj/item/pizzabox/boxtotagto = src if(boxes.len > 0) - boxtotagto = boxes[boxes.len] + boxtotagto = boxes[length(boxes)] boxtotagto.box_tag = copytext("[t]", 1, 30) update_appearance(UPDATE_DESC|UPDATE_ICON) return diff --git a/code/modules/hydroponics/beekeeping/beebox.dm b/code/modules/hydroponics/beekeeping/beebox.dm index 3df3c4f5c3e..f5085f92170 100644 --- a/code/modules/hydroponics/beekeeping/beebox.dm +++ b/code/modules/hydroponics/beekeeping/beebox.dm @@ -140,7 +140,7 @@ if(honeycombs.len) var/plural = honeycombs.len > 1 - . += "There [plural? "are" : "is"] [honeycombs.len] uncollected honeycomb[plural ? "s":""] in the apiary." + . += "There [plural? "are" : "is"] [length(honeycombs)] uncollected honeycomb[plural ? "s":""] in the apiary." if(honeycombs.len >= get_max_honeycomb()) . += "there's no room for more honeycomb!" diff --git a/code/modules/instruments/songs/play_legacy.dm b/code/modules/instruments/songs/play_legacy.dm index fc3d0151564..8b84f24baef 100644 --- a/code/modules/instruments/songs/play_legacy.dm +++ b/code/modules/instruments/songs/play_legacy.dm @@ -33,10 +33,10 @@ accents[key] = oct_acc //if they misspelled it/fucked up that's on them lmao, no safety checks. else //octave octaves[key] = clamp(num, octave_min, octave_max) - compiled_chord[++compiled_chord.len] = list(key, accents[key], octaves[key]) + compiled_chord[++length(compiled_chord)] = list(key, accents[key], octaves[key]) compiled_chord += tempodiv //this goes last if(length(compiled_chord)) - compiled_chords[++compiled_chords.len] = compiled_chord + compiled_chords[++length(compiled_chords)] = compiled_chord /** * Proc to play a legacy note. Just plays the sound to hearing mobs (and does hearcheck if necessary), no fancy channel/sustain/management. diff --git a/code/modules/instruments/songs/play_synthesized.dm b/code/modules/instruments/songs/play_synthesized.dm index 255d7ccffe9..9d9847749d4 100644 --- a/code/modules/instruments/songs/play_synthesized.dm +++ b/code/modules/instruments/songs/play_synthesized.dm @@ -36,7 +36,7 @@ compiled_chord += clamp((note_offset_lookup[key] + octaves[key] * 12 + accent_lookup[accents[key]]), key_min, key_max) compiled_chord += tempodiv //this goes last if(length(compiled_chord)) - compiled_chords[++compiled_chords.len] = compiled_chord + compiled_chords[++length(compiled_chords)] = compiled_chord /** * Plays a specific numerical key from our instrument to anyone who can hear us. diff --git a/code/modules/mob/dead/observer/observer_base.dm b/code/modules/mob/dead/observer/observer_base.dm index 8b158b8f18e..587365a4106 100644 --- a/code/modules/mob/dead/observer/observer_base.dm +++ b/code/modules/mob/dead/observer/observer_base.dm @@ -292,7 +292,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp /mob/dead/observer/get_status_tab_items() var/list/status_tab_data = ..() . = status_tab_data - status_tab_data[++status_tab_data.len] = list("Respawnability:", "[HAS_TRAIT(src, TRAIT_RESPAWNABLE) ? "Yes" : "No"]") + status_tab_data[++length(status_tab_data)] = list("Respawnability:", "[HAS_TRAIT(src, TRAIT_RESPAWNABLE) ? "Yes" : "No"]") /mob/dead/observer/verb/reenter_corpse() set category = "Ghost" diff --git a/code/modules/mob/living/brain/living_brain.dm b/code/modules/mob/living/brain/living_brain.dm index 46a63baf1b8..bc0b170eee7 100644 --- a/code/modules/mob/living/brain/living_brain.dm +++ b/code/modules/mob/living/brain/living_brain.dm @@ -84,8 +84,8 @@ I'm using this for Stat to give it a more nifty interface to work with . = status_tab_data if(has_synthetic_assistance() && ismecha(loc)) var/obj/mecha/M = loc - status_tab_data[++status_tab_data.len] = list("Exosuit Charge:", "[istype(M.cell) ? "[M.cell.charge] / [M.cell.maxcharge]" : "No cell detected"]") - status_tab_data[++status_tab_data.len] = list("Exosuit Integrity:", "[!M.obj_integrity ? "0" : "[(M.obj_integrity / M.max_integrity) * 100]"]%") + status_tab_data[++length(status_tab_data)] = list("Exosuit Charge:", "[istype(M.cell) ? "[M.cell.charge] / [M.cell.maxcharge]" : "No cell detected"]") + status_tab_data[++length(status_tab_data)] = list("Exosuit Integrity:", "[!M.obj_integrity ? "0" : "[(M.obj_integrity / M.max_integrity) * 100]"]%") /mob/living/brain/can_safely_leave_loc() return 0 //You're not supposed to be ethereal jaunting, brains diff --git a/code/modules/mob/living/carbon/alien/alien_base.dm b/code/modules/mob/living/carbon/alien/alien_base.dm index 8392f8a09bf..2e7c51a9531 100644 --- a/code/modules/mob/living/carbon/alien/alien_base.dm +++ b/code/modules/mob/living/carbon/alien/alien_base.dm @@ -111,8 +111,8 @@ /mob/living/carbon/alien/get_status_tab_items() var/list/status_tab_data = ..() . = status_tab_data - status_tab_data[++status_tab_data.len] = list("Intent:", "[a_intent]") - status_tab_data[++status_tab_data.len] = list("Move Mode:", "[m_intent]") + status_tab_data[++length(status_tab_data)] = list("Intent:", "[a_intent]") + status_tab_data[++length(status_tab_data)] = list("Move Mode:", "[m_intent]") /mob/living/carbon/alien/SetStunned(amount, updating = TRUE, force = 0) ..() diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index 37a3e94cf27..47711343d81 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -43,7 +43,7 @@ /mob/living/carbon/alien/larva/get_status_tab_items() var/list/status_tab_data = ..() . = status_tab_data - status_tab_data[++status_tab_data.len] = list("Progress:", "[amount_grown]/[max_grown]") + status_tab_data[++length(status_tab_data)] = list("Progress:", "[amount_grown]/[max_grown]") /mob/living/carbon/alien/larva/add_plasma(amount) if(stat != DEAD && amount > 0) diff --git a/code/modules/mob/living/carbon/carbon_procs.dm b/code/modules/mob/living/carbon/carbon_procs.dm index f6b17c19cf8..d80cadcd86b 100644 --- a/code/modules/mob/living/carbon/carbon_procs.dm +++ b/code/modules/mob/living/carbon/carbon_procs.dm @@ -1002,7 +1002,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven . = status_tab_data var/obj/item/organ/internal/alien/plasmavessel/vessel = get_int_organ(/obj/item/organ/internal/alien/plasmavessel) if(vessel) - status_tab_data[++status_tab_data.len] = list("Plasma Stored:", "[vessel.stored_plasma]/[vessel.max_plasma]") + status_tab_data[++length(status_tab_data)] = list("Plasma Stored:", "[vessel.stored_plasma]/[vessel.max_plasma]") /mob/living/carbon/get_all_slots() return list(l_hand, diff --git a/code/modules/mob/living/carbon/human/human_mob.dm b/code/modules/mob/living/carbon/human/human_mob.dm index 66414c7f35e..f3f98609855 100644 --- a/code/modules/mob/living/carbon/human/human_mob.dm +++ b/code/modules/mob/living/carbon/human/human_mob.dm @@ -174,34 +174,34 @@ var/list/status_tab_data = ..() . = status_tab_data - status_tab_data[++status_tab_data.len] = list("Intent:", "[a_intent]") - status_tab_data[++status_tab_data.len] = list("Move Mode:", "[m_intent]") + status_tab_data[++length(status_tab_data)] = list("Intent:", "[a_intent]") + status_tab_data[++length(status_tab_data)] = list("Move Mode:", "[m_intent]") if(HAS_TRAIT(src, TRAIT_HAS_GPS)) var/turf/T = get_turf(src) - status_tab_data[++status_tab_data.len] = list("GPS:", "[COORD(T)]") + status_tab_data[++length(status_tab_data)] = list("GPS:", "[COORD(T)]") if(HAS_TRAIT(src, TRAIT_CAN_VIEW_HEALTH)) - status_tab_data[++status_tab_data.len] = list("Health:", "[health]") + status_tab_data[++length(status_tab_data)] = list("Health:", "[health]") if(internal) if(!internal.air_contents) qdel(internal) else - status_tab_data[++status_tab_data.len] = list("Internal Atmosphere Info:", "[internal.name]") - status_tab_data[++status_tab_data.len] = list("Tank Pressure:", "[internal.air_contents.return_pressure()]") - status_tab_data[++status_tab_data.len] = list("Distribution Pressure:", "[internal.distribute_pressure]") + status_tab_data[++length(status_tab_data)] = list("Internal Atmosphere Info:", "[internal.name]") + status_tab_data[++length(status_tab_data)] = list("Tank Pressure:", "[internal.air_contents.return_pressure()]") + status_tab_data[++length(status_tab_data)] = list("Distribution Pressure:", "[internal.distribute_pressure]") // I REALLY need to split up status panel things into datums if(mind) var/datum/antagonist/changeling/cling = mind.has_antag_datum(/datum/antagonist/changeling) if(cling) - status_tab_data[++status_tab_data.len] = list("Chemical Storage:", "[cling.chem_charges]/[cling.chem_storage]") - status_tab_data[++status_tab_data.len] = list("Absorbed DNA:", "[cling.absorbed_count]") + status_tab_data[++length(status_tab_data)] = list("Chemical Storage:", "[cling.chem_charges]/[cling.chem_storage]") + status_tab_data[++length(status_tab_data)] = list("Absorbed DNA:", "[cling.absorbed_count]") var/datum/antagonist/vampire/V = mind.has_antag_datum(/datum/antagonist/vampire) if(V) - status_tab_data[++status_tab_data.len] = list("Total Blood:", "[V.bloodtotal]") - status_tab_data[++status_tab_data.len] = list("Usable Blood:", "[V.bloodusable]") + status_tab_data[++length(status_tab_data)] = list("Total Blood:", "[V.bloodtotal]") + status_tab_data[++length(status_tab_data)] = list("Usable Blood:", "[V.bloodusable]") /mob/living/carbon/human/ex_act(severity) if(status_flags & GODMODE) diff --git a/code/modules/mob/living/silicon/ai/ai_mob.dm b/code/modules/mob/living/silicon/ai/ai_mob.dm index f707fe927a9..7dda7ff41fd 100644 --- a/code/modules/mob/living/silicon/ai/ai_mob.dm +++ b/code/modules/mob/living/silicon/ai/ai_mob.dm @@ -291,7 +291,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( var/list/status_tab_data = ..() . = status_tab_data if(stat) - status_tab_data[++status_tab_data.len] = list("System status:", "Nonfunctional") + status_tab_data[++length(status_tab_data)] = list("System status:", "Nonfunctional") return status_tab_data = show_borg_info(status_tab_data) @@ -336,7 +336,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( src << browse(dat_text, "window=aialerts&can_close=0") /mob/living/silicon/ai/proc/show_borg_info(list/status_tab_data) - status_tab_data[++status_tab_data.len] = list("Connected cyborg count:", "[length(connected_robots)]") + status_tab_data[++length(status_tab_data)] = list("Connected cyborg count:", "[length(connected_robots)]") for(var/mob/living/silicon/robot/R in connected_robots) var/robot_status = "Nominal" if(R.stat || !R.client) @@ -346,7 +346,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( // Name, Health, Battery, Module, Area, and Status! Everything an AI wants to know about its borgies! var/area/A = get_area(R) var/area_name = A ? sanitize(A.name) : "Unknown" - status_tab_data[++status_tab_data.len] = list("[R.name]:", "S.Integrity: [R.health]% | Cell: [R.cell ? "[R.cell.charge] / [R.cell.maxcharge]" : "Empty"] | \ + status_tab_data[++length(status_tab_data)] = list("[R.name]:", "S.Integrity: [R.health]% | Cell: [R.cell ? "[R.cell.charge] / [R.cell.maxcharge]" : "Empty"] | \ Module: [R.designation] | Loc: [area_name] | Status: [robot_status]") return status_tab_data diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 45e8c30d2d6..039db1def94 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -163,7 +163,7 @@ /mob/living/silicon/pai/get_status_tab_items() var/list/status_tab_data = ..() . = status_tab_data - status_tab_data[++status_tab_data.len] = show_silenced() + status_tab_data[++length(status_tab_data)] = show_silenced() /mob/living/silicon/pai/blob_act() if(stat != DEAD) diff --git a/code/modules/mob/living/silicon/pai/software/pai_apps.dm b/code/modules/mob/living/silicon/pai/software/pai_apps.dm index 90ada43b34e..aae9310767a 100644 --- a/code/modules/mob/living/silicon/pai/software/pai_apps.dm +++ b/code/modules/mob/living/silicon/pai/software/pai_apps.dm @@ -16,7 +16,7 @@ var/list/emote = list() emote["name"] = name emote["id"] = GLOB.pai_emotions[name] - emotions[++emotions.len] = emote + emotions[++length(emotions)] = emote data["emotions"] = emotions data["current_emotion"] = user.card.current_emotion @@ -26,7 +26,7 @@ var/list/speech = list() speech["name"] = name speech["id"] = length(speech_types) - speech_types[++speech_types.len] = speech + speech_types[++length(speech_types)] = speech data["current_speech_verb"] = user.speech_state data["speech_verbs"] = speech_types @@ -42,7 +42,7 @@ chassis_to_update_with["name"] = name chassis_to_update_with["icon"] = chassis_choices[name] chassis_to_update_with["id"] = length(chassis_to_update_with) - chassises_to_add[++chassises_to_add.len] = chassis_to_update_with + chassises_to_add[++length(chassises_to_add)] = chassis_to_update_with data["available_chassises"] = chassises_to_add data["current_chassis"] = user.chassis diff --git a/code/modules/mob/living/silicon/robot/robot_mob.dm b/code/modules/mob/living/silicon/robot/robot_mob.dm index 2891de7530b..ebc11411207 100644 --- a/code/modules/mob/living/silicon/robot/robot_mob.dm +++ b/code/modules/mob/living/silicon/robot/robot_mob.dm @@ -795,16 +795,16 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( var/list/status_tab_data = ..() . = status_tab_data - status_tab_data[++status_tab_data.len] = show_cell_power() + status_tab_data[++length(status_tab_data)] = show_cell_power() if(!module) return if(locate(/obj/item/gps/cyborg) in module.modules) - status_tab_data[++status_tab_data.len] = show_gps_coords() + status_tab_data[++length(status_tab_data)] = show_gps_coords() for(var/datum/robot_storage/robot_storage in module.storages) - status_tab_data[++status_tab_data.len] = show_stack_energy(robot_storage) + status_tab_data[++length(status_tab_data)] = show_stack_energy(robot_storage) /mob/living/silicon/robot/restrained() return 0 diff --git a/code/modules/mob/living/silicon/silicon_mob.dm b/code/modules/mob/living/silicon/silicon_mob.dm index 9a374ea0f88..ed8e6e3604c 100644 --- a/code/modules/mob/living/silicon/silicon_mob.dm +++ b/code/modules/mob/living/silicon/silicon_mob.dm @@ -326,7 +326,7 @@ /mob/living/silicon/get_status_tab_items() var/list/status_tab_data = ..() . = status_tab_data - status_tab_data[++status_tab_data.len] = show_system_integrity() + status_tab_data[++length(status_tab_data)] = show_system_integrity() //Silicon mob language procs diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/mother.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/mother.dm index d26e9d975db..4c2027a8e22 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/mother.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/mother.dm @@ -59,7 +59,7 @@ . = status_tab_data // Provides a status panel indicator, showing mothers how many regen points they have. if(ckey && stat == CONSCIOUS) - status_tab_data[++status_tab_data.len] = list("Regeneration Points:", "[regen_points]") + status_tab_data[++length(status_tab_data)] = list("Regeneration Points:", "[regen_points]") /mob/living/simple_animal/hostile/poison/terror_spider/mother/examine(mob/user) . = ..() diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm index 9e799044fc3..db415d46e5b 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm @@ -102,13 +102,13 @@ if(spider_myqueen) var/area/A = get_area(spider_myqueen) if(degenerate) - status_tab_data[++status_tab_data.len] = list("Link:", "BROKEN") // color=red + status_tab_data[++length(status_tab_data)] = list("Link:", "BROKEN") // color=red else if(queen_visible) - status_tab_data[++status_tab_data.len] = list("Link:", "[spider_myqueen] is near") // color=green + status_tab_data[++length(status_tab_data)] = list("Link:", "[spider_myqueen] is near") // color=green else if(cycles_noqueen >= 12) - status_tab_data[++status_tab_data.len] = list("Link:", "Critical - return to [spider_myqueen] in [A]") // color=red + status_tab_data[++length(status_tab_data)] = list("Link:", "Critical - return to [spider_myqueen] in [A]") // color=red else - status_tab_data[++status_tab_data.len] = list("Link:", "Warning - return to [spider_myqueen] in [A]") // color=orange + status_tab_data[++length(status_tab_data)] = list("Link:", "Warning - return to [spider_myqueen] in [A]") // color=orange diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm index 81d166eedab..970d057ed34 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm @@ -423,7 +423,7 @@ GLOBAL_LIST_EMPTY(ts_infected_list) // Uses because the status panel does NOT accept . if(ckey && stat == CONSCIOUS) if(degenerate) - status_tab_data[++status_tab_data.len] = list("Hivemind Connection Severed!", "Dying...") // color=red + status_tab_data[++length(status_tab_data)] = list("Hivemind Connection Severed!", "Dying...") // color=red return if(health != maxHealth) var/hp_points_per_second = 0 @@ -441,7 +441,7 @@ GLOBAL_LIST_EMPTY(ts_infected_list) hp_points_per_second = 1 / secs_per_tick if(hp_points_per_second > 0) var/pc_of_max_per_second = round(((hp_points_per_second / maxHealth) * 100), 0.1) - status_tab_data[++status_tab_data.len] = list("Regeneration:", "[ltext]: [num2text(pc_of_max_per_second)]% of health per second") + status_tab_data[++length(status_tab_data)] = list("Regeneration:", "[ltext]: [num2text(pc_of_max_per_second)]% of health per second") /mob/living/simple_animal/hostile/poison/terror_spider/proc/DoRemoteView() if(!isturf(loc)) diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 21552a5898b..5e7bceb1096 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -128,7 +128,7 @@ /mob/living/simple_animal/parrot/get_status_tab_items() var/list/status_tab_data = ..() . = status_tab_data - status_tab_data[++status_tab_data.len] = list("Held Item:", "[held_item]") + status_tab_data[++length(status_tab_data)] = list("Held Item:", "[held_item]") /* * Attack responces diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 06020517b73..7e28aac24e8 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -375,7 +375,7 @@ /mob/living/simple_animal/get_status_tab_items() var/list/status_tab_data = ..() . = status_tab_data - status_tab_data[++status_tab_data.len] = list("Health:", "[round((health / maxHealth) * 100)]%") + status_tab_data[++length(status_tab_data)] = list("Health:", "[round((health / maxHealth) * 100)]%") /mob/living/simple_animal/proc/drop_loot() if(length(loot)) diff --git a/code/modules/mob/living/simple_animal/slime/slime_mob.dm b/code/modules/mob/living/simple_animal/slime/slime_mob.dm index 2e4fca91f6f..13e99c13d38 100644 --- a/code/modules/mob/living/simple_animal/slime/slime_mob.dm +++ b/code/modules/mob/living/simple_animal/slime/slime_mob.dm @@ -229,12 +229,12 @@ var/list/status_tab_data = ..() . = status_tab_data if(!docile) - status_tab_data[++status_tab_data.len] = list("Nutrition:", "[nutrition]/[get_max_nutrition()]") + status_tab_data[++length(status_tab_data)] = list("Nutrition:", "[nutrition]/[get_max_nutrition()]") if(amount_grown >= SLIME_EVOLUTION_THRESHOLD) - status_tab_data[++status_tab_data.len] = list("You can:", is_adult ? "reproduce!" : "evolve!") + status_tab_data[++length(status_tab_data)] = list("You can:", is_adult ? "reproduce!" : "evolve!") else - status_tab_data[++status_tab_data.len] = list("Power Level:", "[powerlevel]") + status_tab_data[++length(status_tab_data)] = list("Power Level:", "[powerlevel]") /mob/living/simple_animal/slime/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 36958d7be1e..8e1f7ceee8b 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1222,7 +1222,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ var/new_log = "\[[time_stamp()]] [text]" if(target.len)//if there are other logs already present - var/previous_log = target[target.len]//get the latest log + var/previous_log = target[length(target)]//get the latest log var/last_log_is_range = (copytext(previous_log, 10, 11) == "-") //whether the last log is a time range or not. The "-" will be an indicator that it is. var/x_sign_position = findtext(previous_log, "x") @@ -1247,7 +1247,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ rep = text2num(copytext(previous_log, 44, x_sign_position))//get whatever number is right before the 'x' new_log = "\[[old_timestamp]-[time_stamp()]][rep?rep+1:2]x [text]" - target -= target[target.len]//remove the last log + target -= target[length(target)]//remove the last log target += new_log diff --git a/code/modules/mob/mob_say_base.dm b/code/modules/mob/mob_say_base.dm index 9182f8e6e35..622500d661b 100644 --- a/code/modules/mob/mob_say_base.dm +++ b/code/modules/mob/mob_say_base.dm @@ -158,9 +158,9 @@ var/selection = trim_right(lowertext(copytext(message, i, i + 3))) var/datum/language/L = GLOB.language_keys[selection] if(L != null && can_speak_language(L)) // What the fuck... remove the L != null check if you ever find out what the fuck is adding `null` to the languages list on absolutely random mobs... seriously what the hell... - prefixes[++prefixes.len] = list(L, i, i + length(selection)) + prefixes[++length(prefixes)] = list(L, i, i + length(selection)) else if(!L && i == 1) - prefixes[++prefixes.len] = list(get_default_language(), i, i) + prefixes[++length(prefixes)] = list(get_default_language(), i, i) return prefixes diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 195daa1a173..af9239659cb 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -93,18 +93,18 @@ . = status_tab_data if(SSticker) if(!SSticker.hide_mode) - status_tab_data[++status_tab_data.len] = list("Game Mode:", "[GLOB.master_mode]") + status_tab_data[++length(status_tab_data)] = list("Game Mode:", "[GLOB.master_mode]") else - status_tab_data[++status_tab_data.len] = list("Game Mode:", "Secret") + status_tab_data[++length(status_tab_data)] = list("Game Mode:", "Secret") if(SSticker.current_state == GAME_STATE_PREGAME) - status_tab_data[++status_tab_data.len] = list("Time To Start:", SSticker.ticker_going ? deciseconds_to_time_stamp(SSticker.pregame_timeleft) : "DELAYED") + status_tab_data[++length(status_tab_data)] = list("Time To Start:", SSticker.ticker_going ? deciseconds_to_time_stamp(SSticker.pregame_timeleft) : "DELAYED") if(check_rights(R_ADMIN, 0, src)) - status_tab_data[++status_tab_data.len] = list("Players Ready:", "[totalPlayersReady]") + status_tab_data[++length(status_tab_data)] = list("Players Ready:", "[totalPlayersReady]") totalPlayersReady = 0 for(var/mob/new_player/player in GLOB.player_list) if(check_rights(R_ADMIN, 0, src)) - status_tab_data[++status_tab_data.len] = list("[player.key]", player.ready ? "(Ready)" : "(Not ready)") + status_tab_data[++length(status_tab_data)] = list("[player.key]", player.ready ? "(Ready)" : "(Not ready)") if(player.ready) totalPlayersReady++ diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index 132a0888755..40ec35bca8e 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -70,7 +70,7 @@ var/obj/item/paper/P if(papers.len > 0) //If there's any custom paper on the stack, use that instead of creating a new paper. - P = papers[papers.len] + P = papers[length(papers)] papers.Remove(P) else if(letterhead_type && alert("Choose a style", null,"Letterhead","Blank")=="Letterhead") @@ -134,7 +134,7 @@ var/obj/item/paper/carbon/P if(papers.len > 0) //If there's any custom paper on the stack, use that instead of creating a new paper. - P = papers[papers.len] + P = papers[length(papers)] papers.Remove(P) else P = new /obj/item/paper/carbon diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 855fdf38103..39b78026a8f 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -87,7 +87,7 @@ c.offset_y = copy.offset_y var/list/temp_overlays = copy.stamp_overlays //Iterates through stamps var/image/img //and puts a matching - for(var/j = 1, j <= temp_overlays.len, j++) //gray overlay onto the copy + for(var/j = 1, j <= length(temp_overlays), j++) //gray overlay onto the copy if(copy.ico.len) if(findtext(copy.ico[j], "cap") || findtext(copy.ico[j], "cent") || findtext(copy.ico[j], "rep")) img = image('icons/obj/bureaucracy.dmi', "paper_stamp-circle") diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index c3cc150362a..cdaf44ffaea 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -299,7 +299,7 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor // Sort the atoms into their layers var/list/sorted = sort_atoms_by_layer(atoms) var/center_offset = (size-1)/2 * 32 + 1 - for(var/i; i <= sorted.len; i++) + for(var/i; i <= length(sorted); i++) var/atom/A = sorted[i] if(A) var/icon/img = getFlatIcon(A)//build_composite_icon(A) @@ -672,7 +672,7 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor gap = round(gap / 1.3) // 1.3 is the emperic comb sort coefficient if(gap < 1) gap = 1 - for(var/i = 1; gap + i <= result.len; i++) + for(var/i = 1; gap + i <= length(result); i++) var/atom/l = result[i] //Fucking hate var/atom/r = result[gap+i] //how lists work here if(l.layer > r.layer) //no "result[i].layer" for me diff --git a/code/modules/pda/cart_apps.dm b/code/modules/pda/cart_apps.dm index f34c992d99b..1d51353092c 100644 --- a/code/modules/pda/cart_apps.dm +++ b/code/modules/pda/cart_apps.dm @@ -234,10 +234,10 @@ botsCount++ if(B.loc) var/area/our_area = get_area(B) - botsData[++botsData.len] = list("Name" = sanitize(B.name), "Location" = sanitize(our_area.name), "uid" = "[B.UID()]") + botsData[++length(botsData)] = list("Name" = sanitize(B.name), "Location" = sanitize(our_area.name), "uid" = "[B.UID()]") if(!length(botsData)) - botsData[++botsData.len] = list("Name" = "No bots found", "Location" = "Invalid", "uid"= null) + botsData[++length(botsData)] = list("Name" = "No bots found", "Location" = "Invalid", "uid"= null) beepskyData["bots"] = botsData beepskyData["count"] = botsCount @@ -311,10 +311,10 @@ mulebotsCount++ if(B.loc) var/area/our_area = get_area(B) - mulebotsData[++mulebotsData.len] = list("Name" = sanitize(B.name), "Location" = our_area.name, "uid" = "[B.UID()]") + mulebotsData[++length(mulebotsData)] = list("Name" = sanitize(B.name), "Location" = our_area.name, "uid" = "[B.UID()]") if(!mulebotsData.len) - mulebotsData[++mulebotsData.len] = list("Name" = "No bots found", "Location" = "Invalid", "uid"= null) + mulebotsData[++length(mulebotsData)] = list("Name" = "No bots found", "Location" = "Invalid", "uid"= null) muleData["bots"] = mulebotsData muleData["count"] = mulebotsCount @@ -376,10 +376,10 @@ for(var/S in SSeconomy.shopping_list) var/datum/supply_order/SO = S supplyOrderCount++ - supplyOrderData[++supplyOrderData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "ApprovedBy" = SO.orderedby, "Comment" = html_encode(SO.comment)) + supplyOrderData[++length(supplyOrderData)] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "ApprovedBy" = SO.orderedby, "Comment" = html_encode(SO.comment)) if(!supplyOrderData.len) - supplyOrderData[++supplyOrderData.len] = list("Number" = null, "Name" = null, "OrderedBy"=null) + supplyOrderData[++length(supplyOrderData)] = list("Number" = null, "Name" = null, "OrderedBy"=null) supplyData["approved"] = supplyOrderData supplyData["approved_count"] = supplyOrderCount @@ -389,10 +389,10 @@ for(var/S in SSeconomy.request_list) var/datum/supply_order/SO = S requestCount++ - requestData[++requestData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "OrderedBy" = SO.orderedby, "Comment" = html_encode(SO.comment)) + requestData[++length(requestData)] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "OrderedBy" = SO.orderedby, "Comment" = html_encode(SO.comment)) if(!requestData.len) - requestData[++requestData.len] = list("Number" = null, "Name" = null, "orderedBy" = null, "Comment" = null) + requestData[++length(requestData)] = list("Number" = null, "Name" = null, "orderedBy" = null, "Comment" = null) supplyData["requests"] = requestData supplyData["requests_count"] = requestCount @@ -422,7 +422,7 @@ if(ml.z != cl.z) continue var/direction = get_dir(pda, M) - MopData[++MopData.len] = list ("x" = ml.x, "y" = ml.y, "dir" = uppertext(dir2text(direction)), "status" = M.reagents.total_volume ? "Wet" : "Dry") + MopData[++length(MopData)] = list ("x" = ml.x, "y" = ml.y, "dir" = uppertext(dir2text(direction)), "status" = M.reagents.total_volume ? "Wet" : "Dry") var/list/BucketData = list() for(var/obj/structure/mopbucket/B in GLOB.janitorial_equipment) @@ -431,7 +431,7 @@ if(bl.z != cl.z) continue var/direction = get_dir(pda,B) - BucketData[++BucketData.len] = list ("x" = bl.x, "y" = bl.y, "dir" = uppertext(dir2text(direction)), "volume" = B.reagents.total_volume, "max_volume" = B.reagents.maximum_volume) + BucketData[++length(BucketData)] = list ("x" = bl.x, "y" = bl.y, "dir" = uppertext(dir2text(direction)), "volume" = B.reagents.total_volume, "max_volume" = B.reagents.maximum_volume) var/list/CbotData = list() for(var/mob/living/simple_animal/bot/cleanbot/B in GLOB.bots_list) @@ -440,7 +440,7 @@ if(bl.z != cl.z) continue var/direction = get_dir(pda,B) - CbotData[++CbotData.len] = list("x" = bl.x, "y" = bl.y, "dir" = uppertext(dir2text(direction)), "status" = B.on ? "Online" : "Offline") + CbotData[++length(CbotData)] = list("x" = bl.x, "y" = bl.y, "dir" = uppertext(dir2text(direction)), "status" = B.on ? "Online" : "Offline") var/list/CartData = list() for(var/obj/structure/janitorialcart/B in GLOB.janitorial_equipment) @@ -449,7 +449,7 @@ if(bl.z != cl.z) continue var/direction = get_dir(pda,B) - CartData[++CartData.len] = list("x" = bl.x, "y" = bl.y, "dir" = uppertext(dir2text(direction)), "volume" = B.reagents.total_volume, "max_volume" = B.reagents.maximum_volume) + CartData[++length(CartData)] = list("x" = bl.x, "y" = bl.y, "dir" = uppertext(dir2text(direction)), "volume" = B.reagents.total_volume, "max_volume" = B.reagents.maximum_volume) var/list/JaniCartData = list() for(var/obj/vehicle/janicart/janicart in GLOB.janitorial_equipment) @@ -458,7 +458,7 @@ if(janicart_loc.z != cl.z) continue var/direction_from_user = get_dir(pda, janicart) - JaniCartData[++JaniCartData.len] = list("x" = janicart_loc.x, "y" = janicart_loc.y, "direction_from_user" = uppertext(dir2text(direction_from_user))) + JaniCartData[++length(JaniCartData)] = list("x" = janicart_loc.x, "y" = janicart_loc.y, "direction_from_user" = uppertext(dir2text(direction_from_user))) JaniData["mops"] = MopData.len ? MopData : null JaniData["buckets"] = BucketData.len ? BucketData : null diff --git a/code/modules/pda/messenger.dm b/code/modules/pda/messenger.dm index c83d8535584..af6c1c333d5 100644 --- a/code/modules/pda/messenger.dm +++ b/code/modules/pda/messenger.dm @@ -85,7 +85,7 @@ var/list/new_tnote = list() for(var/i in tnote) if(i["target"] != active_conversation) - new_tnote[++new_tnote.len] = i + new_tnote[++length(new_tnote)] = i tnote = new_tnote conversations.Remove(active_conversation) diff --git a/code/modules/power/generators/solar.dm b/code/modules/power/generators/solar.dm index 7a9aa7eb9bb..8b79f1721b6 100644 --- a/code/modules/power/generators/solar.dm +++ b/code/modules/power/generators/solar.dm @@ -385,7 +385,7 @@ /obj/machinery/power/solar_control/ui_data(mob/user) var/list/data = list() data["generated"] = round(lastgen) //generated power by all connected panels - data["generated_ratio"] = data["generated"] / round(max(connected_panels.len, 1) * SSsun.solar_gen_rate) //power generation ratio. Used for the power bar + data["generated_ratio"] = data["generated"] / round(max(length(connected_panels), 1) * SSsun.solar_gen_rate) //power generation ratio. Used for the power bar data["direction"] = angle2text(cdir) //current orientation of the panels data["cdir"] = cdir //current orientation of the of the panels in degrees data["tracking_state"] = track //tracker status: TRACKER_OFF, TRACKER_TIMED, TRACKER_AUTO diff --git a/code/modules/projectiles/guns/energy_guns.dm b/code/modules/projectiles/guns/energy_guns.dm index eea499c0be2..9d3e1e66e20 100644 --- a/code/modules/projectiles/guns/energy_guns.dm +++ b/code/modules/projectiles/guns/energy_guns.dm @@ -61,7 +61,7 @@ /obj/item/gun/energy/proc/update_ammo_types() var/obj/item/ammo_casing/energy/shot select = clamp(select, 1, length(ammo_type)) // If we decrease ammo types while selecting a removed one, we want to make sure it doesnt try to select an out of bounds index - for(var/i = 1, i <= ammo_type.len, i++) + for(var/i = 1, i <= length(ammo_type), i++) var/shottype = ammo_type[i] shot = new shottype(src) ammo_type[i] = shot diff --git a/code/modules/projectiles/guns/grenade_launcher.dm b/code/modules/projectiles/guns/grenade_launcher.dm index a2c4e3bd46d..bd31df69439 100644 --- a/code/modules/projectiles/guns/grenade_launcher.dm +++ b/code/modules/projectiles/guns/grenade_launcher.dm @@ -16,7 +16,7 @@ /obj/item/gun/grenadelauncher/examine(mob/user) . = ..() if(get_dist(user, src) <= 2) - . += "[grenades.len] / [max_grenades] grenades." + . += "[length(grenades)] / [max_grenades] grenades." /obj/item/gun/grenadelauncher/attackby(obj/item/I as obj, mob/user as mob, params) if((istype(I, /obj/item/grenade))) @@ -26,7 +26,7 @@ I.loc = src grenades += I to_chat(user, "You put the grenade in [src].") - to_chat(user, "[grenades.len] / [max_grenades] grenades.") + to_chat(user, "[length(grenades)] / [max_grenades] grenades.") else to_chat(user, "The grenade launcher cannot hold more grenades.") else diff --git a/code/modules/projectiles/guns/projectile/sniper.dm b/code/modules/projectiles/guns/projectile/sniper.dm index 8b6e5b9f907..43781e87570 100644 --- a/code/modules/projectiles/guns/projectile/sniper.dm +++ b/code/modules/projectiles/guns/projectile/sniper.dm @@ -192,7 +192,7 @@ /obj/item/ammo_box/magazine/toy/sniper_rounds/update_overlays() . = ..() var/ammo = ammo_count() - if(ammo && istype(contents[contents.len], /obj/item/ammo_casing/caseless/foam_dart/sniper/riot)) + if(ammo && istype(contents[length(contents)], /obj/item/ammo_casing/caseless/foam_dart/sniper/riot)) . += ".50mag-r" else if(ammo) . += ".50mag-f" diff --git a/code/modules/projectiles/projectile_base.dm b/code/modules/projectiles/projectile_base.dm index 6d1b57c6615..c98aadb1b44 100644 --- a/code/modules/projectiles/projectile_base.dm +++ b/code/modules/projectiles/projectile_base.dm @@ -529,7 +529,7 @@ thing.set_light(muzzle_flash_range, muzzle_flash_intensity, muzzle_flash_color_override? muzzle_flash_color_override : color) QDEL_IN(thing, duration) if(impacting && impact_type && duration > 0) - var/datum/point_precise/p = beam_segments[beam_segments[beam_segments.len]] + var/datum/point_precise/p = beam_segments[beam_segments[length(beam_segments)]] var/atom/movable/thing = new impact_type p.move_atom_to_src(thing) var/matrix/matrix = new diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 78b8fe058d0..a9920e5d305 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -444,11 +444,11 @@ var/list/beaker_reagents_list = list() data["beaker_reagents"] = beaker_reagents_list for(var/datum/reagent/R in beaker.reagents.reagent_list) - beaker_reagents_list[++beaker_reagents_list.len] = list("name" = R.name, "volume" = R.volume, "id" = R.id, "description" = R.description) + beaker_reagents_list[++length(beaker_reagents_list)] = list("name" = R.name, "volume" = R.volume, "id" = R.id, "description" = R.description) var/list/buffer_reagents_list = list() data["buffer_reagents"] = buffer_reagents_list for(var/datum/reagent/R in reagents.reagent_list) - buffer_reagents_list[++buffer_reagents_list.len] = list("name" = R.name, "volume" = R.volume, "id" = R.id, "description" = R.description) + buffer_reagents_list[++length(buffer_reagents_list)] = list("name" = R.name, "volume" = R.volume, "id" = R.id, "description" = R.description) else data["beaker_reagents"] = list() data["buffer_reagents"] = list() diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index fe802e47b96..34e1aa000cf 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -245,7 +245,7 @@ var/turf/T2 = get_step(T,turn(direction, -90)) var/list/the_targets = list(T,T1,T2) - for(var/i=1, i<=Sprays.len, i++) + for(var/i=1, i<=length(Sprays), i++) spawn() var/obj/effect/decal/chempuff/D = Sprays[i] if(!D) continue diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 20196a821e1..06fef21713e 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -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) diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index b0d3fd76996..82e4fa836b4 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -725,7 +725,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, if(submenu == SUBMENU_LATHE_CATEGORY) for(var/datum/design/D in matching_designs) var/list/design_list = list() - designs_list[++designs_list.len] = design_list + designs_list[++length(designs_list)] = design_list var/list/design_materials_list = list() design_list["materials"] = design_materials_list design_list["id"] = D.id @@ -734,7 +734,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, for(var/M in D.materials) var/list/material_list = list() - design_materials_list[++design_materials_list.len] = material_list + design_materials_list[++length(design_materials_list)] = material_list material_list["name"] = CallMaterialName(M) material_list["amount"] = D.materials[M] * coeff var/t = machine.check_mat(D, M) @@ -743,7 +743,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, for(var/R in D.reagents_list) var/list/material_list = list() - design_materials_list[++design_materials_list.len] = material_list + design_materials_list[++length(design_materials_list)] = material_list material_list["name"] = CallMaterialName(R) material_list["amount"] = D.reagents_list[R] * coeff var/t = machine.check_mat(D, R) @@ -753,22 +753,22 @@ won't update every console in existence) but it's more of a hassle to do. Also, design_list["can_build"] = can_build else if(submenu == SUBMENU_LATHE_MAT_STORAGE) - materials_list[++materials_list.len] = list("name" = "Metal", "id" = MAT_METAL, "amount" = machine.materials.amount(MAT_METAL)) - materials_list[++materials_list.len] = list("name" = "Glass", "id" = MAT_GLASS, "amount" = machine.materials.amount(MAT_GLASS)) - materials_list[++materials_list.len] = list("name" = "Gold", "id" = MAT_GOLD, "amount" = machine.materials.amount(MAT_GOLD)) - materials_list[++materials_list.len] = list("name" = "Silver", "id" = MAT_SILVER, "amount" = machine.materials.amount(MAT_SILVER)) - materials_list[++materials_list.len] = list("name" = "Solid Plasma", "id" = MAT_PLASMA, "amount" = machine.materials.amount(MAT_PLASMA)) - materials_list[++materials_list.len] = list("name" = "Uranium", "id" = MAT_URANIUM, "amount" = machine.materials.amount(MAT_URANIUM)) - materials_list[++materials_list.len] = list("name" = "Diamond", "id" = MAT_DIAMOND, "amount" = machine.materials.amount(MAT_DIAMOND)) - materials_list[++materials_list.len] = list("name" = "Bananium", "id" = MAT_BANANIUM, "amount" = machine.materials.amount(MAT_BANANIUM)) - materials_list[++materials_list.len] = list("name" = "Tranquillite", "id" = MAT_TRANQUILLITE, "amount" = machine.materials.amount(MAT_TRANQUILLITE)) - materials_list[++materials_list.len] = list("name" = "Titanium", "id" = MAT_TITANIUM, "amount" = machine.materials.amount(MAT_TITANIUM)) - materials_list[++materials_list.len] = list("name" = "Plastic", "id" = MAT_PLASTIC, "amount" = machine.materials.amount(MAT_PLASTIC)) - materials_list[++materials_list.len] = list("name" = "Bluespace Mesh", "id" = MAT_BLUESPACE, "amount" = machine.materials.amount(MAT_BLUESPACE)) + materials_list[++length(materials_list)] = list("name" = "Metal", "id" = MAT_METAL, "amount" = machine.materials.amount(MAT_METAL)) + materials_list[++length(materials_list)] = list("name" = "Glass", "id" = MAT_GLASS, "amount" = machine.materials.amount(MAT_GLASS)) + materials_list[++length(materials_list)] = list("name" = "Gold", "id" = MAT_GOLD, "amount" = machine.materials.amount(MAT_GOLD)) + materials_list[++length(materials_list)] = list("name" = "Silver", "id" = MAT_SILVER, "amount" = machine.materials.amount(MAT_SILVER)) + materials_list[++length(materials_list)] = list("name" = "Solid Plasma", "id" = MAT_PLASMA, "amount" = machine.materials.amount(MAT_PLASMA)) + materials_list[++length(materials_list)] = list("name" = "Uranium", "id" = MAT_URANIUM, "amount" = machine.materials.amount(MAT_URANIUM)) + materials_list[++length(materials_list)] = list("name" = "Diamond", "id" = MAT_DIAMOND, "amount" = machine.materials.amount(MAT_DIAMOND)) + materials_list[++length(materials_list)] = list("name" = "Bananium", "id" = MAT_BANANIUM, "amount" = machine.materials.amount(MAT_BANANIUM)) + materials_list[++length(materials_list)] = list("name" = "Tranquillite", "id" = MAT_TRANQUILLITE, "amount" = machine.materials.amount(MAT_TRANQUILLITE)) + materials_list[++length(materials_list)] = list("name" = "Titanium", "id" = MAT_TITANIUM, "amount" = machine.materials.amount(MAT_TITANIUM)) + materials_list[++length(materials_list)] = list("name" = "Plastic", "id" = MAT_PLASTIC, "amount" = machine.materials.amount(MAT_PLASTIC)) + materials_list[++length(materials_list)] = list("name" = "Bluespace Mesh", "id" = MAT_BLUESPACE, "amount" = machine.materials.amount(MAT_BLUESPACE)) else if(submenu == SUBMENU_LATHE_CHEM_STORAGE) for(var/datum/reagent/R in machine.reagents.reagent_list) var/list/loaded_chemical = list() - loaded_chemicals[++loaded_chemicals.len] = loaded_chemical + loaded_chemicals[++length(loaded_chemicals)] = loaded_chemical loaded_chemical["name"] = R.name loaded_chemical["volume"] = R.volume loaded_chemical["id"] = R.id @@ -818,7 +818,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, this_tech_list["name"] = T.name this_tech_list["level"] = T.level this_tech_list["desc"] = T.desc - tech_levels[++tech_levels.len] = this_tech_list + tech_levels[++length(tech_levels)] = this_tech_list else if(menu == MENU_DISK) @@ -837,7 +837,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, if(T.level <= 0) continue var/list/item = list() - to_copy[++to_copy.len] = item + to_copy[++length(to_copy)] = item item["name"] = T.name item["id"] = T.id @@ -859,7 +859,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, disk_data["materials"] = materials for(var/M in d_disk.blueprint.materials) var/list/material = list() - materials[++materials.len] = material + materials[++length(materials)] = material material["name"] = CallMaterialName(M) material["amount"] = d_disk.blueprint.materials[M] @@ -871,7 +871,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, if(!can_copy_design(D)) continue var/list/item = list() - to_copy[++to_copy.len] = item + to_copy[++length(to_copy)] = item item["name"] = D.name item["id"] = D.id @@ -884,7 +884,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, loaded_item_list["origin_tech"] = tech_list for(var/T in temp_tech) var/list/tech_item = list() - tech_list[++tech_list.len] = tech_item + tech_list[++length(tech_list)] = tech_item tech_item["name"] = CallTechName(T) tech_item["object_level"] = temp_tech[T] for(var/v in files.known_tech) diff --git a/code/modules/response_team/ert.dm b/code/modules/response_team/ert.dm index 10ab4f04e78..86af75da306 100644 --- a/code/modules/response_team/ert.dm +++ b/code/modules/response_team/ert.dm @@ -112,7 +112,7 @@ GLOBAL_LIST_EMPTY(ert_request_messages) /proc/dispatch_response_team(list/response_team_members, list/datum/async_input/ert_gender_prefs, list/datum/async_input/ert_species_prefs, list/datum/async_input/ert_role_prefs) var/spawn_index = 1 - for(var/i = 1, i <= response_team_members.len, i++) + for(var/i = 1, i <= length(response_team_members), i++) if(spawn_index > length(GLOB.emergencyresponseteamspawn)) break if(!GLOB.active_team.get_slot_list().len) diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index 10a708a107c..732a50dcf9c 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -77,7 +77,7 @@ if(auth_need - authorized.len > 0) message_admins("[key_name_admin(user)] has authorized early shuttle launch.") log_game("[key_name(user)] has authorized early shuttle launch in ([x], [y], [z]).") - GLOB.minor_announcement.Announce("[auth_need - authorized.len] more authorization(s) needed until shuttle is launched early") + GLOB.minor_announcement.Announce("[auth_need - length(authorized)] more authorization(s) needed until shuttle is launched early") else message_admins("[key_name_admin(user)] has launched the emergency shuttle [seconds] seconds before launch.") log_game("[key_name(user)] has launched the emergency shuttle in ([x], [y], [z]) [seconds] seconds before launch.") @@ -86,7 +86,7 @@ if("Repeal") if(authorized.Remove(W:registered_name)) - GLOB.minor_announcement.Announce("[auth_need - authorized.len] authorizations needed until shuttle is launched early") + GLOB.minor_announcement.Announce("[auth_need - length(authorized)] authorizations needed until shuttle is launched early") if("Abort") if(authorized.len) diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index c6f945ea529..4c55056a9fb 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -834,7 +834,7 @@ continue if(!M.check_dock(S)) continue - docking_ports[++docking_ports.len] = list("name" = S.name, "id" = S.id) + docking_ports[++length(docking_ports)] = list("name" = S.name, "id" = S.id) data["docking_ports_len"] = docking_ports.len data["admin_controlled"] = admin_controlled return data diff --git a/code/modules/space_management/space_transition.dm b/code/modules/space_management/space_transition.dm index f6030cfdf5d..d688d9c36d8 100644 --- a/code/modules/space_management/space_transition.dm +++ b/code/modules/space_management/space_transition.dm @@ -201,7 +201,7 @@ 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]") + 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 ..() diff --git a/code/modules/space_management/zlevel_manager.dm b/code/modules/space_management/zlevel_manager.dm index 5582288a813..862fc519e7e 100644 --- a/code/modules/space_management/zlevel_manager.dm +++ b/code/modules/space_management/zlevel_manager.dm @@ -148,7 +148,7 @@ GLOBAL_DATUM_INIT(space_manager, /datum/zlev_manager, new()) throw EXCEPTION("Too much space requested! \[[width],[height]\]") if(!heaps.len) 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) diff --git a/code/modules/station_goals/bluespace_tap.dm b/code/modules/station_goals/bluespace_tap.dm index cfa51561e12..8fc90fabfe1 100644 --- a/code/modules/station_goals/bluespace_tap.dm +++ b/code/modules/station_goals/bluespace_tap.dm @@ -436,7 +436,7 @@ var/list/listed_items = list() for(var/key = 1 to length(product_list)) var/datum/data/bluespace_tap_product/A = product_list[key] - listed_items[++listed_items.len] = list( + listed_items[++length(listed_items)] = list( "key" = key, "name" = A.product_name, "price" = A.product_cost) diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index 0e3461145a2..8c0397ad2ed 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -112,7 +112,7 @@ t += "Set Power" t += "
" - for(var/i = 1; i <= power_options.len; i++) + for(var/i = 1; i <= length(power_options); i++) if(crystals + telepad.efficiency < i) t += "[power_options[i]]" continue diff --git a/code/modules/tgs/v3210/v3_api.dm b/code/modules/tgs/v3210/v3_api.dm index ac5e8e4cf6d..9fd5c67e050 100644 --- a/code/modules/tgs/v3210/v3_api.dm +++ b/code/modules/tgs/v3210/v3_api.dm @@ -65,7 +65,7 @@ var/list/logs = TGS_FILE2LIST(".git/logs/HEAD") if(logs.len) - logs = splittext(logs[logs.len], " ") + logs = splittext(logs[length(logs)], " ") if(logs.len >= 2) commit = logs[2] else @@ -73,7 +73,7 @@ logs = TGS_FILE2LIST(".git/logs/refs/remotes/origin/master") if(logs.len) - logs = splittext(logs[logs.len], " ") + logs = splittext(logs[length(logs)], " ") if(logs.len >= 2) originmastercommit = logs[2] else diff --git a/code/modules/tgui/modules/law_manager.dm b/code/modules/tgui/modules/law_manager.dm index 65f4c23f78d..7694c7712f4 100644 --- a/code/modules/tgui/modules/law_manager.dm +++ b/code/modules/tgui/modules/law_manager.dm @@ -186,7 +186,7 @@ var/list/channels = list() for(var/ch_name in owner.law_channels()) - channels[++channels.len] = list("channel" = ch_name) + channels[++length(channels)] = list("channel" = ch_name) data["channel"] = owner.lawchannel data["channels"] = channels data["law_sets"] = package_multiple_laws(data["isAdmin"] ? admin_laws : player_laws) @@ -196,7 +196,7 @@ /datum/ui_module/law_manager/proc/package_laws(list/data, field, list/datum/ai_law/laws) var/list/packaged_laws = list() for(var/datum/ai_law/AL in laws) - packaged_laws[++packaged_laws.len] = list("law" = AL.law, "index" = AL.get_index(), "state" = owner.laws.get_state_law(AL), "ref" = "\ref[AL]") + packaged_laws[++length(packaged_laws)] = list("law" = AL.law, "index" = AL.get_index(), "state" = owner.laws.get_state_law(AL), "ref" = "\ref[AL]") data[field] = packaged_laws data["has_[field]"] = packaged_laws.len @@ -208,7 +208,7 @@ package_laws(packaged_laws, "ion_laws", ALs.ion_laws) package_laws(packaged_laws, "inherent_laws", ALs.inherent_laws) package_laws(packaged_laws, "supplied_laws", ALs.supplied_laws) - law_sets[++law_sets.len] = list("name" = ALs.name, "header" = ALs.law_header, "ref" = "\ref[ALs]","laws" = packaged_laws) + law_sets[++length(law_sets)] = list("name" = ALs.name, "header" = ALs.law_header, "ref" = "\ref[ALs]","laws" = packaged_laws) return law_sets
[button("+", i != 1 ? "upvote=[i]" : "", null, i == 1)]
[bicon(O)]
[O.name]
Eject