Changeset 506
- Timestamp:
- Jun 11, 2025, 7:06:11 PM (3 days ago)
- Location:
- binary-improvements
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/ModInfo.xml
r501 r506 5 5 <Description value="Common functions" /> 6 6 <Author value="Christian 'Alloc' Illy" /> 7 <Version value="3 5" />7 <Version value="36" /> 8 8 <Website value="https://7dtd.illy.bz" /> 9 9 </xml> -
binary-improvements/7dtd-server-fixes/src/API.cs
r493 r506 16 16 } 17 17 18 private static void GameAwake ( ) {18 private static void GameAwake (ref ModEvents.SGameStartDoneData _data) { 19 19 PersistentContainer.Load (); 20 20 } 21 21 22 private static void SavePlayerData ( ClientInfo _cInfo, PlayerDataFile _playerDataFile) {23 PersistentContainer.Instance.Players.GetOrCreate (_ cInfo.InternalId, _cInfo.PlatformId, _cInfo.CrossplatformId).Update (_cInfo, _playerDataFile);22 private static void SavePlayerData (ref ModEvents.SSavePlayerDataData _data) { 23 PersistentContainer.Instance.Players.GetOrCreate (_data.ClientInfo.InternalId, _data.ClientInfo.PlatformId, _data.ClientInfo.CrossplatformId).Update (_data.ClientInfo, _data.PlayerDataFile); 24 24 } 25 25 26 private static void PlayerSpawning ( ClientInfo _cInfo, int _chunkViewDim, PlayerProfile _playerProfile) {26 private static void PlayerSpawning (ref ModEvents.SPlayerSpawningData _data) { 27 27 string owner = null; 28 if (_ cInfo.PlatformId is UserIdentifierSteam identifierSteam) {28 if (_data.ClientInfo.PlatformId is UserIdentifierSteam identifierSteam) { 29 29 owner = identifierSteam.OwnerId.ToString (); 30 30 } 31 31 32 32 Log.Out ( 33 $"Player connected, entityid={_ cInfo.entityId}, name={_cInfo.playerName}, pltfmid={_cInfo.PlatformId?.CombinedString ?? "<unknown>"}, crossid={_cInfo.CrossplatformId?.CombinedString ?? "<unknown/none>"}, steamOwner={owner ?? "<unknown/none>"}, ip={_cInfo.ip}"33 $"Player connected, entityid={_data.ClientInfo.entityId}, name={_data.ClientInfo.playerName}, pltfmid={_data.ClientInfo.PlatformId?.CombinedString ?? "<unknown>"}, crossid={_data.ClientInfo.CrossplatformId?.CombinedString ?? "<unknown/none>"}, steamOwner={owner ?? "<unknown/none>"}, ip={_data.ClientInfo.ip}" 34 34 ); 35 35 } 36 36 37 private static void PlayerDisconnected ( ClientInfo _cInfo, bool _bShutdown) {38 Player p = PersistentContainer.Instance.Players.GetByInternalId (_ cInfo.InternalId);37 private static void PlayerDisconnected (ref ModEvents.SPlayerDisconnectedData _data) { 38 Player p = PersistentContainer.Instance.Players.GetByInternalId (_data.ClientInfo.InternalId); 39 39 if (p != null) { 40 40 p.SetOffline (); … … 46 46 } 47 47 48 private static void PlayerSpawned ( ClientInfo _cInfo, RespawnType _respawnReason, Vector3i _spawnPos) {49 if (_ cInfo == null) {48 private static void PlayerSpawned (ref ModEvents.SPlayerSpawnedInWorldData _data) { 49 if (_data.ClientInfo == null) { 50 50 return; 51 51 } 52 52 53 PersistentContainer.Instance.Players.GetOrCreate (_ cInfo.InternalId, _cInfo.PlatformId, _cInfo.CrossplatformId).SetOnline (_cInfo);53 PersistentContainer.Instance.Players.GetOrCreate (_data.ClientInfo.InternalId, _data.ClientInfo.PlatformId, _data.ClientInfo.CrossplatformId).SetOnline (_data.ClientInfo); 54 54 PersistentContainer.Instance.Save (); 55 55 } … … 57 57 private const string ANSWER = " [ff0000]I[-] [ff7f00]W[-][ffff00]A[-][80ff00]S[-] [00ffff]H[-][0080ff]E[-][0000ff]R[-][8b00ff]E[-]"; 58 58 59 private static bool ChatMessage (ClientInfo _cInfo, EChatType _type, int _senderId, string _msg, string _mainName, 60 List<int> _recipientEntityIds) { 61 if (string.IsNullOrEmpty (_msg) || !_msg.EqualsCaseInsensitive ("/alloc")) { 62 return true; 59 private static ModEvents.EModEventResult ChatMessage (ref ModEvents.SChatMessageData _data) { 60 if (string.IsNullOrEmpty (_data.Message) || !_data.Message.EqualsCaseInsensitive ("/alloc")) { 61 return ModEvents.EModEventResult.Continue; 63 62 } 64 63 65 if (_ cInfo != null) {66 Log.Out ($"Sent chat hook reply to {_ cInfo.InternalId}");67 _ cInfo.SendPackage (NetPackageManager.GetPackage<NetPackageChat> ().Setup (EChatType.Whisper, -1, ANSWER, null, EMessageSender.Server));64 if (_data.ClientInfo != null) { 65 Log.Out ($"Sent chat hook reply to {_data.ClientInfo.InternalId}"); 66 _data.ClientInfo.SendPackage (NetPackageManager.GetPackage<NetPackageChat> ().Setup (EChatType.Whisper, -1, ANSWER, null, EMessageSender.Server, GeneratedTextManager.BbCodeSupportMode.Supported)); 68 67 } else { 69 Log.Error ($"ChatHookExample: Argument _cInfo null on message: {_ msg}");68 Log.Error ($"ChatHookExample: Argument _cInfo null on message: {_data.Message}"); 70 69 } 71 70 72 return false;71 return ModEvents.EModEventResult.StopHandlersAndVanilla; 73 72 } 74 73 } -
binary-improvements/AllocsCommands/ModInfo.xml
r488 r506 5 5 <Description value="Additional commands for server operation" /> 6 6 <Author value="Christian 'Alloc' Illy" /> 7 <Version value="2 7" />7 <Version value="28" /> 8 8 <Website value="https://7dtd.illy.bz" /> 9 9 </xml> -
binary-improvements/MapRendering/ModInfo.xml
r501 r506 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=" 49" />7 <Version value="50" /> 8 8 <Website value="https://7dtd.illy.bz" /> 9 9 </xml> -
binary-improvements/bin/Mods/Allocs_CommandExtensions/ModInfo.xml
r488 r506 5 5 <Description value="Additional commands for server operation" /> 6 6 <Author value="Christian 'Alloc' Illy" /> 7 <Version value="2 7" />7 <Version value="28" /> 8 8 <Website value="https://7dtd.illy.bz" /> 9 9 </xml> -
binary-improvements/bin/Mods/Allocs_CommonFunc/ModInfo.xml
r501 r506 5 5 <Description value="Common functions" /> 6 6 <Author value="Christian 'Alloc' Illy" /> 7 <Version value="3 5" />7 <Version value="36" /> 8 8 <Website value="https://7dtd.illy.bz" /> 9 9 </xml> -
binary-improvements/bin/Mods/Allocs_WebAndMapRendering/ModInfo.xml
r501 r506 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=" 49" />7 <Version value="50" /> 8 8 <Website value="https://7dtd.illy.bz" /> 9 9 </xml>
Note:
See TracChangeset
for help on using the changeset viewer.