Changeset 402 for binary-improvements2/7dtd-server-fixes/src/PersistentData
- Timestamp:
- Jan 27, 2023, 7:28:00 PM (2 years ago)
- Location:
- binary-improvements2/7dtd-server-fixes/src/PersistentData
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements2/7dtd-server-fixes/src/PersistentData/Inventory.cs
r351 r402 67 67 68 68 if (_count > maxAllowed) { 69 Log.Out ("Player with ID " + _playerId + " has stack for \"" + name + "\" greater than allowed (" + 70 _count + " > " + maxAllowed + ")"); 69 Log.Out ($"Player with ID {_playerId} has stack for \"{name}\" greater than allowed ({_count} > {maxAllowed})"); 71 70 } 72 71 … … 80 79 item.icon = itemClass.GetIconName (); 81 80 82 item.iconcolor = AllocsUtils.ColorToHex (itemClass.GetIconTint ());81 item.iconcolor = itemClass.GetIconTint ().ToHexCode (); 83 82 84 83 return item; -
binary-improvements2/7dtd-server-fixes/src/PersistentData/PersistentContainer.cs
r391 r402 22 22 23 23 public void Save () { 24 Stream stream = File.Open ( GameIO.GetSaveGameDir () + "/AllocsPeristentData.bin", FileMode.Create);24 Stream stream = File.Open ($"{GameIO.GetSaveGameDir ()}/AllocsPeristentData.bin", FileMode.Create); 25 25 BinaryFormatter bFormatter = new BinaryFormatter (); 26 26 bFormatter.Serialize (stream, this); … … 29 29 30 30 public static bool Load () { 31 if (!File.Exists ( GameIO.GetSaveGameDir () + "/AllocsPeristentData.bin")) {31 if (!File.Exists ($"{GameIO.GetSaveGameDir ()}/AllocsPeristentData.bin")) { 32 32 return false; 33 33 } 34 34 35 35 try { 36 Stream stream = File.Open ( GameIO.GetSaveGameDir () + "/AllocsPeristentData.bin", FileMode.Open);36 Stream stream = File.Open ($"{GameIO.GetSaveGameDir ()}/AllocsPeristentData.bin", FileMode.Open); 37 37 BinaryFormatter bFormatter = new BinaryFormatter (); 38 38 PersistentContainer obj = (PersistentContainer) bFormatter.Deserialize (stream); -
binary-improvements2/7dtd-server-fixes/src/PersistentData/Player.cs
r369 r402 117 117 } 118 118 119 Log.Out ( "Player set to offline: " + platformId);119 Log.Out ($"Player set to offline: {platformId}"); 120 120 lastOnline = DateTime.Now; 121 121 try { … … 133 133 134 134 public void SetOnline (ClientInfo _ci) { 135 Log.Out ( "Player set to online: " + platformId);135 Log.Out ($"Player set to online: {platformId}"); 136 136 clientInfo = _ci; 137 137 entityId = _ci.entityId; -
binary-improvements2/7dtd-server-fixes/src/PersistentData/Players.cs
r391 r402 22 22 } 23 23 24 Log.Out ( "Created new player entry for ID: " + _platformId);24 Log.Out ($"Created new player entry for ID: {_platformId}"); 25 25 Player p = new Player (_platformId); 26 26 Dict.Add (_platformId, p);
Note:
See TracChangeset
for help on using the changeset viewer.