mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
add view range respects widescreen (#33581)
It will simply increment the x and y independently This prevents a runtime of trying to add a number to a string
This commit is contained in:
@@ -670,6 +670,13 @@ GLOBAL_LIST(external_rsc_urls)
|
||||
return TRUE
|
||||
. = ..()
|
||||
|
||||
/client/proc/rescale_view(change, min, max)
|
||||
var/viewscale = getviewsize(view)
|
||||
var/x = viewscale[1]
|
||||
var/y = viewscale[2]
|
||||
x = Clamp(x+change, min, max)
|
||||
y = Clamp(y+change, min,max)
|
||||
change_view("[x]x[y]")
|
||||
|
||||
/client/proc/change_view(new_size)
|
||||
if (isnull(new_size))
|
||||
|
||||
@@ -470,7 +470,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set hidden = TRUE
|
||||
var/max_view = client.prefs.unlock_content ? GHOST_MAX_VIEW_RANGE_MEMBER : GHOST_MAX_VIEW_RANGE_DEFAULT
|
||||
if(input)
|
||||
client.change_view(Clamp(client.view + input, 7, max_view))
|
||||
client.rescale_view(input, 7, max_view)
|
||||
|
||||
/mob/dead/observer/verb/boo()
|
||||
set category = "Ghost"
|
||||
|
||||
Reference in New Issue
Block a user