Examples of ProducerRegister


Examples of games.stendhal.server.entity.npc.behaviour.journal.ProducerRegister

  @Override
  public Collection<Achievement> createAchievements() {
    List<Achievement> achievements = new LinkedList<Achievement>();

    final ProducerRegister producerRegister = SingletonRepository.getProducerRegister();

      final List<String> foodlist = producerRegister.getProducedItemNames("food");
    final String[] foods = foodlist.toArray(new String[foodlist.size()]);
    // may wish to remove mega potion by hand?

    // this includes a lot of foods! at time of writing, this is at least:
    // pie, cheese sausage, sausage, fish pie, apple pie, cherry pie, crepes suzette, sandwich, bread, pizza
    // grilled steak is made using quest code and not production code so we add an extra condition, and it doesn't adhere to standard completion guidelines
    achievements.add(createAchievement("production.class.food", "Gourmet", "Order all food types available from Faiumoni's cooks",
        Achievement.MEDIUM_BASE_SCORE, true,
        new AndCondition(
            new PlayerProducedNumberOfItemsCondition(1, foods),
            new QuestStateStartsWithCondition("coal_for_haunchy","waiting;"))));


      final List<String> drinklist = producerRegister.getProducedItemNames("drink");
    final String[] drinks = drinklist.toArray(new String[drinklist.size()]);

    // soups and koboldish torcibud are made using quest code so we add extra conditions for those
    // at time of writing, the other drinks are fierywater, tea, pina colada, and mega potion (which we may remove)
    achievements.add(createAchievement("production.class.drink", "Thirsty Worker", "Order all drink types available from Faiumoni's cooks",
        Achievement.MEDIUM_BASE_SCORE, true,
        new AndCondition(
            new PlayerProducedNumberOfItemsCondition(1, drinks),
            new QuestCompletedCondition("soup_maker"),
            new QuestCompletedCondition("fishsoup_maker"),
            new QuestCompletedCondition("koboldish_torcibud"))));


      final List<String> resourcelist = producerRegister.getProducedItemNames("resource");
    final String[] resources = resourcelist.toArray(new String[resourcelist.size()]);
    // at time of writing: gold bar, mithril bar, flour, iron
    achievements.add(createAchievement("production.class.resource", "Alchemist", "Produce 5 of each kind of precious metal and resource",
        Achievement.HARD_BASE_SCORE, true,
        new PlayerProducedNumberOfItemsCondition(5, resources)));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.