class 'l_09_Andreas_house_Z_Tool_rack' (ZoomZone)

function l_09_Andreas_house_Z_Tool_rack:__init(name, mode, PlayField)
	ZoomZone.__init(self, name, mode, PlayField)

	 self:entityHide('zt_spade_handle', 'area_find_shovel')


	local function on_apply_06_handler(event)	
	    
	    self:entityShow('area_find_shovel','zt_spade_handle')
	    self:entityHide('area_apply_06_handle')
	    self.playfield:entityShow('spade_handle')
	   
	    if not event.save then
	    	self:playSound('09_apply_06_handle')
	    	-- self.playfield:getEntityNamed(''):ChangeOpacity(0,1,0.5)
	    	-- self.playfield:getEntityNamed(''):ChangeOpacity(0,1,0.5)
	    	self:getEntityNamed('zt_spade_handle'):ChangeOpacity(0, 1, 0.5)

	    else
		end
		
	end
	self:registerToolApplyInfo('06_handle', 'area_apply_06_handle', on_apply_06_handler, 'BBT_09_NEED_HANDLE')

	local function find_shovel(event)
   		self:entityHide(event.target)
   		self:entityHide('zt_spade_handle','zt_spade')
   		self.playfield:entityHide('spade_handle')
    	if IsToolFound('09_screwdriver') then
			self:closeAndDisable() 
    	end
	end
	self:registerToolFindInfo('09_shovel', 'area_find_shovel', find_shovel)

	local function find_09_screwdriver(event)
   		self:entityHide(event.target)
   		self:entityHide('zt_screwdriver')
		if IsToolFound('09_shovel') then
			self:closeAndDisable() 
    	end
	end
	self:registerToolFindInfo('09_screwdriver', 'area_find_screwdriver', find_09_screwdriver)

end

--------------------------------------------------------------------------------
--                      GENERATED CONTENT. DO NOT EDIT.                       --
--------------------------------------------------------------------------------

function l_09_Andreas_house_Z_Tool_rack:CreateLoaderTable()
	local objects =
	{
		{ name = 'zt_bg',  entityType = 'SpriteEntity',  x = 512,  y = 384,  order = 0,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Scenes/09_Andreas_house/Z_Tool_rack/zt_bg.jpg',  width = 384,  height = 512,  },
		{ name = 'zt_spade',  entityType = 'SpriteEntity',  x = 436,  y = 296,  order = 0,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Scenes/09_Andreas_house/Z_Tool_rack/zt_spade.png',  width = 192,  height = 244,  },
		{ name = 'zt_spade_handle',  entityType = 'SpriteEntity',  x = 405,  y = 169,  order = 0,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Scenes/09_Andreas_house/Z_Tool_rack/zt_spade_stik.png',  width = 42,  height = 82,  },
		{ name = 'area_find_shovel',  entityType = 'SpriteEntity',  x = 428.196,  y = 268.531,  order = 0,  angle = -13,  color = {r = 1, g = 1, b = 1, a = 0.00392157},  editingLocked = false,  treeItemIsExpanded = true,  hotSpot = {x = 80, y = 123.744},  width = 160,  height = 247,  },
		{ name = 'area_apply_06_handle',  entityType = 'SpriteEntity',  x = 414.5,  y = 276,  order = 0,  color = {r = 1, g = 1, b = 1, a = 0.00392157},  editingLocked = false,  treeItemIsExpanded = true,  hotSpot = {x = 92.5, y = 146},  width = 185,  height = 292,  },
		{ name = 'zt_screwdriver',  entityType = 'SpriteEntity',  x = 577,  y = 327,  order = 0,  editingLocked = false,  treeItemIsExpanded = true,  hotSpot = {x = 72, y = 84},  texturePath = 'Data/Textures/Scenes/09_Andreas_house/Z_Tool_rack/zt_screwdriver.png',  width = 144,  height = 168,  },
		{ name = 'area_find_screwdriver',  entityType = 'SpriteEntity',  x = 589.397,  y = 325.311,  order = 30,  angle = -53,  color = {r = 1, g = 1, b = 1, a = 0.00392157},  editingLocked = false,  treeItemIsExpanded = false,  hotSpot = {x = 100, y = 36.4887},  width = 200,  height = 73,  },
	}
	return objects
end
