function OnSceneLoad(screen)
    LoadData(screen)
    DefaultOnSceneLoad('data/Scenes/11_Restaurant_Bar_HO.lua', 'hidden_object', 'data/Scenes/11_Restaurant_Main.lua')
    
    play_field:GetObject('layer_box_open'):SetVisible(false);
    play_field:GetObject('Candy_2'       ):SetVisible(false);
    play_field:GetObject('Bun_2'         ):SetVisible(false);
    
    AddTask(CreateTask('BOTTLE',     'BOTTLES',      'Bottle_1', 'Bottle_2', 'Bottle_3', 'Bottle_4', 'Bottle_5', 'Bottle_6', 'Bottle_7', 'Bottle_8'));
    AddTask(CreateTask('BUN',        'BUNS',         'Bun_1',    'Bun_2',    'Bun_3'));
    AddTask(CreateTask('HARD_CANDY', 'HARD_CANDIES', 'Candy_1',  'Candy_2',  'Candy_3'));
    
    AddRandomTasks( CreateTask('BRUSH',          '', 'Brush'),
                    CreateTask('CAKE',           '', 'Cake'),
                    CreateTask('CARD',           '', 'Card'),
                    CreateTask('CIGAR',          '', 'Cigar'),
                    CreateTask('CIGARCASE',      '', 'Cigarcase'),
                    CreateTask('GOLDENBUG',      '', 'GoldenBug'),
                    CreateTask('HANDBELL',       '', 'Handbell'),
                    CreateTask('LANTERN',        '', 'Lantern'),
                    CreateTask('BRACELET',       '', 'Necklace'),
                    CreateTask('ONION',          '', 'Onion'),
                    CreateTask('ALMONDS',        '', 'Almonds'),
                    CreateTask('CHERRY',         '', 'Cherry'),
                    CreateTask('CINNAMON',       '', 'Cinnamon'),
                    CreateTask('PEPPER_MILL',    '', 'CoffeeMill'),
                    CreateTask('DIRIGIBLE',      '', 'Dirigible'),
                    CreateTask('EARRING',        '', 'Earring'),
                    CreateTask('LEMON',          '', 'Lemon'),
                    CreateTask('PEPPER',         '', 'Pepper'),
                    CreateTask('SALVER',         '', 'Salver'),
                    CreateTask('WHISK',          '', 'Whisk'));
    
    RegisterToolFindInfo('12_wine_bottle', nil, nil, nil);
    
    RegisterActiveObject('area_shuhlada',   function(obj_name)
                                                play_field:GetObject('area_shuhlada'):SetVisible(false);
                                                play_field:GetObject('layer_box_open'):ChangeOpacity(0, 1, OPEN_DOOR_TIME);
                                                play_field:GetObject('Candy_2'       ):ChangeOpacity(0, 1, OPEN_DOOR_TIME);
                                                play_field:GetObject('Bun_2'         ):ChangeOpacity(0, 1, OPEN_DOOR_TIME);
                                                
                                                play_field:GetObject('layer_box_open'):SetVisible(true);
                                                play_field:GetObject('Candy_2'       ):SetVisible(true);
                                                play_field:GetObject('Bun_2'         ):SetVisible(true);
                                                
                                                PlaySound('11_OpenShelf')
                                            end,
                                            function(obj_name)
                                                play_field:GetObject('area_shuhlada'):SetVisible(false);
                                                play_field:GetObject('layer_box_open'):SetVisible(true)
                                                play_field:GetObject('Candy_2'       ):SetVisible(true)
                                                play_field:GetObject('Bun_2'         ):SetVisible(true)
                                            end)
end

function OnSceneFree(screen)
    DefaultOnSceneFree()
    FreeData(screen)
end

function OnUpdate(dt)
    DefaultOnUpdate(dt)
end

function OnAllItemsFound()
    DefaultOnAllItemsFound()
end

function OnLose()
    DefaultOnLose()
end

function OnExit()
    DefaultOnExit()
end

function OnClose()
    DefaultOnClose()
end

function OnObjectMouseEnter(object)
    DefaultOnObjectMouseEnter(object)
end

function OnObjectMouseLeave(object)
    DefaultOnObjectMouseLeave(object)
end

function OnObjectMouseDown(object)
    local is_wrong_click = not DefaultOnObjectMouseDown(object)
    local obj_name = object:GetName()
    local pf = play_field

    DefaultOnObjectMouseDownProcessed(is_wrong_click);
end

function OnObjectMouseUp(object)
    DefaultOnObjectMouseUp(object)
end

function OnObjectFound(object)
    DefaultOnObjectFound(object)
end

function OnToolFound(tool)
    DefaultOnToolFound(tool)
end

function OnToolApply(tool, object)
    DefaultOnToolApply(tool, object)
end

function OnObjectReachPanel(object)
    DefaultOnObjectReachPanel(object)
end

function OnButtonPress(title)
    DefaultOnButtonPress(title)
end

function OnMouseMove(previous_pos, current_pos)
    DefaultOnMouseMove(previous_pos, current_pos)
end

function OnSetTool(tool)
    DefaultOnSetTool(tool)
end

function LevelLoaded(level)
end

function OnSceneDestroy(playfield)
    DefaultOnSceneDestroy(playfield)
end

