function OnSceneLoad(screen)
    LoadData(screen)
    DefaultOnSceneLoad('data/Scenes/15_Workshop_Floor_HO.lua', 'hidden_object', 'data/Scenes/15_Workshop_Main.lua')
    
    AddTask(CreateTask('CANDY',  'CANDIES',  'Candy1', 'Candy2'));
    AddTask(CreateTask('CLEW',   'CLEWS',    'Clew1',  'Clew2', 'Clew3'));
    AddTask(CreateTask('KEY',    'KEYS',     'Key1',   'Key2',  'Key3'));
    AddTask(CreateTask('PAWN',   'PAWNS',    'Pawn1',  'Pawn2'));
    AddTask(CreateTask('WRENCH', '',         'Wrench'));
    
    AddRandomTasks( CreateTask('ARROW',        '',         'Arrow'),
                    CreateTask('CANDLESTICK',  '',         'Candlestick'),
                    CreateTask('EYE',          '',         'Eye'),
                    CreateTask('FEATHER',      '',         'Feather'),
                    CreateTask('LIZARD',       '',         'Lizard'),
                    CreateTask('ROOK',         '',         'Rook'),
                    CreateTask('SCISSORS',     'SCISSORS', 'Scissors1', 'Scissors2'),
                    CreateTask('SHELL',        '',         'Shell'),
                    CreateTask('SPIDER',       '',         'Spider'));
    
    RegisterToolFindInfo('15_wrench')
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/15_Workshop/Zone_HO_floor/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/15_Workshop/Zone_HO_floor/Items/Arrow.png',0,0,276,32,1,0)
	anim:SetHotSpot(138,16)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Arrow',anim,486,258,101,-40,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Items/Candlestick.png',0,0,67,209,1,0)
	anim:SetHotSpot(33,104)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Candlestick',anim,156,131,101,-7,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Items/Candy1.png',0,0,84,56,1,0)
	anim:SetHotSpot(42,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Candy1',anim,583,641,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Items/Candy2.png',0,0,85,57,1,0)
	anim:SetHotSpot(42,28)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Candy2',anim,871,117,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Items/Clew1.png',0,0,132,117,1,0)
	anim:SetHotSpot(66,58)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Clew1',anim,77,542,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Items/Clew2.png',0,0,92,95,1,0)
	anim:SetHotSpot(46,47)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Clew2',anim,436,448,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Items/Clew3.png',0,0,111,83,1,0)
	anim:SetHotSpot(55,41)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Clew3',anim,850,60,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Items/Eye.png',0,0,149,89,1,0)
	anim:SetHotSpot(74,44)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Eye',anim,791,528,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Items/Feather.png',0,0,57,97,1,0)
	anim:SetHotSpot(28,48)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Feather',anim,408,195,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Items/Key1.png',0,0,47,108,1,0)
	anim:SetHotSpot(23,54)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Key1',anim,528,157,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Items/Key2.png',0,0,138,55,1,0)
	anim:SetHotSpot(69,27)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Key2',anim,940,173,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Items/Key3.png',0,0,126,34,1,0)
	anim:SetHotSpot(63,17)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Key3',anim,237,224,101,24,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Items/Lizard.png',0,0,67,145,1,0)
	anim:SetHotSpot(33,72)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Lizard',anim,222,136,101,-9,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Items/Pawn1.png',0,0,52,65,1,0)
	anim:SetHotSpot(26,32)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Pawn1',anim,154,391,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Items/Pawn2.png',0,0,56,64,1,0)
	anim:SetHotSpot(28,32)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Pawn2',anim,571,384,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Items/Rook.png',0,0,50,74,1,0)
	anim:SetHotSpot(25,37)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Rook',anim,482,164,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Items/Scissors1.png',0,0,129,95,1,0)
	anim:SetHotSpot(64,47)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Scissors1',anim,332,568,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Items/Scissors2.png',0,0,62,162,1,0)
	anim:SetHotSpot(31,81)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Scissors2',anim,648,356,101,30,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Items/Shell.png',0,0,81,54,1,0)
	anim:SetHotSpot(40,27)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Shell',anim,969,437,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Items/Spider.png',0,0,85,63,1,0)
	anim:SetHotSpot(42,31)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Spider',anim,638,252,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Layers/Layer_1_eye.png',0,0,113,60,1,0)
	anim:SetHotSpot(56,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_1_eye',anim,795,487,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Layers/Layer_1_nozhnicy01.png',0,0,64,61,1,0)
	anim:SetHotSpot(32,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_1_nozhnicy01',anim,305,543,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Layers/Layer_2_eye.png',0,0,70,52,1,0)
	anim:SetHotSpot(35,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_2_eye',anim,790,533,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Layers/Layer_2_kljuch02.png',0,0,40,48,1,0)
	anim:SetHotSpot(20,24)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_2_kljuch02',anim,913,255,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Layers/Layer_2_nozhnicy01.png',0,0,48,44,1,0)
	anim:SetHotSpot(24,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_2_nozhnicy01',anim,373,556,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Layers/Layer_kljuch01.png',0,0,50,89,1,0)
	anim:SetHotSpot(25,44)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_kljuch01',anim,532,198,103,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Layers/Layer_kljuch02.png',0,0,106,67,1,0)
	anim:SetHotSpot(53,33)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_kljuch02',anim,813,237,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Layers/Layer_klubka01.png',0,0,134,141,1,0)
	anim:SetHotSpot(67,70)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_klubka01',anim,67,527,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Layers/Layer_klubok02.png',0,0,105,108,1,0)
	anim:SetHotSpot(52,54)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_klubok02',anim,430,458,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Layers/Layer_konfeta02.png',0,0,32,29,1,0)
	anim:SetHotSpot(16,14)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_konfeta02',anim,815,110,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Layers/Layer_nozhnicy02.png',0,0,113,121,1,0)
	anim:SetHotSpot(56,60)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_nozhnicy02',anim,624,386,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Layers/Layer_shell.png',0,0,59,74,1,0)
	anim:SetHotSpot(29,37)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_shell',anim,990,446,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Layers/Layer_svechi.png',0,0,83,134,1,0)
	anim:SetHotSpot(41,67)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_svechi',anim,133,186,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Items/Wrench.png',0,0,90,64,1,0)
	anim:SetHotSpot(45,32)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Wrench',anim,956,278,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/15_Workshop/Zone_HO_floor/Layers/Layer_Candy2.png',0,0,51,45,1,0)
	anim:SetHotSpot(25,22)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Layer_Candy2',anim,837,126,102,0,1,1)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
