mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-16 07:12:27 +02:00
RobustToolbox projects should be named Robust.* This PR changes the RobustToolbox projects from SS14.* to Robust.* Updates SS14.* prefixes/namespaces to Robust.* Updates SpaceStation14.sln to RobustToolbox.sln Updates MSBUILD/SS14.* to MSBUILD/Robust.* Updates CSProject and MSBuild references for the above Updates git_helper.py Removes Runserver and Runclient as they are unusable
58 lines
1.2 KiB
C#
58 lines
1.2 KiB
C#
using System;
|
|
using Robust.Shared.Serialization;
|
|
|
|
namespace Robust.Shared.Map
|
|
{
|
|
[Serializable, NetSerializable]
|
|
public struct MapId : IEquatable<MapId>
|
|
{
|
|
public static readonly MapId Nullspace = new MapId(0);
|
|
|
|
internal readonly int Value;
|
|
|
|
public MapId(int value)
|
|
{
|
|
Value = value;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public bool Equals(MapId other)
|
|
{
|
|
return Value == other.Value;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override bool Equals(object obj)
|
|
{
|
|
if (ReferenceEquals(null, obj)) return false;
|
|
return obj is MapId id && Equals(id);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override int GetHashCode()
|
|
{
|
|
return Value;
|
|
}
|
|
|
|
public static bool operator ==(MapId a, MapId b)
|
|
{
|
|
return a.Value == b.Value;
|
|
}
|
|
|
|
public static bool operator !=(MapId a, MapId b)
|
|
{
|
|
return !(a == b);
|
|
}
|
|
|
|
public static explicit operator int(MapId self)
|
|
{
|
|
return self.Value;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return Value.ToString();
|
|
}
|
|
}
|
|
}
|