示例#1
0
        /// <summary>
        /// Attempts to mount the accessory to the current outfit and updates its information.
        /// (The outfit must be non-null!)
        /// </summary>
        private MountResult MountToOutfit(ref AccessoryMountInfo mountInfo)
        {
            var status = m_Outfit.Mount(mountInfo.Accessory, mountInfo.LocationType,
                                        mountInfo.IgnoreRestrictions, mountInfo.Mounter, mountInfo.AdditionalCoverage);

            if (status == MountResult.Success)
            {
                mountInfo.Outfit = Outfit;
            }

            return(status);
        }
示例#2
0
        /// <summary>
        /// Attempts to mount the accessory to the current outfit and updates its information.
        /// (The outfit must be non-null!)
        /// </summary>
        private MountResult MountToOutfit(ref AccessoryMountInfo mountInfo)
        {
            // If this is a remount and it fails the accessory will be released, so...
            var origIgnore = m_IgnoreAccessoryStateEvent;

            m_IgnoreAccessoryStateEvent = mountInfo.Accessory;

            var status = m_Outfit.Mount(mountInfo.Accessory, mountInfo.LocationType,
                                        mountInfo.IgnoreRestrictions, mountInfo.Mounter, mountInfo.AdditionalCoverage);

            m_IgnoreAccessoryStateEvent = origIgnore;

            return(status);
        }