Merge pull request #4008 from advomach/master

List lookup to actual math
This commit is contained in:
Ben G.
2014-06-27 19:43:55 -05:00
@@ -26,7 +26,6 @@
var/target = null //its target. moves towards the target if it has one
var/last_failed_movement = 0//Will not move in the same dir if it couldnt before, will help with the getting stuck on fields thing
var/teleport_del = 0
var/sizes_to_number = list("1" = 0, "3" = 1, "5" = 2, "7" = 3, "9" = 4) //so i dont have to mess around with weirdass formulas to get this done.
var/last_warning
var/list/uneatable = list(/turf/space, /obj/effect/overlay)
@@ -230,7 +229,7 @@
if(current_size >= 5)
var/list/handlist = list(H.l_hand, H.r_hand)
for(var/obj/item/hand in handlist)
if(prob(current_size * 5) && hand.w_class >= 5 - sizes_to_number["[current_size]"] && H.unEquip(hand))
if(prob(current_size * 5) && hand.w_class >= ((11-current_size)/2) && H.unEquip(hand))
step_towards(hand, src)
H << "<span class='warning'>\The [src] pulls \the [hand] from your grip!</span>"