He = 1004;
She = 1003;
SPEED = 2;

function LevelComplete()
	
	
	if obj.sponge.is_stored then
		UnStoreObj(obj.sponge.id);
	end;
	if obj.charcoal.is_stored then
		UnStoreObj(obj.sponge.id);
	end;
	
	

	flags = {};
	
	flags.glove_taken = true;	
	flags.rentgen_taken = true;
	flags.nvg_taken = true;
	flags.restore_sheet = false;	
	flags.bikrent=false;	
	
	SaveGame1();

	ShowMenu(false);
	delete_tree_leaf("Root","gates");
	if gloveselect then	RotateToPos(2);		end;
	if nvgselect then	RotateToPos(3);			end;
	if rentgenselect then	RotateToPos(1);			end;
	if scanerselect then	RotateToPos(0);			end;
	obj={}
	NextLevel(4);
	
end;
flags.glove_taken = true;	
flags.rentgen_taken = true;
flags.nvg_taken = true;
dofile("script\\gamemenu.lua");
dofile("script\\lib.lua");
set_inpun_fun("gameinput");
flags.items_collected = false;
flags["first_time_load"] = true;
flags["path_is_clear"] = false;
flags["bull_anim_played"] = false;
flags["start_draw"] = true;
flags["board_is_active"] = true;
flags["mini1_complete"] = true;
flags["comics1"]=false;
flags["comics2"]=false;
flags["comicsend1"]=false;
flags["desk_game"] = false;
flags["mini1"] = false;
flags["finish"] = false;
flags["items"] = 0;
flags["bull"] = false;
flags["starting_hint"] = false;
flags["bull0"] = false;
flags["bull1"] = false;
flags["bull2"] = false;
flags["bull3"] = false;
flags["bull4"] = false;
flags["bull5"] = false;
flags.bullfinish=false;

flags.glove_vkl=false;
flags.glove_vikl=false;
flags.ngv_vkl=false;
flags.ngv_vikl=false;
flags.rentgen_vkl=false;
flags.rentgen_vikl=false;
pointer_is_usable=false

flags.light1=true;

flags.rentgen=false;

flags.plawes = false;
flags.plawes1 = false;

flags.light1=true;
flags.light=false;
flags.nv_done=true;

flags.nvg_block=false;
-- addstaticobjecttogame(1000002,"menu",-78,624,"");
if flags.restore_sheet then
	LoadGame();
	AddTool();
end;
flags.restore_sheet = true;

add_tree_leaf("Root","gates",3,0);-- Добавляет лист в дерево  КАБИНЕТ
AddTxt();

dofile("./data/3/0/res.lua");

flags.start_draw = true;


if flags.cango then
-- StopEmiter("Highlight")
Set_Cursor(700,3);
for i=10001,10014 do
Set_Cursor(i,3)
end
else
StartEmiter("Highlight")
end

if not flags.rentgen then
rentgen_is_usable=true;

end

SetCurrentLeaf("gates",3,0);
StartAnimation( 5555555555,5,5 );

ShowMenu(false);
declineGadjet=false;
-- playfile(".\\sound\\037.ogg",true,true);
playeffect("037",true)
c("3 lvl")
