Ignore:
Timestamp:
Apr 18, 2015, 4:27:57 PM (10 years ago)
Author:
alloc
Message:

Binary improvements

Location:
binary-improvements/7dtd-server-fixes
Files:
2 added
6 deleted
7 edited

Legend:

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

    r224 r230  
    1515    <DebugType>none</DebugType>
    1616    <Optimize>true</Optimize>
    17     <OutputPath>..\bin\7DaysToDie_Data\Managed</OutputPath>
     17    <OutputPath>..\bin\Mods\Allocs_CommonFunc</OutputPath>
    1818    <ErrorReport>prompt</ErrorReport>
    1919    <WarningLevel>4</WarningLevel>
     
    2323    <DebugType>none</DebugType>
    2424    <Optimize>true</Optimize>
    25     <OutputPath>..\bin\7DaysToDie_Data\Managed</OutputPath>
     25    <OutputPath>..\bin\Mods\Allocs_CommonFunc</OutputPath>
    2626    <ErrorReport>prompt</ErrorReport>
    2727    <WarningLevel>4</WarningLevel>
     
    3434  </PropertyGroup>
    3535  <ItemGroup>
    36     <Reference Include="System" />
     36    <Reference Include="Assembly-CSharp">
     37      <HintPath>..\7dtd-binaries\Assembly-CSharp.dll</HintPath>
     38      <Private>False</Private>
     39    </Reference>
     40    <Reference Include="mscorlib">
     41      <HintPath>..\7dtd-binaries\mscorlib.dll</HintPath>
     42      <Private>False</Private>
     43    </Reference>
     44    <Reference Include="System">
     45      <HintPath>..\7dtd-binaries\System.dll</HintPath>
     46      <Private>False</Private>
     47    </Reference>
    3748    <Reference Include="UnityEngine">
    3849      <HintPath>..\7dtd-binaries\UnityEngine.dll</HintPath>
    39     </Reference>
    40     <Reference Include="EasyAntiCheat.Client">
    41       <HintPath>..\7dtd-binaries\EasyAntiCheat.Client.dll</HintPath>
    42     </Reference>
    43     <Reference Include="EasyAntiCheat.Server">
    44       <HintPath>..\7dtd-binaries\EasyAntiCheat.Server.dll</HintPath>
    45     </Reference>
    46     <Reference Include="Assembly-CSharp-firstpass">
    47       <HintPath>..\7dtd-binaries\Assembly-CSharp-firstpass.dll</HintPath>
     50      <Private>False</Private>
    4851    </Reference>
    4952    <Reference Include="LogLibrary">
    5053      <HintPath>..\7dtd-binaries\LogLibrary.dll</HintPath>
    51     </Reference>
    52     <Reference Include="mscorlib">
    53       <HintPath>..\7dtd-binaries\mscorlib.dll</HintPath>
    54     </Reference>
    55     <Reference Include="Assembly-CSharp">
    56       <HintPath>..\7dtd-binaries\Assembly-CSharp.dll</HintPath>
     54      <Private>False</Private>
    5755    </Reference>
    5856  </ItemGroup>
     
    6159    <Compile Include="src\AllocsLogFunctions.cs" />
    6260    <Compile Include="src\PlayerDataStuff.cs" />
    63     <Compile Include="src\CommandExtensions.cs" />
    64     <Compile Include="src\CommonMappingFunctions.cs" />
    65     <Compile Include="src\NetConnections\ConsoleOutputSeparator.cs" />
    66     <Compile Include="src\NetConnections\NetTelnetServer.cs" />
    67     <Compile Include="src\NetConnections\IServer.cs" />
    68     <Compile Include="src\NetConnections\IConnection.cs" />
    69     <Compile Include="src\NetConnections\Servers\Telnet\Telnet.cs" />
    70     <Compile Include="src\NetConnections\Servers\Telnet\TelnetConnection.cs" />
    7161    <Compile Include="src\PersistentData\PersistentContainer.cs" />
    7262    <Compile Include="src\StateManager.cs" />
     
    9080    <Compile Include="src\FileCache\SimpleCache.cs" />
    9181    <Compile Include="src\FileCache\MapTileCache.cs" />
    92     <Compile Include="src\Mods.cs" />
    93     <Compile Include="src\ModAPI.cs" />
    94     <Compile Include="src\Version.cs" />
     82    <Compile Include="src\API.cs" />
    9583  </ItemGroup>
    9684  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
    9785  <ItemGroup>
    9886    <Folder Include="src\" />
    99     <Folder Include="src\CustomCommands\" />
    100     <Folder Include="src\NetConnections\" />
    101     <Folder Include="src\NetConnections\Servers\" />
    102     <Folder Include="src\NetConnections\Servers\Telnet\" />
    10387    <Folder Include="src\PersistentData\" />
    10488    <Folder Include="src\JSON\Parser\" />
    10589    <Folder Include="src\FileCache\" />
    10690  </ItemGroup>
     91  <ItemGroup>
     92    <None Include="ModInfo.xml">
     93      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     94    </None>
     95  </ItemGroup>
    10796</Project>
  • binary-improvements/7dtd-server-fixes/src/AllocsLogFunctions.cs

    r228 r230  
    88        public class AllocsLogFunctions
    99        {
    10                 public static void RequestToSpawnPlayer (GameManager manager, int _clientId, string _name, int _chunkViewDim, PlayerProfile _playerProfile)
     10                public static void RequestToSpawnPlayer (int _clientId, string _name, int _chunkViewDim, PlayerProfile _playerProfile)
    1111                {
    1212                        try {
    13                                 ClientInfo ci = CommonMappingFunctions.GetClientInfoFromClientID (_clientId);
    14                                 int entityId = CommonMappingFunctions.GetEntityID (ci);
    15                                 EntityPlayer ep = CommonMappingFunctions.GetEntityPlayer (ci);
    16                                 string steamId = CommonMappingFunctions.GetSteamID (ci);
    17 
    18                                 string ip = ci.ip;
    19                                 string name = string.Empty;
    20 
    21                                 if (ep != null)
    22                                         name = ep.EntityName;
     13                                ClientInfo ci = ConnectionManager.Instance.GetClient (_clientId);
    2314
    2415                                Log.Out ("Player connected, clientid=" + _clientId +
    25                                         ", entityid=" + entityId +
    26                                         ", name=" + name +
    27                                         ", steamid=" + steamId +
    28                                         ", ip=" + ip
     16                                        ", entityid=" + ci.entityId +
     17                                        ", name=" + ci.playerName +
     18                                        ", steamid=" + ci.playerId +
     19                                        ", ip=" + ci.ip
    2920                                );
    3021
    31                                 PersistentContainer.Instance.Players [steamId].SetOnline (ci);
     22                                PersistentContainer.Instance.Players [ci.playerId].SetOnline (ci);
    3223                                PersistentData.PersistentContainer.Instance.Save ();
    33 
    34                                 Mods.CallRequestToSpawnPlayer (_clientId, _name, _chunkViewDim, _playerProfile);
    3524                        } catch (Exception e) {
    3625                                Log.Out ("Error in AllocsLogFunctions.RequestToSpawnPlayer: " + e);
     
    3827                }
    3928
    40                 public static void PlayerDisconnected (ConnectionManager manager, ClientInfo _cInfo, bool _bShutdown)
     29                public static void PlayerDisconnected (ClientInfo _cInfo, bool _bShutdown)
    4130                {
    4231                        try {
     
    4837                                }
    4938                                PersistentData.PersistentContainer.Instance.Save ();
    50 
    51                                 Mods.CallPlayerDisconnected (_cInfo, _bShutdown);
    5239                        } catch (Exception e) {
    5340                                Log.Out ("Error in AllocsLogFunctions.PlayerDisconnected: " + e);
  • binary-improvements/7dtd-server-fixes/src/AssemblyInfo.cs

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

    r146 r230  
    5454                                        return true;
    5555                                } catch (Exception e) {
    56                                         Log.Out ("Exception in PersistentContainer.Load: " + e.Message);
     56                                        Log.Error ("Exception in PersistentContainer.Load");
     57                                        Log.Exception (e);
    5758                                }
    5859                        }
  • binary-improvements/7dtd-server-fixes/src/PersistentData/Player.cs

    r228 r230  
    5959                        get {
    6060                                if (IsOnline) {
    61                                         return CommonMappingFunctions.GetEntityPlayer (clientInfo);
     61                                        return GameManager.Instance.World.Players.dict [clientInfo.entityId];
    6262                                } else {
    6363                                        return null;
     
    116116                        Log.Out ("Player set to online: " + steamId);
    117117                        clientInfo = ci;
    118                         entityId = CommonMappingFunctions.GetEntityID (ci);
    119                         name = CommonMappingFunctions.GetPlayerName (ci);
     118                        entityId = ci.entityId;
     119                        name = ci.playerName;
    120120                        ip = ci.ip;
    121121                }
  • binary-improvements/7dtd-server-fixes/src/PlayerDataStuff.cs

    r224 r230  
    1111                {
    1212                        try {
    13                                 ClientInfo ci = CommonMappingFunctions.GetClientInfoFromClientID(_clientId);
    14                                 string steamId = CommonMappingFunctions.GetSteamID(ci);
    15                                 PersistentContainer.Instance.Players[steamId].Inventory.Update(_playerDataFile);
    16                                 Mods.CallSavePlayerData (_clientId, _playerDataFile);
     13                                ClientInfo ci = ConnectionManager.Instance.GetClient (_clientId);
     14                                PersistentContainer.Instance.Players[ci.playerId].Inventory.Update(_playerDataFile);
    1715                        } catch (Exception e) {
    1816                                Log.Out ("Error in GM_SavePlayerData: " + e);
  • binary-improvements/7dtd-server-fixes/src/StateManager.cs

    r224 r230  
    1 using AllocsFixes.NetConnections.Servers.Telnet;
    21using System;
    32using System.Reflection;
     
    76        public class StateManager
    87        {
    9                 public static void Awake (GameManager manager)
     8                public static void Awake ()
    109                {
    1110                        try {
    1211                                Log.Out ("[7dtd-server-fixes by Alloc] Version: " + Assembly.GetExecutingAssembly ().GetName ().Version);
    13 
    14                                 Mods.LoadMods ();
    15                                 Mods.CallGameAwake ();
    16                                 CommandExtensions.InitCommandExtensions (manager);
    17 
    18                                 new Telnet ();
    1912
    2013                                ItemList.Instance.Init ();
     
    2619                }
    2720
    28                 public static void Shutdown (GameManager manager)
     21                public static void Shutdown ()
    2922                {
    3023                        try {
    3124                                Log.Out ("Server shutting down!");
    32                                 Mods.CallGameShutdown ();
    3325                                PersistentData.PersistentContainer.Instance.Save ();
    3426                        } catch (Exception e) {
Note: See TracChangeset for help on using the changeset viewer.