[MIRROR] Field of View and Blindness improvements [bounty + upstream push] [MDB IGNORE] (#10060)

* Field of View and Blindness improvements [bounty + upstream push]

* Update death.dm

* almost done

* Update fov_handler.dm

* Face mouse when in combat mode, fix

* Fixes the category for the fov admin verb. #63401

* Fixes objects with bad planes and FoV bugs #63412

* pain

* there we go

* face pref

Co-authored-by: Azarak <azarak10@gmail.com>
This commit is contained in:
SkyratBot
2021-12-22 14:56:01 +00:00
committed by GitHub
co-authored by Azarak
parent 5604c5d160
commit c0706f4a41
45 changed files with 600 additions and 14 deletions
@@ -5,6 +5,7 @@
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/toggle/ambient_occlusion/apply_to_client(client/client, value)
/// Backdrop for the game world plane.
var/atom/movable/screen/plane_master/game_world/plane_master = locate() in client?.screen
if (!plane_master)
return
@@ -0,0 +1,17 @@
/datum/preference/numeric/fov_darkness
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "fov_darkness"
savefile_identifier = PREFERENCE_PLAYER
minimum = 0
maximum = 255
/datum/preference/numeric/fov_darkness/create_default_value()
return 255
/datum/preference/numeric/fov_darkness/apply_to_client_updated(client/client, value)
if(client.mob)
var/datum/component/fov_handler/fov_component = client.mob.GetComponent(/datum/component/fov_handler)
if(!fov_component)
return
fov_component.visual_shadow.alpha = value