Exemplo n.º 1
0
 private static DebugMenuOption Option_EditPP(LogisticProviderPassive providerPassive)
 {
     return(new DebugMenuOption
     {
         label = "Edit provider " + providerPassive.GetHashCode(),
         method = () =>
                  Find.WindowStack.Add(new Dialog_DebugOptionListLister(Options_EditPP(providerPassive))),
         mode = DebugMenuOptionMode.Action,
     });
 }
Exemplo n.º 2
0
        private static IEnumerable <DebugMenuOption> Options_EditPP(LogisticProviderPassive providerPassive)
        {
            yield return(Option_Remove(providerPassive));

            yield return(new DebugMenuOption
            {
                label = "Add filter",
                method = () =>
                         Find.WindowStack.Add(new Dialog_DebugOptionListLister(Options_EditPP_AddFilter(providerPassive))),
                mode = DebugMenuOptionMode.Action,
            });
        }
Exemplo n.º 3
0
 private static IEnumerable <DebugMenuOption> Options_EditPP_AddFilter(LogisticProviderPassive providerPassive)
 {
     foreach (var item in DefDatabase <ThingDef> .AllDefs)
     {
         yield return(new DebugMenuOption
         {
             label = item.label,
             method = () =>
                      providerPassive.thingFilter.SetAllow(item, true),
             mode = DebugMenuOptionMode.Action,
         });
     }
 }