forked from NebulaModTeam/nebula
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request NebulaModTeam#681 from starfi5h/pr-adpat-0.10.30.2…
…2292 Update for game version 0.10.30.22292
- Loading branch information
Showing
22 changed files
with
351 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
namespace NebulaModel.Packets.Logistics; | ||
|
||
// Sync route update events in GalacticTransport | ||
public class ILSUpdateRoute | ||
{ | ||
public ILSUpdateRoute() { } | ||
|
||
public ILSUpdateRoute(ERouteEvent type, int id0, int id1 = 0, int itemId = 0) | ||
{ | ||
Type = type; | ||
Id0 = id0; | ||
Id1 = id1; | ||
ItemId = itemId; | ||
} | ||
|
||
public ERouteEvent Type { get; set; } | ||
public int Id0 { get; set; } | ||
public int Id1 { get; set; } | ||
public int ItemId { get; set; } | ||
public bool Enable { get; set; } | ||
public string Comment { get; set; } | ||
|
||
public enum ERouteEvent | ||
{ | ||
None = 0, | ||
AddStation2StationRoute, | ||
RemoveStation2StationRoute_Single, | ||
RemoveStation2StationRoute_Pair, | ||
AddAstro2AstroRoute, | ||
RemoveAstro2AstroRoute, | ||
SetAstro2AstroRouteEnable, | ||
SetAstro2AstroRouteComment | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 0 additions & 31 deletions
31
NebulaNetwork/PacketProcessors/Logistics/ILSShipEnterWarpProcessor.cs
This file was deleted.
Oops, something went wrong.
55 changes: 55 additions & 0 deletions
55
NebulaNetwork/PacketProcessors/Logistics/ILSUpdateRouteProcessor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#region | ||
|
||
using NebulaAPI.Packets; | ||
using NebulaModel.Logger; | ||
using NebulaModel.Networking; | ||
using NebulaModel.Packets; | ||
using NebulaModel.Packets.Logistics; | ||
using NebulaWorld; | ||
|
||
#endregion | ||
|
||
namespace NebulaNetwork.PacketProcessors.Logistics; | ||
|
||
[RegisterPacketProcessor] | ||
public class ILSUpdateRouteProcessor : PacketProcessor<ILSUpdateRoute> | ||
{ | ||
protected override void ProcessPacket(ILSUpdateRoute packet, NebulaConnection conn) | ||
{ | ||
Log.Debug($"{packet.Type} id0:{packet.Id0} id1:{packet.Id1}"); | ||
using (Multiplayer.Session.Ships.PatchLockILS.On()) | ||
{ | ||
var galacticTransport = GameMain.data.galacticTransport; | ||
switch (packet.Type) | ||
{ | ||
case ILSUpdateRoute.ERouteEvent.AddStation2StationRoute: | ||
galacticTransport.AddStation2StationRoute(packet.Id0, packet.Id1); | ||
break; | ||
|
||
case ILSUpdateRoute.ERouteEvent.RemoveStation2StationRoute_Single: | ||
galacticTransport.RemoveStation2StationRoute(packet.Id0); | ||
break; | ||
|
||
case ILSUpdateRoute.ERouteEvent.RemoveStation2StationRoute_Pair: | ||
galacticTransport.RemoveStation2StationRoute(packet.Id0, packet.Id1); | ||
break; | ||
|
||
case ILSUpdateRoute.ERouteEvent.AddAstro2AstroRoute: | ||
galacticTransport.AddAstro2AstroRoute(packet.Id0, packet.Id1, packet.ItemId); | ||
break; | ||
|
||
case ILSUpdateRoute.ERouteEvent.RemoveAstro2AstroRoute: | ||
galacticTransport.RemoveAstro2AstroRoute(packet.Id0, packet.Id1, packet.ItemId); | ||
break; | ||
|
||
case ILSUpdateRoute.ERouteEvent.SetAstro2AstroRouteEnable: | ||
galacticTransport.SetAstro2AstroRouteEnable(packet.Id0, packet.Id1, packet.ItemId, packet.Enable); | ||
break; | ||
|
||
case ILSUpdateRoute.ERouteEvent.SetAstro2AstroRouteComment: | ||
galacticTransport.SetAstro2AstroRouteComment(packet.Id0, packet.Id1, packet.ItemId, packet.Comment); | ||
break; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.