mirror of
https://gitlab.com/Syroot/Worms.git
synced 2025-01-13 07:18:00 +03:00
Fix several XML summaries.
This commit is contained in:
parent
ebba11bd59
commit
bf0c60659a
@ -9,7 +9,7 @@ namespace Syroot.Worms.Armageddon
|
||||
|
||||
/// <summary>
|
||||
/// Represents the blob of extended scheme options attached in <see cref="SchemeVersion.Version3"/>
|
||||
/// <see cref="Schemes"/>.
|
||||
/// <see cref="Scheme"/> instances.
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct ExtendedOptions : IEquatable<ExtendedOptions>
|
||||
@ -331,7 +331,7 @@ namespace Syroot.Worms.Armageddon
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether worm select does not cancel the <see cref="HotSeatDelay"/>.
|
||||
/// Gets or sets a value indicating whether worm select does not cancel the <see cref="HotSeatTime"/>.
|
||||
/// </summary>
|
||||
public bool WormSelectKeepHotSeat
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ namespace Syroot.Worms.Armageddon
|
||||
/// <summary>
|
||||
/// Gets a reference to the weapon with the given <paramref name="index"/>.
|
||||
/// </summary>
|
||||
/// <param name="name">The index of the weapon to access.</param>
|
||||
/// <param name="index">The index of the weapon to access.</param>
|
||||
/// <returns>A reference to the <see cref="SchemeWeapon"/>.</returns>
|
||||
public ref SchemeWeapon this[int index] => ref _array[index];
|
||||
|
||||
|
@ -1098,7 +1098,7 @@ namespace Syroot.Worms.Armageddon
|
||||
/// <summary>
|
||||
/// Saves the data in the given file with a format appropriate for <see cref="Version"/>.
|
||||
/// </summary>
|
||||
/// <param name="stream">The <see cref="Stream"/> to save the data to.</param>
|
||||
/// <param name="fileName">The name of the file to save the data in.</param>
|
||||
public void Save(string fileName) => Save(fileName, (SchemeSaveFormat)((uint)Version << 16));
|
||||
|
||||
/// <summary>
|
||||
|
@ -25,8 +25,20 @@ namespace Syroot.Worms.Armageddon
|
||||
|
||||
// ---- OPERATORS ----------------------------------------------------------------------------------------------
|
||||
|
||||
/// <summary>
|
||||
/// Returns whether two <see cref="SchemeWeapon"/> instances are equal by value.
|
||||
/// </summary>
|
||||
/// <param name="left">The first instance to compare.</param>
|
||||
/// <param name="right">The second instance to compare.</param>
|
||||
/// <returns>Whether the instances are equal.</returns>
|
||||
public static bool operator ==(SchemeWeapon left, SchemeWeapon right) => left.Equals(right);
|
||||
|
||||
/// <summary>
|
||||
/// Returns whether two <see cref="SchemeWeapon"/> instances are inequal by value.
|
||||
/// </summary>
|
||||
/// <param name="left">The first instance to compare.</param>
|
||||
/// <param name="right">The second instance to compare.</param>
|
||||
/// <returns>Whether the instances are inequal.</returns>
|
||||
public static bool operator !=(SchemeWeapon left, SchemeWeapon right) => !(left == right);
|
||||
|
||||
// ---- METHODS (PUBLIC) ---------------------------------------------------------------------------------------
|
||||
|
@ -9,6 +9,7 @@ namespace Syroot.Worms.Mgame
|
||||
{
|
||||
// ---- FIELDS -------------------------------------------------------------------------------------------------
|
||||
|
||||
/// <summary>Korean KS C 5601-1987 (codepage 949) encoding.</summary>
|
||||
public static readonly Encoding Korean;
|
||||
|
||||
// ---- CONSTRUCTORS & DESTRUCTOR ------------------------------------------------------------------------------
|
||||
@ -16,7 +17,7 @@ namespace Syroot.Worms.Mgame
|
||||
static Encodings()
|
||||
{
|
||||
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
|
||||
Korean = Encoding.GetEncoding("ks_c_5601-1987"); // codepage 949
|
||||
Korean = Encoding.GetEncoding("ks_c_5601-1987");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -81,8 +81,20 @@ namespace Syroot.Worms.Worms2
|
||||
|
||||
// ---- OPERATORS ----------------------------------------------------------------------------------------------
|
||||
|
||||
/// <summary>
|
||||
/// Returns whether two <see cref="SchemeWeapon"/> instances are equal by value.
|
||||
/// </summary>
|
||||
/// <param name="left">The first instance to compare.</param>
|
||||
/// <param name="right">The second instance to compare.</param>
|
||||
/// <returns>Whether the instances are equal.</returns>
|
||||
public static bool operator ==(SchemeWeapon left, SchemeWeapon right) => left.Equals(right);
|
||||
|
||||
/// <summary>
|
||||
/// Returns whether two <see cref="SchemeWeapon"/> instances are inequal by value.
|
||||
/// </summary>
|
||||
/// <param name="left">The first instance to compare.</param>
|
||||
/// <param name="right">The second instance to compare.</param>
|
||||
/// <returns>Whether the instances are inequal.</returns>
|
||||
public static bool operator !=(SchemeWeapon left, SchemeWeapon right) => !(left == right);
|
||||
|
||||
// ---- METHODS (PUBLIC) ---------------------------------------------------------------------------------------
|
||||
|
@ -82,7 +82,7 @@ namespace Syroot.Worms.IO
|
||||
/// Writes the given color.
|
||||
/// </summary>
|
||||
/// <param name="self">The extended <see cref="BinaryStream"/> instance.</param>
|
||||
/// <param name="value">The color to write.</param>
|
||||
/// <param name="color">The color to write.</param>
|
||||
public static void WriteColor(this BinaryStream self, Color color)
|
||||
=> self.Write(color.A << 24 | color.R << 16 | color.G << 8 | color.B);
|
||||
|
||||
@ -90,7 +90,7 @@ namespace Syroot.Worms.IO
|
||||
/// Writes the given colors.
|
||||
/// </summary>
|
||||
/// <param name="self">The extended <see cref="BinaryStream"/> instance.</param>
|
||||
/// <param name="value">The colors to write.</param>
|
||||
/// <param name="colors">The colors to write.</param>
|
||||
public static void WriteColors(this BinaryStream self, IEnumerable<Color> colors)
|
||||
{
|
||||
foreach (Color color in colors)
|
||||
|
@ -67,12 +67,12 @@ namespace Syroot.Worms.IO
|
||||
/// Reads an <see cref="ILoadable"/> instance from the current stream.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the <see cref="ILoadable"/> class to instantiate.</typeparam>
|
||||
/// <param name="self">The extended <see cref="BinaryStream"/> instance.</param>
|
||||
/// <param name="stream">The <see cref="Stream"/> instance to read with.</param>
|
||||
/// <returns>The <see cref="ILoadable"/> instance.</returns>
|
||||
public static T Load<T>(this Stream self) where T : ILoadable, new()
|
||||
public static T Load<T>(this Stream stream) where T : ILoadable, new()
|
||||
{
|
||||
T instance = new T();
|
||||
instance.Load(self);
|
||||
instance.Load(stream);
|
||||
return instance;
|
||||
}
|
||||
|
||||
@ -80,9 +80,9 @@ namespace Syroot.Worms.IO
|
||||
/// Writes the given <see cref="ISaveable"/> instance into the current stream.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the <see cref="ISaveable"/> class to write.</typeparam>
|
||||
/// <param name="self">The extended <see cref="BinaryStream"/> instance.</param>
|
||||
/// <param name="stream">The <see cref="Stream"/> instance to write with.</param>
|
||||
/// <param name="value">The instance to write into the current stream.</param>
|
||||
public static void Save<T>(this Stream self, T value) where T : ISaveable => value.Save(self);
|
||||
public static void Save<T>(this Stream stream, T value) where T : ISaveable => value.Save(stream);
|
||||
|
||||
// ---- Backports ----
|
||||
#if NETSTANDARD2_0
|
||||
|
Loading…
x
Reference in New Issue
Block a user