Changeset 128


Ignore:
Timestamp:
Aug 26, 2014, 1:08:25 AM (10 years ago)
Author:
alloc
Message:

Fixes

Location:
binary-improvements
Files:
3 added
10 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements/7dtd-server-fixes/7dtd-server-fixes.csproj

    r115 r128  
    3737    </Reference>
    3838    <Reference Include="Assembly-CSharp">
    39       <HintPath>..\7dtd-binaries\Assembly-CSharp.deobf.dll</HintPath>
     39      <HintPath>..\7dtd-binaries\Assembly-CSharp.dll</HintPath>
    4040    </Reference>
    4141  </ItemGroup>
     
    6262    <Compile Include="src\TelnetCommands\RemoveLandProtection.cs" />
    6363    <Compile Include="src\TelnetCommands\Version.cs" />
     64    <Compile Include="src\TelnetCommands\RenderMap.cs" />
     65    <Compile Include="src\TelnetCommands\CreativeMenu.cs" />
     66    <Compile Include="src\TelnetCommands\Give.cs" />
     67    <Compile Include="src\TelnetCommands\ListItems.cs" />
     68    <Compile Include="src\MapRendering.cs" />
    6469  </ItemGroup>
    6570  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  • binary-improvements/7dtd-server-fixes/src/AdminToolsStuff.cs

    r120 r128  
    7878                        return cc.Names ();
    7979                } else {
    80                         return new string[0];
     80                        return new string[]{cmd};
    8181                }
    8282        }
  • binary-improvements/7dtd-server-fixes/src/AssemblyInfo.cs

    r117 r128  
    1818// and "{Major}.{Minor}.{Build}.*" will update just the revision.
    1919
    20 [assembly: AssemblyVersion("0.090.*")]
     20[assembly: AssemblyVersion("0.091.*")]
    2121
    2222// The following attributes are used to specify the signing key for the assembly,
  • binary-improvements/7dtd-server-fixes/src/CommandExtensions.cs

    r114 r128  
    77        {
    88                try {
     9                        manager.m_GUIConsole.AddCommand (new CreativeMenu (manager.m_GUIConsole));
    910                        manager.m_GUIConsole.AddCommand (new GetGamePrefs (manager.m_GUIConsole));
    1011                        manager.m_GUIConsole.AddCommand (new GetTime (manager.m_GUIConsole));
     12                        manager.m_GUIConsole.AddCommand (new Give (manager.m_GUIConsole));
    1113                        manager.m_GUIConsole.AddCommand (new Kill (manager.m_GUIConsole));
     14                        manager.m_GUIConsole.AddCommand (new ListItems (manager.m_GUIConsole));
    1215                        manager.m_GUIConsole.AddCommand (new ListLandProtection (manager.m_GUIConsole));
    1316                        manager.m_GUIConsole.AddCommand (new ListPlayersExtended (manager.m_GUIConsole));
    1417                        manager.m_GUIConsole.AddCommand (new RemoveLandProtection (manager.m_GUIConsole));
     18                        manager.m_GUIConsole.AddCommand (new RenderMap (manager.m_GUIConsole));
    1519                        manager.m_GUIConsole.AddCommand (new Reply (manager.m_GUIConsole));
    1620                        manager.m_GUIConsole.AddCommand (new SayToPlayer (manager.m_GUIConsole));
     
    2125                        Log.Out ("Error registering custom commands: " + e);
    2226                }
    23                 /*
    24                 try {
    25                         List<ConsoleCommand> commands = manager.m_GUIConsole.commands;
    26                         foreach (ConsoleCommand c in commands) {
    27                                 string name = string.Empty;
    28                                 foreach (string cname in c.Names()) {
    29                                         if (cname.Length > 0) {
    30                                                 if (name.Length > 0)
    31                                                         name += ", ";
    32                                                 name += cname;
    33                                         }
    34                                 }
    35                                 name += " => " + c.Description();
    36                                 Log.Out (name);
    37                         }
    38                 } catch (Exception e) {
    39                         Log.Out ("Error listing commands: " + e);
    40                 }
    41                 */
    4227        }
    4328}
  • binary-improvements/7dtd-server-fixes/src/CommonMappingFunctions.cs

    r111 r128  
    4141        {
    4242                return SingletonMonoBehaviour<Authenticator>.Instance.GetPlayerId (GetPlayerName (_ci));
     43        }
     44
     45        public static string GetSteamID (string _playerName)
     46        {
     47                return SingletonMonoBehaviour<Authenticator>.Instance.GetPlayerId (_playerName);
    4348        }
    4449
  • binary-improvements/7dtd-server-fixes/src/PlayerDataStuff.cs

    r103 r128  
    5959                        Log.Out ("Error in GM_SavePlayerData: " + e);
    6060                }
    61                 /*
    62                 Log.Out ("Inventory of player:");
    63                 for (int i = 0; i < _playerDataFile.inventory.Length; i++) {
    64                         InventoryField item = _playerDataFile.inventory [i];
    65                         printItem (item, i);
    66                 }
    6761
    68                 Log.Out ("Bag of player:");
    69                 for (int i = 0; i < _playerDataFile.bag.Length; i++) {
    70                         InventoryField item = _playerDataFile.bag [i];
    71                         printItem (item, i);
    72                 }*/
     62//              Log.Out ("Inventory of player:");
     63//              for (int i = 0; i < _playerDataFile.inventory.Length; i++) {
     64//                      InventoryField item = _playerDataFile.inventory [i];
     65//                      printItem (item, i);
     66//              }
     67//
     68//              Log.Out ("Bag of player:");
     69//              for (int i = 0; i < _playerDataFile.bag.Length; i++) {
     70//                      InventoryField item = _playerDataFile.bag [i];
     71//                      printItem (item, i);
     72//              }
    7373        }
    7474
     
    9393                                name = iBlock.GetItemName (item.itemValue);
    9494                        }
    95                         Log.Out (string.Format ("Slot {0:00}: {1:00} * {2}", slot, item.count, name));
     95                        Log.Out (string.Format ("Slot {0:00}: {1:00} * {2}, blockinst={3}, meta={4}, type={5}, usetimes={6}",
     96                                                slot, item.count, name, item.itemValue.blockinst, item.itemValue.meta, item.itemValue.type, item.itemValue.usetimes));
    9697                }
    9798        }
  • binary-improvements/assembly-patcher/Main.cs

    r115 r128  
    2020                        markTypePatched (module, type);
    2121
     22                        mappingPatch (module);
    2223                        consoleOutputPatch (module);
    2324                        telnetPatch (module);
     
    2930                        Console.WriteLine ("Done");
    3031
     32                }
     33
     34                private static void mappingPatch (ModuleDefinition module)
     35                {
     36                        TypeDefinition type = module.GetType ("Chunk");
     37                        addHook (type, "CalcMapColors", true, 0, true, typeof(MapRendering).GetMethod ("RenderSingleChunk"));
    3138                }
    3239
  • binary-improvements/server-fixes.userprefs

    r123 r128  
    77      <File FileName="7dtd-server-fixes/src/TelnetCommands/ListPlayersExtended.cs" Line="45" Column="17" />
    88      <File FileName="7dtd-server-fixes/src/AllocsNetTelnetServer.cs" Line="1" Column="1" />
    9       <File FileName="7dtd-server-fixes/src/TelnetCommands/RemoveLandProtection.cs" Line="52" Column="44" />
     9      <File FileName="7dtd-server-fixes/src/TelnetCommands/RemoveLandProtection.cs" Line="41" Column="47" />
    1010    </Files>
    1111  </MonoDevelop.Ide.Workbench>
Note: See TracChangeset for help on using the changeset viewer.