Changes

no edit summary
Line 375: Line 375:     
<ol>
 
<ol>
<li>Create your model. This is just a C# class with properties for the config options you want, and it can contain almost anything from a few boolean fields to a complex object graph (You should try to keep it simple for your users, though). Be sure to declare the values as static to access them outside of the class.
+
<li>Create your model. This is just a C# class with properties for the config options you want, and it can contain almost anything from a few boolean fields to a complex object graph (You should try to keep it simple for your users, though).
 
<br />You can set defaults directly:
 
<br />You can set defaults directly:
   Line 408: Line 408:  
</source>
 
</source>
   −
Example:
+
Values are then accessible through the value config. Example:
 
<source lang="c#">
 
<source lang="c#">
 
public class ModEntry : Mod
 
public class ModEntry : Mod
Line 415: Line 415:  
   {
 
   {
 
     ModConfig config = helper.ReadConfig<ModConfig>();
 
     ModConfig config = helper.ReadConfig<ModConfig>();
 +
    float exampleF = config.ExampleFloat;
 
   }
 
   }
 
}
 
}
6

edits