public Dialog_ManageLoadouts(Loadout loadout) { CurrentLoadout = null; if (loadout != null && !loadout.defaultLoadout) { CurrentLoadout = loadout; } _allSuitableDefs = DefDatabase <ThingDef> .AllDefs.Where(td => !td.menuHidden && IsSuitableThingDef(td)).ToList(); _allDefsGeneric = DefDatabase <LoadoutGenericDef> .AllDefs.OrderBy(g => g.label).ToList(); _selectableItems = new List <SelectableItem>(); foreach (var td in _allSuitableDefs) { _selectableItems.Add(new SelectableItem() { thingDef = td, isGreyedOut = (Find.CurrentMap.listerThings.AllThings.Find(thing => thing.GetInnerIfMinified().def == td && !thing.def.Minifiable) == null) //!thing.PositionHeld.Fogged(thing.MapHeld) //check Thing is visible on map. CPU expensive! }); } SetSource(SourceSelection.Ranged); doCloseX = true; forcePause = true; absorbInputAroundWindow = true; //doCloseButton = true; //Close button is awkward closeOnClickedOutside = true; Utility_Loadouts.UpdateColonistCapacities(); }
public Dialog_ManageLoadouts(Loadout loadout) { CurrentLoadout = loadout; SetSource(SourceSelection.Ranged); doCloseX = true; closeOnClickedOutside = true; closeOnEscapeKey = true; Utility_Loadouts.UpdateColonistCapacities(); }
public Dialog_ManageLoadouts(Loadout loadout) { CurrentLoadout = null; if (loadout != null && !loadout.defaultLoadout) { CurrentLoadout = loadout; } SetSource(SourceSelection.Ranged); doCloseX = true; //doCloseButton = true; //Close button is awkward closeOnClickedOutside = true; Utility_Loadouts.UpdateColonistCapacities(); }
public Dialog_ManageLoadouts(Loadout loadout) { CurrentLoadout = null; if (loadout != null && !loadout.defaultLoadout) { CurrentLoadout = loadout; } SetSource(SourceSelection.Ranged); doCloseX = true; closeOnClickedOutside = true; this.closeOnAccept = false; this.closeOnCancel = false; Utility_Loadouts.UpdateColonistCapacities(); }