Class CustomKeycard
- Namespace
- Exiled.CustomItems.API.Features
- Assembly
- Exiled.CustomItems.dll
The Custom keycard base class.
public abstract class CustomKeycard : CustomItem
- Inheritance
-
CustomKeycard
- Inherited Members
- Extension Methods
Properties
Permissions
Gets or sets the permissions for custom keycard.
public virtual KeycardPermissions Permissions { get; set; }
Property Value
Type
Gets or sets the ItemType to use for this item.
public override ItemType Type { get; set; }
Property Value
- ItemType
Exceptions
- ArgumentOutOfRangeException
Throws if specified ItemType is not Keycard.
Methods
Give(Player, Item, bool)
Gives an Item as a CustomItem to a Player.
public override void Give(Player player, Item item, bool displayMessage = true)
Parameters
player
PlayerThe Player who will receive the item.
item
ItemThe Item to be given.
displayMessage
boolIndicates whether ShowPickedUpMessage(Player) will be called when the player receives the item.
OnInteractingDoor(Player, Door)
Called when custom keycard interacts with a door.
protected virtual void OnInteractingDoor(Player player, Door door)
Parameters
OnInteractingLocker(Player, Chamber)
Called when custom keycard interacts with a locker.
protected virtual void OnInteractingLocker(Player player, Chamber chamber)
Parameters
Spawn(Vector3, Item, Player?)
Spawns the CustomItem in a specific position.
public override Pickup? Spawn(Vector3 position, Item item, Player? previousOwner = null)
Parameters
position
Vector3The UnityEngine.Vector3 where the CustomItem will be spawned.
item
ItemThe Item to be spawned as a CustomItem.
previousOwner
PlayerThe PreviousOwner of the item. Can be null.
Returns
- Pickup
The Pickup of the spawned CustomItem.
SubscribeEvents()
Called after the manager is initialized, to allow loading of special event handlers.
protected override void SubscribeEvents()
UnsubscribeEvents()
Called when the manager is being destroyed, to allow unloading of special event handlers.
protected override void UnsubscribeEvents()