Changeset 345
- Timestamp:
- Jan 5, 2019, 3:21:40 PM (6 years ago)
- Location:
- binary-improvements
- Files:
-
- 4 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/7dtd-server-fixes.csproj
r330 r345 39 39 <DefineConstants>ENABLE_PROFILER</DefineConstants> 40 40 <Optimize>true</Optimize> 41 <WarningLevel>4</WarningLevel> 41 42 </PropertyGroup> 42 43 <ItemGroup> … … 76 77 <ItemGroup> 77 78 <Compile Include="src\AssemblyInfo.cs" /> 78 <Compile Include="src\AllocsLogFunctions.cs" />79 79 <Compile Include="src\LiveData\Animals.cs" /> 80 80 <Compile Include="src\LiveData\Hostiles.cs" /> 81 <Compile Include="src\PlayerDataStuff.cs" />82 81 <Compile Include="src\PersistentData\PersistentContainer.cs" /> 83 <Compile Include="src\StateManager.cs" />84 82 <Compile Include="src\PersistentData\InvItem.cs" /> 85 83 <Compile Include="src\PersistentData\Inventory.cs" /> … … 101 99 <Compile Include="src\FileCache\MapTileCache.cs" /> 102 100 <Compile Include="src\API.cs" /> 103 <Compile Include="src\ChatHookExample.cs" />104 101 <Compile Include="src\AllocsUtils.cs" /> 105 102 <Compile Include="src\LandClaimList.cs" /> -
binary-improvements/7dtd-server-fixes/ModInfo.xml
r341 r345 5 5 <Description value="Common functions" /> 6 6 <Author value="Christian 'Alloc' Illy" /> 7 <Version value="2 0" />7 <Version value="21" /> 8 8 <Website value="http://7dtd.illy.bz" /> 9 9 </ModInfo> -
binary-improvements/7dtd-server-fixes/src/API.cs
r337 r345 1 1 using System.Collections.Generic; 2 using AllocsFixes.PersistentData; 3 using System; 2 4 3 5 namespace AllocsFixes { … … 9 11 ModEvents.PlayerSpawning.RegisterHandler (PlayerSpawning); 10 12 ModEvents.PlayerDisconnected.RegisterHandler (PlayerDisconnected); 13 ModEvents.PlayerSpawnedInWorld.RegisterHandler (PlayerSpawned); 11 14 ModEvents.ChatMessage.RegisterHandler (ChatMessage); 12 15 } 13 16 14 17 public void GameAwake () { 15 StateManager.Awake (); 18 try { 19 PersistentContainer.Load (); 20 } catch (Exception e) { 21 Log.Out ("Error in StateManager.Awake: " + e); 22 } 16 23 } 17 24 18 25 public void GameShutdown () { 19 StateManager.Shutdown (); 26 try { 27 Log.Out ("Server shutting down!"); 28 PersistentContainer.Instance.Save (); 29 } catch (Exception e) { 30 Log.Out ("Error in StateManager.Shutdown: " + e); 31 } 20 32 } 21 33 22 34 public void SavePlayerData (ClientInfo _cInfo, PlayerDataFile _playerDataFile) { 23 PlayerDataStuff.GM_SavePlayerData (_cInfo, _playerDataFile); 35 try { 36 PersistentContainer.Instance.Players [_cInfo.playerId, true].Update (_playerDataFile); 37 } catch (Exception e) { 38 Log.Out ("Error in GM_SavePlayerData: " + e); 39 } 24 40 } 25 41 26 42 public void PlayerSpawning (ClientInfo _cInfo, int _chunkViewDim, PlayerProfile _playerProfile) { 27 AllocsLogFunctions.RequestToSpawnPlayer (_cInfo, _chunkViewDim, _playerProfile); 43 try { 44 Log.Out ("Player connected" + 45 ", entityid=" + _cInfo.entityId + 46 ", name=" + _cInfo.playerName + 47 ", steamid=" + _cInfo.playerId + 48 ", steamOwner=" + _cInfo.ownerId + 49 ", ip=" + _cInfo.ip 50 ); 51 } catch (Exception e) { 52 Log.Out ("Error in AllocsLogFunctions.RequestToSpawnPlayer: " + e); 53 } 28 54 } 29 55 30 56 public void PlayerDisconnected (ClientInfo _cInfo, bool _bShutdown) { 31 AllocsLogFunctions.PlayerDisconnected (_cInfo, _bShutdown); 57 try { 58 Player p = PersistentContainer.Instance.Players [_cInfo.playerId, false]; 59 if (p != null) { 60 p.SetOffline (); 61 } else { 62 Log.Out ("Disconnected player not found in client list..."); 63 } 64 65 PersistentContainer.Instance.Save (); 66 } catch (Exception e) { 67 Log.Out ("Error in AllocsLogFunctions.PlayerDisconnected: " + e); 68 } 32 69 } 70 71 public void PlayerSpawned (ClientInfo _cInfo, RespawnType _respawnReason, Vector3i _spawnPos) { 72 try { 73 PersistentContainer.Instance.Players [_cInfo.playerId, true].SetOnline (_cInfo); 74 PersistentContainer.Instance.Save (); 75 } catch (Exception e) { 76 Log.Out ("Error in AllocsLogFunctions.PlayerSpawnedInWorld: " + e); 77 } 78 } 79 80 private const string ANSWER = 81 " [ff0000]I[-] [ff7f00]W[-][ffff00]A[-][80ff00]S[-] [00ffff]H[-][0080ff]E[-][0000ff]R[-][8b00ff]E[-]"; 33 82 34 83 public bool ChatMessage (ClientInfo _cInfo, EChatType _type, int _senderId, string _msg, string _mainName, 35 84 bool _localizeMain, List<int> _recipientEntityIds) { 36 return ChatHookExample.Hook (_cInfo, _type, _msg, _mainName); 85 if (string.IsNullOrEmpty (_msg) || !_msg.EqualsCaseInsensitive ("/alloc")) { 86 return true; 87 } 88 89 if (_cInfo != null) { 90 Log.Out ("Sent chat hook reply to {0}", _cInfo.playerId); 91 _cInfo.SendPackage (new NetPackageChat (EChatType.Whisper, -1, ANSWER, "", false, null)); 92 } else { 93 Log.Error ("ChatHookExample: Argument _cInfo null on message: {0}", _msg); 94 } 95 96 return false; 37 97 } 38 98 } -
binary-improvements/MapRendering/ModInfo.xml
r341 r345 5 5 <Description value="Render the game map to image map tiles as it is uncovered" /> 6 6 <Author value="Christian 'Alloc' Illy" /> 7 <Version value="3 0" />7 <Version value="31" /> 8 8 <Website value="http://7dtd.illy.bz" /> 9 9 </ModInfo> -
binary-improvements/server-fixes.userprefs
r322 r345 1 1 <Properties> 2 2 <MonoDevelop.Ide.Workspace ActiveConfiguration="Release_Version" /> 3 <MonoDevelop.Ide.Workbench ActiveDocument=" 7dtd-server-fixes/src/PersistentData/Inventory.cs">3 <MonoDevelop.Ide.Workbench ActiveDocument="MapRendering/ModInfo.xml"> 4 4 <Files> 5 <File FileName=" 7dtd-server-fixes/ModInfo.xml" Line="1" Column="1" />6 <File FileName=" AllocsCommands/ModInfo.xml" Line="1" Column="1" />7 <File FileName="MapRendering/ModInfo.xml" Line="7" Column="2 0" />8 <File FileName="MapRendering/Web/Web.cs" Line=" 240" Column="24" />5 <File FileName="AllocsCommands/ModInfo.xml" Line="10" Column="7" /> 6 <File FileName="7dtd-server-fixes/ModInfo.xml" Line="7" Column="21" /> 7 <File FileName="MapRendering/ModInfo.xml" Line="7" Column="21" /> 8 <File FileName="MapRendering/Web/Web.cs" Line="1" Column="1" /> 9 9 <File FileName="MapRendering/Commands/WebTokens.cs" Line="1" Column="1" /> 10 10 <File FileName="MapRendering/API.cs" Line="1" Column="1" /> … … 12 12 <File FileName="MapRendering/Web/Handlers/ItemIconHandler.cs" Line="1" Column="1" /> 13 13 <File FileName="AllocsCommands/Commands/ShowInventory.cs" Line="1" Column="1" /> 14 <File FileName="7dtd-server-fixes/src/PersistentData/Inventory.cs" Line=" 61" Column="41" />14 <File FileName="7dtd-server-fixes/src/PersistentData/Inventory.cs" Line="1" Column="1" /> 15 15 <File FileName="7dtd-server-fixes/src/AllocsLogFunctions.cs" Line="1" Column="1" /> 16 16 <File FileName="7dtd-server-fixes/src/PersistentData/PersistentContainer.cs" Line="1" Column="1" /> … … 24 24 <File FileName="AllocsCommands/PrivateMessageConnections.cs" Line="1" Column="1" /> 25 25 <File FileName="AllocsCommands/Chat.cs" Line="1" Column="1" /> 26 <File FileName="MapRendering/Web/WebCommandResult.cs" Line="1" Column="1" />27 26 <File FileName="MapRendering/Web/API/GetPlayerList.cs" Line="1" Column="1" /> 28 <File FileName="MapRendering/Web/API/GetPlayer sLocation.cs" Line="31" Column="5" />29 <File FileName="MapRendering/Web/ OpenID.cs" Line="22" Column="9" />30 <File FileName="MapRendering/ Web/Handlers/SessionHandler.cs" Line="1" Column="1" />31 <File FileName="MapRendering/ Commands/EnableOpenIDDebug.cs" Line="33" Column="2" />27 <File FileName="MapRendering/Web/API/GetPlayerInventories.cs" Line="1" Column="1" /> 28 <File FileName="MapRendering/Web/API/GetLog.cs" Line="1" Column="1" /> 29 <File FileName="MapRendering/MapRendering/MapRendering.cs" Line="29" Column="14" /> 30 <File FileName="MapRendering/MapRendering/Constants.cs" Line="1" Column="1" /> 32 31 </Files> 33 32 </MonoDevelop.Ide.Workbench> -
binary-improvements/webserver/js/inventory_dialog.js
r256 r345 1 1 var ITEMICONBASEURL = "../itemicons/"; 2 2 3 var BAG_COLS = 8;4 var BAG_ROWS = 4;3 var BAG_COLS = 9; 4 var BAG_ROWS = 5; 5 5 var BELT_COLS = 8; 6 6 var INV_ITEM_WIDTH = 58;
Note:
See TracChangeset
for help on using the changeset viewer.