public static bool AddDesignation(DesignationManager __instance, Designation newDes)
        {
            if (newDes.def.targetType == TargetType.Cell && __instance.DesignationAt(newDes.target.Cell, newDes.def) != null)
            {
                Log.Error("Tried to double-add designation at location " + newDes.target);
            }
            else if (newDes.def.targetType == TargetType.Thing && __instance.DesignationOn(newDes.target.Thing, newDes.def) != null)
            {
                Log.Error("Tried to double-add designation on Thing " + newDes.target);
            }
            else
            {
                if (newDes.def.targetType == TargetType.Thing)
                {
                    newDes.target.Thing.SetForbidden(false, false);
                }
                lock (__instance)
                {
                    __instance.allDesignations.Add(newDes);
                }

                newDes.designationManager = __instance;
                newDes.Notify_Added();
                Map map = newDes.target.HasThing ? newDes.target.Thing.Map : __instance.map;
                if (map == null)
                {
                    return(false);
                }
#if RW12
                MoteMaker.ThrowMetaPuffs(newDes.target.ToTargetInfo(map));
#endif
#if RW13
                FleckMaker.ThrowMetaPuffs(newDes.target.ToTargetInfo(map));
#endif
            }
            return(false);
        }