Changeset 369 for binary-improvements/MapRendering
- Timestamp:
- Nov 9, 2021, 6:28:33 PM (3 years ago)
- Location:
- binary-improvements/MapRendering
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/API.cs
r367 r369 6 6 private Web webInstance; 7 7 8 public void InitMod ( ) {8 public void InitMod (Mod _modInstance) { 9 9 ModEvents.GameStartDone.RegisterHandler (GameStartDone); 10 10 ModEvents.GameShutdown.RegisterHandler (GameShutdown); … … 14 14 private void GameStartDone () { 15 15 // ReSharper disable once ObjectCreationAsStatement 16 if (!ConnectionManager.Instance.IsServer) { 17 return; 18 } 19 16 20 webInstance = new Web (); 17 21 LogBuffer.Init (); … … 23 27 24 28 private void GameShutdown () { 25 webInstance .Shutdown ();29 webInstance?.Shutdown (); 26 30 MapRendering.MapRendering.Shutdown (); 27 31 } -
binary-improvements/MapRendering/MapRendering/MapRendering.cs
r351 r369 26 26 27 27 private MapRendering () { 28 Constants.MAP_DIRECTORY = Game Utils.GetSaveGameDir () + "/map";28 Constants.MAP_DIRECTORY = GameIO.GetSaveGameDir () + "/map"; 29 29 30 30 lock (lockObject) { … … 59 59 60 60 public static void Shutdown () { 61 if (Instance .renderCoroutineRef != null) {61 if (Instance?.renderCoroutineRef != null) { 62 62 ThreadManager.StopCoroutine (Instance.renderCoroutineRef); 63 63 Instance.renderCoroutineRef = null; … … 66 66 67 67 public static void RenderSingleChunk (Chunk _chunk) { 68 if (renderingEnabled ) {68 if (renderingEnabled && Instance != null) { 69 69 // TODO: Replace with regular thread and a blocking queue / set 70 70 ThreadPool.UnsafeQueueUserWorkItem (_o => { … … 101 101 MicroStopwatch microStopwatch = new MicroStopwatch (); 102 102 103 string regionSaveDir = Game Utils.GetSaveGameRegionDir ();103 string regionSaveDir = GameIO.GetSaveGameRegionDir (); 104 104 RegionFileManager rfm = new RegionFileManager (regionSaveDir, regionSaveDir, 0, false); 105 105 Texture2D fullMapTexture = null; -
binary-improvements/MapRendering/Web/API/GetLandClaims.cs
r351 r369 8 8 public override void HandleRequest (HttpListenerRequest _req, HttpListenerResponse _resp, WebConnection _user, 9 9 int _permissionLevel) { 10 string requestedSteamID = string.Empty; 11 12 if (_req.QueryString ["steamid"] != null) { 13 ulong lViewersSteamID; 14 requestedSteamID = _req.QueryString ["steamid"]; 15 if (requestedSteamID.Length != 17 || !ulong.TryParse (requestedSteamID, out lViewersSteamID)) { 10 PlatformUserIdentifierAbs requestedUserId = null; 11 if (_req.QueryString ["userid"] != null) { 12 if (!PlatformUserIdentifierAbs.TryFromCombinedString (_req.QueryString ["userid"], out requestedUserId)) { 16 13 _resp.StatusCode = (int) HttpStatusCode.BadRequest; 17 Web.SetResponseTextContent (_resp, "Invalid SteamIDgiven");14 Web.SetResponseTextContent (_resp, "Invalid user id given"); 18 15 return; 19 16 } … … 21 18 22 19 // default user, cheap way to avoid 'null reference exception' 23 _user = _user ?? new WebConnection ("", IPAddress.None, 0L);20 PlatformUserIdentifierAbs userId = _user?.UserId; 24 21 25 22 bool bViewAll = WebConnection.CanViewAllClaims (_permissionLevel); … … 32 29 33 30 LandClaimList.OwnerFilter[] ownerFilters = null; 34 if ( !string.IsNullOrEmpty (requestedSteamID)|| !bViewAll) {35 if ( !string.IsNullOrEmpty (requestedSteamID)&& !bViewAll) {31 if (requestedUserId != null || !bViewAll) { 32 if (requestedUserId != null && !bViewAll) { 36 33 ownerFilters = new[] { 37 LandClaimList. SteamIdFilter (_user.SteamID.ToString ()),38 LandClaimList. SteamIdFilter (requestedSteamID)34 LandClaimList.UserIdFilter (userId), 35 LandClaimList.UserIdFilter (requestedUserId) 39 36 }; 40 37 } else if (!bViewAll) { 41 ownerFilters = new[] {LandClaimList. SteamIdFilter (_user.SteamID.ToString ())};38 ownerFilters = new[] {LandClaimList.UserIdFilter (userId)}; 42 39 } else { 43 ownerFilters = new[] {LandClaimList. SteamIdFilter (requestedSteamID)};40 ownerFilters = new[] {LandClaimList.UserIdFilter (requestedUserId)}; 44 41 } 45 42 } … … 50 47 51 48 foreach (KeyValuePair<Player, List<Vector3i>> kvp in claims) { 52 // try { 53 JSONObject owner = new JSONObject (); 54 claimOwners.Add (owner); 49 JSONObject owner = new JSONObject (); 50 claimOwners.Add (owner); 55 51 56 owner.Add ("steamid", new JSONString (kvp.Key.SteamID));57 52 owner.Add ("steamid", new JSONString (kvp.Key.PlatformId.CombinedString)); 53 owner.Add ("claimactive", new JSONBoolean (kvp.Key.LandProtectionActive)); 58 54 59 60 61 62 63 55 if (kvp.Key.Name.Length > 0) { 56 owner.Add ("playername", new JSONString (kvp.Key.Name)); 57 } else { 58 owner.Add ("playername", new JSONNull ()); 59 } 64 60 65 66 61 JSONArray claimsJson = new JSONArray (); 62 owner.Add ("claims", claimsJson); 67 63 68 69 70 71 72 64 foreach (Vector3i v in kvp.Value) { 65 JSONObject claim = new JSONObject (); 66 claim.Add ("x", new JSONNumber (v.x)); 67 claim.Add ("y", new JSONNumber (v.y)); 68 claim.Add ("z", new JSONNumber (v.z)); 73 69 74 claimsJson.Add (claim); 75 } 76 // } catch { 77 // } 70 claimsJson.Add (claim); 71 } 78 72 } 79 73 -
binary-improvements/MapRendering/Web/API/GetPlayerInventories.cs
r349 r369 8 8 public override void HandleRequest (HttpListenerRequest _req, HttpListenerResponse _resp, WebConnection _user, 9 9 int _permissionLevel) { 10 11 bool showIconColor, showIconName; 12 GetPlayerInventory.GetInventoryArguments (_req, out showIconColor, out showIconName); 10 GetPlayerInventory.GetInventoryArguments (_req, out bool showIconColor, out bool showIconName); 13 11 14 12 JSONArray AllInventoriesResult = new JSONArray (); 15 13 16 foreach (KeyValuePair< string, Player> kvp in PersistentContainer.Instance.Players.Dict) {14 foreach (KeyValuePair<PlatformUserIdentifierAbs, Player> kvp in PersistentContainer.Instance.Players.Dict) { 17 15 Player p = kvp.Value; 18 16 … … 22 20 23 21 if (p.IsOnline) { 24 AllInventoriesResult.Add (GetPlayerInventory.DoPlayer (kvp.Key , p, showIconColor, showIconName));22 AllInventoriesResult.Add (GetPlayerInventory.DoPlayer (kvp.Key.CombinedString, p, showIconColor, showIconName)); 25 23 } 26 24 } -
binary-improvements/MapRendering/Web/API/GetPlayerInventory.cs
r348 r369 8 8 public override void HandleRequest (HttpListenerRequest _req, HttpListenerResponse _resp, WebConnection _user, 9 9 int _permissionLevel) { 10 if (_req.QueryString [" steamid"] == null) {10 if (_req.QueryString ["userid"] == null) { 11 11 _resp.StatusCode = (int) HttpStatusCode.BadRequest; 12 Web.SetResponseTextContent (_resp, "No SteamIDgiven");12 Web.SetResponseTextContent (_resp, "No user id given"); 13 13 return; 14 14 } 15 15 16 string steamId = _req.QueryString ["steamid"]; 17 18 Player p = PersistentContainer.Instance.Players [steamId, false]; 19 if (p == null) { 20 _resp.StatusCode = (int) HttpStatusCode.NotFound; 21 Web.SetResponseTextContent (_resp, "Invalid or unknown SteamID given"); 16 string userIdString = _req.QueryString ["userid"]; 17 if (!PlatformUserIdentifierAbs.TryFromCombinedString (userIdString, out PlatformUserIdentifierAbs userId)) { 18 _resp.StatusCode = (int) HttpStatusCode.BadRequest; 19 Web.SetResponseTextContent (_resp, "Invalid user id given"); 22 20 return; 23 21 } 24 22 25 bool showIconColor, showIconName; 26 GetInventoryArguments (_req, out showIconColor, out showIconName); 23 Player p = PersistentContainer.Instance.Players [userId, false]; 24 if (p == null) { 25 _resp.StatusCode = (int) HttpStatusCode.NotFound; 26 Web.SetResponseTextContent (_resp, "Unknown user id given"); 27 return; 28 } 27 29 28 JSONObject result = DoPlayer (steamId, p, showIconColor, showIconName); 30 GetInventoryArguments (_req, out bool showIconColor, out bool showIconName); 31 32 JSONObject result = DoPlayer (userIdString, p, showIconColor, showIconName); 29 33 30 34 WriteJSON (_resp, result); … … 49 53 JSONArray belt = new JSONArray (); 50 54 JSONObject equipment = new JSONObject (); 51 result.Add (" steamid", new JSONString (_steamId));55 result.Add ("userid", new JSONString (_steamId)); 52 56 result.Add ("entityid", new JSONNumber (_player.EntityID)); 53 57 result.Add ("playername", new JSONString (_player.Name)); … … 86 90 87 91 for (int i = 0; i < slotindices.Length; i++) { 88 if (_items != null && _items[slotindices [i]] != null) {92 if (_items? [slotindices [i]] != null) { 89 93 InvItem item = _items [slotindices [i]]; 90 94 _eq.Add (_slotname, GetJsonForItem (item, _showIconColor, _showIconName)); -
binary-improvements/MapRendering/Web/API/GetPlayerList.cs
r351 r369 6 6 using AllocsFixes.JSON; 7 7 using AllocsFixes.PersistentData; 8 using UnityEngine.Profiling;9 8 10 9 namespace AllocsFixes.NetConnections.Servers.Web.API { … … 14 13 15 14 #if ENABLE_PROFILER 16 private static readonly CustomSampler jsonSerializeSampler =CustomSampler.Create ("JSON_Build");15 private static readonly UnityEngine.Profiling.CustomSampler jsonSerializeSampler = UnityEngine.Profiling.CustomSampler.Create ("JSON_Build"); 17 16 #endif 18 17 … … 20 19 int _permissionLevel) { 21 20 AdminTools admTools = GameManager.Instance.adminTools; 22 _user = _user ?? new WebConnection ("", IPAddress.None, 0L);21 PlatformUserIdentifierAbs userId = _user?.UserId; 23 22 24 23 bool bViewAll = WebConnection.CanViewAllPlayers (_permissionLevel); … … 47 46 #endif 48 47 49 foreach (KeyValuePair< string, Player> kvp in playersList.Dict) {48 foreach (KeyValuePair<PlatformUserIdentifierAbs, Player> kvp in playersList.Dict) { 50 49 Player p = kvp.Value; 51 50 52 ulong player_steam_ID; 53 if (!ulong.TryParse (kvp.Key, out player_steam_ID)) { 54 player_steam_ID = 0L; 55 } 56 57 if (player_steam_ID == _user.SteamID || bViewAll) { 51 if (bViewAll || p.PlatformId.Equals (userId)) { 58 52 JSONObject pos = new JSONObject (); 59 53 pos.Add ("x", new JSONNumber (p.LastPosition.x)); … … 62 56 63 57 JSONObject pJson = new JSONObject (); 64 pJson.Add ("steamid", new JSONString (kvp.Key ));58 pJson.Add ("steamid", new JSONString (kvp.Key.CombinedString)); 65 59 pJson.Add ("entityid", new JSONNumber (p.EntityID)); 66 60 pJson.Add ("ip", new JSONString (p.IP)); … … 74 68 pJson.Add ("ping", new JSONNumber (p.IsOnline ? p.ClientInfo.ping : -1)); 75 69 76 JSONBoolean banned; 77 if (admTools != null) { 78 banned = new JSONBoolean (admTools.IsBanned (kvp.Key)); 79 } else { 80 banned = new JSONBoolean (false); 81 } 70 JSONBoolean banned = admTools != null ? new JSONBoolean (admTools.IsBanned (kvp.Key, out _, out _)) : new JSONBoolean (false); 82 71 83 72 pJson.Add ("banned", banned); -
binary-improvements/MapRendering/Web/API/GetPlayersLocation.cs
r351 r369 9 9 int _permissionLevel) { 10 10 AdminTools admTools = GameManager.Instance.adminTools; 11 _user = _user ?? new WebConnection ("", IPAddress.None, 0L);11 PlatformUserIdentifierAbs userId = _user?.UserId; 12 12 13 13 bool listOffline = false; … … 22 22 Players playersList = PersistentContainer.Instance.Players; 23 23 24 foreach (KeyValuePair< string, Player> kvp in playersList.Dict) {24 foreach (KeyValuePair<PlatformUserIdentifierAbs, Player> kvp in playersList.Dict) { 25 25 if (admTools != null) { 26 if (admTools.IsBanned (kvp.Key )) {26 if (admTools.IsBanned (kvp.Key, out _, out _)) { 27 27 continue; 28 28 } … … 32 32 33 33 if (listOffline || p.IsOnline) { 34 ulong player_steam_ID; 35 if (!ulong.TryParse (kvp.Key, out player_steam_ID)) { 36 player_steam_ID = 0L; 37 } 38 39 if (player_steam_ID == _user.SteamID || bViewAll) { 34 if (bViewAll || p.PlatformId.Equals (userId)) { 40 35 JSONObject pos = new JSONObject (); 41 36 pos.Add ("x", new JSONNumber (p.LastPosition.x)); … … 44 39 45 40 JSONObject pJson = new JSONObject (); 46 pJson.Add ("steamid", new JSONString (kvp.Key ));41 pJson.Add ("steamid", new JSONString (kvp.Key.CombinedString)); 47 42 48 43 // pJson.Add("entityid", new JSONNumber (p.EntityID)); -
binary-improvements/MapRendering/Web/API/GetPlayersOnline.cs
r351 r369 13 13 foreach (KeyValuePair<int, EntityPlayer> current in w.Players.dict) { 14 14 ClientInfo ci = ConnectionManager.Instance.Clients.ForEntityId (current.Key); 15 Player player = PersistentContainer.Instance.Players [ci. playerId, false];15 Player player = PersistentContainer.Instance.Players [ci.PlatformId, false]; 16 16 17 17 JSONObject pos = new JSONObject (); … … 21 21 22 22 JSONObject p = new JSONObject (); 23 p.Add ("steamid", new JSONString (ci. playerId));23 p.Add ("steamid", new JSONString (ci.PlatformId.CombinedString)); 24 24 p.Add ("entityid", new JSONNumber (ci.entityId)); 25 25 p.Add ("ip", new JSONString (ci.ip)); … … 28 28 p.Add ("position", pos); 29 29 30 // Deprecated! 31 p.Add ("experience", new JSONNumber (-1)); 32 33 p.Add ("level", new JSONNumber (player != null ? player.Level : -1)); 30 p.Add ("level", new JSONNumber (player?.Level ?? -1)); 34 31 p.Add ("health", new JSONNumber (current.Value.Health)); 35 32 p.Add ("stamina", new JSONNumber (current.Value.Stamina)); … … 39 36 p.Add ("score", new JSONNumber (current.Value.Score)); 40 37 41 p.Add ("totalplaytime", new JSONNumber (player != null ? player.TotalPlayTime :-1));38 p.Add ("totalplaytime", new JSONNumber (player?.TotalPlayTime ?? -1)); 42 39 p.Add ("lastonline", new JSONString (player != null ? player.LastOnline.ToString ("s") : string.Empty)); 43 40 p.Add ("ping", new JSONNumber (ci.ping)); -
binary-improvements/MapRendering/Web/ConnectionHandler.cs
r351 r369 2 2 using System.Collections.Generic; 3 3 using System.Net; 4 using Platform.Steam; 4 5 5 6 namespace AllocsFixes.NetConnections.Servers.Web { … … 36 37 public WebConnection LogIn (ulong _steamId, IPAddress _ip) { 37 38 string sessionId = Guid.NewGuid ().ToString (); 38 WebConnection con = new WebConnection (sessionId, _ip, _steamId); 39 PlatformUserIdentifierAbs userId = new UserIdentifierSteam (_steamId); 40 WebConnection con = new WebConnection (sessionId, _ip, userId); 39 41 connections.Add (sessionId, con); 40 42 return con; -
binary-improvements/MapRendering/Web/Handlers/ItemIconHandler.cs
r367 r369 77 77 78 78 try { 79 loadIconsFromFolder ( Utils.GetGameDir ("Data/ItemIcons"), tintedIcons);79 loadIconsFromFolder (GameIO.GetGameDir ("Data/ItemIcons"), tintedIcons); 80 80 } catch (Exception e) { 81 81 Log.Error ("Failed loading icons from base game"); -
binary-improvements/MapRendering/Web/Handlers/UserStatusHandler.cs
r351 r369 13 13 14 14 result.Add ("loggedin", new JSONBoolean (_user != null)); 15 result.Add ("username", new JSONString (_user != null ? _user. SteamID.ToString () : string.Empty));15 result.Add ("username", new JSONString (_user != null ? _user.UserId.ToString () : string.Empty)); 16 16 17 17 JSONArray perms = new JSONArray (); -
binary-improvements/MapRendering/Web/LogBuffer.cs
r350 r369 1 1 using System; 2 2 using System.Collections.Generic; 3 using System.Text.RegularExpressions;4 3 using UnityEngine; 5 4 … … 8 7 private const int MAX_ENTRIES = 3000; 9 8 private static LogBuffer instance; 10 11 private static readonly Regex logMessageMatcher =12 new Regex (@"^([0-9]{4}-[0-9]{2}-[0-9]{2})T([0-9]{2}:[0-9]{2}:[0-9]{2}) ([0-9]+[,.][0-9]+) [A-Z]+ (.*)$");13 9 14 10 private readonly List<LogEntry> logEntries = new List<LogEntry> (); … … 23 19 24 20 private LogBuffer () { 25 Log ger.Main.LogCallbacks+= LogCallback;21 Log.LogCallbacksExtended += LogCallback; 26 22 } 27 23 … … 72 68 } 73 69 74 private void LogCallback (string _ msg, string _trace, LogType _type) {70 private void LogCallback (string _formattedMsg, string _plainMsg, string _trace, LogType _type, DateTime _timestamp, long _uptime) { 75 71 LogEntry le = new LogEntry (); 76 72 77 Match match = logMessageMatcher.Match (_msg); 78 if (match.Success) { 79 le.date = match.Groups [1].Value; 80 le.time = match.Groups [2].Value; 81 le.uptime = match.Groups [3].Value; 82 le.message = match.Groups [4].Value; 83 } else { 84 DateTime dt = DateTime.Now; 85 le.date = string.Format ("{0:0000}-{1:00}-{2:00}", dt.Year, dt.Month, dt.Day); 86 le.time = string.Format ("{0:00}:{1:00}:{2:00}", dt.Hour, dt.Minute, dt.Second); 87 le.uptime = ""; 88 le.message = _msg; 89 } 90 73 le.date = $"{_timestamp.Year:0000}-{_timestamp.Month:00}-{_timestamp.Day:00}"; 74 le.time = $"{_timestamp.Hour:00}:{_timestamp.Minute:00}:{_timestamp.Second:00}"; 75 le.uptime = _uptime.ToString (); 76 le.message = _plainMsg; 91 77 le.trace = _trace; 92 78 le.type = _type; -
binary-improvements/MapRendering/Web/SSE/EventLog.cs
r367 r369 1 1 using System; 2 using System.Net;3 using System.Text;4 using System.Text.RegularExpressions;5 2 using AllocsFixes.JSON; 6 3 using UnityEngine; … … 8 5 namespace AllocsFixes.NetConnections.Servers.Web.SSE { 9 6 public class EventLog : EventBase { 10 private static readonly Regex logMessageMatcher =11 new Regex (@"^([0-9]{4}-[0-9]{2}-[0-9]{2})T([0-9]{2}:[0-9]{2}:[0-9]{2}) ([0-9]+[,.][0-9]+) [A-Z]+ (.*)$");12 13 7 public EventLog (SseHandler _parent) : base (_parent, _name: "log") { 14 Log ger.Main.LogCallbacks+= LogCallback;8 Log.LogCallbacksExtended += LogCallback; 15 9 } 16 10 17 18 private void LogCallback (string _msg, string _trace, LogType _type) { 19 Match match = logMessageMatcher.Match (_msg); 20 21 string date; 22 string time; 23 string uptime; 24 string message; 25 if (match.Success) { 26 date = match.Groups [1].Value; 27 time = match.Groups [2].Value; 28 uptime = match.Groups [3].Value; 29 message = match.Groups [4].Value; 30 } else { 31 DateTime dt = DateTime.Now; 32 date = $"{dt.Year:0000}-{dt.Month:00}-{dt.Day:00}"; 33 time = $"{dt.Hour:00}:{dt.Minute:00}:{dt.Second:00}"; 34 uptime = ""; 35 message = _msg; 36 } 11 private void LogCallback (string _formattedMsg, string _plainMsg, string _trace, LogType _type, DateTime _timestamp, long _uptime) { 12 string date = $"{_timestamp.Year:0000}-{_timestamp.Month:00}-{_timestamp.Day:00}"; 13 string time = $"{_timestamp.Hour:00}:{_timestamp.Minute:00}:{_timestamp.Second:00}"; 14 string uptime = _uptime.ToString (); 15 string message = _plainMsg; 37 16 38 17 JSONObject data = new JSONObject (); … … 46 25 SendData ("logLine", data); 47 26 } 48 49 27 } 50 28 } -
binary-improvements/MapRendering/Web/Web.cs
r367 r369 59 59 RegisterPathHandler ("/itemicons/", new ItemIconHandler (true)); 60 60 RegisterPathHandler ("/map/", new StaticHandler ( 61 Game Utils.GetSaveGameDir () + "/map",61 GameIO.GetSaveGameDir () + "/map", 62 62 MapRendering.MapRendering.GetTileCache (), 63 63 false, … … 111 111 } 112 112 113 public void SendLog (string _ text, string _trace, LogType _type) {113 public void SendLog (string _formattedMessage, string _plainMessage, string _trace, LogType _type, DateTime _timestamp, long _uptime) { 114 114 // Do nothing, handled by LogBuffer internally 115 115 } … … 248 248 if (con != null) { 249 249 _con = con; 250 return GameManager.Instance.adminTools.GetUserPermissionLevel (_con. SteamID.ToString ());250 return GameManager.Instance.adminTools.GetUserPermissionLevel (_con.UserId); 251 251 } 252 252 } … … 270 270 WebConnection con = connectionHandler.LogIn (id, _req.RemoteEndPoint.Address); 271 271 _con = con; 272 int level = GameManager.Instance.adminTools.GetUserPermissionLevel ( id.ToString ());272 int level = GameManager.Instance.adminTools.GetUserPermissionLevel (con.UserId); 273 273 Log.Out ("Steam OpenID login from {0} with ID {1}, permission level {2}", 274 remoteEndpointString, con. SteamID, level);274 remoteEndpointString, con.UserId, level); 275 275 return level; 276 276 } -
binary-improvements/MapRendering/Web/WebCommandResult.cs
r332 r369 95 95 } 96 96 97 public void SendLog (string _ msg, string _trace, LogType _type) {97 public void SendLog (string _formattedMessage, string _plainMessage, string _trace, LogType _type, DateTime _timestamp, long _uptime) { 98 98 //throw new NotImplementedException (); 99 99 } -
binary-improvements/MapRendering/Web/WebConnection.cs
r332 r369 11 11 private readonly string conDescription; 12 12 13 public WebConnection (string _sessionId, IPAddress _endpoint, ulong _steamId) {13 public WebConnection (string _sessionId, IPAddress _endpoint, PlatformUserIdentifierAbs _userId) { 14 14 SessionID = _sessionId; 15 15 Endpoint = _endpoint; 16 SteamID = _steamId;16 UserId = _userId; 17 17 login = DateTime.Now; 18 18 lastAction = login; … … 20 20 } 21 21 22 public string SessionID { get; private set;}22 public string SessionID { get; } 23 23 24 public IPAddress Endpoint { get; private set;}24 public IPAddress Endpoint { get; } 25 25 26 public ulong SteamID { get; private set; }26 public PlatformUserIdentifierAbs UserId { get; } 27 27 28 public TimeSpan Age { 29 get { return DateTime.Now - lastAction; } 30 } 28 public TimeSpan Age => DateTime.Now - lastAction; 31 29 32 30 public static bool CanViewAllPlayers (int _permissionLevel) { … … 54 52 } 55 53 56 public override void SendLog (string _ msg, string _trace, LogType _type) {54 public override void SendLog (string _formattedMsg, string _plainMsg, string _trace, LogType _type, DateTime _timestamp, long _uptime) { 57 55 // Do nothing, handled by LogBuffer 58 56 } -
binary-improvements/MapRendering/Web/WebPermissions.cs
r351 r369 191 191 modules.Clear (); 192 192 193 if (! Utils.FileExists (GetFullPath ())) {193 if (!File.Exists (GetFullPath ())) { 194 194 Log.Out (string.Format ("Permissions file '{0}' not found, creating.", GetFileName ())); 195 195 Save (); -
binary-improvements/MapRendering/WebAndMapRendering.csproj
r367 r369 31 31 </PropertyGroup> 32 32 <ItemGroup> 33 <Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"> 34 <HintPath>..\7dtd-binaries\Assembly-CSharp-firstpass.dll</HintPath> 35 <Private>False</Private> 36 </Reference> 33 37 <Reference Include="LogLibrary"> 34 38 <HintPath>..\7dtd-binaries\LogLibrary.dll</HintPath>
Note:
See TracChangeset
for help on using the changeset viewer.