loadresource("data\\10\\12\\0005.png","motor05", 5);
loadresource("data\\10\\12\\motor_big1.png","motor_big1", 6);
loadresource("data\\10\\12\\motor_big2.png","motor_big2", 7);
loadresource("data\\10\\12\\kanistra.png","kanistra", 7);
loadresource("data\\10\\12\\0018.jpg","motor18",18);


AddObjForCur()
SetFlagsForSatButtons()



pl_kan={
622,360,
622+100,360,
622+100,360+100,
622,360+100,
}
CreatePolygon(1011,4,"pl_kan")

addstaticobjecttogame(1030,"kanistra",706 ,138 ,"",0,0,318,438);
addstaticobjecttogame(1031,"kanistra",671 ,146  ,"",320,0,354,438);
speciale_action(2,1030)
speciale_action(2,1031)

addstaticobjecttogame(1005,"motor05",98 ,6  ,""); --рамка
CloseBtnX,CloseBtnY,SkipBtnX,SkipBtnY,HelpBtnX,HelpBtnY=Coords(1005)


HelpWidth=36
HelpHeight=36
CreateHelpBtn(HelpBtnX,HelpBtnY,36,36);


if not (flags.obj1015 and flags.obj1013 and flags.obj1016 and flags.obj1017) then
    AddSkipBtn(SkipBtnX,SkipBtnY);
end;


CloseWidth=34
CloseHeight=34
CreateCloseBtn(CloseBtnX,CloseBtnY);

if (flags.obj1015 and flags.obj1013 and flags.obj1016 and flags.obj1017) then
    HideHelp();
end;

addstaticobjecttogame(1006,"motor_big2",107,21 ,"",0,258,120,112); --крышка открытая
addactivobjecttogame(1007,"motor_big2",809,25 ,"","",0,0,307,132,106,166); --патрубок отсоед
Set_Anim_Cur(1007,4);
addactivobjecttogame(1008,"motor_big2",715,479,"","",0,0,307,0,153,132); --контакт отсоед
Set_Anim_Cur(1008,4);
addstaticobjecttogame(1009,"motor_big1",111,21 ,"",0,0,804,604); --люк
addstaticobjecttogame(1010,"motor_big2",644,360,"",120,427,77,76); --крышка на баке
speciale_action(2,1010);

addstaticobjecttogame(1071,"motor_big1",622,360,"",0,604,293,222); --бак
addactivobjecttogame(1012,"motor_big2",481,367,"","",0,0,0,0,307,258); --шланг отсоед
Set_Anim_Cur(1012,4);
addstaticobjecttogame(1013,"motor_big1",517,258,"",614,604,250,359); --шланг соед
speciale_action(2,1013);
speciale_action(10,1013);
setcolor(1013,1,1,1,0.35);
addactivobjecttogame(1014,"motor_big2",477,29 ,"","",0,0,413,132,99,216); --провод отсоед
Set_Anim_Cur(1014,4);
addstaticobjecttogame(1015,"motor_big2",566,21 ,"",120,258,112,169); --провод соед
speciale_action(2,1015);
speciale_action(10,1015);
setcolor(1015,1,1,1,0.35);
addstaticobjecttogame(1016,"motor_big2",598,129,"",197,427,37,32); --контакт соед
speciale_action(2,1016);
speciale_action(10,1016);
setcolor(1016,1,1,1,0.35);
addstaticobjecttogame(1017,"motor_big1",336,251,"",293,604,321,347); --патрубок соед
speciale_action(2,1017);
speciale_action(10,1017);
setcolor(1017,1,1,1,0.35);


obl1={
111+398,21+233,
111+398+54,21+233,
111+398+54,21+233+52,
111+398,21+233+52
}

obl2={
111+446,21+232,
111+446+92,21+232,
111+446+92,21+232+91,
111+446,21+232+91
}

obl3={
111+472,21+95,
111+472+70,21+95,
111+472+70,21+95+58,
111+472,21+95+58
}


CreatePolygon(1020,4,"obl1")
OnMouseOver(1020,true)
Set_Anim_Cur(1020,4)

CreatePolygon(1021,4,"obl2")
OnMouseOver(1021,true)
Set_Anim_Cur(1021,4)

CreatePolygon(1022,4,"obl3")
OnMouseOver(1022,true)
Set_Anim_Cur(1022,4)

Set_Anim_Cur(1011,4)
addstaticobjecttogame(1018,"motor18",111,21 ,"",0,0,804,604); --бг

if flags.obj1017 then
    speciale_action(2,1007);
    speciale_action(2,1017);
    setcolor(1017,1,1,1,1);
    OnMouseOver(1021,false)
    Set_Anim_Cur(1021,3)
    ActivateObject(1021,false)
    Set_Anim_Cur(1007,3)
    ActivateObject(1007,false)    
end;
if flags.obj1016 then
    Set_Anim_Cur(1008,3)
    speciale_action(2,1008);
    speciale_action(2,1016);
    setcolor(1016,1,1,1,1);

    ActivateObject(1008,false)        
end;
if flags.obj1013 then
    speciale_action(2,1012);
    speciale_action(2,1013);
    setcolor(1013,1,1,1,1);
    OnMouseOver(1020,false)
    Set_Anim_Cur(1020,3)
    ActivateObject(1020,false)
    Set_Anim_Cur(1012,3)
    ActivateObject(1012,false)        
end;
if flags.obj1015 then
    speciale_action(2,1014);
    speciale_action(2,1015);
    setcolor(1015,1,1,1,1);
    OnMouseOver(1022,false)
    Set_Anim_Cur(1022,3)
    ActivateObject(1022,false)
    Set_Anim_Cur(1014,3)
    ActivateObject(1014,false)        
end;

if flags.obj1017 and flags.obj1016 and flags.obj1013 and flags.obj1015 then
  if s_obj>0 then
  AddObjToMouse(s_obj)
  s_obj=0
  end;
end;
Block_Show_Cur(true)
WaitRender();