예제 #1
0
        /// <summary>
        /// Apply configuration using the <see cref="Symbols"/> data.
        /// </summary>
        /// <param name="options">Options</param>
        public void ApplyConfigurationPostPatch(AsmOptionsCosmetic options)
        {
            this.WriteDPadConfig(options.DPadConfig);
            this.WriteHudColorsConfig(options.HudColorsConfig);

            // Only write the MiscConfig hash (the rest should not be changeable post-patch)
            this.WriteMiscHash(options.Hash);
        }
예제 #2
0
        /// <summary>
        /// Try and apply configuration post-patch using the <see cref="Symbols"/> data.
        /// </summary>
        /// <param name="options">Options</param>
        public void TryApplyConfigurationPostPatch(AsmOptionsCosmetic options)
        {
            this.TryWriteDPadConfig(options.DPadConfig);
            this.TryWriteHudColorsConfig(options.HudColorsConfig);

            // Try and write the MiscConfig hash
            this.TryWriteMiscHash(options.Hash);
        }
예제 #3
0
 /// <summary>
 /// Apply configuration after the patch file has been created (or applied) and the hash calculated.
 /// </summary>
 /// <param name="options">Options</param>
 /// <param name="patch">Whether or not a patch file was applied</param>
 public void ApplyPostConfiguration(AsmOptionsCosmetic options, bool patch = false)
 {
     if (patch)
     {
         // If applying post-configuration after applying a patch file, it may be an older
         // patch file which does not support newer features (and thus would not have the
         // necessary symbols). Thus, "try" and apply it without throwing an exception if
         // symbols are not found.
         this.Symbols.TryApplyConfigurationPostPatch(options);
     }
     else
     {
         // If applying post-configuration from the internal patch & symbols data, all
         // expected symbols should be present. Thus, an exception should be thrown if any
         // cannot be found.
         this.Symbols.ApplyConfigurationPostPatch(options);
     }
 }