Right... I tried it and immediately scrapped it as all non-inventory objects are then no longer haulable
The code? exactly the same as the Core but a tag is added: <canBeSpawningInventory> (XML)
In C# i found a member called PutCarriedThingInInventory, but I don't think this is the solution
I learned by doing; never in this post I mentioned for you to do this for me. That's why it's in Help, not Suggestions
What I'm asking for is a clue to the solution like
Before that time arrived, no
For the DIY and 'make it work yourself' part, I'll try to do that, but I begged for clues right now
The code? exactly the same as the Core but a tag is added: <canBeSpawningInventory> (XML)
In C# i found a member called PutCarriedThingInInventory, but I don't think this is the solution
Code Select
public static Toil PutCarriedThingInInventory()
{
Toil toil = new Toil();
toil.initAction = delegate
{
Pawn actor = toil.GetActor();
if (actor.carrier.CarriedThing != null)
{
if (actor.inventory.container.TryAdd(actor.carrier.CarriedThing))
{
actor.carrier.container.Clear();
}
else
{
Thing thing;
actor.carrier.TryDropCarriedThing(actor.Position, actor.carrier.CarriedThing.stackCount, ThingPlaceMode.Near, out thing);
}
}
};
return toil;
}
I learned by doing; never in this post I mentioned for you to do this for me. That's why it's in Help, not Suggestions
What I'm asking for is a clue to the solution like
- XML-Only or C# override required?
- If C# override required, what C# class governed this?
- Can all types of objects behave the same with the same code?
- Is there any additional functionalities I needed to code for this to work?
Before that time arrived, no
For the DIY and 'make it work yourself' part, I'll try to do that, but I begged for clues right now