mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 05:51:56 +01:00
Lighting Overhaul & General process improvements (#1612)
This is it. The big one. Risk: Very large. This modifies or rewrites several important systems. Some things still need balancing, but that's probably better done if/when this hits dev. changes: New smooth lighting system. Machinery split into three processes: machinery, powernet, pipenet Removed due to breakage. Refactored into multi-step process. Mob process rewritten. NanoUI process rewritten. Objects process rewritten. Tweaked color output of station lights. Slime core lights now emit colored light. Fixed light update frequency issue with fire alarms, hydroponics trays, and airlocks. Increased light emission from bolted airlocks. Miscellaneous performance improvements. New datum pool implementation. New lighting usage profiler. Lighting system now tracks UV light, which is not visible to players. Space now has a parallax effect. Disabled Spin View verbs due to incompatibility with the new lighting system. Disabled hallucination view spin due to incompatibility with the new lighting system. Lighting system now initializes in the lobby before the round starts to reduce BoR deadtime. Added UV light tracking to lighting engine; dionae now gain energy exclusively from UV light. Added colored lighting to a few consoles that used default (white) light.
This commit is contained in:
@@ -49,3 +49,14 @@
|
||||
var/need_saves_migrated = "Requires database" //Used to determine whether or not the ckey needs their saves migrated over to the database. Default is 0 upon successful connection.
|
||||
|
||||
preload_rsc = 0 // This is 0 so we can set it to an URL once the player logs in and have them download the resources from a different server.
|
||||
|
||||
////////////
|
||||
//PARALLAX//
|
||||
////////////
|
||||
var/list/parallax = list()
|
||||
var/list/parallax_movable = list()
|
||||
var/list/parallax_offset = list()
|
||||
var/turf/previous_turf = null
|
||||
var/obj/screen/plane_master/parallax_master/parallax_master = null
|
||||
var/obj/screen/plane_master/parallax_dustmaster/parallax_dustmaster = null
|
||||
var/obj/screen/plane_master/parallax_spacemaster/parallax_spacemaster = null
|
||||
@@ -3,6 +3,9 @@
|
||||
..()
|
||||
dir = NORTH
|
||||
|
||||
// These break the lighting system, comment out for now until
|
||||
// someone can be arsed to fix it.
|
||||
/*
|
||||
/client/verb/spinleft()
|
||||
set name = "Spin View CCW"
|
||||
set category = "OOC"
|
||||
@@ -13,3 +16,4 @@
|
||||
set category = "OOC"
|
||||
dir = turn(dir, -90)
|
||||
|
||||
*/
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
S["asfx_togs"] >> pref.asfx_togs
|
||||
S["motd_hash"] >> pref.motd_hash
|
||||
S["memo_hash"] >> pref.memo_hash
|
||||
S["parallax_speed"] >> pref.parallax_speed
|
||||
S["parallax_toggles"] >> pref.parallax_togs
|
||||
|
||||
/datum/category_item/player_setup_item/player_global/settings/save_preferences(var/savefile/S)
|
||||
S["lastchangelog"] << pref.lastchangelog
|
||||
@@ -17,6 +19,8 @@
|
||||
S["asfx_togs"] << pref.asfx_togs
|
||||
S["motd_hash"] << pref.motd_hash
|
||||
S["memo_hash"] << pref.memo_hash
|
||||
S["parallax_speed"] << pref.parallax_speed
|
||||
S["parallax_toggles"] << pref.parallax_togs
|
||||
|
||||
/datum/category_item/player_setup_item/player_global/settings/gather_load_query()
|
||||
return list("ss13_player_preferences" = list("vars" = list("lastchangelog", "current_character", "toggles", "asfx_togs", "lastmotd" = "motd_hash", "lastmemo" = "memo_hash"), "args" = list("ckey")))
|
||||
@@ -25,7 +29,7 @@
|
||||
return list(":ckey" = pref.client.ckey)
|
||||
|
||||
/datum/category_item/player_setup_item/player_global/settings/gather_save_query()
|
||||
return list("ss13_player_preferences" = list("lastchangelog", "current_character", "toggles", "asfx_togs", "lastmotd", "lastmemo", "ckey" = 1))
|
||||
return list("ss13_player_preferences" = list("lastchangelog", "current_character", "toggles", "asfx_togs", "lastmotd", "lastmemo", "ckey" = 1, "parallax_toggles", "parallax_speed"))
|
||||
|
||||
/datum/category_item/player_setup_item/player_global/settings/gather_save_parameters()
|
||||
return list(":ckey" = pref.client.ckey,
|
||||
@@ -34,7 +38,9 @@
|
||||
":toggles" = pref.toggles,
|
||||
":asfx_togs" = pref.asfx_togs,
|
||||
":lastmotd" = pref.motd_hash,
|
||||
":lastmemo" = pref.memo_hash)
|
||||
":lastmemo" = pref.memo_hash,
|
||||
":parallax_toggles" = pref.parallax_togs,
|
||||
":parallax_speed" = pref.parallax_speed)
|
||||
|
||||
/datum/category_item/player_setup_item/player_global/settings/sanitize_preferences(var/sql_load = 0)
|
||||
if (sql_load)
|
||||
@@ -46,6 +52,8 @@
|
||||
pref.asfx_togs = sanitize_integer(text2num(pref.asfx_togs), 0, 65535, initial(pref.toggles))
|
||||
pref.motd_hash = sanitize_text(pref.motd_hash, initial(pref.motd_hash))
|
||||
pref.memo_hash = sanitize_text(pref.memo_hash, initial(pref.memo_hash))
|
||||
pref.parallax_speed = sanitize_integer(text2num(pref.parallax_speed), 1, 10, initial(pref.parallax_speed))
|
||||
pref.parallax_togs = sanitize_integer(text2num(pref.parallax_togs), 0, 65535, initial(pref.parallax_togs))
|
||||
|
||||
/datum/category_item/player_setup_item/player_global/settings/content(var/mob/user)
|
||||
. += "<b>Play admin midis:</b> <a href='?src=\ref[src];toggle=[SOUND_MIDI]'><b>[(pref.toggles & SOUND_MIDI) ? "Yes" : "No"]</b></a><br>"
|
||||
@@ -53,6 +61,8 @@
|
||||
. += "<b>Ghost ears:</b> <a href='?src=\ref[src];toggle=[CHAT_GHOSTEARS]'><b>[(pref.toggles & CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]</b></a><br>"
|
||||
. += "<b>Ghost sight:</b> <a href='?src=\ref[src];toggle=[CHAT_GHOSTSIGHT]'><b>[(pref.toggles & CHAT_GHOSTSIGHT) ? "All Emotes" : "Nearest Creatures"]</b></a><br>"
|
||||
. += "<b>Ghost radio:</b> <a href='?src=\ref[src];toggle=[CHAT_GHOSTRADIO]'><b>[(pref.toggles & CHAT_GHOSTRADIO) ? "All Chatter" : "Nearest Speakers"]</b></a><br>"
|
||||
. += "<b>Space Parallax:</b> <a href='?src=\ref[src];paratoggle=[PARALLAX_SPACE]'><b>[(pref.parallax_togs & PARALLAX_SPACE) ? "Yes" : "No"]</b></a><br>"
|
||||
. += "<b>Space Dust:</b> <a href='?src=\ref[src];paratoggle=[PARALLAX_DUST]'><b>[(pref.parallax_togs & PARALLAX_DUST) ? "Yes" : "No"]</b></a><br>"
|
||||
|
||||
/datum/category_item/player_setup_item/player_global/settings/OnTopic(var/href,var/list/href_list, var/mob/user)
|
||||
if(href_list["toggle"])
|
||||
@@ -65,4 +75,9 @@
|
||||
user << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1)
|
||||
return TOPIC_REFRESH
|
||||
|
||||
if(href_list["paratoggle"])
|
||||
var/flag = text2num(href_list["paratoggle"])
|
||||
pref.parallax_togs ^= flag
|
||||
return TOPIC_REFRESH
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -125,6 +125,10 @@ datum/preferences
|
||||
// OOC Metadata:
|
||||
var/metadata = ""
|
||||
|
||||
// SPAAAACE
|
||||
var/parallax_speed = 2
|
||||
var/parallax_togs = PARALLAX_SPACE
|
||||
|
||||
var/list/pai = list() // A list for holding pAI related data.
|
||||
|
||||
var/client/client = null
|
||||
|
||||
@@ -145,3 +145,47 @@
|
||||
src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 1)
|
||||
src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 2)
|
||||
feedback_add_details("admin_verb","TAmbi") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggle_space_parallax()
|
||||
set name = "Show/Hide Space Parallax"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles space parallax effects."
|
||||
prefs.parallax_togs ^= PARALLAX_SPACE
|
||||
prefs.save_preferences()
|
||||
if (prefs.parallax_togs & PARALLAX_SPACE)
|
||||
src << "You will now see space parallax effects."
|
||||
else
|
||||
src << "You will no longer see space parallax effects."
|
||||
|
||||
if (mob.hud_used)
|
||||
mob.hud_used.update_parallax()
|
||||
|
||||
|
||||
/client/verb/toggle_space_dust()
|
||||
set name = "Show/Hide Space Dust"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles space parallax dust."
|
||||
prefs.parallax_togs ^= PARALLAX_DUST
|
||||
prefs.save_preferences()
|
||||
if (prefs.parallax_togs & PARALLAX_DUST)
|
||||
src << "You will now see space parallax dust effects."
|
||||
else
|
||||
src << "You will no longer see space parallax dust effects."
|
||||
|
||||
if (mob.hud_used)
|
||||
mob.hud_used.update_parallax()
|
||||
|
||||
/client/verb/set_parallax_speed()
|
||||
set name = "Set Parallax Speed"
|
||||
set category = "Preferences"
|
||||
set desc = "Sets the movement speed of the space parallax effect."
|
||||
var/choice = input("What speed do you want to use for space parallax? (default 2)", "SPAAACE") as num|null
|
||||
if (!choice || choice < 0)
|
||||
src << "Invalid input."
|
||||
return
|
||||
|
||||
prefs.parallax_speed = choice
|
||||
prefs.save_preferences()
|
||||
|
||||
if (mob.hud_used)
|
||||
mob.hud_used.update_parallax()
|
||||
|
||||
Reference in New Issue
Block a user