Changeset 163 for binary-improvements/7dtd-server-fixes
- Timestamp:
- Sep 4, 2014, 5:45:22 PM (10 years ago)
- Location:
- binary-improvements/7dtd-server-fixes
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/7dtd-server-fixes.csproj
r154 r163 110 110 <Compile Include="src\JSON\JSONBoolean.cs" /> 111 111 <Compile Include="src\NetConnections\Servers\Web\API\GetPlayersLocation.cs" /> 112 <Compile Include="src\CustomCommands\TeleportPlayer.cs" /> 113 <Compile Include="src\NetConnections\Servers\Web\API\GetPlayerInventory.cs" /> 112 114 </ItemGroup> 113 115 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> -
binary-improvements/7dtd-server-fixes/src/CommandExtensions.cs
r146 r163 10 10 { 11 11 try { 12 manager.m_GUIConsole.AddCommand (new CreativeMenu (manager.m_GUIConsole)); 13 manager.m_GUIConsole.AddCommand (new EnableRendering (manager.m_GUIConsole)); 14 manager.m_GUIConsole.AddCommand (new GetGamePrefs (manager.m_GUIConsole)); 15 manager.m_GUIConsole.AddCommand (new GetTime (manager.m_GUIConsole)); 16 manager.m_GUIConsole.AddCommand (new Give (manager.m_GUIConsole)); 17 manager.m_GUIConsole.AddCommand (new Kill (manager.m_GUIConsole)); 18 manager.m_GUIConsole.AddCommand (new ListItems (manager.m_GUIConsole)); 19 manager.m_GUIConsole.AddCommand (new ListKnownPlayers (manager.m_GUIConsole)); 20 manager.m_GUIConsole.AddCommand (new ListLandProtection (manager.m_GUIConsole)); 21 manager.m_GUIConsole.AddCommand (new ListPlayersExtended (manager.m_GUIConsole)); 22 manager.m_GUIConsole.AddCommand (new RemoveLandProtection (manager.m_GUIConsole)); 23 manager.m_GUIConsole.AddCommand (new RenderMap (manager.m_GUIConsole)); 24 manager.m_GUIConsole.AddCommand (new Reply (manager.m_GUIConsole)); 25 manager.m_GUIConsole.AddCommand (new SayToPlayer (manager.m_GUIConsole)); 26 manager.m_GUIConsole.AddCommand (new SetTimeReal (manager.m_GUIConsole)); 27 manager.m_GUIConsole.AddCommand (new ShowInventory (manager.m_GUIConsole)); 28 manager.m_GUIConsole.AddCommand (new AllocsFixes.CustomCommands.Version (manager.m_GUIConsole)); 12 ConsoleSdtd cons = manager.m_GUIConsole; 13 cons.AddCommand (new CreativeMenu (cons)); 14 cons.AddCommand (new EnableRendering (cons)); 15 cons.AddCommand (new GetGamePrefs (cons)); 16 cons.AddCommand (new GetTime (cons)); 17 cons.AddCommand (new Give (cons)); 18 cons.AddCommand (new Kill (cons)); 19 cons.AddCommand (new ListItems (cons)); 20 cons.AddCommand (new ListKnownPlayers (cons)); 21 cons.AddCommand (new ListLandProtection (cons)); 22 cons.AddCommand (new ListPlayersExtended (cons)); 23 cons.AddCommand (new RemoveLandProtection (cons)); 24 cons.AddCommand (new RenderMap (cons)); 25 cons.AddCommand (new Reply (cons)); 26 cons.AddCommand (new SayToPlayer (cons)); 27 cons.AddCommand (new SetTimeReal (cons)); 28 cons.AddCommand (new ShowInventory (cons)); 29 cons.AddCommand (new TeleportPlayer (cons)); 30 cons.AddCommand (new AllocsFixes.CustomCommands.Version (cons)); 29 31 } catch (Exception e) { 30 32 Log.Out ("Error registering custom commands: " + e); -
binary-improvements/7dtd-server-fixes/src/NetConnections/Servers/Web/ApiHandler.cs
r158 r163 18 18 apis.Add ("getplayersonline", new GetPlayersOnline ()); 19 19 apis.Add ("getplayerslocation", new GetPlayersLocation ()); 20 apis.Add ("getplayerinventory", new GetPlayerInventory ()); 20 21 } 21 22 -
binary-improvements/7dtd-server-fixes/src/NetConnections/Servers/Web/Web.cs
r154 r163 120 120 } 121 121 122 public static void SetResponseTextContent (HttpListenerResponse resp, string text) 123 { 124 byte[] buf = Encoding.UTF8.GetBytes (text); 125 resp.ContentLength64 = buf.Length; 126 resp.ContentType = "text/html"; 127 resp.ContentEncoding = Encoding.UTF8; 128 resp.OutputStream.Write (buf, 0, buf.Length); 129 } 130 122 131 } 123 132 } -
binary-improvements/7dtd-server-fixes/src/PersistentData/Inventory.cs
r145 r163 48 48 { 49 49 ItemBase iBase = ItemBase.list [item.itemValue.type]; 50 string name = iBase.name; 51 if (iBase.IsBlock ()) { 52 ItemBlock iBlock = (ItemBlock)iBase; 53 name = iBlock.GetItemName (item.itemValue); 54 } 55 return name; 50 return iBase.GetItemName(item.itemValue); 56 51 } 57 52
Note:
See TracChangeset
for help on using the changeset viewer.