/**
 * Author: dkanus
 * Home repo: https://www.insultplayers.ru/git/AcediaFramework/AcediaCore
 * License: GPL
 * Copyright 2024 Anton Tarasenko
 *------------------------------------------------------------------------------
 * This file is part of Acedia.
 *
 * Acedia is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3 of the License, or
 * (at your option) any later version.
 *
 * Acedia is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Acedia.  If not, see <https://www.gnu.org/licenses/>.
 */
class ItemComponent extends Component
    abstract;

//! Stores data that that describes item parameters for an entity.

/// Returns UI-usable name of the caller [`EItem`].
///
/// Allowed to be empty, but not allowed to be `none` for existent items.
public function Text GetName();

/// Changes UI-usable name of the caller [`EItem`].
///
/// Allowed to be empty, but not allowed to be `none` for existent items.
public function SetName(BaseText newName);

/// Returns whether corresponding entity can be removed as a result of player's
/// action.
///
/// We will not enforce items to be completely unremovable through the API, so
/// this only marks an item as one unintended to be removed from inventory.
/// Enforcing of this rule is up to the implementation.
/// 9mm pistol is a good example for Killing Floor.
///
/// Note that item being removable does not mean game must always (or ever)
/// provide players with a way to remove that item, just that it can.
public function bool IsRemovable();

/// Changes whether corresponding entity can be removed as a result of player's
/// action.
///
/// We will not enforce items to be completely unremovable through the API, so
/// this only marks an item as one unintended to be removed from inventory.
/// Enforcing of this rule is up to the implementation.
/// 9mm pistol is a good example for Killing Floor.
///
/// Note that item being removable does not mean game must always (or ever)
/// provide players with a way to remove that item, just that it can.
public function SetRemovable(bool newRemovable);

/// Returns quantity of items that are contained in the stack, represented by
/// relevant entity.
public function int GetStackSize();

/// Changes quantity of items that are contained in the stack, represented by
/// relevant entity.
///
/// It is not the responsibility of this method to handle the case where
/// new stack size exceeds current maximum.
/// It is still allowed to change the value
public function SetStackSize(int newStackSize);

/// Returns maximum possible quantity of items that can be contained in
/// the stack, represented by relevant entity.
public function int GetMaxStackSize();

/// Changes maximum possible quantity of items that can be contained in
/// the stack, represented by relevant entity.
///
/// Negative values mean that there is no limit.
///
/// If the current stack size exceeds the new maximum, it is up to
/// the implementation to handle this scenario of items no longer fitting inside
/// the inventory.
/// This method doesn't have to try and correct anything.
public function SetMaxStackSize(int newMaxStackSize);

/// Returns maximum possible quantity of items of the same type (determined by
/// the `type` parameter of the corresponding entity) that can be contained in
/// ones inventory.
///
/// Negative values mean that there is no limit.
public function int GetMaxTotalAmount();

defaultproperties {
}