Merge pull request #2273 from Citadel-Station-13/upstream-merge-29697

[MIRROR] Rewrites incorrect documentation for the pickweight() proc
This commit is contained in:
LetterJay
2017-08-07 07:20:26 -05:00
committed by GitHub
+5 -1
View File
@@ -184,7 +184,11 @@
result = first ^ second
return result
//Pretends to pick an element based on its weight but really just seems to pick a random element.
//Picks a random element from a list based on a weighting system:
//1. Adds up the total of weights for each element
//2. Gets a number between 1 and that total
//3. For each element in the list, subtracts its weighting from that number
//4. If that makes the number 0 or less, return that element.
/proc/pickweight(list/L)
var/total = 0
var/item