Example #1
0
        public static void StockUpPasteSettings(this Pawn pawn)
        {
            Dictionary <Pawn, ExDictionary <ThingDef, int> > settings = SmartMedicineGameComp.Settings();

            if (settings.ContainsKey(SmartMedicineGameComp.Get().copiedPawn))
            {
                settings[pawn] = new ExDictionary <ThingDef, int>(settings[SmartMedicineGameComp.Get().copiedPawn]);
            }
        }
Example #2
0
        public static Dictionary <ThingDef, int> StockUpSettings(this Pawn pawn)
        {
            var settings = SmartMedicineGameComp.Settings();

            if (!settings.TryGetValue(pawn, out ExDictionary <ThingDef, int> pawnSettings))
            {
                settings[pawn] = pawnSettings = new ExDictionary <ThingDef, int>();
            }
            return(pawnSettings);
        }
Example #3
0
 public static void StockUpClearSettings(this Pawn pawn)
 {
     SmartMedicineGameComp.Settings().Remove(pawn);
     StockUpCopySettings(null);
 }
Example #4
0
 public static Pawn CopiedPawn()
 {
     return(SmartMedicineGameComp.Get().copiedPawn);
 }
Example #5
0
 public static void StockUpCopySettings(this Pawn pawn)
 {
     SmartMedicineGameComp.Get().copiedPawn = pawn;
 }