:farm_animal_feed_bin_empty
  Player "This is where I should put the animal feed."

:farm_animal_feed_bin_full
  Player "This bin is filled with animal feed. It should be enough to feed a grown cow or sheep for a day."

:chicken_feed_bin_empty
  Player "I can put bird feed here."

:chicken_feed_bin_full
  Player "This is bird feed. It should be enough to feed a grown bird for a day."

:no_space_to_milk
  Player "I don't have room on my backpack to store the milk."

:no_space_to_wool
  Player "I don't have room on my backpack to store the wool."

:play_animal_balloon
  if farm animal upsetLevel > 0
    if farm animal upsetLevel > 3
      js Variables.creatureEvent.requestBalloon(Balloons.ANGER);
    else
      js Variables.creatureEvent.requestBalloon(Balloons.SILENCE);
    end
  else
    js Variables.creatureEvent.requestBalloon(Balloons.HEART);
  end

:talk_to_animal
  if !Variables.creatureData.spokenTo
    js Variables.creatureData.spokenTo = true
  end

  include play_animal_balloon

:default_milker_animal_talk
  if farm animal age > 0
    if farm animal upsetLevel > 3
      Player "<color:name><var:creatureName></color> looks <color:important>angry</color> today. Am I forgetting to feed her?"
      return
    end

    if farm animal upsetLevel > 0
      Player "<color:name><var:creatureName></color> looks <color:important>upset</color> today. Did I do something wrong?"
      return
    end

    if farm animal milked
      Player "Good girl <color:name><var:creatureName></color>. You look very happy today."
      return
    end

    if farm animal hasMilk
      if tool equipped milker
        use tool
      else
        Player "Good girl <color:name><var:creatureName></color>. Looks like you have produced some milk."
      end

      return
    end

    Player "<color:name><var:creatureName></color> didn't produce milk today. Did I do something wrong?"
    return
  end
  
  Player "Good girl <color:name><var:creatureName></color>. Welcome to your new home."

:default_clippers_animal_talk
  if farm animal age > 0
    if farm animal upsetLevel > 3
      Player "<color:name><var:creatureName></color> looks <color:important>angry</color> today. Am I forgetting to feed her?"
      return
    end

    if farm animal upsetLevel > 0
      Player "<color:name><var:creatureName></color> looks <color:important>upset</color> today. Did I do something wrong?"
      return
    end

    if farm animal sheared
      Player "Good girl <color:name><var:creatureName></color>. You look very happy today."
      return
    end

    if farm animal hasWool
      if tool equipped clippers
        use tool
      else
        Player "Good girl <color:name><var:creatureName></color>. It's time to shear your wool."
      end

      return
    end

    Player "Good girl <color:name><var:creatureName></color>."
    return
  end
  
  Player "Good girl <color:name><var:creatureName></color>. Welcome to your new home."

:talk_to_cow
  play child talk_to_animal
  play sound Cow
  play child default_milker_animal_talk

:talk_to_horse
  play child talk_to_animal
  play sound Horse

  if farm animal age == 0
    Player "There there <color:name><var:creatureName></color>. Welcome to your new home."
  end
  
:talk_to_yak
  play child talk_to_cow

:talk_to_goat
  play child talk_to_animal
  play child default_milker_animal_talk

:talk_to_pig
  play child talk_to_animal

  if farm animal age == 0
    Player "There there <color:name><var:creatureName></color>. Welcome to your new home."
  end

:talk_to_bull
  play child talk_to_animal

  if farm animal age == 0
    Player "There there <color:name><var:creatureName></color>. Welcome to your new home."
  end

:talk_to_sheep
  play child talk_to_animal
  # play sound Sheep
  play child default_clippers_animal_talk
  # if farm animal age == 0
  #   Player "There there <color:name><var:creatureName></color>. Welcome to your new home."
  # end

:pick_fertilized_egg
  if !Managers.Items.canGainItemId('fertilized-egg')
    return
  end

  Player ("Take fertilized egg?", "Yes", "No", "No")
  if response == "Yes"
    if Managers.Items.pickItemId('fertilized-egg')
      js $gameSelfSwitches.setValue([$gameMap._mapId, Variables.eggEventId, 'C'], false);
    end
  end

:pick_double_egg
  if !Managers.Items.canGainItemId('egg')
    return
  end

  if Managers.Items.pickItemId('egg', 1)
    js $gameSelfSwitches.setValue([$gameMap._mapId, Variables.eggEventId, 'B'], false);
  end

:pick_egg
  if !Managers.Items.canGainItemId('egg')
    return
  end

  if Managers.Items.pickItemId('egg')
    js $gameSelfSwitches.setValue([$gameMap._mapId, Variables.eggEventId, 'A'], false);
  end

:fishing_failed
  Player "<?:async>"
  if Managers.Items.itemIdIsFish(Variables.fishThatEscapedId)
    Player "The <color:name><var:fishThatEscaped></color> managed to escape."
  else
    Player "There was 1 <color:name><var:fishThatEscaped></color> stuck on the hook, but it fell back into the water."
  end

:chick_is_born
  wait 30
  Player "Looks like an egg hatched. I should give this chick a name."
  js Managers.Creatures.changeCreatureName(Managers.Creatures._lastPreparedData, 'chick_is_born_and_named');

:chick_is_born_and_named
  Player "A new member of my animal family. I have to work even harder now."

:force_sleep
  include make_party_member_comment_on_sleep
  home sleep

:check_bed
  Player ("What am I going to do?", "Save and go to bed", "Save", "Go to bed", "Open Storage", "Nothing", "Nothing")

  if response == "Save and go to bed"
    save_sleep
    play force_sleep
    return
  end

  if response == "Save"
    # snap
    # wait 10
    save_menu
    wait 10
    return
  end

  if response == "Go to bed"
    include force_sleep
  end

  if response == "Open Storage"
    open storage
    return
  end

:check_storage
  farm storage

:check_feed_dispenser
  Player "I can't pick feed from the storage if my bag is full."

:check_empty_chicken_feed_dispenser
  Player "If I put bird feed in the storage, I can quickly retrieve it here."

:check_empty_animal_feed_dispenser
  Player "If I put animal feed in the storage, I can quickly retrieve it here."

:check_barn_hay_pile
  farm barn feed

:check_shipping_bin
  farm shipping_bin

:coop_feeding_explanation
  Player "My chickens will be fed automatically every day if I add Chicken Feed to the box by the door."