Skip to content

OnCardSwipe

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnCardSwipe( CardReader instance, Keycard keycard, BasePlayer player )
{
    Puts( "OnCardSwipe works!" );
}

Location

  • CardReader::ServerCardSwiped(BaseEntity/RPCMessage msg)
csharp
//---
	Effect.server.Run(this.swipeEffect.resourcePath, this.audioPosition.position, Vector3.up, msg.player.net.connection, false, null);
	if (keycard == null)
	{
		return;
	}
	if (Interface.CallHook("OnCardSwipe", this, keycard, msg.player) != null)
	{
		return;
	}
	Item item = keycard.GetItem();
	if (item == null)
//---

Released under the MIT License.