mob/proc
Choose()
prob(90)
for(var/Item/I in src.NormalItems)
pick(I)
I == src.loc
Problem description:
How would you create a /proc that could pick from a list in the src list with a probability of the item being rare or not. like 99.5% is going to be a normal item and .5% its going to be rare? and how would you interpret the rarity var of the item into it if that would be more efficient.
By the way, you might notice that i've ommitted the whole 'src.' when referencing the src's list or location later on. This is just due to the style in which i choose to program or code, in this case not spending time writing something unnecessarily: you see, writing out 'loc' -for instance- when intepreted/compiled is ultimately the same as typing 'src.loc'. I'm not sure if this is a good explanation, but basically there isn't a need to especially note the src. before vars, procs and so on because automatically DM will default you might want to define in this way to having this behaviour without you having to explicitly state as much.