Load virgo-specific configuration parameters from config.txt

This commit is contained in:
Leshana
2016-11-04 21:58:25 -04:00
parent 8710e0f926
commit 7dbdfdda01
2 changed files with 33 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
//
// Lets read our settings from the configuration file on startup too!
//
/hook/startup/proc/read_vs_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
if (pos)
name = lowertext(copytext(t, 1, pos))
value = copytext(t, pos + 1)
else
name = lowertext(t)
if (!name)
continue
switch (name)
if ("items_survive_digestion")
config.items_survive_digestion = 1
return 1