コード例 #1
0
 /// <summary>Adds new types of custom chore.</summary>
 /// <param name="factory">A factory which creates an instance of a chore type.</param>
 public void AddChoreFactory(IChoreFactory factory)
 {
     if (factory == null)
     {
         throw new ArgumentNullException(nameof(factory));
     }
     CustomChoresMod.Instance.Monitor.Log($"Adding chore factory: {factory.GetType().AssemblyQualifiedName}");
     _choreBuilders.AddChoreFactory(factory);
 }
コード例 #2
0
 /*********
 ** Public methods
 *********/
 /// <summary>Add a new type of custom chore.</summary>
 /// <param name="factory">A factory which creates an instance of a chore.</param>
 public void AddChoreFactory(IChoreFactory factory)
 {
     _choreFactories.Add(factory);
 }