Beispiel #1
0
        private static Designator InstantiateThingDesignator(ReverseDesignatorDef reverseDef)
        {
            var designatorType = reverseDef.designatorClass ?? reverseDef.designatorDef.designatorClass;

            try {
                return((Designator)Activator.CreateInstance(designatorType));
            } catch (Exception e) {
                throw new Exception($"Failed to instantiate designator {designatorType.FullName} (def {reverseDef.defName})", e);
            }
        }
Beispiel #2
0
 public bool IsReverseDesignatorEnabledInSettings(ReverseDesignatorDef def)
 {
     return(GetToolHandleSettingValue(reverseDesignatorToggleHandles, ReverseDesignatorHandleNamePrefix + def.defName));
 }