--------------------------------------------------------------------------------
-- CLEAR_ON_SAVE_BEGIN
-- Do not edit code listed below (generated by the editor on each save)
function LoadData(screen)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Layers/background.jpg',0,0,1024,768,1,0)
	anim:SetHotSpot(512,384)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('background',anim,512,384,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Animations/Fly_anim.png',0,0,33,88,23,10)
	anim:SetHotSpot(15,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Fly_anim',anim,624,609,104,90,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Bottle_1.png',0,0,76,113,1,0)
	anim:SetHotSpot(38,56)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bottle_1',anim,230,56,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Bottle_2.png',0,0,116,52,1,0)
	anim:SetHotSpot(58,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bottle_2',anim,537,50,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Bottle_3.png',0,0,42,68,1,0)
	anim:SetHotSpot(21,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bottle_3',anim,545,119,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Bottle_4.png',0,0,95,45,1,0)
	anim:SetHotSpot(47,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bottle_4',anim,474,454,101,20,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Bottle_5.png',0,0,140,175,1,0)
	anim:SetHotSpot(70,87)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bottle_5',anim,898,296,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Bottle_6.png',0,0,56,103,1,0)
	anim:SetHotSpot(28,51)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bottle_6',anim,561,521,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Bottle_7.png',0,0,244,80,1,0)
	anim:SetHotSpot(122,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bottle_7',anim,779,462,101,45,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Bottle_8.png',0,0,106,189,1,0)
	anim:SetHotSpot(53,94)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bottle_8',anim,336,406,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Brush.png',0,0,86,111,1,0)
	anim:SetHotSpot(43,55)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Brush',anim,572,333,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Bun_1.png',0,0,63,46,1,0)
	anim:SetHotSpot(31,23)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bun_1',anim,594,642,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Bun_2.png',0,0,43,42,1,0)
	anim:SetHotSpot(21,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bun_2',anim,315,262,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Bun_3.png',0,0,64,43,1,0)
	anim:SetHotSpot(32,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bun_3',anim,30,328,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Cake.png',0,0,73,52,1,0)
	anim:SetHotSpot(36,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Cake',anim,159,162,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Candy_1.png',0,0,50,52,1,0)
	anim:SetHotSpot(25,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Candy_1',anim,705,586,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Candy_2.png',0,0,42,37,1,0)
	anim:SetHotSpot(21,18)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Candy_2',anim,169,296,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Candy_3.png',0,0,42,38,1,0)
	anim:SetHotSpot(21,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Candy_3',anim,49,114,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Card.png',0,0,56,67,1,0)
	anim:SetHotSpot(28,33)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Card',anim,340,68,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Cigar.png',0,0,82,25,1,0)
	anim:SetHotSpot(41,12)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Cigar',anim,985,509,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Cigarcase.png',0,0,118,100,1,0)
	anim:SetHotSpot(59,50)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Cigarcase',anim,965,561,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/GoldenBug.png',0,0,73,62,1,0)
	anim:SetHotSpot(36,31)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('GoldenBug',anim,942,255,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Handbell.png',0,0,83,78,1,0)
	anim:SetHotSpot(41,39)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Handbell',anim,578,190,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Lantern.png',0,0,81,119,1,0)
	anim:SetHotSpot(40,59)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Lantern',anim,144,59,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Necklace.png',0,0,81,52,1,0)
	anim:SetHotSpot(40,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Necklace',anim,828,604,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Onion.png',0,0,58,45,1,0)
	anim:SetHotSpot(29,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Onion',anim,573,441,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Layers/Basket_layer.png',0,0,144,154,1,0)
	anim:SetHotSpot(72,77)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Basket_layer',anim,334,444,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Layers/Book_layer.png',0,0,45,84,1,0)
	anim:SetHotSpot(22,42)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Book_layer',anim,319,68,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Layers/Bottle_layer.png',0,0,190,119,1,0)
	anim:SetHotSpot(95,59)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Bottle_layer',anim,822,508,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Layers/layer_box_open.png',0,0,262,195,1,0)
	anim:SetHotSpot(131,97)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_box_open',anim,261,308,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Layers/layer_box_over.png',0,0,38,52,1,0)
	anim:SetHotSpot(19,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('layer_box_over',anim,138,346,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Layers/Table_layer.png',0,0,88,95,1,0)
	anim:SetHotSpot(44,47)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Table_layer',anim,572,548,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/area.png',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('area_shuhlada',anim,235,265,105,-12,25,10)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Almonds.png',0,0,44,32,1,0)
	anim:SetHotSpot(22,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Almonds',anim,363,172,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Cherry.png',0,0,41,24,1,0)
	anim:SetHotSpot(20,12)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Cherry',anim,746,278,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Cinnamon.png',0,0,69,39,1,0)
	anim:SetHotSpot(34,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Cinnamon',anim,236,166,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/CoffeeMill.png',0,0,41,64,1,0)
	anim:SetHotSpot(20,32)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('CoffeeMill',anim,595,56,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Dirigible.png',0,0,62,47,1,0)
	anim:SetHotSpot(31,23)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Dirigible',anim,430,601,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Earring.png',0,0,41,38,1,0)
	anim:SetHotSpot(20,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Earring',anim,110,497,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Lemon.png',0,0,49,51,1,0)
	anim:SetHotSpot(24,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Lemon',anim,943,408,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Pepper.png',0,0,43,30,1,0)
	anim:SetHotSpot(21,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Pepper',anim,521,180,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Salver.png',0,0,95,134,1,0)
	anim:SetHotSpot(47,67)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Salver',anim,825,207,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Items/Whisk.png',0,0,145,43,1,0)
	anim:SetHotSpot(72,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Whisk',anim,181,210,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/11_Restaurant/Zone_HO/Layers/BG_Podnos.png',0,0,58,91,1,0)
	anim:SetHotSpot(29,45)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('BG_Podnos',anim,796,235,102,0,1,1)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
