CORE dashboard + a lot of changes
This commit is contained in:
@@ -5,14 +5,16 @@ using RPGCore.BackpackEquipment.ObjectModules.UnitBackpack.Events;
|
||||
using RPGCore.BackpackEquipment.Objects;
|
||||
using RPGCore.Core;
|
||||
using RPGCore.Core.Objects;
|
||||
using RPGCoreCommon.Helpers.PropertyAttributeDrawers;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RPGCore.BackpackEquipment.ObjectModules.UnitBackpack
|
||||
{
|
||||
[RequireComponent(typeof(UnitObject))]
|
||||
[RequireComponent(typeof(ContentModule))]
|
||||
[DisallowMultipleComponent]
|
||||
[ObjectModule(
|
||||
name: "[Inventory] Backpack",
|
||||
description: "Requires <b>ContentModule</b> to work. Simple backpack that can be attached to <b>UnitObject</b>."
|
||||
)]
|
||||
public sealed class UnitBackpackModule : ObjectModule<UnitObject>, IContentOwner
|
||||
{
|
||||
// TODO: implementacja stackowania tutaj
|
||||
@@ -53,7 +55,7 @@ namespace RPGCore.BackpackEquipment.ObjectModules.UnitBackpack
|
||||
|
||||
bool IContentOwner.Add(ItemObject item, int index)
|
||||
{
|
||||
if (index < 0) index = Array.IndexOf(_items, false);
|
||||
if (index < 0) index = Array.IndexOf(_items, null);
|
||||
if (index < 0) return false;
|
||||
if (isLimited && index >= itemsLimit) return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user