to "fix" the part and be able to use the Cooking Workbench i created a small Change in the .cs file and tested it. It works without any Problems and no Errors in Console.
private void OnEntitySpawned(BaseNetworkable entity)
{
if (entity is BaseOven || entity is Workbench)
{
if (entity.gameObject.GetComponent<FurnaceController>() == null)
{
entity.gameObject.AddComponent<FurnaceController>();
}
}
}
private object OnOvenToggle(StorageContainer entity, BasePlayer player)
{
if (entity == null || entity is BaseFuelLightSource)
return null;
if (entity.needsBuildingPrivilegeToUse && !player.CanBuild())
return null;
PrintDebug($"OnOvenToggle called for {entity.ShortPrefabName}");
var component = entity.gameObject.GetComponent<FurnaceController>();
if (component == null) return null;
var canUse = CanUse(entity.OwnerID) || CanUse(player.userID);
if (entity.IsOn())
{
component.StopCooking();
}
else
{
if (canUse)
{
component.StartCooking();
}
else
{
PrintDebug($"No permission ({player.userID})");
return null;
}
}
return false;
}