Remove ambiguous comments.

移除有歧义的注释。
This commit is contained in:
Cold-Mint 2024-06-14 19:25:48 +08:00
parent b8b8e81d8f
commit b018165e3c
Signed by: Cold-Mint
GPG Key ID: C5A9BF8A98E0CE99
3 changed files with 4 additions and 5 deletions

View File

@ -12,7 +12,6 @@ namespace ColdMint.scripts.inventory;
/// </summary> /// </summary>
public partial class ItemSlotNode : MarginContainer public partial class ItemSlotNode : MarginContainer
{ {
//private IItem? _item;
private IItemStack? _itemStack; private IItemStack? _itemStack;
private TextureRect? _backgroundTextureRect; private TextureRect? _backgroundTextureRect;
private TextureRect? _iconTextureRect; private TextureRect? _iconTextureRect;

View File

@ -71,10 +71,6 @@ public interface IItem
/// <para>If this item need a special stack type, return the special item stack instance that contains the item. If else, just leave this null.</para> /// <para>If this item need a special stack type, return the special item stack instance that contains the item. If else, just leave this null.</para>
/// <para>如果该项目需要特殊的物品堆类型重写此方法来返回包含该物品的特殊物品堆实例。否则保留原本的null返回值。</para> /// <para>如果该项目需要特殊的物品堆类型重写此方法来返回包含该物品的特殊物品堆实例。否则保留原本的null返回值。</para>
/// </summary> /// </summary>
/// <remarks>
/// <para>DO NOT use this method to create stack from item, use <see cref="IItemStack.FromItem"/> instead</para>
/// <para>不要使用此方法从一个物品创建堆,请使用 <see cref="IItemStack.FromItem"/></para>。
/// </remarks>
/// <seealso cref="CanStackWith"/> /// <seealso cref="CanStackWith"/>
IItemStack? SpecialStack() => null; IItemStack? SpecialStack() => null;
} }

View File

@ -159,6 +159,10 @@ public interface IItemStack
/// <para>Create a new ItemStack with the given item as the first item</para> /// <para>Create a new ItemStack with the given item as the first item</para>
/// <para>以给定的物品为第一个物品创建物品堆</para> /// <para>以给定的物品为第一个物品创建物品堆</para>
/// </summary> /// </summary>
/// <remarks>
///<para>Assuming the item implements the <see cref="IItem.SpecialStack"/> method, then use the return value of the SpecialStack method, otherwise extrapolate from the maximum number of stacks of items.</para>
///<para>假设物品实现了<see cref="IItem.SpecialStack"/>方法那么使用SpecialStack方法的返回值否则根据物品的最大堆叠数量来推断。</para>
/// </remarks>
public static IItemStack FromItem(IItem item) => public static IItemStack FromItem(IItem item) =>
item.SpecialStack() ?? item.SpecialStack() ??
ItemTypeManager.MaxStackQuantityOf(item.Id) switch ItemTypeManager.MaxStackQuantityOf(item.Id) switch