Beispiel #1
0
        public static List <PawnKindDef> returnVariable(List <PawnKindDef> output, string field, FCTraitEffectDef def)
        {
            Type      typ       = def.GetType();
            FieldInfo fieldInfo = typ.GetField(field);

            return((List <PawnKindDef>)fieldInfo.GetValue(def));
        }
Beispiel #2
0
        public static double returnVariable(double output, string field, FCTraitEffectDef def)
        {
            Type      typ       = def.GetType();
            FieldInfo fieldInfo = typ.GetField(field);

            return(Convert.ToDouble(fieldInfo.GetValue(def)));
        }
Beispiel #3
0
        public static string returnVariable(string output, string field, FCTraitEffectDef def)
        {
            Type      typ       = def.GetType();
            FieldInfo fieldInfo = typ.GetField(field);

            return(fieldInfo.GetValue(def).ToString());
        }
Beispiel #4
0
        public static double returnVariable(string field, FCTraitEffectDef def)
        {
            Type      typ       = def.GetType();
            FieldInfo fieldInfo = typ.GetField(field);

            return((double)fieldInfo.GetValue(def));
        }