Changeset 267
- Timestamp:
- Apr 28, 2016, 1:41:44 PM (9 years ago)
- Location:
- binary-improvements
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/API.cs
r238 r267 28 28 } 29 29 30 public override bool ChatMessage (ClientInfo _cInfo, string _message, string _playerName) {31 return ChatHookExample.Hook (_cInfo, _ message, _playerName);30 public override bool ChatMessage (ClientInfo _cInfo, EnumGameMessages _type, string _msg, string _mainName, bool _localizeMain, string _secondaryName, bool _localizeSecondary) { 31 return ChatHookExample.Hook (_cInfo, _type, _msg, _mainName); 32 32 } 33 33 } -
binary-improvements/7dtd-server-fixes/src/ChatHookExample.cs
r238 r267 4 4 { 5 5 public class ChatHookExample { 6 private const string BBFILTER = "[ffffffff][/url][/b][/i][/u][/s][/sub][/sup][ff]";7 6 private const string ANSWER = " [ff0000]I[-] [ff7f00]W[-][ffff00]A[-][80ff00]S[-] [00ffff]H[-][0080ff]E[-][0000ff]R[-][8b00ff]E[-]"; 8 7 9 public static bool Hook (ClientInfo _cInfo, string _message, string _playerName) {8 public static bool Hook (ClientInfo _cInfo, EnumGameMessages _type, string _message, string _playerName) { 10 9 if (!string.IsNullOrEmpty (_message)) { 11 if (_message.EndsWith (BBFILTER + BBFILTER)) {12 _message = _message.Remove (_message.Length - 2 * BBFILTER.Length);13 }14 15 10 if (_message.ToLower () == "/alloc") { 16 11 if (_cInfo != null) { 17 12 Log.Out ("Sent chat hook reply to {0}", _cInfo.playerId); 18 _cInfo.SendPackage (new NetPackageGameMessage ( ANSWER, ""));13 _cInfo.SendPackage (new NetPackageGameMessage (EnumGameMessages.Chat, ANSWER, "", false, "", false)); 19 14 } else { 20 15 Log.Error ("Argument _cInfo null on message: {0}", _message); -
binary-improvements/AllocsCommands/Chat.cs
r251 r267 13 13 senderName = "Server"; 14 14 } 15 _receiver.SendPackage (new NetPackageGameMessage ( _message, senderName + " (PM)"));15 _receiver.SendPackage (new NetPackageGameMessage (EnumGameMessages.Chat, _message, senderName + " (PM)", false, "", false)); 16 16 string receiverName = _receiver.playerName; 17 17 SdtdConsole.Instance.Output ("Message to player " + (receiverName != null ? "\"" + receiverName + "\"" : "unknownName") + " sent with sender \"" + senderName + "\""); -
binary-improvements/MapRendering/API.cs
r250 r267 10 10 } 11 11 12 // public override void GameStartDone () { 13 // if (AllocsFixes.NetConnections.Servers.Web.Handlers.ItemIconHandler.Instance != null) { 14 // AllocsFixes.NetConnections.Servers.Web.Handlers.ItemIconHandler.Instance.LoadIcons (); 15 // } 16 // } 17 12 18 public override void CalcChunkColorsDone (Chunk _chunk) { 13 19 AllocsFixes.MapRendering.MapRendering.RenderSingleChunk (_chunk); -
binary-improvements/MapRendering/Web/Handlers/ItemIconHandler.cs
r254 r267 9 9 { 10 10 public class ItemIconHandler : PathHandler { 11 private static ItemIconHandler instance = null; 12 public static ItemIconHandler Instance { 13 get { return instance; } 14 } 15 11 16 private string staticPart; 12 17 private bool logMissingFiles; … … 17 22 this.staticPart = staticPart; 18 23 this.logMissingFiles = logMissingFiles; 24 ItemIconHandler.instance = this; 19 25 } 20 26 … … 47 53 } 48 54 49 p rivatebool LoadIcons () {55 public bool LoadIcons () { 50 56 lock (icons) { 51 57 if (loaded) { -
binary-improvements/server-fixes.userprefs
r256 r267 1 1 <Properties> 2 2 <MonoDevelop.Ide.Workspace ActiveConfiguration="Release_Version" /> 3 <MonoDevelop.Ide.Workbench ActiveDocument="MapRendering/ ModInfo.xml">3 <MonoDevelop.Ide.Workbench ActiveDocument="MapRendering/API.cs"> 4 4 <Files> 5 5 <File FileName="7dtd-server-fixes/ModInfo.xml" Line="1" Column="1" /> 6 6 <File FileName="AllocsCommands/ModInfo.xml" Line="1" Column="1" /> 7 <File FileName="MapRendering/ModInfo.xml" Line=" 21" Column="21" />8 <File FileName="MapRendering/Web/Web.cs" Line="1 " Column="1" />7 <File FileName="MapRendering/ModInfo.xml" Line="1" Column="1" /> 8 <File FileName="MapRendering/Web/Web.cs" Line="10" Column="10" /> 9 9 <File FileName="MapRendering/Web/API/ExecuteConsoleCommand.cs" Line="1" Column="1" /> 10 10 <File FileName="MapRendering/Web/LogBuffer.cs" Line="1" Column="1" /> … … 13 13 <File FileName="MapRendering/Web/Handlers/ApiHandler.cs" Line="1" Column="1" /> 14 14 <File FileName="MapRendering/Commands/WebTokens.cs" Line="1" Column="1" /> 15 <File FileName="AllocsCommands/Commands/TeleportPlayer.cs" Line="63" Column="63" /> 16 <File FileName="MapRendering/Web/Handlers/ItemIconHandler.cs" Line="42" Column="42" /> 15 <File FileName="AllocsCommands/Commands/TeleportPlayer.cs" Line="1" Column="1" /> 16 <File FileName="MapRendering/Web/Handlers/ItemIconHandler.cs" Line="20" Column="20" /> 17 <File FileName="MapRendering/API.cs" Line="1" Column="1" /> 17 18 </Files> 18 19 </MonoDevelop.Ide.Workbench>
Note:
See TracChangeset
for help on using the changeset viewer.