#include "scripts/common.txt"
#include "scripts/BP_common.txt"

class BP_KeyPickup : BP_Pickup
{
	//------------------------------------------------------------------------------------------------------------------------
    BP_KeyPickup(kActor @actor)
	{
        super(@actor);
    }
	//------------------------------------------------------------------------------------------------------------------------
	void OnPickup() override
	{
		int keyID = self.SpawnParams(7); //Param 1
		Game.PlaySound("sounds/shaders/generic_4_non_weapon_pickup.ksnd");
		FoundKey(keyID);
		//HasKey(keyID);
		//0 = "KEYS TO FIND"
		//1 = "ON THIS LEVEL"
		//7 = " key"
		//13 = "invalid"
		//16 = " activated"
		//177 = "USE THE KEYS"
		Game.PrintLine(Game.GetLocalizedText("$str_7") + " " + (keyID + 1) + Game.GetLocalizedText("$str_16"), 0); 
		self.MarkPersistentBit(false);		
		self.Remove();
	}
	//------------------------------------------------------------------------------------------------------------------------
}
