actor CoinItem : Inventory
{
	Tag "Money"
	+INVENTORY.KEEPDEPLETED
	+INVENTORY.UNDROPPABLE
	inventory.maxamount 1000000
}

actor SingleCoin : CustomInventory 25006
{
	//$Category Pickups (Wolf3D)
	//$Title Treasure (Coin, 1pts)
	//$Color 17
	inventory.pickupmessage "Picked up a coin."
	inventory.pickupsound "treasure/pickup"
	states
	{
	Spawn:
		COIN A -1 Light(COINLITE)
		stop
	Pickup:
		TNT1 A 0 A_GiveInventory("CoinItem")
		stop
	}
}

actor BagOfCoins : SingleCoin 25007
{
	//$Category Pickups (Wolf3D)
	//$Title Treasure (Coin Bag, 10pts)
	//$Color 17
	inventory.pickupmessage "Picked up a bag of coins."
	states
	{
	Spawn:
		SACK A -1 Light(BAGCLITE)
		stop
	Pickup:
		TNT1 A 0 A_GiveInventory("CoinItem",10)
		stop
	}
}

ACTOR TreasureChest : SingleCoin 16502
{
	//$Category Pickups (Wolf3D)
	//$Title Treasure (Chest, 50pts)
	//$Color 17
	inventory.pickupmessage "Picked up a treasure chest."
	States
	{
	Spawn:
		TRES B -1 Light(TRESLITE)
		stop
	Pickup:
		TNT1 A 0 A_GiveInventory("CoinItem", 50)
		stop
	}
}

ACTOR TreasureChest2 : SingleCoin 16503
{
	//$Category Pickups (Wolf3D)
	//$Title Treasure (Large Chest, 100pts)
	//$Color 17
	inventory.pickupmessage "Picked up a large treasure chest."
	States
	{
	Spawn:
		TRES C -1 Light(BIGCLITE)
		stop
	Pickup:
		TNT1 A 0 A_GiveInventory("CoinItem",100)
		stop
	}
}

ACTOR TreasureChest3 : SingleCoin 16504
{
	//$Category Pickups (Wolf3D)
	//$Title Treasure (Chest, 25pts)
	//$Color 17
	inventory.pickupmessage "Picked up a small treasure chest."
	States
	{
	Spawn:
		TRES E -1 Light(TRESLITE)
		stop
	Pickup:
		TNT1 A 0 A_GiveInventory("CoinItem",25)
		stop
	}
}

ACTOR TreasureCross : SingleCoin 16505
{
	//$Category Pickups (Wolf3D)
	//$Title Treasure (Cross, 15pts)
	//$Color 17
	inventory.pickupmessage "Picked up a golden cross."
	States
	{
	Spawn:
		TRES F -1 Light(COINLITE)
		stop
	Pickup:
		TNT1 A 0 A_GiveInventory("CoinItem",15)
		stop
	}
}

ACTOR Goblet : TreasureCross 16507
{
	//$Category Pickups (Wolf3D)
	//$Title Treasure (Goblet, 15pts)
	//$Color 17
	inventory.pickupmessage "Picked up a golden chalice."
	States
	{
	Spawn:
		TRES G -1 Light(TRESLITE)
		stop
	}
}

ACTOR TreasureCrown : SingleCoin 16501
{
	//$Category Pickups (Wolf3D)
	//$Title Treasure (Crown, 20pts)
	//$Color 17
	inventory.pickupmessage "Picked up a gold crown."
	States
	{
	Spawn:
		TRES D -1 Light(BAGCLITE)
		stop
	Pickup:
		TNT1 A 0 A_GiveInventory("CoinItem",20)
		stop
	}
}

ACTOR GoldBar : TreasureCrown 16506
{
	//$Category Pickups (Wolf3D)
	//$Title Treasure (Gold Bar, 20pts)
	//$Color 17
	inventory.pickupmessage "Picked up a gold bar."
	States
	{
	Spawn:
		GOLD B -1 Light(TRESLITE)
		stop
	}
}

/////////////Treasure Box //////////
ACTOR ChestKey : Inventory 11001
{
	//$Category Pickups (Wolf3D)
	//$Title Treasure Chest Key
	//$Color 17
	Inventory.Icon "I_SPBKEY"
	Inventory.PickupMessage "CHEST KEY"
	Inventory.PickupSound "misc/k_pkup"
	Inventory.UseSound "supplychest/open"
	+INVENTORY.INVBAR
	Inventory.DefMaxAmount
	Tag "Chest key"
	States
	{
	Spawn:
		SBKY A -1
		Stop
	}
}

ACTOR SupplyChest : SwitchingDecoration 11002
{
	//$Category Pickups (Wolf3D)
	//$Title Treasure Chest
	//$Color 17
	Height 34
	Radius 21
	+SOLID
	+USESPECIAL
	States
	{
	Spawn:
		SUBX A -1
		Stop
	Active:
		SUBX B 20
		SUBX C -1 A_UnSetSolid
		Stop
	}
}