Importing thingClass into another thingClass

Started by jacob814, August 25, 2015, 12:57:45 PM

Previous topic - Next topic

jacob814

I know how to do this in java but not so well with xml files. I want to import the StandingLamp,from the vannila furniture xml,  base parent into one of my own xml's. I know there is a simple fix to this if I was to copy and paste it into my own file but I am curious.
My Mods:
Glass&Lights

skullywag

What are you trying to acheive here? If its your own version of the standing lamp with changes while keeping the vanilla one in the game then copy the def to your own fike and change the defname. Some more info might be helpful here.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

jacob814

I am trying to use the parent class from the vannila rimworld thingdef found under lights in the furniture xml file. I want to know if this is possible and if so how. I know there is a work around for this but I feel like this should be possible.
My Mods:
Glass&Lights

Latta

But standing lamps all has just plain Building class?

If you mean extending(Java term) do this:

using RimWorld;
using Verse;

namespace Foo
{
    public class Bar : Building
        {
              ....
         }
    }
}

Where the colon means extension.