Merge pull request #8021 from RemieRichards/AltClick-PixelPlacement-InteractionFix

Table-Item Pixel Placement Improvements
This commit is contained in:
Razharas
2015-03-01 06:42:44 +03:00
+5 -2
View File
@@ -324,8 +324,11 @@
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(!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)
/*