예제 #1
0
        public object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
        {
            int   idNumber = info.GetInt32("pawn_thingid");
            Thing t        = ThingRegistry.tryGetThing(idNumber);

            if (t == null)
            {
                RimLog.Message("Could not locate a pawn with thingid " + idNumber);
            }
            return(t);
        }
예제 #2
0
        public static void Postfix(Thing __instance)
        {
            ThingRegistry.AddThing(__instance, __instance.thingIDNumber);

            if (!stopID)
            {
                if (__instance is Pawn)
                {
                    //Utilities.RimLog.Message("Made id for " + (__instance as Pawn) + " | " + Rand.Int + "|" + System.Threading.Thread.CurrentThread.ManagedThreadId);
                }
                else
                {
                    //Utilities.RimLog.Message("Made id for " + (__instance) + " | " + Rand.Int + "|" + System.Threading.Thread.CurrentThread.ManagedThreadId);
                }
            }
        }