Пример #1
0
 static FloatMenuManager()
 {
     rawItems             = new Dictionary <string, Action <Pawn> >();
     usesDefaultJobDriver = new Dictionary <string, bool>();
     currentAction        = null;
     shiftKeyItems        = new Dictionary <string, Action>();
     Add("FloatMenuCaptionExchange".Translate(), delegate(Pawn p)
     {
         ExtUtil.PrepareVirtualTrade(p, new Trader_BankNoteExchange());
     }, usesDefaultJobDriver: true);
     AddShiftKeyItem("FloatMenuCaptionRemoveAll".Translate(), delegate
     {
         Find.WindowStack.Add(Dialog_MessageBox.CreateConfirmation("DlgRemoveModContents".Translate(), delegate
         {
             int num = 0;
             num    += ModContentRemover.RemoveAllModContentsFromWorldObjects();
             num    += ModContentRemover.RemoveAllModContentsFromPassingShips();
             num    += ModContentRemover.RemoveAllModContentsFromMaps();
             num    += ModContentRemover.RemoveAllModContentsFromAllPawns();
             Messages.Message("MsgModContentsRemoved".Translate(num), MessageTypeDefOf.PositiveEvent);
         }, destructive: true, title: "DlgTitleRemoveModContents".Translate()));
     });
 }