Ejemplo n.º 1
0
        private void InternalConstructor(Plugin[] plugins, int pluginIndex, Logger logger)
        {
            this.plugins   = plugins;
            this.logger    = logger;
            this.variables = new BakeryVariables();

            LoadDefaultGlobalVariables();
            curPluginIdx         = pluginIndex;
            currentCommand       = null;
            returnAddress        = new Stack <CommandAddress>();
            currentSectionParams = new string[0];
        }
Ejemplo n.º 2
0
        public void WriteVariables(BakeryVariables vars)
        {
            string str = "\n\n[Local Variables]\n";

            foreach (var local in vars.LocalVars)
            {
                str = string.Concat(str, local.Key, " (Raw)   = ", local.Value, "\n");
                str = string.Concat(str, local.Key, " (Value) = ", vars.LocalGetValue(local.Key), "\n");
            }
            str += "\n[Global Variables]\n";
            foreach (var global in vars.GlobalVars)
            {
                str = string.Concat(str, global.Key, " (Raw)   = ", global.Value, "\n");
                str = string.Concat(str, global.Key, " (Value) = ", vars.GlobalGetValue(global.Key), "\n");
            }
            sw.Write(str);
            sw.Flush();
        }