protected void UseDesignatorDef(ThingDesignatorDef def)
 {
     Def            = def;
     defaultLabel   = def.label;
     defaultDesc    = def.description;
     soundSucceeded = def.soundSucceeded;
     hotKey         = def.hotkeyDef;
     visible        = AllowToolController.Instance.Handles.IsDesignatorEnabled(def);
     ResolveIcon();
     OnDefAssigned();
 }
		public Designator_SelectableThings(ThingDesignatorDef def) {
			this.def = def;
			defaultLabel = def.label;
			defaultDesc = def.description;
			icon = def.IconTex;
			useMouseIcon = true;
			soundDragSustain = SoundDefOf.DesignateDragStandard;
			soundDragChanged = SoundDefOf.DesignateDragStandardChanged;
			soundSucceeded = def.soundSucceded;
			hotKey = def.hotkeyDef;
		}
Esempio n. 3
0
 protected Designator_SelectableThings(ThingDesignatorDef def)
 {
     this.def         = def;
     defaultLabel     = def.label;
     defaultDesc      = def.description;
     icon             = def.IconTex;
     useMouseIcon     = true;
     soundDragSustain = SoundDefOf.Designate_DragStandard;
     soundDragChanged = SoundDefOf.Designate_DragStandard_Changed;
     soundSucceeded   = def.soundSucceeded;
     hotKey           = def.hotkeyDef;
 }
Esempio n. 4
0
 public bool IsDesignatorEnabledInSettings(ThingDesignatorDef def)
 {
     return(GetToolHandleSettingValue(designatorToggleHandles, DesignatorHandleNamePrefix + def.defName));
 }
 public Designator_FinishOff(ThingDesignatorDef def) : base(def)
 {
 }
Esempio n. 6
0
 public Designator_AllowAll(ThingDesignatorDef def) : base(def)
 {
 }
		public Designator_Forbid(ThingDesignatorDef def) : base(def) {
		}
Esempio n. 8
0
 public Designator_SelectableThings InstantiateDesignator(Type designatorType, ThingDesignatorDef designatorDef)
 {
     try {
         return((Designator_SelectableThings)Activator.CreateInstance(designatorType, designatorDef));
     } catch (Exception e) {
         Logger.ReportException(e, null, false, string.Format("instantiation of {0} with Def {1}", (designatorType != null ? designatorType.FullName : "(null)"), designatorDef));
     }
     return(null);
 }
		public Designator_MassSelect(ThingDesignatorDef def) : base(def) {
		}
Esempio n. 10
0
 public Designator_HaulUrgently(ThingDesignatorDef def)
     : base(def)
 {
 }
 public Designator_SelectSimilar(ThingDesignatorDef def) : base(def)
 {
 }
 public Designator_MassSelect(ThingDesignatorDef def) : base(def)
 {
 }
		public Designator_Allow(ThingDesignatorDef def) : base(def) {
		}
Esempio n. 14
0
 public Designator_Forbid(ThingDesignatorDef def) : base(def)
 {
 }
Esempio n. 15
0
 public Designator_SelectableThings TryGetDesignator(ThingDesignatorDef def)
 {
     return(activeDesignators.Select(e => e.designator).FirstOrDefault(d => d.def == def));
 }
Esempio n. 16
0
 public Designator_SelectableThings InstantiateDesignator(Type designatorType, ThingDesignatorDef designatorDef, Designator replacedDesignator = null)
 {
     try {
         var des = (Designator_SelectableThings)Activator.CreateInstance(designatorType, designatorDef);
         des.ReplacedDesignator = replacedDesignator;
         return(des);
     } catch (Exception e) {
         Logger.ReportException(e, null, false, $"instantiation of {(designatorType != null ? designatorType.FullName : "(null)")} with Def {designatorDef}");
     }
     return(null);
 }
Esempio n. 17
0
 public Designator_Forbid(ThingDesignatorDef def) : base(def)
 {
     inheritIcon = !AllowToolController.Instance.ReplaceIconsSetting;
 }