Document all undocumented methods and properties
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -9,8 +9,14 @@ using PkmnLib.Static.Utils;
|
||||
|
||||
namespace PkmnLib.Dynamic.Libraries.DataLoaders;
|
||||
|
||||
/// <summary>
|
||||
/// Loads item data from a JSON file.
|
||||
/// </summary>
|
||||
public static class ItemDataLoader
|
||||
{
|
||||
/// <summary>
|
||||
/// Loads the item library from a JSON file.
|
||||
/// </summary>
|
||||
public static ItemLibrary LoadItems(Stream stream, Action<List<SerializedItem>>? onAfterLoad = null)
|
||||
{
|
||||
var library = new ItemLibrary();
|
||||
@@ -24,10 +30,16 @@ public static class ItemDataLoader
|
||||
return library;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Factory delegate for creating items.
|
||||
/// </summary>
|
||||
public delegate IItem ItemFactoryDelegate(SerializedItem serialized, StringKey name, ItemCategory type,
|
||||
BattleItemCategory battleType, int price, ImmutableHashSet<StringKey> flags, ISecondaryEffect? effect,
|
||||
ISecondaryEffect? battleTriggerEffect, Dictionary<StringKey, object?> additionalData);
|
||||
|
||||
/// <summary>
|
||||
/// The item constructor. This is used to create items from the JSON data.
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public static ItemFactoryDelegate ItemConstructor { get; set; } =
|
||||
(_, name, type, battleType, price, flags, effect, battleTriggerEffect, additionalData) => new ItemImpl(name,
|
||||
|
||||
Reference in New Issue
Block a user