Files
CHOMPStation2/code/controllers/configuration_ch.dm
2019-12-30 02:33:17 -07:00

42 lines
1.2 KiB
Plaintext

// Making this file to allow us to easily understand the location of any modifications to the config file made by Chompers and to try and prevent any conflicts happening in the future.
// Basically a copy pasta from virgo's configuration.dm file but it'll make life easer for us to just toggle on/off.
/datum/configuration
var/discord_restriction = 0
var/use_jobwhitelist = 1
var/emojis = 1
/hook/startup/proc/read_ch_config()
var/list/Lines = file2list("config/config.txt")
for(var/t in Lines)
if(!t) continue
t = trim(t)
if (length(t) == 0)
continue
else if (copytext(t, 1, 2) == "#")
continue
var/pos = findtext(t, " ")
var/name = null
// var/value = null //Commenting out because config doesn't contain any values at the moment. - Jonathan
if (pos)
name = lowertext(copytext(t, 1, pos))
// value = copytext(t, pos + 1) //Commenting out because config doesn't contain any values at the moment. - Jonathan
else
name = lowertext(t)
if (!name)
continue
switch (name)
if ("discord_restriction")
config.discord_restriction = 1
if ("use_jobwhitelist")
config.use_jobwhitelist = 1
if ("disable_emojis")
config.emojis = 0
return 1