Changes the default ghost lighting, makes it a preference (#65352)

* Changes the default ghost lighting, makes it a preference

I think the way ghost lighting looks right now is really crummy.
It's dark enough you can see where the shadows should be, but it's just
bright enough for everything to look like dog poo

A lot of what makes the game look nice is the depth of the lighting
and if we just hide that for observers we're shooting ourselves in the
foot.

I'm also making it a game preference, so if someone wants to have bad
opinions they can easily.
This commit is contained in:
LemonInTheDark
2022-03-10 23:11:28 -08:00
committed by GitHub
parent 33e893e113
commit dc20fa1c8c
9 changed files with 58 additions and 8 deletions
@@ -0,0 +1,28 @@
GLOBAL_LIST_INIT(ghost_lighting_options, list(
"Fullbright" = LIGHTING_PLANE_ALPHA_INVISIBLE,
"Night Vision" = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE,
"Darker" = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE,
"Normal" = LIGHTING_PLANE_ALPHA_VISIBLE,
))
/// How bright a ghost's lighting plane is
/datum/preference/choiced/ghost_lighting
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "ghost_lighting"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/choiced/ghost_lighting/create_default_value()
return "Darker"
/datum/preference/choiced/ghost_lighting/init_possible_values()
var/list/values = list()
for(var/option_name in GLOB.ghost_lighting_options)
values += option_name
return values
/datum/preference/choiced/ghost_lighting/apply_to_client(client/client, value)
var/mob/current_mob = client?.mob
if(!isobserver(current_mob))
return
current_mob.lighting_alpha = current_mob.default_lighting_alpha()
current_mob.update_sight()