Bug fixes

This commit is contained in:
Markolie
2015-02-27 17:51:57 +01:00
parent 8ac9e69043
commit 20ac07de8d
14 changed files with 75 additions and 37 deletions
+18 -7
View File
@@ -422,8 +422,12 @@
W.Move(loc)
var/list/click_params = params2list(params)
//Center the icon where the user clicked.
W.pixel_x = (text2num(click_params["icon-x"]) - 16)
W.pixel_y = (text2num(click_params["icon-y"]) - 16)
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
return
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
W.pixel_x = Clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
W.pixel_y = Clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
return
/obj/structure/table/proc/straight_table_check(var/direction)
@@ -591,9 +595,12 @@
I.Move(loc)
var/list/click_params = params2list(params)
//Center the icon where the user clicked.
I.pixel_x = (text2num(click_params["icon-x"]) - 16)
I.pixel_y = (text2num(click_params["icon-y"]) - 16)
//if(W && W.loc) W.loc = src.loc
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
return
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
I.pixel_x = Clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
I.pixel_y = Clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
return 1
/obj/structure/table/woodentable/poker //No specialties, Just a mapping object.
@@ -649,8 +656,12 @@
W.Move(loc)
var/list/click_params = params2list(params)
//Center the icon where the user clicked.
W.pixel_x = (text2num(click_params["icon-x"]) - 16)
W.pixel_y = (text2num(click_params["icon-y"]) - 16)
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
return
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
W.pixel_x = Clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
W.pixel_y = Clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
return 1