Exemplo n.º 1
0
 @Override
 public void interrupt(final String message) {
   super.interrupt(message);
   if (crafter != null) {
     crafter.setAvailable(true);
   }
   if (resources != null) {
     for (Item resource : resources) {
       resource.setAvailable(true);
     }
   }
 }
Exemplo n.º 2
0
 @Override
 protected void doFinalActions() {
   for (int i = 0; i < recipe.quantity; i++) {
     Item newItem = new Item(workshop.getPosition(), recipe.itemType, getPlayer());
     getPlayer()
         .getComponent(IStockManager.class)
         .getUnstoredItemManager()
         .addGameObject(newItem);
   }
   workshop.setAvailable(true);
   if (recipe.skill != null) {
     crafter.getComponent(ISkillComponent.class).increaseSkillLevel(requiredLabor);
   }
   for (Item resource : resources) {
     resource.delete();
   }
   crafter.setAvailable(true);
 }