예제 #1
0
        static void WatchPrefix(ITab_Pawn_Visitor __instance)
        {
            if (MP.IsInMultiplayer)
            {
                MP.WatchBegin();

                Pawn pawn = __instance.SelPawn;

                object comp = GetCompMethod.Invoke(pawn, null);

                _chat.Watch(comp);
                _recruit.Watch(comp);
                _arrived.Watch(comp);
                _sentAway.Watch(comp);

                _areaGuest.Watch(comp);
                _areaShop.Watch(comp);

                object worldComp = GetMapCompMethod.Invoke(null, new object[] { pawn.Map });

                _defMode.Watch(worldComp);
                _defAreaGuest.Watch(worldComp);
                _defAreaShop.Watch(worldComp);
            }
        }
예제 #2
0
        public static bool ShouldDisplayConvertIco(ITab_Pawn_Visitor tab)
        {
            Pawn p = Traverse.Create(tab).Property("SelPawn").GetValue <Pawn>();

            return(p.guest.interactionMode == PrisonerInteractionModeDefOf.Convert || p.guest.interactionMode == PL_DefOf.PrisonLabor_workAndConvertOption);
        }