[READY] Widescreen (#20861)

* TM Needed - Widescreen

* A lot of fixes

* TM notice

* Feedback thread

* Minor tweaks

* Expans silicon view stuff

* Fix viewmods

* The preferential option

* Why were these global

* Fix clickcatch sizing, fix parallax issues

* Maybe fixes the runtime

* READY
This commit is contained in:
AffectedArc07
2023-06-07 21:09:16 +01:00
committed by GitHub
parent fa7e321f10
commit 48b0210064
30 changed files with 264 additions and 189 deletions
+9 -6
View File
@@ -134,19 +134,22 @@
set_viewer(usr)
attack_self(usr)
/obj/item/areaeditor/blueprints/proc/get_images(turf/T, viewsize)
/obj/item/areaeditor/blueprints/proc/get_images(turf/central_turf, viewsize)
. = list()
for(var/tt in RANGE_TURFS(viewsize, T))
var/turf/TT = tt
if(TT.blueprint_data)
. += TT.blueprint_data
var/list/dimensions = getviewsize(viewsize)
var/horizontal_radius = dimensions[1] / 2
var/vertical_radius = dimensions[2] / 2
for(var/turf/nearby_turf as anything in RECT_TURFS(horizontal_radius, vertical_radius, central_turf))
if(nearby_turf.blueprint_data)
. += nearby_turf.blueprint_data
/obj/item/areaeditor/blueprints/proc/set_viewer(mob/user, message = "")
if(user && user.client)
if(viewing)
clear_viewer()
viewing = user.client
showing = get_images(get_turf(user), viewing.view)
showing = get_images(get_turf(viewing.eye || user), viewing.view)
viewing.images |= showing
if(message)
to_chat(user, message)
@@ -233,7 +233,7 @@
return
if(!isturf(T))
return
if(get_dist(src, T) >= (U.client.view + 2)) // To prevent people from using it over cameras
if(get_dist(src, T) >= (U.client.maxview() + 2)) // To prevent people from using it over cameras
return
var/used = FALSE
+1 -1
View File
@@ -282,7 +282,7 @@
// If we get here, then we're effectively acting on the turf, probably placing a pipe.
if(ranged) //woosh beam if bluespaced at a distance
if(get_dist(src, T) <= (user.client.view + 2))\
if(get_dist(src, T) <= (user.client.maxview() + 2))\
user.Beam(T, icon_state = "rped_upgrade", icon = 'icons/effects/effects.dmi', time = 5)
else
message_admins("\[EXPLOIT] [key_name_admin(user)] attempted to place pipes with a BRPD via a camera console. (Attempted range exploit)")
@@ -24,7 +24,7 @@
/obj/item/storage/part_replacer/afterattack(obj/machinery/M, mob/user, flag, params)
if(!flag && works_from_distance && istype(M))
// Make sure its in range
if(get_dist(src, M) <= (user.client.view + 2))
if(get_dist(src, M) <= (user.client.maxview() + 2))
if(M.component_parts)
M.exchange_parts(user, src)
user.Beam(M,icon_state="rped_upgrade", icon='icons/effects/effects.dmi', time=5)