// Well this is decorative. :P

//Melee Button Press

Actor Boolean : Inventory
{
    Inventory.MaxAmount 1
    +UNDROPPABLE
    -INVBAR
}

Actor MeleePressed : Boolean {}
Actor DropShellsActor : Boolean {}

Actor GameIsCoop : Boolean {}
Actor GameIsSinglePlayer : Boolean {}

Actor ItemAlreadySpawned : Boolean {}

ACTOR MeleeSelected : Boolean {}
ACTOR 919Selected : Boolean {}
ACTOR ZekeSelected : Boolean {}
ACTOR DahliaSelected : Boolean {}
ACTOR AmmoBoxSelected : Boolean {}
ACTOR ToolBoxSelected : Boolean {}
ACTOR MP40Selected : Boolean {}

Actor StartMelee : CustomInventory
{
  -INVBAR
  +UNDROPPABLE
  Inventory.Amount 1
  Inventory.MaxAmount 1
  States
  {
      Use:
      TNT1 A 0 A_GiveInventory("MeleePressed", 1)
	  TNT1 A 0 A_GiveInventory("MakeHellFireBurst", 1)
      Fail
  }
}

Actor StopMelee : CustomInventory
{
  -INVBAR
  +UNDROPPABLE
  Inventory.Amount 1
  Inventory.MaxAmount 1
  States
  {
      Use:
      TNT1 A 0 A_TakeInventory("MeleePressed", 1)
	  TNT1 A 0 A_TakeInventory("MakeHellFireBurst", 1)
      Fail
  }
}

//Reload Button Press

Actor Reloading : Boolean {}

Actor StartReload : CustomInventory
{
  -INVBAR
  +UNDROPPABLE
  Inventory.Amount 1
  Inventory.MaxAmount 1
  States
  {
      Use:
      TNT1 A 0 A_GiveInventory("Reloading", 1)
      Fail
  }
}

Actor StopReload : CustomInventory
{
  -INVBAR
  +UNDROPPABLE
  Inventory.Amount 1
  Inventory.MaxAmount 1
  States
  {
      Use:
      TNT1 A 0 A_TakeInventory("Reloading", 1)
      Fail
  }
}

Actor DropCurrentShells : CustomInventory
{
  -INVBAR
  +UNDROPPABLE
  Inventory.Amount 1
  Inventory.MaxAmount 1
  States
  {
      Use:
      TNT1 A 0 A_GiveInventory("DropShellsActor", 1)
      Fail
  }
}

ACTOR MeleeButtonActor : CustomInventory
{
  -INVBAR
  +UNDROPPABLE
  Inventory.Amount 1
  Inventory.MaxAmount 1  
  States
  {
      Use:
	  TNT1 A 0 A_JumpIfInventory("GameIsSinglePlayer",1,"UseSingle")
	  TNT1 A 0 A_JumpIfInventory("IsMel",1,"MelMeleeButton")
	  Fail
	  MelMeleeButton:
	  TNT1 A 0 A_JumpIfInventory("MeleeSelected",1,"MelMeleeSwitch")
	  TNT1 A 0 A_GiveInventory("MelMeleePickupItem")
	  Fail
	  MelMeleeSwitch:
	  TNT1 A 0 A_JumpIfInventory("919Selected",1,"Mel919Switch")
	  TNT1 A 0 A_JumpIfInventory("ZekeSelected",1,"MelZekeSwitch")
	  TNT1 A 0 A_JumpIfInventory("DahliaSelected",1,"MelDahliaSwitch")
	  TNT1 A 0 A_JumpIfInventory("AmmoBoxSelected",1,"MelAmmoBoxSwitch")
	  TNT1 A 0 A_JumpIfInventory("ToolBoxSelected",1,"MelToolBoxSwitch")
	  TNT1 A 0 A_JumpIfInventory("MP40Selected",1,"MelMipFowtySwitch")
	  Goto Mel919Switch
	  Mel919Switch:
	  TNT1 A 0 A_GiveInventory("Mel919mPistolPickupItem")
	  Fail
	  MelZekeSwitch:
	  //TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("GetShellPoolCVAR") == false,"MelZekeNoPoolSwitch")
	  TNT1 A 0 A_GiveInventory("MelZekeShotgunPickupItem")
	  Fail
	  //MelZekeNoPoolSwitch:
	  //TNT1 A 0 A_SelectWeapon("MelZekeShotgunNoPool")
	  //Fail
	  MelDahliaSwitch:
	  TNT1 A 0 A_GiveInventory("MelDahliaCrossbowPickupItem")
	  Fail
	  MelAmmoBoxSwitch:
	  TNT1 A 0 A_GiveInventory("MelAmmoBox50PickupItem")
	  Fail
	  MelToolBoxSwitch:
	  TNT1 A 0 A_GiveInventory("MelToolboxPickupItem")
	  Fail
	  MelMipFowtySwitch:
	  TNT1 A 0 A_GiveInventory("MelMipFowtyPickupItem")
	  Fail

      UseSingle:
	  TNT1 A 0 A_JumpIfInventory("IsMel",1,"MelMeleeButtonSingle")
	  Fail
	  MelMeleeButtonSingle:
	  TNT1 A 0 A_JumpIfInventory("MeleeSelected",1,"MelMeleeSwitchSingle")
	  TNT1 A 0 A_SelectWeapon("MelMelee")
	  Fail
	  MelMeleeSwitchSingle:
	  TNT1 A 0 A_JumpIfInventory("919Selected",1,"Mel919SwitchSingle")
	  TNT1 A 0 A_JumpIfInventory("ZekeSelected",1,"MelZekeSwitchSingle")
	  TNT1 A 0 A_JumpIfInventory("DahliaSelected",1,"MelDahliaSwitchSingle")
	  TNT1 A 0 A_JumpIfInventory("AmmoBoxSelected",1,"MelAmmoBoxSwitchSingle")
	  TNT1 A 0 A_JumpIfInventory("ToolBoxSelected",1,"MelToolBoxSwitchSingle")
	  TNT1 A 0 A_JumpIfInventory("MP40Selected",1,"MelMipFowtySwitchSingle")
	  Goto Mel919SwitchSingle
	  Mel919SwitchSingle:
	  TNT1 A 0 A_SelectWeapon("Mel919mPistol")
	  Fail
	  MelZekeSwitchSingle:
	  //TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("GetShellPoolCVAR") == false,"MelZekeNoPoolSwitchSingle")
	  TNT1 A 0 A_SelectWeapon("MelZekeShotgun")
	  Fail
	  //MelZekeNoPoolSwitchSingle:
	  //TNT1 A 0 A_SelectWeapon("MelZekeShotgunNoPool")
	  //Fail
	  MelDahliaSwitchSingle:
	  TNT1 A 0 A_SelectWeapon("MelDahliaCrossbow")
	  Fail
	  MelAmmoBoxSwitchSingle:
	  TNT1 A 0 A_SelectWeapon("MelAmmoBox50")
	  Fail
	  MelToolBoxSwitchSingle:
	  TNT1 A 0 A_SelectWeapon("MelToolbox")
	  Fail
	  MelMipFowtySwitchSingle:
	  TNT1 A 0 A_SelectWeapon("MelMipFowty")
	  Fail
  }
}

