// Oxygen Handler.
// Worthless Bums 2012.


// Create an oxygen tank at the specified indices.
function createOxygenTank (%xIndex, %yIndex)
{//echo("createOxygenTank()");
	// Create oxygen tank static sprite.
	%oxygenTank = new Sprite("Oxygen Tank")
	{
		SceneLayer = 11;		// Below monsters/squad members.
		graph = 11;		// Below monsters/squad members.
		position = %position;
		scenegraph = levelSceneGraph;
		imagemap = "OxygenPickupImageMap";
		visible = true;
		size = "4 4";
		
		// Each oxygen level can refill the entire squad's oxygen tanks.
		oxygenLevel = 1;
		
		// Flags whether this oxygen tank is depleted or not.
		depleted = false;
	};
	addObjectToScene(%oxygenTank);
}