playeffect("young",true)

if not flags.firstloc16 then
  flags.firstloc16=true
  CreatePlashechka("490")
end;

setCursor(obj.door_KoridorBratyev_16_0.id,6);
setCursor(obj.door_YoungerHidden_16_0.id,2);
setCursor(obj.mini_YoungerBust_16_0.id,2);
setCursor(obj.mini_YoungerKover_16_0.id,2);
setCursor(obj.mini_Masti_16_0.id,2);

function SelectRandom()
  if not neighbors.YoungerHidden.lock then
    giveMeHint(obj.door_YoungerHidden_16_0.id)
  return end
  if obj.fomka_15_13 and obj.fomka_15_13.is_collapsed
  and not neighbors.YoungerKover.lock then
    giveMeHint(obj.mini_YoungerKover_16_0.id)
  return end
  if obj.vstavka_18_0 and obj.vstavka_18_0.is_collapsed
  and not neighbors.Masti.lock then
    giveMeHint(obj.mini_Masti_16_0.id)
  return end
  if neighbors.ZalBratyevFonar.lock and not neighbors.YoungerBust.lock then
    giveMeHint(obj.mini_YoungerBust_16_0.id)
  return end
  CreatePlashechka("10001")
end

if flags.YoungerHidden2 then
  neighbors.YoungerHidden.lock=false
end;
if neighbors.YoungerBust.lock then
  set_visible_object(obj.mini_YoungerBust_16_0.id,false)
end
if neighbors.YoungerHidden.lock then
  set_visible_object(obj.door_YoungerHidden_16_0.id,false)
else
  set_visible_object(obj.door_YoungerHidden_16_0.id,true)
end
if neighbors.YoungerKover.lock then
  set_visible_object(obj.mini_YoungerKover_16_0.id,false)
end
if flags.kover then
  set_visible_object(obj.kover_16_0.id,true)
else
  set_visible_object(obj.kover_16_0.id,false)
end
if flags.podkovrom then
  set_visible_object(obj.tajnik_16_0.id,true)
else
  set_visible_object(obj.tajnik_16_0.id,false)
end
if neighbors.Masti.lock then
  set_visible_object(obj.mini_Masti_16_0.id,false)
end
if flags.otkrylBust then
  set_visible_object(obj.postam_16_0.id,true)
else
  set_visible_object(obj.postam_16_0.id,false)
end
if flags.vstavkaVstavlena then
  set_visible_object(obj.yaschik_16_0.id,true)
else
  set_visible_object(obj.yaschik_16_0.id,false)
end

flags.younger = true

function gameinput (sender,obj_id,attachedID)
  sendersProcessing(sender,obj_id,attachedID)
  if sender==1 then
    if obj_id == obj.door_KoridorBratyev_16_0.id then
      jump("Backyard");
    end;
    if obj_id == obj.door_YoungerHidden_16_0.id then
      flags.is_hidden_loc = true;
      jump("YoungerHidden");
    end;
    if obj_id == obj.mini_YoungerBust_16_0.id then
      CreateSatelite("YoungerBust");
      playeffect("sat")
    end;
    if obj_id == obj.mini_YoungerKover_16_0.id then
      CreateSatelite("YoungerKover");
      playeffect("sat")
    end;
    if obj_id == obj.mini_Masti_16_0.id then
      CreateSatelite("Masti");
      playeffect("sat")
    end;
  end
  -- if sender == 8 then
    -- dofile("./data/16/0/comics.lua")
  -- end
end


