61 lines
3.0 KiB
C#

using Milimoe.FunGame.Core.Api.Utility;
using Milimoe.FunGame.Core.Entity;
using Oshima.Core.Constant;
using Oshima.FunGame.OshimaModules.Items;
namespace Oshima.FunGame.OshimaModules
{
public class ItemModule : Milimoe.FunGame.Core.Library.Common.Addon.ItemModule
{
public override string Name => OshimaGameModuleConstant.Item;
public override string Description => OshimaGameModuleConstant.Description;
public override string Version => OshimaGameModuleConstant.Version;
public override string Author => OshimaGameModuleConstant.Author;
public override Dictionary<string, Item> Items
{
get
{
return Factory.GetGameModuleInstances<Item>(OshimaGameModuleConstant.General, OshimaGameModuleConstant.Item);
}
}
protected override Factory.EntityFactoryDelegate<Item> ItemFactory()
{
return (id, name, args) =>
{
return id switch
{
(long)AccessoryID.8 => new 8(),
(long)AccessoryID.20 => new 20(),
(long)AccessoryID.35 => new 35(),
(long)AccessoryID.50 => new 50(),
(long)ConsumableID. => new (),
(long)ConsumableID. => new (),
(long)ConsumableID. => new (),
(long)SpecialItemID. => new (),
(long)SpecialItemID. => new (),
(long)SpecialItemID. => new (),
(long)SpecialItemID. => new (),
(long)SpecialItemID. => new (),
(long)SpecialItemID. => new (),
(long)SpecialItemID. => new (),
(long)ConsumableID. => new (),
(long)ConsumableID. => new (),
(long)ConsumableID. => new (),
(long)ConsumableID.1 => new 1(),
(long)ConsumableID.2 => new 2(),
(long)ConsumableID.3 => new 3(),
(long)ConsumableID.1 => new 1(),
(long)ConsumableID.2 => new 2(),
(long)ConsumableID.3 => new 3(),
(long)GiftBoxID. => new (),
(long)GiftBoxID. => new (),
(long)GiftBoxID. => new (),
_ => null,
};
};
}
}
}