Пример #1
0
 public virtual void PerformCraft(IPerformCraftEvent evt)
 {
     if (evt.Item is null)
     {
         evt.Cancel();
     }
     else
     {
         evt.Complete();
     }
 }
Пример #2
0
    public void PerformCraft(IPerformCraftEvent evt)
    {
        var menu     = new BuildMenu(Blueprint, Blueprint.isUpgrade() ? ActionType.Upgrade : ActionType.Build, evt, Mod);
        var old_menu = Game1.activeClickableMenu;

        Game1.activeClickableMenu = menu;

        menu.exitFunction = () => {
            Game1.activeClickableMenu = old_menu;
            evt.Cancel();
        };
    }