Build 0.18.5.0
This commit is contained in:
@@ -4056,7 +4056,11 @@ namespace Barotrauma
|
||||
string beaconStationName = System.IO.Path.GetFileNameWithoutExtension(contentFile.Path.Value);
|
||||
|
||||
BeaconStation = SpawnSubOnPath(beaconStationName, contentFile, SubmarineType.BeaconStation);
|
||||
if (BeaconStation == null) { return; }
|
||||
if (BeaconStation == null)
|
||||
{
|
||||
LevelData.HasBeaconStation = false;
|
||||
return;
|
||||
}
|
||||
|
||||
Item sonarItem = Item.ItemList.Find(it => it.Submarine == BeaconStation && it.GetComponent<Sonar>() != null);
|
||||
if (sonarItem == null)
|
||||
@@ -4072,6 +4076,11 @@ namespace Barotrauma
|
||||
if (!LevelData.HasBeaconStation) { return; }
|
||||
if (GameMain.NetworkMember?.IsClient ?? false) { return; }
|
||||
|
||||
if (BeaconStation == null)
|
||||
{
|
||||
throw new InvalidOperationException("Failed to prepare beacon station (no beacon station in the level).");
|
||||
}
|
||||
|
||||
List<Item> beaconItems = Item.ItemList.FindAll(it => it.Submarine == BeaconStation);
|
||||
|
||||
Item reactorItem = beaconItems.Find(it => it.GetComponent<Reactor>() != null);
|
||||
|
||||
Reference in New Issue
Block a user