Files
Reactor/Reactor.Shared/Networking/Mod.cs
T
js6pak d58afa5907 Airship support
Logger utility
Initial Reactor.Networking protocol rework
2021-04-04 00:05:34 +02:00

41 lines
966 B
C#

#nullable enable
using System;
namespace Reactor.Networking
{
public class Mod
{
public Mod(uint netId, string id, string version, PluginSide side)
{
NetId = netId;
Id = id;
Version = version;
Side = side;
}
public uint NetId { get; }
public string Id { get; }
public string Version { get; }
public PluginSide Side { get; }
protected bool Equals(Mod other)
{
return Id == other.Id && Version == other.Version;
}
public override bool Equals(object? obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
if (obj.GetType() != GetType()) return false;
return Equals((Mod) obj);
}
public override int GetHashCode()
{
return HashCode.Combine(Id, Version);
}
}
}