mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-25 13:09:11 +01:00
Ports over configuration controller (#16484)
* Ports over configuration controller * Fixes * Manual path fix * patch (#16490) * patch * . * SQL Fix * Post-rebase fix * Added missing examples --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
selectable = 0
|
||||
|
||||
/datum/ai_laws/nanotrasen/malfunction/New()
|
||||
set_zeroth_law(config.law_zero)
|
||||
set_zeroth_law(CONFIG_GET(string/law_zero))
|
||||
..()
|
||||
|
||||
/************* NanoTrasen Aggressive *************/
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
GLOBAL_DATUM(revdata, /datum/getrev)
|
||||
|
||||
/datum/getrev
|
||||
var/branch
|
||||
var/revision
|
||||
@@ -50,7 +48,7 @@ GLOBAL_DATUM(revdata, /datum/getrev)
|
||||
var/details = ": '" + html_encode(tm.title) + "' by " + html_encode(tm.author) + " at commit " + html_encode(copytext_char(cm, 1, 11))
|
||||
if(details && findtext(details, "\[s\]") && (!usr || !usr.client.holder))
|
||||
continue
|
||||
. += "<a href=\"[config.githuburl]/pull/[tm.number]\">#[tm.number][details]</a>"
|
||||
. += "<a href=\"[CONFIG_GET(string/githuburl)]/pull/[tm.number]\">#[tm.number][details]</a>"
|
||||
|
||||
/client/verb/showrevinfo()
|
||||
set category = "OOC"
|
||||
@@ -65,8 +63,8 @@ GLOBAL_DATUM(revdata, /datum/getrev)
|
||||
|
||||
if(GLOB.revdata.revision)
|
||||
msg += span_bold("Server revision:") + " B:[GLOB.revdata.branch] D:[GLOB.revdata.date]"
|
||||
if(config.githuburl)
|
||||
msg += span_bold("Commit:") + " <a href='[config.githuburl]/commit/[GLOB.revdata.revision]'>[GLOB.revdata.revision]</a>"
|
||||
if(CONFIG_GET(string/githuburl))
|
||||
msg += span_bold("Commit:") + " <a href='[CONFIG_GET(string/githuburl)]/commit/[GLOB.revdata.revision]'>[GLOB.revdata.revision]</a>"
|
||||
else
|
||||
msg += span_bold("Commit:") + " GLOB.revdata.revision"
|
||||
else
|
||||
|
||||
@@ -19,7 +19,7 @@ GENERAL_PROTECT_DATUM(/datum/managed_browser/feedback_form)
|
||||
var/feedback_hide_author = FALSE
|
||||
|
||||
/datum/managed_browser/feedback_form/New(client/new_client)
|
||||
feedback_topic = config.sqlite_feedback_topics[1]
|
||||
feedback_topic = CONFIG_GET(str_list/sqlite_feedback_topics)[1]
|
||||
..(new_client)
|
||||
|
||||
/datum/managed_browser/feedback_form/Destroy()
|
||||
@@ -29,7 +29,7 @@ GENERAL_PROTECT_DATUM(/datum/managed_browser/feedback_form)
|
||||
|
||||
// Privacy option is allowed if both the config allows it, and the pepper file exists and isn't blank.
|
||||
/datum/managed_browser/feedback_form/proc/can_be_private()
|
||||
return config.sqlite_feedback_privacy && SSsqlite.get_feedback_pepper()
|
||||
return CONFIG_GET(flag/sqlite_feedback_privacy) && SSsqlite.get_feedback_pepper()
|
||||
|
||||
/datum/managed_browser/feedback_form/display()
|
||||
if(!my_client)
|
||||
@@ -70,10 +70,11 @@ GENERAL_PROTECT_DATUM(/datum/managed_browser/feedback_form)
|
||||
dat += my_client.ckey
|
||||
dat += "<br>"
|
||||
|
||||
if(config.sqlite_feedback_topics.len > 1)
|
||||
var/list/sqlite_feedback_topics = CONFIG_GET(str_list/sqlite_feedback_topics)
|
||||
if(sqlite_feedback_topics.len > 1)
|
||||
dat += "Topic: [href(src, list("feedback_choose_topic" = 1), feedback_topic)]<br>"
|
||||
else
|
||||
dat += "Topic: [config.sqlite_feedback_topics[1]]<br>"
|
||||
dat += "Topic: [sqlite_feedback_topics[1]]<br>"
|
||||
|
||||
dat += "<br>"
|
||||
if(feedback_body)
|
||||
@@ -84,8 +85,8 @@ GENERAL_PROTECT_DATUM(/datum/managed_browser/feedback_form)
|
||||
dat += href(src, list("feedback_edit_body" = 1), "Edit")
|
||||
dat += "<hr>"
|
||||
|
||||
if(config.sqlite_feedback_cooldown)
|
||||
dat += "<i>Please note that you will have to wait [config.sqlite_feedback_cooldown] day\s before \
|
||||
if(CONFIG_GET(number/sqlite_feedback_cooldown))
|
||||
dat += "<i>Please note that you will have to wait [CONFIG_GET(number/sqlite_feedback_cooldown)] day\s before \
|
||||
being able to write more feedback after submitting.</i><br>"
|
||||
|
||||
dat += href(src, list("feedback_submit" = 1), "Submit")
|
||||
@@ -112,7 +113,7 @@ GENERAL_PROTECT_DATUM(/datum/managed_browser/feedback_form)
|
||||
return
|
||||
|
||||
if(href_list["feedback_choose_topic"])
|
||||
feedback_topic = tgui_input_list(my_client, "Choose the topic you want to submit your feedback under.", "Feedback Topic", config.sqlite_feedback_topics)
|
||||
feedback_topic = tgui_input_list(my_client, "Choose the topic you want to submit your feedback under.", "Feedback Topic", CONFIG_GET(str_list/sqlite_feedback_topics))
|
||||
display()
|
||||
return
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
|
||||
if(href_list["filter_topic"])
|
||||
var/topic_to_search = tgui_input_text(my_client, "Write desired topic here. Partial topics are allowed. \
|
||||
\nThe current topics in the config are [english_list(config.sqlite_feedback_topics)].", "Filter by Topic", null)
|
||||
\nThe current topics in the config are [english_list(CONFIG_GET(str_list/sqlite_feedback_topics))].", "Filter by Topic", null)
|
||||
if(topic_to_search)
|
||||
last_query = feedback_filter(SQLITE_FEEDBACK_COLUMN_TOPIC, topic_to_search)
|
||||
|
||||
@@ -159,4 +159,4 @@
|
||||
last_query = feedback_filter(SQLITE_FEEDBACK_COLUMN_DATETIME, datetime_to_search)
|
||||
|
||||
// Refresh.
|
||||
display()
|
||||
display()
|
||||
|
||||
Reference in New Issue
Block a user