mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-11 18:33:36 +00:00
Update configuration.dm
This commit is contained in:
@@ -193,6 +193,13 @@
|
|||||||
stat("[name]:", statclick)
|
stat("[name]:", statclick)
|
||||||
|
|
||||||
/datum/controller/configuration/proc/Get(entry_type)
|
/datum/controller/configuration/proc/Get(entry_type)
|
||||||
|
var/datum/config_entry/E = GetEntryDatum(entry_type)
|
||||||
|
if((E.protection & CONFIG_ENTRY_HIDDEN) && IsAdminAdvancedProcCall() && GLOB.LastAdminCalledProc == "Get" && GLOB.LastAdminCalledTargetRef == "[REF(src)]")
|
||||||
|
log_admin_private("Config access of [entry_type] attempted by [key_name(usr)]")
|
||||||
|
return
|
||||||
|
return E.config_entry_value
|
||||||
|
|
||||||
|
/datum/controller/configuration/proc/GetEntryDatum(entry_type)
|
||||||
var/datum/config_entry/E = entry_type
|
var/datum/config_entry/E = entry_type
|
||||||
var/entry_is_abstract = initial(E.abstract_type) == entry_type
|
var/entry_is_abstract = initial(E.abstract_type) == entry_type
|
||||||
if(entry_is_abstract)
|
if(entry_is_abstract)
|
||||||
@@ -200,10 +207,7 @@
|
|||||||
E = entries_by_type[entry_type]
|
E = entries_by_type[entry_type]
|
||||||
if(!E)
|
if(!E)
|
||||||
CRASH("Missing config entry for [entry_type]!")
|
CRASH("Missing config entry for [entry_type]!")
|
||||||
if((E.protection & CONFIG_ENTRY_HIDDEN) && IsAdminAdvancedProcCall() && GLOB.LastAdminCalledProc == "Get" && GLOB.LastAdminCalledTargetRef == "[REF(src)]")
|
return E
|
||||||
log_admin_private("Config access of [entry_type] attempted by [key_name(usr)]")
|
|
||||||
return
|
|
||||||
return E.config_entry_value
|
|
||||||
|
|
||||||
/datum/controller/configuration/proc/Set(entry_type, new_val)
|
/datum/controller/configuration/proc/Set(entry_type, new_val)
|
||||||
var/datum/config_entry/E = entry_type
|
var/datum/config_entry/E = entry_type
|
||||||
|
|||||||
Reference in New Issue
Block a user