Now the problem is, the list I'm using is going to be really long, due to having the most of the functions down.
Code:
list/choices = list("blue", "blue", "blue", "blue", "red", "red", "red", "red", "orange", "orange", "orange", "orange", "yellow", "yellow", "yellow", "yellow") //As you can imagine, doing this as I increase map size will be annoying and inefficient.
list/choices = list("blue" = 4, "red" = 4, "orange" = 4, "yellow" = 4) //I want it to be more along the size of this. But I'm unsure of how this, or anything like this would work
//"Tile Assignment" as I like to call it.
proc
tile_assign()
for(var/obj/tile/O in world)
if(!choices.len)
return
var/pick_tile = pick(choices) //pick the tile icon state
O.picked = pick_tile //assign it
choices.Remove(pick_tile) //remove it from the list
I tried reading Lummox's tutorial on Associative lists. But to be honest, the way he writes code hurts my eyes.