-
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into patch-1
- Loading branch information
Showing
11 changed files
with
101 additions
and
163 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
NebulaClient/PacketProcessors/Logistics/ILSAddStationComponentProcessor.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,37 @@ | ||
using NebulaModel.Attributes; | ||
using NebulaModel.Networking; | ||
using NebulaModel.Packets.Logistics; | ||
using NebulaModel.Packets.Processors; | ||
using NebulaModel.Logger; | ||
using NebulaWorld.Logistics; | ||
|
||
namespace NebulaClient.PacketProcessors.Logistics | ||
{ | ||
[RegisterPacketProcessor] | ||
public class ILSAddStationComponentProcessor: IPacketProcessor<ILSAddStationComponent> | ||
{ | ||
public void ProcessPacket(ILSAddStationComponent packet, NebulaConnection conn) | ||
{ | ||
Log.Info($"ILSAddStationComponentProcessor processing packet for planet {packet.PlanetId}, station {packet.StationId} with gId of {packet.StationGId}"); | ||
|
||
using (ILSShipManager.PatchLockILS.On()) | ||
{ | ||
GalacticTransport galacticTransport = GameMain.data.galacticTransport; | ||
|
||
if (packet.PlanetId == GameMain.localPlanet?.id) | ||
{ | ||
// If we're on the same planet as the new station was created on, should be able to find | ||
// it in our local PlanetTransport.stationPool | ||
StationComponent stationComponent = GameMain.localPlanet.factory.transport.stationPool[packet.StationId]; | ||
galacticTransport.AddStationComponent(packet.PlanetId, stationComponent); | ||
} | ||
else | ||
{ | ||
// If we're not on the same planet as the new station was create on, we need to create a | ||
// "fake" station that we can put into the GalacticTransport.stationPool instead of a real on | ||
ILSShipManager.CreateFakeStationComponent(packet.StationGId, packet.PlanetId, true); | ||
} | ||
} | ||
} | ||
} | ||
} |
38 changes: 0 additions & 38 deletions
38
NebulaClient/PacketProcessors/Logistics/ILSAddStationComponentResponseProcessor.cs
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
NebulaHost/PacketProcessors/Logistics/ILSAddStationComponentRequestProcessor.cs
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
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,19 @@ | ||
using UnityEngine; | ||
using NebulaModel.DataStructures; | ||
|
||
namespace NebulaModel.Packets.Logistics | ||
{ | ||
public class ILSAddStationComponent | ||
{ | ||
public int PlanetId { get; set; } | ||
public int StationId { get; set; } | ||
public int StationGId { get; set; } | ||
public ILSAddStationComponent() { } | ||
public ILSAddStationComponent(int planetId, int stationId, int stationGId) | ||
{ | ||
StationGId = stationGId; | ||
PlanetId = planetId; | ||
StationId = stationId; | ||
} | ||
} | ||
} |
17 changes: 0 additions & 17 deletions
17
NebulaModel/Packets/Logistics/ILSAddStationComponentRequest.cs
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
NebulaModel/Packets/Logistics/ILSAddStationComponentResponse.cs
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
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