Can't find a type/class name from recipe

Started by JT, August 08, 2016, 05:30:47 PM

Previous topic - Next topic

JT

So I'm puzzling over this one.  Here's the relevant portion of the assembly's source:

using System;
using System.Reflection;
using System.Xml.Linq;
using System.Collections.Generic;
using System.Text;

using UnityEngine;
using RimWorld;
using Verse;

namespace JTFieldSurgery
{
class Recipe_JTFieldSurgeryFieldAmputate : Recipe_MedicalOperation
{
...


which compiles successfully and is placed in my mod's Assemblies subfolder.

Here's my RecipeDef:<RecipeDef ParentName="SurgeryFlesh">
<defName>JTFieldSurgeryFieldAmputate</defName>
<label>field amputation</label>
<description>Removes a natural body part without the use of anaesthetic, for use in emergencies if no medicine is available. Removed limb will not be usable.</description>
<jobString>Amputating without anaesthetic.</jobString>

<workerClass>Recipe_JTFieldSurgeryFieldAmputate</workerClass>
...


Yet for reasons I completely fail to understand, I receive a "Could not find a type named Recipe_JTFieldSurgeryFieldAmputate" error during boot.  Is there somewhere I have to "register" an assembly for it to be loaded by the game?  What could be going wrong here?

CallMeDio

You need to add the namespace:
<workerClass>JTFieldSurgery.Recipe_JTFieldSurgeryFieldAmputate</workerClass>
QuoteYou may need a rubber duck.  Also, try some caveman debugging.

Released mods: No Mood Loss on Prisoner Sold or Died

JT

Heh, figures it'd be something easy. =)

Thanks!  Seems to be loading just fine now.  And now, the always time-consuming testing phase... ;-)

CallMeDio

QuoteYou may need a rubber duck.  Also, try some caveman debugging.

Released mods: No Mood Loss on Prisoner Sold or Died