Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/fix!: Dynamic spawn location changes #388

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 25 additions & 5 deletions EXILED/Exiled.API/Enums/SpawnLocationType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ public enum SpawnLocationType
/// </summary>
InsideLczCafe,

/// <summary>
/// Inside the Nuke armory.
/// </summary>
InsideNukeArmory,

/// <summary>
/// Inside the surface nuke room.
/// </summary>
Expand Down Expand Up @@ -142,5 +137,30 @@ public enum SpawnLocationType
/// Just inside the LCZ WC door.
/// </summary>
InsideLczWc,

/// <summary>
/// Inside the Glass Box in GR-18.
/// </summary>
InsideGr18Glass,

/// <summary>
/// Inside 106's Primary Door
/// </summary>
Inside106Primary,

/// <summary>
/// Inside 106's Secondary Door
/// </summary>
Inside106Secondary,

/// <summary>
/// Inside 939 Cryo Chamber
/// </summary>
Inside939Cryo,

/// <summary>
/// Inside SCP-079's Armory
/// </summary>
Inside079Armory,
}
}
7 changes: 6 additions & 1 deletion EXILED/Exiled.API/Extensions/SpawnExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public static class SpawnExtensions
SpawnLocationType.Inside914,
SpawnLocationType.Inside049Armory,
SpawnLocationType.InsideLczCafe,
SpawnLocationType.Inside939Cryo,
};

/// <summary>
Expand Down Expand Up @@ -97,12 +98,16 @@ public static Vector3 GetPosition(this SpawnLocationType location)
SpawnLocationType.Inside173Bottom => "173_BOTTOM",
SpawnLocationType.InsideLczArmory => "LCZ_ARMORY",
SpawnLocationType.InsideHczArmory => "HCZ_ARMORY",
SpawnLocationType.InsideNukeArmory => "NUKE_ARMORY",
SpawnLocationType.InsideSurfaceNuke => "SURFACE_NUKE",
SpawnLocationType.Inside079Secondary => "079_SECOND",
SpawnLocationType.Inside173Connector => "173_CONNECTOR",
SpawnLocationType.InsideEscapePrimary => "ESCAPE_PRIMARY",
SpawnLocationType.InsideEscapeSecondary => "ESCAPE_SECONDARY",
SpawnLocationType.InsideGr18Glass => "GR18_INNER",
SpawnLocationType.Inside106Primary => "106_PRIMARY",
SpawnLocationType.Inside106Secondary => "106_SECONDARY",
SpawnLocationType.Inside939Cryo => "939_CRYO",
SpawnLocationType.Inside079Armory => "079_ARMORY",
_ => default,
};
}
Expand Down
Loading