Changeset 488 for binary-improvements
- Timestamp:
- Jun 21, 2024, 2:58:18 PM (6 months ago)
- Location:
- binary-improvements
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-binaries/README.txt
r420 r488 1 1 Put the following files from your dedicated server in this folder: 2 - 0Harmony.dll 2 - 0Harmony.dll (from TFP Harmony mod) 3 3 - Assembly-CSharp.dll 4 4 - Assembly-CSharp-firstpass.dll … … 15 15 16 16 Also, grab the following two from the "vanilla web mods": 17 - MapRendering.dll17 - SpaceWizards.HttpListener.dll 18 18 - WebServer.dll -
binary-improvements/7dtd-server-fixes/ModInfo.xml
r464 r488 5 5 <Description value="Common functions" /> 6 6 <Author value="Christian 'Alloc' Illy" /> 7 <Version value="3 1" />7 <Version value="32" /> 8 8 <Website value="https://7dtd.illy.bz" /> 9 9 </xml> -
binary-improvements/7dtd-server-fixes/src/API.cs
r455 r488 47 47 48 48 private static void PlayerSpawned (ClientInfo _cInfo, RespawnType _respawnReason, Vector3i _spawnPos) { 49 if (_cInfo == null) { 50 return; 51 } 52 49 53 PersistentContainer.Instance.Players.GetOrCreate (_cInfo.InternalId, _cInfo.PlatformId, _cInfo.CrossplatformId).SetOnline (_cInfo); 50 54 PersistentContainer.Instance.Save (); … … 54 58 55 59 private static bool ChatMessage (ClientInfo _cInfo, EChatType _type, int _senderId, string _msg, string _mainName, 56 bool _localizeMain,List<int> _recipientEntityIds) {60 List<int> _recipientEntityIds) { 57 61 if (string.IsNullOrEmpty (_msg) || !_msg.EqualsCaseInsensitive ("/alloc")) { 58 62 return true; … … 61 65 if (_cInfo != null) { 62 66 Log.Out ($"Sent chat hook reply to {_cInfo.InternalId}"); 63 _cInfo.SendPackage (NetPackageManager.GetPackage<NetPackageChat> ().Setup (EChatType.Whisper, -1, ANSWER, "", false,null));67 _cInfo.SendPackage (NetPackageManager.GetPackage<NetPackageChat> ().Setup (EChatType.Whisper, -1, ANSWER, "", null)); 64 68 } else { 65 69 Log.Error ($"ChatHookExample: Argument _cInfo null on message: {_msg}"); -
binary-improvements/7dtd-server-fixes/src/LandClaimList.cs
r448 r488 41 41 42 42 foreach (KeyValuePair<PersistentPlayerData, List<Vector3i>> kvp in owners) { 43 Player p = PersistentContainer.Instance.Players.GetByInternalId (kvp.Key. UserIdentifier);43 Player p = PersistentContainer.Instance.Players.GetByInternalId (kvp.Key.PrimaryId); 44 44 if (p == null) { 45 PlatformUserIdentifierAbs platformId = kvp.Key. PlatformUserIdentifier;46 PlatformUserIdentifierAbs internalId = kvp.Key. UserIdentifier;45 PlatformUserIdentifierAbs platformId = kvp.Key.NativeId; 46 PlatformUserIdentifierAbs internalId = kvp.Key.PrimaryId; 47 47 PlatformUserIdentifierAbs crossPlatformId = platformId == null || platformId.Equals (internalId) ? null : internalId; 48 48 p = new Player (internalId, platformId, crossPlatformId); -
binary-improvements/AllocsCommands/Commands/ListKnownPlayers.cs
r455 r488 6 6 [UsedImplicitly] 7 7 public class ListKnownPlayers : ConsoleCmdAbstract { 8 p rotectedoverride string getDescription () {8 public override string getDescription () { 9 9 return "lists all players that were ever online"; 10 10 } 11 11 12 p rotectedoverride string getHelp () {12 public override string getHelp () { 13 13 return "Usage:\n" + 14 14 " 1. listknownplayers\n" + … … 22 22 } 23 23 24 p rotectedoverride string[] getCommands () {24 public override string[] getCommands () { 25 25 return new[] {"listknownplayers", "lkp"}; 26 26 } -
binary-improvements/AllocsCommands/Commands/ListLandProtection.cs
r455 r488 7 7 [UsedImplicitly] 8 8 public class ListLandProtection : ConsoleCmdAbstract { 9 p rotectedoverride string getDescription () {9 public override string getDescription () { 10 10 return "lists all land protection blocks and owners"; 11 11 } 12 12 13 p rotectedoverride string getHelp () {13 public override string getHelp () { 14 14 return "Usage:\n" + 15 15 " 1. listlandprotection summary\n" + … … 22 22 } 23 23 24 p rotectedoverride string[] getCommands () {24 public override string[] getCommands () { 25 25 return new[] {"listlandprotection", "llp"}; 26 26 } -
binary-improvements/AllocsCommands/Commands/RemoveLandProtection.cs
r455 r488 7 7 [UsedImplicitly] 8 8 public class RemoveLandProtection : ConsoleCmdAbstract { 9 p rotectedoverride string getDescription () {9 public override string getDescription () { 10 10 return "removes the association of a land protection block to the owner"; 11 11 } 12 12 13 p rotectedoverride string getHelp () {13 public override string getHelp () { 14 14 return "Usage:" + 15 15 " 1. removelandprotection <userid>\n" + … … 21 21 } 22 22 23 p rotectedoverride string[] getCommands () {23 public override string[] getCommands () { 24 24 return new[] {"removelandprotection", "rlp"}; 25 25 } -
binary-improvements/AllocsCommands/Commands/ShowInventory.cs
r455 r488 6 6 [UsedImplicitly] 7 7 public class ShowInventory : ConsoleCmdAbstract { 8 p rotectedoverride string getDescription () {8 public override string getDescription () { 9 9 return "list inventory of a given player"; 10 10 } 11 11 12 p rotectedoverride string getHelp () {12 public override string getHelp () { 13 13 return "Usage:\n" + 14 14 " showinventory <user id / player name / entity id> [tag]\n" + … … 21 21 } 22 22 23 p rotectedoverride string[] getCommands () {23 public override string[] getCommands () { 24 24 return new[] {"showinventory", "si"}; 25 25 } … … 103 103 104 104 private static void PrintEquipment (IReadOnlyList<InvItem> _equipment, int _entityId, string _location, string _tag) { 105 AddEquipment ("head", _equipment, EquipmentSlots.Head gear, _entityId, _location, _tag);106 AddEquipment ("eyes", _equipment, EquipmentSlots.Eyewear, _entityId, _location, _tag);107 AddEquipment ("face", _equipment, EquipmentSlots.Face, _entityId, _location, _tag);105 AddEquipment ("head", _equipment, EquipmentSlots.Head, _entityId, _location, _tag); 106 // AddEquipment ("eyes", _equipment, EquipmentSlots.Eyewear, _entityId, _location, _tag); 107 // AddEquipment ("face", _equipment, EquipmentSlots.Face, _entityId, _location, _tag); 108 108 109 AddEquipment ("armor", _equipment, EquipmentSlots.Chest Armor, _entityId, _location, _tag);110 AddEquipment ("jacket", _equipment, EquipmentSlots.Jacket, _entityId, _location, _tag);111 AddEquipment ("shirt", _equipment, EquipmentSlots.Shirt, _entityId, _location, _tag);109 AddEquipment ("armor", _equipment, EquipmentSlots.Chest, _entityId, _location, _tag); 110 // AddEquipment ("jacket", _equipment, EquipmentSlots.Jacket, _entityId, _location, _tag); 111 // AddEquipment ("shirt", _equipment, EquipmentSlots.Shirt, _entityId, _location, _tag); 112 112 113 AddEquipment ("legarmor", _equipment, EquipmentSlots.LegArmor, _entityId, _location, _tag);114 AddEquipment ("pants", _equipment, EquipmentSlots.Legs, _entityId, _location, _tag);113 // AddEquipment ("legarmor", _equipment, EquipmentSlots.LegArmor, _entityId, _location, _tag); 114 // AddEquipment ("pants", _equipment, EquipmentSlots.Legs, _entityId, _location, _tag); 115 115 AddEquipment ("boots", _equipment, EquipmentSlots.Feet, _entityId, _location, _tag); 116 116 … … 120 120 private static void AddEquipment (string _slotname, IReadOnlyList<InvItem> _items, EquipmentSlots _slot, int _entityId, 121 121 string _location, string _tag) { 122 int [] slotindices = XUiM_PlayerEquipment.GetSlotIndicesByEquipmentSlot (_slot);122 int slotindex = (int)_slot; 123 123 124 for (int i = 0; i < slotindices.Length; i++) { 125 if (_items == null || _items[slotindices[i]] == null) { 126 continue; 124 if (_items == null || _items[slotindex] == null) { 125 return; 126 } 127 128 InvItem item = _items [slotindex]; 129 if (_tag == null) { 130 // no Tag defined -> readable output 131 if (item.quality < 0) { 132 SdtdConsole.Instance.Output (string.Format (" Slot {0:8}: {1:000}", _slotname, 133 item.itemName)); 134 } else { 135 SdtdConsole.Instance.Output (string.Format (" Slot {0:8}: {1:000} - quality: {2}", 136 _slotname, item.itemName, item.quality)); 127 137 } 128 138 129 InvItem item = _items [slotindices [i]]; 130 if (_tag == null) { 131 // no Tag defined -> readable output 132 if (item.quality < 0) { 133 SdtdConsole.Instance.Output (string.Format (" Slot {0:8}: {1:000}", _slotname, 134 item.itemName)); 135 } else { 136 SdtdConsole.Instance.Output (string.Format (" Slot {0:8}: {1:000} - quality: {2}", 137 _slotname, item.itemName, item.quality)); 138 } 139 140 DoParts (_items [slotindices [i]].parts, 1, null); 141 } else { 142 // Tag defined -> parseable output 143 string partsMsg = DoParts (_items [slotindices [i]].parts, 1, ""); 144 string msg = $"tracker_item id={_entityId}, tag={_tag}, location={_location}, slot={_slotname}, item={item.itemName}, qnty=1, quality={item.quality}, parts=({partsMsg})"; 145 SdtdConsole.Instance.Output (msg); 146 } 147 148 return; 139 DoParts (_items [slotindex].parts, 1, null); 140 } else { 141 // Tag defined -> parseable output 142 string partsMsg = DoParts (_items [slotindex].parts, 1, ""); 143 string msg = $"tracker_item id={_entityId}, tag={_tag}, location={_location}, slot={_slotname}, item={item.itemName}, qnty=1, quality={item.quality}, parts=({partsMsg})"; 144 SdtdConsole.Instance.Output (msg); 149 145 } 150 146 } -
binary-improvements/AllocsCommands/ModInfo.xml
r464 r488 5 5 <Description value="Additional commands for server operation" /> 6 6 <Author value="Christian 'Alloc' Illy" /> 7 <Version value="2 6" />7 <Version value="27" /> 8 8 <Website value="https://7dtd.illy.bz" /> 9 9 </xml> -
binary-improvements/MapRendering/API/GetPlayerInventory.cs
r455 r488 94 94 _writer.WriteBeginObject (); 95 95 96 AddEquipment (ref _writer, "head", _equ, EquipmentSlots.Headgear, _showIconColor, _showIconName); 97 _writer.WriteValueSeparator (); 98 AddEquipment (ref _writer, "eyes", _equ, EquipmentSlots.Eyewear, _showIconColor, _showIconName); 99 _writer.WriteValueSeparator (); 100 AddEquipment (ref _writer, "face", _equ, EquipmentSlots.Face, _showIconColor, _showIconName); 96 AddEquipment (ref _writer, "head", _equ, EquipmentSlots.Head, _showIconColor, _showIconName); 101 97 _writer.WriteValueSeparator (); 102 98 103 AddEquipment (ref _writer, "armor", _equ, EquipmentSlots.ChestArmor, _showIconColor, _showIconName); 104 _writer.WriteValueSeparator (); 105 AddEquipment (ref _writer, "jacket", _equ, EquipmentSlots.Jacket, _showIconColor, _showIconName); 106 _writer.WriteValueSeparator (); 107 AddEquipment (ref _writer, "shirt", _equ, EquipmentSlots.Shirt, _showIconColor, _showIconName); 99 AddEquipment (ref _writer, "armor", _equ, EquipmentSlots.Chest, _showIconColor, _showIconName); 108 100 _writer.WriteValueSeparator (); 109 101 110 AddEquipment (ref _writer, "legarmor", _equ, EquipmentSlots.LegArmor, _showIconColor, _showIconName);111 _writer.WriteValueSeparator ();112 AddEquipment (ref _writer, "pants", _equ, EquipmentSlots.Legs, _showIconColor, _showIconName);113 _writer.WriteValueSeparator ();114 102 AddEquipment (ref _writer, "boots", _equ, EquipmentSlots.Feet, _showIconColor, _showIconName); 115 103 _writer.WriteValueSeparator (); … … 123 111 _writer.WritePropertyName (_slotname); 124 112 125 int [] slotindices = XUiM_PlayerEquipment.GetSlotIndicesByEquipmentSlot (_slot);113 int slotindex = (int)_slot; 126 114 127 for (int i = 0; i < slotindices.Length; i++) { 128 if (_items? [slotindices [i]] != null) { 129 InvItem item = _items [slotindices [i]]; 130 131 GetJsonForItem (ref _writer, item, _showIconColor, _showIconName); 132 return; 133 } 115 if (_items == null || _items[slotindex] == null) { 116 // Slot not found / empty 117 _writer.WriteNull (); 118 return; 134 119 } 135 136 // Slot not found / empty137 _writer.WriteNull ();120 121 InvItem item = _items [slotindex]; 122 GetJsonForItem (ref _writer, item, _showIconColor, _showIconName); 138 123 } 139 124 -
binary-improvements/MapRendering/ModInfo.xml
r464 r488 5 5 <Description value="Render the game map to image map tiles as it is uncovered" /> 6 6 <Author value="Christian 'Alloc' Illy" /> 7 <Version value="4 7" />7 <Version value="48" /> 8 8 <Website value="https://7dtd.illy.bz" /> 9 9 </xml> -
binary-improvements/MapRendering/WebAndMapRendering.csproj
r470 r488 48 48 <Reference Include="LogLibrary"> 49 49 <HintPath>..\7dtd-binaries\LogLibrary.dll</HintPath> 50 <Private>False</Private>51 </Reference>52 <Reference Include="MapRendering, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">53 <HintPath>..\7dtd-binaries\MapRendering.dll</HintPath>54 50 <Private>False</Private> 55 51 </Reference> -
binary-improvements/MapRendering/WebTokens_Legacy.cs
r456 r488 5 5 private const string notUsedMessage = "NOT USED - WebTokens are managed through vanilla 7DTD now. Please use the 'webtokens' command instead."; 6 6 7 p rotectedoverride string[] getCommands () {7 public override string[] getCommands () { 8 8 return new[] {"webtokens_legacy"}; 9 9 } 10 10 11 p rotectedoverride string getDescription () {11 public override string getDescription () { 12 12 return notUsedMessage; 13 13 } 14 14 15 p rotectedoverride string getHelp () {15 public override string getHelp () { 16 16 return notUsedMessage; 17 17 } -
binary-improvements/bin/Mods/Allocs_CommandExtensions/ModInfo.xml
r464 r488 5 5 <Description value="Additional commands for server operation" /> 6 6 <Author value="Christian 'Alloc' Illy" /> 7 <Version value="2 6" />7 <Version value="27" /> 8 8 <Website value="https://7dtd.illy.bz" /> 9 9 </xml> -
binary-improvements/bin/Mods/Allocs_CommonFunc/ModInfo.xml
r464 r488 5 5 <Description value="Common functions" /> 6 6 <Author value="Christian 'Alloc' Illy" /> 7 <Version value="3 1" />7 <Version value="32" /> 8 8 <Website value="https://7dtd.illy.bz" /> 9 9 </xml> -
binary-improvements/bin/Mods/Allocs_WebAndMapRendering/ModInfo.xml
r464 r488 5 5 <Description value="Render the game map to image map tiles as it is uncovered" /> 6 6 <Author value="Christian 'Alloc' Illy" /> 7 <Version value="4 7" />7 <Version value="48" /> 8 8 <Website value="https://7dtd.illy.bz" /> 9 9 </xml>
Note:
See TracChangeset
for help on using the changeset viewer.