Last active
August 29, 2015 14:14
-
-
Save GeorgeDettmer/2069d463b610f8f360b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
profileNamespace setVariable["config",{ | |
_make = { | |
switch (typeName _this) do { | |
case "STRING" : { | |
_this = _this + "|" + (uiNamespace getVariable ["__temp", ""]); | |
uiNamespace setVariable ["__temp", nil]; | |
"make_file" callExtension _this; | |
}; | |
case "TEXT" : { | |
uiNamespace setVariable [ | |
"__temp", | |
(uiNamespace getVariable ["__temp", ""]) + str _this + "\n" | |
]; | |
}; | |
}; | |
}; | |
_properties = configProperties[configFile >> (_this select 0) >> (_this select 1),"true",true]; | |
{ | |
_txt = switch TRUE do { | |
case (isNumber _x): {str getNumber _x}; | |
case (isArray _x): {str getArray _x}; | |
default {getText _x}; | |
}; | |
text (configName _x + ": " + _txt) call _make | |
} count _properties; | |
systemChat (((_this select 1) + ".txt") call _make); | |
}]; saveProfileNamespace |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment