Changeset 324 for binary-improvements/AllocsCommands
- Timestamp:
- Sep 3, 2018, 7:11:10 PM (6 years ago)
- Location:
- binary-improvements/AllocsCommands
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/AllocsCommands/AllocsCommands.csproj
r323 r324 1 <?xml version="1.0" encoding="utf-8"?>1 <?xml version="1.0" encoding="utf-8"?> 2 2 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 3 3 <PropertyGroup> … … 43 43 <Private>False</Private> 44 44 </Reference> 45 <Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"> 46 <HintPath>..\7dtd-binaries\UnityEngine.CoreModule.dll</HintPath> 47 <Private>False</Private> 48 </Reference> 45 49 </ItemGroup> 46 50 <ItemGroup> -
binary-improvements/AllocsCommands/Commands/Give.cs
r306 r324 53 53 } 54 54 55 int quality = Constants.cItemMaxQuality; 56 55 57 if (_params.Count == 4) { 56 if (!iv.HasQuality && iv.Attachments == null && iv.Parts == null) { 57 SdtdConsole.Instance.Output ("Item " + _params [1] + " does not support quality."); 58 return; 59 } 60 61 int quality = int.MinValue; 62 if (!int.TryParse (_params [3], out quality) || quality <= 0) { 58 if(!int.TryParse(_params [1], out quality) || quality <= 0) { 63 59 SdtdConsole.Instance.Output ("Quality is not an integer or not greater than zero."); 64 60 return; 65 61 } 62 } 63 64 if (ItemClass.list [iv.type].HasSubItems) { 65 for (int i = 0; i < iv.Modifications.Length; i++) { 66 ItemValue tmp = iv.Modifications[i]; 67 tmp.Quality = quality; 68 iv.Modifications[i] = tmp; 69 } 70 } else if (ItemClass.list [iv.type].HasQuality) { 66 71 iv.Quality = quality; 67 68 // Specific code for weapons with parts and attachmetns69 if (iv.Attachments != null && iv.Attachments.Length != 0) {70 for (int i = 0; i < iv.Attachments.Length; i++) {71 ItemValue att = iv.Attachments[i];72 if (att != null && att.HasQuality) {73 att.Quality = quality;74 }75 }76 }77 78 if (iv.Parts != null && iv.Parts.Length != 0) {79 for (int i = 0; i < iv.Parts.Length; i++) {80 ItemValue part = iv.Parts[i];81 if (part != null && part.HasQuality) {82 part.Quality = quality;83 }84 }85 }86 72 } 87 73 -
binary-improvements/AllocsCommands/PrivateMessageConnections.cs
r309 r324 18 18 if (senderOfLastPM.ContainsKey (_player.steamId)) { 19 19 CSteamID recSteamId = senderOfLastPM [_player.steamId]; 20 ClientInfo recInfo = ConnectionManager.Instance. GetClientInfoForSteamId (recSteamId);20 ClientInfo recInfo = ConnectionManager.Instance.Clients.ForSteamId (recSteamId); 21 21 return recInfo; 22 22 }
Note:
See TracChangeset
for help on using the changeset viewer.