Ejemplo n.º 1
0
 @Override
 public void unInvoke() {
   if (canBeUninvoked()) {
     if (affected instanceof MOB) {
       final MOB mob = (MOB) affected;
       if ((buildingI != null) && (!aborted)) {
         if (messedUp) {
           if (activity == CraftingActivity.LEARNING)
             commonEmote(mob, L("<S-NAME> fail(s) to learn how to make @x1.", buildingI.name()));
           else commonTell(mob, L("You've ruined @x1!", buildingI.name(mob)));
           buildingI.destroy();
         } else if (activity == CraftingActivity.LEARNING) {
           deconstructRecipeInto(buildingI, recipeHolder);
           buildingI.destroy();
         } else dropAWinner(mob, buildingI);
       }
       buildingI = null;
     }
   }
   super.unInvoke();
 }
 @Override
 public void unInvoke() {
   if (canBeUninvoked()) {
     if (affected instanceof MOB) {
       final MOB mob = (MOB) affected;
       if ((buildingI != null) && (!aborted)) {
         if (messedUp) {
           if (activity == CraftingActivity.MENDING) messedUpCrafting(mob);
           else if (activity == CraftingActivity.LEARNING) {
             commonEmote(mob, L("<S-NAME> fail(s) to learn how to make @x1.", buildingI.name()));
             buildingI.destroy();
           } else if (activity == CraftingActivity.REFITTING)
             commonEmote(mob, L("<S-NAME> mess(es) up refitting @x1.", buildingI.name()));
           else commonEmote(mob, L("<S-NAME> mess(es) up making @x1.", buildingI.name()));
         } else {
           if (activity == CraftingActivity.MENDING) {
             buildingI.setUsesRemaining(100);
             CMLib.achievements()
                 .possiblyBumpAchievement(mob, AchievementLibrary.Event.MENDER, 1, this);
           } else if (activity == CraftingActivity.LEARNING) {
             deconstructRecipeInto(buildingI, recipeHolder);
             buildingI.destroy();
           } else if (activity == CraftingActivity.REFITTING) {
             buildingI.basePhyStats().setHeight(0);
             buildingI.recoverPhyStats();
           } else {
             dropAWinner(mob, buildingI);
             CMLib.achievements()
                 .possiblyBumpAchievement(mob, AchievementLibrary.Event.CRAFTING, 1, this);
           }
         }
       }
       buildingI = null;
       activity = CraftingActivity.CRAFTING;
     }
   }
   super.unInvoke();
 }
Ejemplo n.º 3
0
 public void unInvoke() {
   if (canBeUninvoked()) {
     if ((affected != null) && (affected instanceof MOB)) {
       MOB mob = (MOB) affected;
       if ((building != null) && (!aborted)) {
         if (messedUp) {
           if (mending) messedUpCrafting(mob);
           else if (refitting)
             commonEmote(mob, "<S-NAME> mess(es) up refitting " + building.name() + ".");
           else commonEmote(mob, "<S-NAME> mess(es) up knitting " + building.name() + ".");
         } else {
           if (mending) building.setUsesRemaining(100);
           else if (refitting) {
             building.baseEnvStats().setHeight(0);
             building.recoverEnvStats();
           } else dropAWinner(mob, building);
         }
       }
       building = null;
       mending = false;
     }
   }
   super.unInvoke();
 }