mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
Bug fixes
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user