public override void onCraftGuiOpened(ICrafting icrafting) { base.onCraftGuiOpened(icrafting); icrafting.updateCraftingInventoryInfo(this, 0, furnace.furnaceCookTime); icrafting.updateCraftingInventoryInfo(this, 1, furnace.furnaceBurnTime); icrafting.updateCraftingInventoryInfo(this, 2, furnace.currentItemBurnTime); }
/// <summary> /// Updates crafting matrix; called from onCraftMatrixChanged. Args: none /// </summary> public override void UpdateCraftingResults() { base.UpdateCraftingResults(); for (int i = 0; i < Crafters.Count; i++) { ICrafting icrafting = (ICrafting)Crafters[i]; if (LastCookTime != Furnace.FurnaceCookTime) { icrafting.UpdateCraftingInventoryInfo(this, 0, Furnace.FurnaceCookTime); } if (LastBurnTime != Furnace.FurnaceBurnTime) { icrafting.UpdateCraftingInventoryInfo(this, 1, Furnace.FurnaceBurnTime); } if (LastItemBurnTime != Furnace.CurrentItemBurnTime) { icrafting.UpdateCraftingInventoryInfo(this, 2, Furnace.CurrentItemBurnTime); } } LastCookTime = Furnace.FurnaceCookTime; LastBurnTime = Furnace.FurnaceBurnTime; LastItemBurnTime = Furnace.CurrentItemBurnTime; }
/// <summary> /// Updates crafting matrix; called from onCraftMatrixChanged. Args: none /// </summary> public override void UpdateCraftingResults() { base.UpdateCraftingResults(); for (int i = 0; i < Crafters.Count; i++) { ICrafting icrafting = (ICrafting)Crafters[i]; icrafting.UpdateCraftingInventoryInfo(this, 0, EnchantLevels[0]); icrafting.UpdateCraftingInventoryInfo(this, 1, EnchantLevels[1]); icrafting.UpdateCraftingInventoryInfo(this, 2, EnchantLevels[2]); } }
public virtual void onCraftGuiOpened(ICrafting icrafting) { crafters.add(icrafting); var arraylist = new ArrayList(); for (int i = 0; i < inventorySlots.size(); i++) { arraylist.add(((Slot) inventorySlots.get(i)).getStack()); } icrafting.updateCraftingInventory(this, arraylist); updateCraftingMatrix(); }
public virtual void onCraftGuiOpened(ICrafting icrafting) { crafters.add(icrafting); var arraylist = new ArrayList(); for (int i = 0; i < inventorySlots.size(); i++) { arraylist.add(((Slot)inventorySlots.get(i)).getStack()); } icrafting.updateCraftingInventory(this, arraylist); updateCraftingMatrix(); }
public Commands( IMovement movement, IRoomActions roomActions, IDebug debug, ISkills skills, ISpells spells, IObject objects, IInventory inventory, Icommunication communication, IEquip equipment, IScore score, ICombat combat, ICache cache, ISocials socials, ICommandHandler commandHandler, ICore core, IMobFunctions mobFunctions, IHelp help, IMobScripts mobScripts, ICrafting crafting, ICooking cooking, IUtilSkills utilSkills, IPassiveSkills passiveSkills, IHealer healer ) { _movement = movement; _roomActions = roomActions; _debug = debug; _skills = skills; _spells = spells; _object = objects; _inventory = inventory; _communication = communication; _equipment = equipment; _score = score; _combat = combat; _cache = cache; _socials = socials; _commandHandler = commandHandler; _core = core; _mobFunctions = mobFunctions; _help = help; _mobScripts = mobScripts; _crafting = crafting; _cooking = cooking; _utilSkills = utilSkills; _passiveSkills = passiveSkills; _healer = healer; }
/// <summary> /// Updates crafting matrix; called from onCraftMatrixChanged. Args: none /// </summary> public override void UpdateCraftingResults() { base.UpdateCraftingResults(); for (int i = 0; i < Crafters.Count; i++) { ICrafting icrafting = (ICrafting)Crafters[i]; if (BrewTime != TileBrewingStand.GetBrewTime()) { icrafting.UpdateCraftingInventoryInfo(this, 0, TileBrewingStand.GetBrewTime()); } } BrewTime = TileBrewingStand.GetBrewTime(); }