The 515 MegaPR early downport (#7783)

Co-authored-by: Selis <selis@xynolabs.com>
Co-authored-by: Selis <sirlionfur@hotmail.de>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
Co-authored-by: SatinIsle <thesatinisle@gmail.com>
Co-authored-by: Heroman <alesha3000@list.ru>
Co-authored-by: Casey <a.roaming.shadow@gmail.com>
Co-authored-by: Raeschen <rycoop29@gmail.com>
This commit is contained in:
Cadyn
2024-02-27 11:17:32 -08:00
committed by GitHub
parent 96a43a09c1
commit b90f7ec922
254 changed files with 2135 additions and 1576 deletions
+21 -14
View File
@@ -109,10 +109,10 @@
var/tip_timer // reference to timer id for a tooltip we might open soon
var/no_random_knockdown = FALSE //stops item from being able to randomly knock people down in combat
var/rock_climbing = FALSE //If true, allows climbing cliffs using click drag for single Z, walls if multiZ
var/climbing_delay = 1 //If rock_climbing, lower better.
/obj/item/Initialize(mapload) //CHOMPedit I stg I'm going to overwrite these many uncommented edits.
. = ..()
if(islist(origin_tech))
@@ -707,7 +707,14 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
//Looking through a scope or binoculars should /not/ improve your periphereal vision. Still, increase viewsize a tiny bit so that sniping isn't as restricted to NSEW
/obj/item/var/ignore_visor_zoom_restriction = FALSE
/obj/item/proc/zoom(var/tileoffset = 14,var/viewsize = 9) //tileoffset is client view offset in the direction the user is facing. viewsize is how far out this thing zooms. 7 is normal view
/obj/item/proc/zoom(var/mob/living/M, var/tileoffset = 14,var/viewsize = 9) //tileoffset is client view offset in the direction the user is facing. viewsize is how far out this thing zooms. 7 is normal view
if(isliving(usr)) //Always prefer usr if set
M = usr
if(!isliving(M))
return 0
var/devicename
@@ -718,25 +725,25 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
var/cannotzoom
if((usr.stat && !zoom) || !(istype(usr,/mob/living/carbon/human)))
to_chat(usr, "<span class='filter_notice'>You are unable to focus through the [devicename].</span>")
if((M.stat && !zoom) || !(istype(M,/mob/living/carbon/human)))
to_chat(M, "<span class='filter_notice'>You are unable to focus through the [devicename].</span>")
cannotzoom = 1
else if(!zoom && (global_hud.darkMask[1] in usr.client.screen))
to_chat(usr, "<span class='filter_notice'>Your visor gets in the way of looking through the [devicename].</span>")
else if(!zoom && (global_hud.darkMask[1] in M.client.screen))
to_chat(M, "<span class='filter_notice'>Your visor gets in the way of looking through the [devicename].</span>")
cannotzoom = 1
else if(!zoom && usr.get_active_hand() != src)
to_chat(usr, "<span class='filter_notice'>You are too distracted to look through the [devicename], perhaps if it was in your active hand this might work better.</span>")
else if(!zoom && M.get_active_hand() != src)
to_chat(M, "<span class='filter_notice'>You are too distracted to look through the [devicename], perhaps if it was in your active hand this might work better.</span>")
cannotzoom = 1
//We checked above if they are a human and returned already if they weren't.
var/mob/living/carbon/human/H = usr
var/mob/living/carbon/human/H = M
if(!zoom && !cannotzoom)
if(H.hud_used.hud_shown)
H.toggle_zoom_hud() // If the user has already limited their HUD this avoids them having a HUD when they zoom in
H.set_viewsize(viewsize)
zoom = 1
GLOB.moved_event.register(H, src, PROC_REF(zoom))
RegisterSignal(H, COMSIG_OBSERVER_MOVED, PROC_REF(zoom), override = TRUE)
var/tilesize = 32
var/viewoffset = tilesize * tileoffset
@@ -755,7 +762,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
H.client.pixel_x = -viewoffset
H.client.pixel_y = 0
H.visible_message("<span class='filter_notice'>[usr] peers through the [zoomdevicename ? "[zoomdevicename] of the [src.name]" : "[src.name]"].</span>")
H.visible_message("<span class='filter_notice'>[M] peers through the [zoomdevicename ? "[zoomdevicename] of the [src.name]" : "[src.name]"].</span>")
if(!ignore_visor_zoom_restriction)
H.looking_elsewhere = TRUE
H.handle_vision()
@@ -765,7 +772,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
if(!H.hud_used.hud_shown)
H.toggle_zoom_hud()
zoom = 0
GLOB.moved_event.unregister(H, src, PROC_REF(zoom))
UnregisterSignal(H, COMSIG_OBSERVER_MOVED)
H.client.pixel_x = 0
H.client.pixel_y = 0
@@ -773,7 +780,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
H.handle_vision()
if(!cannotzoom)
usr.visible_message("<span class='filter_notice'>[zoomdevicename ? "[usr] looks up from the [src.name]" : "[usr] lowers the [src.name]"].</span>")
M.visible_message("<span class='filter_notice'>[zoomdevicename ? "[M] looks up from the [src.name]" : "[M] lowers the [src.name]"].</span>")
return