ACTOR "Night vision Goggles" : CustomInventory Replaces Infrared 31038
{
    //$Category DN3D Items
	Inventory.PickupMessage "\ckNight vision Goggles"
	Inventory.PickupSound "NightVision/Pick"
    Inventory.Icon "NIGHVISO"
    Inventory.Amount 100
    Inventory.MaxAmount 100
	Inventory.InterHubAmount 100
	+INVENTORY.PERSISTENTPOWER
    +INVENTORY.INVBAR
	+COUNTITEM
    Scale 0.75
	Tag "Night vision Goggles" 
    States
    {
    Spawn:
        NIVI A -1
        Stop
	Pickup:
	    TNT1 A 1 A_JumpIfInventory("Night vision Goggles",100,"Nope")
		TNT1 A 1 A_GiveInventory("NightVisorAmmo",100)
		TNT1 A 1 ACS_Execute(512,0,0,0,0)
		Stop
	Nope:
	    TNT1 A 1
	    Fail
    Use:
   	    TNT1 A 1 ACS_NamedExecuteAlways("ActivateNightVisor")
		Fail	    
    }
}

ACTOR NightVisorAmmo : Ammo
{
	+IGNORESKILL
	Inventory.Amount 1
	Inventory.MaxAmount 100
}

ACTOR NightVisorActive : PuzzleItem
{	
    Inventory.MaxAmount 1		
    -INVENTORY.INVBAR	
}

ACTOR NightVisorEffect : PowerupGiver
{
    Powerup.Duration -4
    Powerup.Type "Torch"
    +INVENTORY.AUTOACTIVATE
    +INVENTORY.ALWAYSPICKUP
    -INVENTORY.INVBAR
    +INVENTORY.QUIET
    +DONTSPLASH
}