Merge pull request #4242 from Citadel-Station-13/upstream-merge-32950
[MIRROR] Adds support for non-1:1 screen ratios (Doesn't add widescreen)
This commit is contained in:
@@ -663,6 +663,9 @@ GLOBAL_LIST(external_rsc_urls)
|
||||
return FALSE
|
||||
if ("key")
|
||||
return FALSE
|
||||
if("view")
|
||||
change_view(var_value)
|
||||
return TRUE
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -683,7 +686,8 @@ GLOBAL_LIST(external_rsc_urls)
|
||||
|
||||
/client/proc/apply_clickcatcher()
|
||||
generate_clickcatcher()
|
||||
void.UpdateGreed(view,view)
|
||||
var/list/actualview = getviewsize(view)
|
||||
void.UpdateGreed(actualview[1],actualview[2])
|
||||
|
||||
/client/proc/AnnouncePR(announcement)
|
||||
if(prefs && prefs.chat_toggles & CHAT_PULLR)
|
||||
|
||||
@@ -396,10 +396,12 @@
|
||||
var/y = text2num(screen_loc_Y[1]) * 32 + text2num(screen_loc_Y[2]) - 32
|
||||
|
||||
//Calculate the "resolution" of screen based on client's view and world's icon size. This will work if the user can view more tiles than average.
|
||||
var/screenview = (user.client.view * 2 + 1) * world.icon_size //Refer to http://www.byond.com/docs/ref/info.html#/client/var/view for mad maths
|
||||
var/list/screenview = getviewsize(user.client.view)
|
||||
var/screenviewX = screenview[1] * world.icon_size
|
||||
var/screenviewY = screenview[2] * world.icon_size
|
||||
|
||||
var/ox = round(screenview/2) - user.client.pixel_x //"origin" x
|
||||
var/oy = round(screenview/2) - user.client.pixel_y //"origin" y
|
||||
var/ox = round(screenviewX/2) - user.client.pixel_x //"origin" x
|
||||
var/oy = round(screenviewY/2) - user.client.pixel_y //"origin" y
|
||||
angle = Atan2(y - oy, x - ox)
|
||||
return list(angle, p_x, p_y)
|
||||
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
. = max(., UI_INTERACTIVE)
|
||||
|
||||
// Regular ghosts can always at least view if in range.
|
||||
if(get_dist(src_object, user) < user.client.view)
|
||||
var/clientviewlist = getviewsize(user.client.view)
|
||||
if(get_dist(src_object, user) < max(clientviewlist[1],clientviewlist[2]))
|
||||
. = max(., UI_UPDATE)
|
||||
|
||||
// Check if the state allows interaction
|
||||
|
||||
@@ -33,7 +33,8 @@ GLOBAL_DATUM_INIT(default_state, /datum/ui_state/default, new)
|
||||
return
|
||||
|
||||
// Robots can interact with anything they can see.
|
||||
if(get_dist(src, src_object) <= client.view)
|
||||
var/list/clientviewlist = getviewsize(client.view)
|
||||
if(get_dist(src, src_object) <= min(clientviewlist[1],clientviewlist[2]))
|
||||
return UI_INTERACTIVE
|
||||
return UI_DISABLED // Otherwise they can keep the UI open.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user