I created a class in my project, and added:
Then, I created a copy of the vanilla Various_Stone.xml and deleted everything, except for the "ChunkBase". There, i added to the file:
I tested the game, and the debug log said that "DendrovoreAnimalGastroliths" was not valid for "FoodType", and listed the vanilla 'tags' (DendrovoreAnimal, etc). So, i tried looking into the code with ILSpy again. Under FoodTypeFlags, i saw each tag divided into separated classes.
I copied one of them, so that i could paste it into one of my own classes on my own project, but Visual Studio wont accept classes without the normal structure of a C# project. What can i do?
Ps.: Sorry for the giant image, i don't know how to resize it :/
Code Select
using System;
using RimWorld;
using Verse;
namespace KingkillerCreatures
{
[Flags]
public enum FoodTypeFlags
{
StoneChunks = 4096,
DendrovoreAnimalGastroliths = 6801
}
}
Then, I created a copy of the vanilla Various_Stone.xml and deleted everything, except for the "ChunkBase". There, i added to the file:
Code Select
<ingestible>
<foodType>StoneChunks</foodType>
</ingestible>
I tested the game, and the debug log said that "DendrovoreAnimalGastroliths" was not valid for "FoodType", and listed the vanilla 'tags' (DendrovoreAnimal, etc). So, i tried looking into the code with ILSpy again. Under FoodTypeFlags, i saw each tag divided into separated classes.
I copied one of them, so that i could paste it into one of my own classes on my own project, but Visual Studio wont accept classes without the normal structure of a C# project. What can i do?
Ps.: Sorry for the giant image, i don't know how to resize it :/