Changeset 402 for binary-improvements2/7dtd-server-fixes
- Timestamp:
- Jan 27, 2023, 7:28:00 PM (22 months ago)
- Location:
- binary-improvements2/7dtd-server-fixes
- Files:
-
- 2 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements2/7dtd-server-fixes/7dtd-server-fixes.csproj
r392 r402 89 89 <ItemGroup> 90 90 <Compile Include="src\AssemblyInfo.cs" /> 91 <Compile Include="src\FileCache\InvalidateCachesCmd.cs" />92 <Compile Include="src\JSON\JsonManualBuilder.cs" />93 <Compile Include="src\LiveData\Animals.cs" />94 <Compile Include="src\LiveData\Hostiles.cs" />95 91 <Compile Include="src\PersistentData\PersistentContainer.cs" /> 96 92 <Compile Include="src\PersistentData\InvItem.cs" /> … … 98 94 <Compile Include="src\PersistentData\Players.cs" /> 99 95 <Compile Include="src\PersistentData\Player.cs" /> 100 <Compile Include="src\JSON\JsonNode.cs" />101 <Compile Include="src\JSON\JsonArray.cs" />102 <Compile Include="src\JSON\JsonObject.cs" />103 <Compile Include="src\JSON\JsonNumber.cs" />104 <Compile Include="src\JSON\JsonString.cs" />105 <Compile Include="src\JSON\JsonBoolean.cs" />106 <Compile Include="src\JSON\Parser.cs" />107 <Compile Include="src\JSON\JsonNull.cs" />108 <Compile Include="src\JSON\MalformedJSONException.cs" />109 <Compile Include="src\FileCache\AbstractCache.cs" />110 <Compile Include="src\FileCache\DirectAccess.cs" />111 <Compile Include="src\FileCache\SimpleCache.cs" />112 <Compile Include="src\FileCache\MapTileCache.cs" />113 96 <Compile Include="src\ModApi.cs" /> 114 <Compile Include="src\AllocsUtils.cs" />115 97 <Compile Include="src\LandClaimList.cs" /> 116 98 <Compile Include="src\PersistentData\Attributes.cs" /> 117 <Compile Include="src\JSON\JsonValue.cs" />118 <Compile Include="src\LiveData\EntityFilterList.cs" />119 99 </ItemGroup> 120 100 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> … … 122 102 <Folder Include="src\" /> 123 103 <Folder Include="src\PersistentData\" /> 124 <Folder Include="src\FileCache\" />125 104 </ItemGroup> 126 105 <ItemGroup> -
binary-improvements2/7dtd-server-fixes/ModInfo.xml
r391 r402 1 1 <?xml version="1.0" encoding="UTF-8" ?> 2 2 <xml> 3 <ModInfo> 4 <Name value="Server extensions" /> 5 <Description value="Common functions" /> 6 <Author value="The Fun Pimps LLC" /> 7 <Version value="1" /> 8 <Website value="" /> 9 </ModInfo> 3 <Name value="TFP_ServerExtensions" /> 4 <DisplayName value="Server Extensions (base)" /> 5 <Description value="Common functions for other mods" /> 6 <Author value="The Fun Pimps LLC" /> 7 <Version value="21.0" /> 8 <Website value="" /> 10 9 </xml> -
binary-improvements2/7dtd-server-fixes/src/ModApi.cs
r391 r402 30 30 } 31 31 32 Log.Out ("Player connected" + 33 ", entityid=" + _cInfo.entityId + 34 ", name=" + _cInfo.playerName + 35 ", pltfmid=" + (_cInfo.PlatformId?.CombinedString ?? "<unknown>") + 36 ", crossid=" + (_cInfo.CrossplatformId?.CombinedString ?? "<unknown/none>") + 37 ", steamOwner=" + (owner ?? "<unknown/none>") + 38 ", ip=" + _cInfo.ip 32 Log.Out ( 33 $"Player connected, entityid={_cInfo.entityId}, name={_cInfo.playerName}, pltfmid={_cInfo.PlatformId?.CombinedString ?? "<unknown>"}, crossid={_cInfo.CrossplatformId?.CombinedString ?? "<unknown/none>"}, steamOwner={owner ?? "<unknown/none>"}, ip={_cInfo.ip}" 39 34 ); 40 35 } … … 66 61 67 62 if (_cInfo != null) { 68 Log.Out ( "Sent chat hook reply to {0}", _cInfo.InternalId);63 Log.Out ($"Sent chat hook reply to {_cInfo.InternalId}"); 69 64 _cInfo.SendPackage (NetPackageManager.GetPackage<NetPackageChat> ().Setup (EChatType.Whisper, -1, testChatAnswer, "", false, null)); 70 65 } else { 71 Log.Error ( "ChatHookExample: Argument _cInfo null on message: {0}", _msg);66 Log.Error ($"ChatHookExample: Argument _cInfo null on message: {_msg}"); 72 67 } 73 68 -
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.