ACTOR MelMeleePickupItem : CustomInventory
{
  +INVENTORY.ALWAYSPICKUP
  States
  {
  Pickup:
    TNT1 A 0 A_SelectWeapon("MelMelee")
	TNT1 A 1
    Stop
  }
}

ACTOR Mel919mPistolPickupItem : CustomInventory
{
  +INVENTORY.ALWAYSPICKUP
  States
  {
  Pickup:
    TNT1 A 0 A_SelectWeapon("Mel919mPistol")
	TNT1 A 1
    Stop
  }
}

ACTOR MelZekeShotgunPickupItem : CustomInventory
{
  +INVENTORY.ALWAYSPICKUP
  States
  {
  Pickup:
    TNT1 A 0 A_SelectWeapon("MelZekeShotgun")
	TNT1 A 1
    Stop
  }
}

ACTOR MelDahliaCrossbowPickupItem : CustomInventory
{
  +INVENTORY.ALWAYSPICKUP
  States
  {
  Pickup:
    TNT1 A 0 A_SelectWeapon("MelDahliaCrossbow")
	TNT1 A 1
    Stop
  }
}

ACTOR MelAmmoBox50PickupItem : CustomInventory
{
  +INVENTORY.ALWAYSPICKUP
  States
  {
  Pickup:
    TNT1 A 0 A_SelectWeapon("MelAmmoBox50")
	TNT1 A 1
    Stop
  }
}

ACTOR MelToolboxPickupItem : CustomInventory
{
  +INVENTORY.ALWAYSPICKUP
  States
  {
  Pickup:
    TNT1 A 0 A_SelectWeapon("MelToolbox")
	TNT1 A 1
    Stop
  }
}

ACTOR MelMipFowtyPickupItem : CustomInventory
{
  +INVENTORY.ALWAYSPICKUP
  States
  {
  Pickup:
    TNT1 A 0 A_SelectWeapon("MelMipFowty")
	TNT1 A 1
    Stop
  }
}

//
#include "Actors/Characters/DEC_MEL.txt" // Mel's Player Stuff
#include "Actors/Characters/DEC_VEX.txt" // Vexler's Player Stuff
//#include "Actors/Characters/DEC_MAC.txt" // Little Mac's Player Stuff

//Enemies
#include "Actors/Enemies/DEC_ENEM.txt" // Generic Enemy Stuff
#include "Actors/Enemies/DEC_PZMB.txt" // Pistol / Rifle Zombie Enemies
#include "Actors/Enemies/DEC_SZMB.txt" // Shotgun Zombie Enemies
#include "Actors/Enemies/DEC_CZMB.txt" // Commando Zombie Enemies
#include "Actors/Enemies/DEC_IMP.txt"  // Imp Enemies
#include "Actors/Enemies/DEC_LSOUL.txt"// Lost Soul enemies
#include "Actors/Enemies/DEC_ARCH.txt"// //Archvile enemies
//#include "Actors/Enemies/DEC_SCIE.txt"  // Scientist Enemies

//Weapons
#include "Actors/Weapons/DEC_WEP1.txt" // Slot 1 Weapons (Mel Melee)
#include "Actors/Weapons/DEC_WEP2.txt" // Slot 2 Weapons (919m)
#include "Actors/Weapons/DEC_WEP3.txt" // Slot 3 Weapons (Zeke)
#include "Actors/Weapons/DEC_WEP3b.txt"// Slot 3 Weapons, continued (Dahlia, Leviathan)
#include "Actors/Weapons/DEC_WEP4.txt" // Slot 4 Weapons (Ammobox 50)
#include "Actors/Weapons/DEC_WEP5.txt" // Slot 5 Weapons
//#include "Actors/Weapons/DEC_PNOT.txt" // Punch-Out!!
#include "Actors/DEC_SFX.txt" //Special Effects (Casings, Smoke, Etc.)
#include "Actors/DEC_TEMP.txt" //Blanked out and replaced actors for the alpha

//Items
#include "Actors/DEC_ITEM.txt"

//Zand Coop Compatibility 
//#include "Actors/COOP_COMPAT.txt"