mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 16:10:02 +01:00
Fixes being able to use binoculars while looking up or down. (#14829)
This commit is contained in:
@@ -682,9 +682,15 @@ modules/mob/mob_movement.dm if you move you will be zoomed out
|
||||
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/proc/zoom(var/mob/M, var/tileoffset = 14, var/viewsize = 9, var/do_device_check = TRUE) //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/M, var/tileoffset = 14, var/viewsize = 9, var/do_device_check = TRUE, var/show_zoom_message = TRUE) //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 (!M)
|
||||
return
|
||||
if(!isliving(M))
|
||||
return
|
||||
var/mob/living/L = M
|
||||
if(L.z_eye)
|
||||
to_chat(L, SPAN_WARNING("You can't do that from here!"))
|
||||
return
|
||||
|
||||
var/devicename
|
||||
|
||||
@@ -728,7 +734,8 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
M.client.pixel_x = -viewoffset
|
||||
M.client.pixel_y = 0
|
||||
|
||||
M.visible_message("<b>[M]</b> peers through \the [zoomdevicename ? "[zoomdevicename] of \the [src.name]" : "[src.name]"].")
|
||||
if(show_zoom_message)
|
||||
M.visible_message("<b>[M]</b> peers through \the [zoomdevicename ? "[zoomdevicename] of \the [src.name]" : "[src.name]"].")
|
||||
|
||||
else
|
||||
M.client.view = world.view
|
||||
@@ -740,7 +747,8 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
M.client.pixel_y = 0
|
||||
|
||||
if(!cannotzoom)
|
||||
M.visible_message("[zoomdevicename ? "<b>[M]</b> looks up from \the [src.name]" : "<b>[M]</b> lowers \the [src.name]"].")
|
||||
if(show_zoom_message)
|
||||
M.visible_message("[zoomdevicename ? "<b>[M]</b> looks up from \the [src.name]" : "<b>[M]</b> lowers \the [src.name]"].")
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
var/viewsize = 7
|
||||
|
||||
/obj/item/device/binoculars/attack_self(mob/user)
|
||||
zoom(user,tileoffset,viewsize)
|
||||
zoom(user,tileoffset,viewsize, show_zoom_message = FALSE)
|
||||
|
||||
/obj/item/device/binoculars/high_power
|
||||
name = "high power binoculars"
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
# balance
|
||||
# admin
|
||||
# backend
|
||||
# security
|
||||
# refactor
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: MattAtlas
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- bugfix: "Fixed binocular message spam."
|
||||
- bugfix: "Fixed being able to use your binoculars while looking down or up."
|
||||
Reference in New Issue
Block a user