예제 #1
0
        private static void ValidateExpandedEvents()
        {
            var wereChanges = false;

            // TODO: Check to see if this fixes the issue described below.
            Store_IncidentEditor.LoadCopies();

            // We're not going to update this to use EventExtension
            // since it appears to wipe previous settings.
            foreach (StoreIncident incident in DefDatabase <StoreIncident> .AllDefs.Where(
                         i => i.defName == "BuyPawn" || i.defName == "AddTrait" || i.defName == "RemoveTrait"
                         ))
            {
                if (incident.cost <= 1)
                {
                    continue;
                }

                incident.cost = 1;
                wereChanges   = true;
            }

            if (wereChanges)
            {
                Store_IncidentEditor.UpdatePriceSheet();
            }
        }
예제 #2
0
 private static void ValidateEventList()
 {
     Store_IncidentEditor.LoadCopies(); // Just to ensure the actual incidents are loaded.
     Events = DefDatabase <StoreIncident> .AllDefs.Select(i => new EventItem {
         Incident = i
     }).ToList();
 }