cleanup _HELPERS/_lists.dm and all the necessary files (#61827)

Bring _HELPERS/_lists.dm to latest standards by:
-Adding proper documentation and fixing existing one
-Giving vars proper names
-Procs now use snake case as per standard (many files that use those procs will be affected)
This commit is contained in:
Ghilker
2021-10-12 15:48:51 +02:00
committed by GitHub
parent 56d21164d0
commit 95c8e00af7
207 changed files with 551 additions and 522 deletions
+9 -9
View File
@@ -96,7 +96,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
for(var/mob/C in GLOB.mob_list)
if(C.key)
available.Add(C)
var/mob/choice = tgui_input_list(usr, "Choose a player to play the pAI", "Spawn pAI", sortNames(available))
var/mob/choice = tgui_input_list(usr, "Choose a player to play the pAI", "Spawn pAI", sort_names(available))
if(!choice)
return
if(!isobserver(choice))
@@ -162,7 +162,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(matches.len==0)
return
var/hsbitem = input(usr, "Choose an object to delete.", "Delete:") as null|anything in sortList(matches)
var/hsbitem = input(usr, "Choose an object to delete.", "Delete:") as null|anything in sort_list(matches)
if(hsbitem)
hsbitem = matches[hsbitem]
var/counter = 0
@@ -259,7 +259,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(M.ckey)
if(tgui_alert(usr,"This mob is being controlled by [M.key]. Are you sure you wish to give someone else control of it? [M.key] will be made a ghost.",,list("Yes","No")) != "Yes")
return
var/client/newkey = input(src, "Pick the player to put in control.", "New player") as null|anything in sortList(GLOB.clients)
var/client/newkey = input(src, "Pick the player to put in control.", "New player") as null|anything in sort_list(GLOB.clients)
var/mob/oldmob = newkey.mob
var/delmob = FALSE
if((isobserver(oldmob) || tgui_alert(usr,"Do you want to delete [newkey]'s old mob?","Delete?",list("Yes","No")) != "No"))
@@ -505,7 +505,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/datum/outfit/O = path //not much to initalize here but whatever
outfits[initial(O.name)] = path
var/dresscode = input("Select outfit", "Robust quick dress shop") as null|anything in baseoutfits + sortList(outfits)
var/dresscode = input("Select outfit", "Robust quick dress shop") as null|anything in baseoutfits + sort_list(outfits)
if (isnull(dresscode))
return
@@ -519,7 +519,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/datum/outfit/O = path
job_outfits[initial(O.name)] = path
dresscode = input("Select job equipment", "Robust quick dress shop") as null|anything in sortList(job_outfits)
dresscode = input("Select job equipment", "Robust quick dress shop") as null|anything in sort_list(job_outfits)
dresscode = job_outfits[dresscode]
if(isnull(dresscode))
return
@@ -531,7 +531,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/datum/outfit/O = path
plasmaman_outfits[initial(O.name)] = path
dresscode = input("Select plasmeme equipment", "Robust quick dress shop") as null|anything in sortList(plasmaman_outfits)
dresscode = input("Select plasmeme equipment", "Robust quick dress shop") as null|anything in sort_list(plasmaman_outfits)
dresscode = plasmaman_outfits[dresscode]
if(isnull(dresscode))
return
@@ -540,7 +540,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/list/custom_names = list()
for(var/datum/outfit/D in GLOB.custom_outfits)
custom_names[D.name] = D
var/selected_name = input("Select outfit", "Robust quick dress shop") as null|anything in sortList(custom_names)
var/selected_name = input("Select outfit", "Robust quick dress shop") as null|anything in sort_list(custom_names)
dresscode = custom_names[selected_name]
if(isnull(dresscode))
return
@@ -700,7 +700,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
names[name] = ruin_landmark
var/ruinname = input("Select ruin", "Jump to Ruin") as null|anything in sortList(names)
var/ruinname = input("Select ruin", "Jump to Ruin") as null|anything in sort_list(names)
var/obj/effect/landmark/ruin/landmark = names[ruinname]
@@ -737,7 +737,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
for(var/name in SSmapping.ice_ruins_underground_templates)
names[name] = list(SSmapping.ice_ruins_underground_templates[name], ZTRAIT_ICE_RUINS_UNDERGROUND, list(/area/icemoon/underground/unexplored))
var/ruinname = input("Select ruin", "Spawn Ruin") as null|anything in sortList(names)
var/ruinname = input("Select ruin", "Spawn Ruin") as null|anything in sort_list(names)
var/data = names[ruinname]
if (!data)
return