Algorithmic Directional Lighting (#1726)

This is similar to #1722, but it uses a bit of math to allow explicit setting of the angle of light.
Pretty much complete, although no lights have been updated to use directional lighting.

Features:
Facing a wall with a directional light results in darkness - light is not emitted on own tile.
This commit is contained in:
Lohikar
2017-02-24 21:43:22 +02:00
committed by skull132
parent 70912e9b1d
commit 8c6a2a84a0
7 changed files with 249 additions and 46 deletions
+3 -20
View File
@@ -99,7 +99,6 @@ var/list/admin_verbs_admin = list(
/client/proc/cmd_dev_bst,
/client/proc/clear_toxins,
/client/proc/wipe_ai, // allow admins to force-wipe AIs
/client/proc/flush_lighting_queues,
/client/proc/fix_player_list
)
var/list/admin_verbs_ban = list(
@@ -205,9 +204,9 @@ var/list/admin_verbs_debug = list(
/client/proc/dsay,
/client/proc/toggle_recursive_explosions,
/client/proc/restart_sql,
/client/proc/flush_lighting_queues,
/client/proc/debug_pooling,
/client/proc/fix_player_list
/client/proc/fix_player_list,
/client/proc/lighting_show_verbs
)
var/list/admin_verbs_paranoid_debug = list(
@@ -360,7 +359,7 @@ var/list/admin_verbs_dev = list( //will need to be altered - Ryan784
/client/proc/toggledebuglogs,
/client/proc/ZASSettings,
/client/proc/cmd_dev_bst,
/client/proc/flush_lighting_queues
/client/proc/lighting_show_verbs
)
var/list/admin_verbs_cciaa = list(
/client/proc/cmd_admin_pm_panel, /*admin-pm list*/
@@ -1060,22 +1059,6 @@ var/list/admin_verbs_cciaa = list(
dbcon.Reconnect()
/client/proc/flush_lighting_queues()
set category = "Debug"
set name = "Reset Lighting"
set desc = "Flushes the lighting processor's work queue. Useful if the processor is hung with an invalid source."
if (!check_rights(R_DEBUG|R_ADMIN|R_DEV))
return
if (alert("Flush Lighting Work Queue? This will invalidate all pending lighting updates.", "Reset Lighting", "No", "No", "Yes") != "Yes")
return
log_and_message_admins("has flushed the lighting processor queues.")
lighting_update_lights = list()
lighting_update_corners = list()
lighting_update_overlays = list()
/client/proc/fix_player_list()
set category = "Special Verbs"
set name = "Regenerate Player List"
-15
View File
@@ -971,18 +971,3 @@
log_admin("[key_name(src)] has toggled [M.key]'s [blockname] block [state]!")
else
alert("Invalid mob")
/client/proc/cmd_debug_profile_lighting()
set category = "Debug"
set name = "Profile Lighting"
set desc = "Spams the database with lighting updates. Y'know, just 'cause."
if (!check_rights(R_DEBUG|R_SERVER))
return
if (!establish_db_connection(dbcon))
usr << span("alert", "Unable to start profiling: No active database connection.")
return
lighting_profiling = !lighting_profiling
log_and_message_admins("has [lighting_profiling ? "enabled" : "disabled"] lighting profiling.")
-1
View File
@@ -163,7 +163,6 @@ var/list/debug_verbs = list (
,/datum/admins/proc/setup_supermatter
,/client/proc/atmos_toggle_debug
,/client/proc/spawn_tanktransferbomb
,/client/proc/cmd_debug_profile_lighting
)