CraftingController

CraftingController - Failed to compile: 'ItemCraftTask' does not contain a definition for 'cancelled' and no accessible extension method 'cancelled' accepting a first argument of type 'ItemCraftTask' could be found (are you missing a using directive or an assembly reference?) | Line: 766, Pos: 22

Same issue

Hi Whispers88,

CraftingController 3.3.7 no longer compiles on the current Rust/Oxide build:

 
Error while compiling CraftingController: 'ItemCraftTask' does not contain a definition for 'cancelled' and no accessible extension method 'cancelled' accepting a first argument of type 'ItemCraftTask' could be found | Line: 766, Pos: 22

Rust removed the cancelled field from ItemCraftTask. It's used in two places:

  1. Line 766 in OnItemCraft, after InstantBulkCraft(...)
  2. Line 844 in ReturnCraft(...). Oxide only shows the first error, but this one fails too.

Fix: delete both task.cancelled = true; lines. In both cases OnItemCraft already returns true, which stops the task from being queued, so the flag isn't needed. InstantCraft 3.2.0 handles it the same way (it just returns true after crafting instantly).

I've been running the patched version on my server. It compiles, instant bulk craft works (items given, materials taken, nothing left in the queue), the "not enough room" refund works, and normal timed crafting works as before.

It would be great to get an official update so other servers don't have to patch it by hand.

Thanks for the plugin!