if(!isObject(SmallBrickBlockheadBot_HoleSpawnData)) datablock fxDTSBrickData (SmallBrickBlockheadBot_HoleSpawnData) {
	brickFile = "base/data/bricks/flats/1x1F.blb";
	category = "Special";
	subCategory = "Holes";
	uiName = "1x1F Blockhead Hole";
	iconName = "Add-Ons/Bot_Blockhead/icon_blockhead";

	bricktype = 2;
	cancover = 0;
	orientationfix = 1;
	indestructable = 1;

	isBotHole = 1;
	holeBot = "BlockheadHoleBot";
};
if(!isObject(SmallTwoBrickBlockheadBot_HoleSpawnData)) datablock fxDTSBrickData (SmallTwoBrickBlockheadBot_HoleSpawnData) {
	brickFile = "base/data/bricks/flats/1x2F.blb";
	category = "Special";
	subCategory = "Holes";
	uiName = "1x2F Blockhead Hole";
	iconName = "Add-Ons/Bot_Blockhead/icon_blockhead";

	bricktype = 2;
	cancover = 0;
	orientationfix = 1;
	indestructable = 1;

	isBotHole = 1;
	holeBot = "BlockheadHoleBot";
};

if(!isObject(energyDrinkItem)) datablock ItemData(energyDrinkItem)
{
	 // Basic Item Properties
	shapeFile = "Add-Ons/Server_Vore/shapes/energy_drink/energydrink.dts";
	mass = 1;
	density = 0.2;
	elasticity = 0.2;
	friction = 0.6;
	emap = true;

	//gui properties
	uiName = "Energy Drink";
	iconName = "Add-Ons/Item_Key/Icon_KeyA";
	doColorShift = true;
	colorShiftColor = "1.0 0.0 0.0 1.0";

	 // Dynamic properties defined by the scripts
	image = energyDrinkImage;
	canDrop = true;
	digestable = true;
	digestThreshold = 20;
};

if(!isObject(energyDrinkImage)) datablock ShapeBaseImageData(energyDrinkImage) {
   // Basic Item properties
//   shapeFile = "base/data/shapes/brickweapon.dts";
   shapeFile = "Add-Ons/Server_Vore/shapes/energy_drink/energydrink.dts";
   emap = true;

   // Specify mount point & offset for 3rd person, and eye offset
   // for first person rendering.
   mountPoint = 0;
   offset = "0 0 0";

   // When firing from a point offset from the eye, muzzle correction
   // will adjust the muzzle vector to point to the eye LOS point.
   // Since this weapon doesn't actually fire from the muzzle point,
   // we need to turn this off.  
   correctMuzzleVector = false;

   // Add the WeaponImage namespace as a parent, WeaponImage namespace
   // provides some hooks into the inventory system.
   className = "WeaponImage";

   // Projectile && Ammo.
   item = energyDrinkItem;
   ammo = " ";
   projectile = "";
   projectileType = "";

   //melee particles shoot from eye node for consistancy
   melee = true;
   doRetraction = false;
   //raise your arm up or not
   armReady = true;

   showBricks = false;

   //casing = " ";

   doColorShift = true;
   colorShiftColor = energyDrinkItem.colorShiftColor;

   // Images have a state system which controls how the animations
   // are run, which sounds are played, script callbacks, etc. This
   // state system is downloaded to the client so that clients can
   // predict state changes and animate accordingly.  The following
   // system supports basic ready->fire->reload transitions as
   // well as a no-ammo->dryfire idle state.

   // Initial start up state
	stateName[0]                     = "Activate";
	stateTimeoutValue[0]             = 0.0;
	stateTransitionOnTimeout[0]      = "Ready";

	stateName[1]                     = "Ready";
	stateTransitionOnTriggerDown[1]  = "PreFire";
	stateAllowImageChange[1]         = true;

	stateName[2]                    = "PreFire";
	stateScript[2]                  = "onPreFire";
	stateAllowImageChange[2]        = true;
	stateTimeoutValue[2]            = 0.01;
	stateTransitionOnTimeout[2]     = "Fire";

	stateName[3]                    = "Fire";
	stateTransitionOnTimeout[3]     = "CheckFire";
	stateTimeoutValue[3]            = 0.15;
	stateFire[3]                    = true;
	stateAllowImageChange[3]        = true;
	stateSequence[3]                = "Fire";
	stateScript[3]                  = "onFire";
	stateWaitForTimeout[3]		     = true;
	stateSequence[3]                = "Fire";

	stateName[4]                    = "CheckFire";
	stateTransitionOnTriggerUp[4]   = "StopFire";

	stateName[5]                    = "StopFire";
	stateTransitionOnTimeout[5]     = "Ready";
	stateTimeoutValue[5]            = 0.01;
	stateAllowImageChange[5]        = true;
	stateWaitForTimeout[5]          = true;
	stateSequence[5]                = "StopFire";
	stateScript[5]                  = "onStopFire";
};

function energyDrinkImage::onPreFire(%this, %obj, %slot) {
	%obj.playthread(2, shiftLeft);
}

function energyDrinkImage::onStopFire(%this, %obj, %slot) {	
	%obj.playthread(2, root);
}

function energyDrinkImage::onDigest(%this, %digestor) {
	%digestor.energyDrinkAmt  += 500;
	%digestor.stomach_stamina += getRandom(3, 10);
}

function energyDrinkImage::onFire(%this, %player, %slot) {
	if(%player.isCrouched()) {
		if(%player.inStomach) {
			messageClient(%player.client, '', "\c6You pour some of the energy drink on the stomach floor.");
			%player.drinkAmount[%player.currTool] += 0.3;
			%player.heldBy.energyDrinkAmt += 100;
			%pouredOut = 1;
		}
	} else {
		if(isObject(%player.heldBy) && %player.inStomach && getRandom(0, 20) < 3) {
			messageClient(%player.client, '', "\c6The stomach contracted right as you were taking a drink, causing some of the liquid to pour onto the stomach floor.");
			%player.drinkAmount[%player.currTool] += 0.3;
			%player.heldBy.energyDrinkAmt += 100;
			%pouredOut = 1;
		}
	}
	if(!%pouredOut) %this.onDigest(%player);
	
	if(%player.drinkAmount[%player.currTool]++ == 4 && !%player.client.isAdmin) {
		%player.drinkAmount[%player.currTool] = 0;
		messageClient(%player.client, 'MsgItemPickup', '', %player.currTool, 0);
		%player.playThread(1, "root");
		%player.unmountImage(%this.mountPoint);
		%player.tool[%player.currTool] = 0;
		%player.currTool = -1;
	}
	
	if(!%pouredOut) messageClient(%player.client, '', "\c6Drank a bit of the energy drink. You feel ecstatic.");  
}