Skip to content

OnVendingShopOpened

Usage

  • No return behavior

Example Autogenerated

csharp
private void OnVendingShopOpened( InvisibleVendingMachine itemDefinition, BasePlayer player )
{
    Puts( "OnVendingShopOpened works!" );
}
csharp
private void OnVendingShopOpened( NPCVendingMachine vendingMachine, BasePlayer player )
{
    Puts( "OnVendingShopOpened works!" );
}
csharp
private void OnVendingShopOpened( VendingMachine instance, BasePlayer player )
{
    Puts( "OnVendingShopOpened works!" );
}

Location

  • NPCTalking::OnConversationAction(BasePlayer player, string action)
  • TravellingVendor::SV_OpenMenu(BaseEntity/RPCMessage msg)
  • VendingMachine::RPC_OpenShop(BaseEntity/RPCMessage msg)
csharp
//---
			if (Interface.CallHook("OnVendingShopOpen", vendingMachine, player) != null)
			{
				return;
			}
			vendingMachine.PlayerOpenLoot(player, "vendingmachine.customer", false);
			Interface.CallHook("OnVendingShopOpened", vendingMachine, player);
			return;
		}
	}
	ItemDefinition itemDefinition = ItemManager.FindItemDefinition("scrap");
	NPCTalking.NPCConversationResultAction[] array = this.conversationResultActions;
//---
csharp
//---
	if (Interface.CallHook("OnVendingShopOpen", this.vendingMachine, msg.player) != null)
	{
		return;
	}
	this.vendingMachine.OpenShop(msg.player);
	Interface.CallHook("OnVendingShopOpened", this.vendingMachine, msg.player);
}
csharp
//---
	if (Interface.CallHook("OnVendingShopOpen", this, msg.player) != null)
	{
		return;
	}
	this.OpenShop(msg.player);
	Interface.CallHook("OnVendingShopOpened", this, msg.player);
}

Released under the MIT License.