mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-31 12:41:46 +00:00
* Light Update * Not failing tests I hope * Whitespace Removal * Tweaking here and there * Merge Conflict Fix * Rebuild TGUI Bundle to Fix Merge Conflict * Settings are now in "Game Preferences" too * ColorMatrix formatting and removal of unused procs * A little mistake on matrices * A little mistake x2 (last I hope) * Moving Glare under every other effect, tweaking values, playing with blending * Update TGUI Bundle for Merge Conflict * Apply suggestions from code reviews * Fuck it, it just works * No tabs cool * Remove unused * Am I retarded * We better return * Whitespace we need * oh * New SQL update version * Missing comma fix and recompiled tgui.bundle * Updating SQL version in misc_defines and config * Remove datum in holder * BloomEdit empty lines removal * No more unneeded functions calls * Tgui.bundle rebuild * SQL Changes * SQL Version = 56 now * Documentation and some formatting * tgui.bundle.js rebuild * Remove unused layers and variables * Allow cameras to render backdrops * Possible runtime issue fix * Remove "baked" bloom from the lamps * Revert the "remove". Make it low on alpha channel * Shuttle rotation light update fix * We don't need this * Possible runtime issue fix x2 * tgui.bundle.js update * tgui.bundle.js update * tgui.bundle.js update * Revert config.toml changes * Revert the revertion of config.toml changes * Bring that config changes back! * Entry added * tgui.bundle.js update * Prettier possible fix (?) * Runtime fix (and broken tubes now have light after reinstalling them) * config update --------- Co-authored-by: Mikhail Dzianishchyts <mikhail.dzianishchyts@gmail.com>
72 lines
3.6 KiB
Plaintext
72 lines
3.6 KiB
Plaintext
/client/proc/debug_bloom()
|
|
set name = "Bloom Edit"
|
|
set category = "Debug"
|
|
|
|
if(!check_rights(R_DEBUG))
|
|
return
|
|
var/datum/bloom_edit/editor = new()
|
|
editor.ui_interact(usr)
|
|
|
|
message_admins("[key_name(src)] opened Bloom Edit panel.")
|
|
log_admin("[key_name(src)] opened Bloom Edit panel.")
|
|
|
|
/datum/bloom_edit
|
|
|
|
/datum/bloom_edit/ui_interact(mob/user, datum/tgui/ui = null)
|
|
ui = SStgui.try_update_ui(user, src, ui)
|
|
if(!ui)
|
|
ui = new(user, src, "BloomEdit", "Bloom Edit")
|
|
ui.open()
|
|
|
|
/datum/bloom_edit/ui_data(mob/user)
|
|
var/list/data = list()
|
|
|
|
data["glow_brightness_base"] = GLOB.configuration.lighting_effects.glow_brightness_base
|
|
data["glow_brightness_power"] = GLOB.configuration.lighting_effects.glow_brightness_power
|
|
data["glow_contrast_base"] = GLOB.configuration.lighting_effects.glow_contrast_base
|
|
data["glow_contrast_power"] = GLOB.configuration.lighting_effects.glow_contrast_power
|
|
data["exposure_brightness_base"] = GLOB.configuration.lighting_effects.exposure_brightness_base
|
|
data["exposure_brightness_power"] = GLOB.configuration.lighting_effects.exposure_brightness_power
|
|
data["exposure_contrast_base"] = GLOB.configuration.lighting_effects.exposure_contrast_base
|
|
data["exposure_contrast_power"] = GLOB.configuration.lighting_effects.exposure_contrast_power
|
|
return data
|
|
|
|
/datum/bloom_edit/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
switch(action)
|
|
if("glow_brightness_base")
|
|
GLOB.configuration.lighting_effects.glow_brightness_base = clamp(params["value"], -10, 10)
|
|
if("glow_brightness_power")
|
|
GLOB.configuration.lighting_effects.glow_brightness_power = clamp(params["value"], -10, 10)
|
|
if("glow_contrast_base")
|
|
GLOB.configuration.lighting_effects.glow_contrast_base = clamp(params["value"], -10, 10)
|
|
if("glow_contrast_power")
|
|
GLOB.configuration.lighting_effects.glow_contrast_power = clamp(params["value"], -10, 10)
|
|
if("exposure_brightness_base")
|
|
GLOB.configuration.lighting_effects.exposure_brightness_base = clamp(params["value"], -10, 10)
|
|
if("exposure_brightness_power")
|
|
GLOB.configuration.lighting_effects.exposure_brightness_power = clamp(params["value"], -10, 10)
|
|
if("exposure_contrast_base")
|
|
GLOB.configuration.lighting_effects.exposure_contrast_base = clamp(params["value"], -10, 10)
|
|
if("exposure_contrast_power")
|
|
GLOB.configuration.lighting_effects.exposure_contrast_power = clamp(params["value"], -10, 10)
|
|
if("default")
|
|
GLOB.configuration.lighting_effects.glow_brightness_base = initial(GLOB.configuration.lighting_effects.glow_brightness_base)
|
|
GLOB.configuration.lighting_effects.glow_brightness_power = initial(GLOB.configuration.lighting_effects.glow_brightness_power)
|
|
GLOB.configuration.lighting_effects.glow_contrast_base = initial(GLOB.configuration.lighting_effects.glow_contrast_base)
|
|
GLOB.configuration.lighting_effects.glow_contrast_power = initial(GLOB.configuration.lighting_effects.glow_contrast_power)
|
|
GLOB.configuration.lighting_effects.exposure_brightness_base = initial(GLOB.configuration.lighting_effects.exposure_brightness_base)
|
|
GLOB.configuration.lighting_effects.exposure_brightness_power = initial(GLOB.configuration.lighting_effects.exposure_brightness_power)
|
|
GLOB.configuration.lighting_effects.exposure_contrast_base = initial(GLOB.configuration.lighting_effects.exposure_contrast_base)
|
|
GLOB.configuration.lighting_effects.exposure_contrast_power = initial(GLOB.configuration.lighting_effects.exposure_contrast_power)
|
|
if("update_lamps")
|
|
for(var/obj/machinery/light/L in GLOB.machines)
|
|
if(L.glow_overlay || L.exposure_overlay)
|
|
L.update_bloom()
|
|
return TRUE
|
|
|
|
/datum/bloom_edit/ui_state(mob/user)
|
|
return GLOB.admin_state
|