From 3e7f262a130c5851912f072ce5c129ad4f451a35 Mon Sep 17 00:00:00 2001 From: Contrabang <91113370+Contrabang@users.noreply.github.com> Date: Thu, 20 Jul 2023 20:51:30 -0400 Subject: [PATCH] fixes this comment (#21730) --- code/__HELPERS/lists.dm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/__HELPERS/lists.dm b/code/__HELPERS/lists.dm index 167c53c6ad5..c47011461e6 100644 --- a/code/__HELPERS/lists.dm +++ b/code/__HELPERS/lists.dm @@ -226,7 +226,12 @@ result = first ^ second return result -//Pretends to pick an element based on its weight but really just seems to pick a random element. +/** + * Picks an element based on its weight. + * L - The input list + * + * example: list("a" = 1, "b" = 2) will pick "b" 2/3s of the time + */ /proc/pickweight(list/L) var/total = 0 var/item