public void Save(TextWriter writer) { var kvp = new KeyValuePairs(); kvp.SetColour("background_colour", BackgroundColour); kvp.Set("background_image", BackgroundImage); kvp.SetColour("ambient_colour", AmbientColour); kvp.SetColour("light_colour", LightColour); kvp.SetVector("light_direction", LightDirection); kvp.SetColour("light2_colour", Light2Colour); kvp.SetVector("light2_direction", Light2Direction); kvp.Set("model", ModelPath); kvp.Set("foreground_model", ModelPath); kvp.Set("animation", AnimPath); kvp.Set("render_pass", RenderPass); kvp.Set("foreground_render_pass", ForegroundRenderPass); kvp.Set("cast_shaows", CastShadows); kvp.Save(writer); }