Add proc set_viewsize() to allow hooking actions when client.view is changed.

- Proc is on mob to simplify the standard use case; maybe someday actually save it there too if desired.
This commit is contained in:
Leshana
2020-03-14 16:26:56 -04:00
parent 0d7f59242e
commit 73c4809d26
6 changed files with 17 additions and 10 deletions
+2 -2
View File
@@ -654,7 +654,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
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.client.view = viewsize
H.set_viewsize(viewsize)
zoom = 1
var/tilesize = 32
@@ -679,7 +679,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
H.handle_vision()
else
H.client.view = world.view
H.set_viewsize() // Reset to default
if(!H.hud_used.hud_shown)
H.toggle_zoom_hud()
zoom = 0