From b5685ca15f092c34696b15384bc5a269814923b3 Mon Sep 17 00:00:00 2001 From: MrMith <25213249+MrMith@users.noreply.github.com> Date: Thu, 5 Nov 2020 09:32:31 -0600 Subject: [PATCH] Room Update (#179) * haha smodroom works Added GetCurrentRoom() to SmodPlayer Added GetAllRooms() to SmodMap * Fine Evan >:( --- Smod2/API/Map.cs | 103 +++++++++++++++++++++++++++----------------- Smod2/API/Player.cs | 1 + 2 files changed, 65 insertions(+), 39 deletions(-) diff --git a/Smod2/API/Map.cs b/Smod2/API/Map.cs index f8126855..fce2e82c 100644 --- a/Smod2/API/Map.cs +++ b/Smod2/API/Map.cs @@ -5,6 +5,11 @@ namespace Smod2.API { public abstract class Map { + /// + /// Gets every Room in the game including surface (Pocket excluded) + /// + /// Every room in the game + public abstract List GetRooms(); public abstract List GetItems(ItemType type, bool world_only); public abstract Vector GetRandomSpawnPoint(RoleType role); [Obsolete("Use RoleType instead of Role")] @@ -158,49 +163,69 @@ public enum Spawnable //1st is player and 2nd is Lobby_Playback and I don't know public enum ZoneType { - UNDEFINED = 0, - LCZ = 1, - HCZ = 2, - ENTRANCE = 3 + LCZ, + HCZ, + ENTRANCE, + SURFACE } public enum RoomType { - UNDEFINED = 0, - WC00 = 1, - SCP_914 = 2, - AIRLOCK_00 = 3, - AIRLOCK_01 = 4, - CHECKPOINT_A = 5, - CHECKPOINT_B = 6, - HCZ_ARMORY = 7, - SERVER_ROOM = 8, - MICROHID = 9, - NUKE = 10, - SCP_012 = 11, - SCP_049 = 12, - SCP_079 = 13, - SCP_096 = 14, - SCP_106 = 15, - SCP_173 = 16, - SCP_372 = 17, - SCP_939 = 18, - ENTRANCE_CHECKPOINT = 19, - TESLA_GATE = 20, - PC_SMALL = 21, - PC_LARGE = 22, - GATE_A = 23, - GATE_B = 24, - CAFE = 25, - INTERCOM = 26, - DR_L = 27, - STRAIGHT = 28, - CURVE = 29, - T_INTERSECTION = 30, - X_INTERSECTION = 31, - LCZ_ARMORY = 32, - CLASS_D_CELLS = 33, - CUBICLES = 34 + //Light Containment Zone + LCZ_012, + LCZ_173, + LCZ_372, + LCZ_914, + LCZ_AIRLOCK, + LCZ_ARMORY, + LCZ_CAFE, + LCZ_CHECKPOINT_A, + LCZ_CHECKPOINT_B, + LCZ_CLASSD_SPAWN, + LCZ_4_WAY_INTERSECTION, + LCZ_3_WAY_INTERSECTION, + LCZ_CURVE, + LCZ_PLANTS, + LCZ_STRAIGHT, + LCZ_TOILETS, + //Heavy Containment Zone + HCZ_049, + HCZ_079, + HCZ_106, + HCZ_096, + HCZ_939, + HCZ_CHECKPOINT_A, + HCZ_CHECKPOINT_B, + HCZ_4_WAY_INTERSECTION, + HCZ_3_WAY_INTERSECTION, + HCZ_CURVE, + HCZ_STRAIGHT, + HCZ_EZ_CHECKPOINT, + HCZ_HID, + HCZ_NUKE, + HCZ_SERVER, + HCZ_TARMORY, + HCZ_TESLA, + //Entrance Zone + EZ_STRAIGHT, + EZ_CAFETERIA, + EZ_CHEF, //There are 4 straight hallways... how do you name these properly >>>>:( + EZ_GATE_A, + EZ_GATE_B, + EZ_4_WAY_INTERSECTION, + EZ_3_WAY_INTERSECTION, + EZ_CURVE, + EZ_COLLAPSEDTUNNEL, + EZ_REDGATE, + EZ_INTERCOM, + EZ_PC_LARGE, + EZ_PC_SMALL, + EZ_SHELTER, + EZ_SMALLSTRAIGHT, + EZ_SMALLSTRAIGHT2, + EZ_UPSTAIRS, + //End + SURFACE, } public enum Scp079InteractionType diff --git a/Smod2/API/Player.cs b/Smod2/API/Player.cs index 8ea9bf06..f2134524 100644 --- a/Smod2/API/Player.cs +++ b/Smod2/API/Player.cs @@ -141,6 +141,7 @@ public abstract class Player : ICommandSender, IEquatable public abstract bool OverwatchMode { get; set; } public abstract bool DoNotTrack { get; } public abstract Scp079Data Scp079Data { get; } + public abstract Room GetCurrentRoom(); public string GetParsedUserID() {