Unstable 0.1300.0.8
This commit is contained in:
@@ -1066,6 +1066,7 @@ namespace Barotrauma
|
||||
case "connection":
|
||||
int connectionIndex = subElement.GetAttributeInt("i", 0);
|
||||
Connections[connectionIndex].Passed = subElement.GetAttributeBool("passed", false);
|
||||
Connections[connectionIndex].Locked = subElement.GetAttributeBool("locked", false);
|
||||
break;
|
||||
case "radiation":
|
||||
Radiation = new Radiation(this, generationParams.RadiationParams, subElement);
|
||||
|
||||
@@ -1425,7 +1425,8 @@ namespace Barotrauma
|
||||
humanPrefab.GiveItems(npc, outpost, Rand.RandSync.Server);
|
||||
foreach (Item item in npc.Inventory.FindAllItems(it => it != null, recursive: true))
|
||||
{
|
||||
item.SpawnedInOutpost = !outpost.Info.OutpostGenerationParams.AllowStealing;
|
||||
item.AllowStealing = outpost.Info.OutpostGenerationParams.AllowStealing;
|
||||
item.SpawnedInOutpost = true;
|
||||
}
|
||||
npc.GiveIdCardTags(gotoTarget as WayPoint);
|
||||
humanPrefab.InitializeCharacter(npc, gotoTarget);
|
||||
|
||||
@@ -1175,7 +1175,8 @@ namespace Barotrauma
|
||||
subBody.SetPosition(subBody.Position + amount);
|
||||
}
|
||||
|
||||
public static Submarine FindClosest(Vector2 worldPosition, bool ignoreOutposts = false, bool ignoreOutsideLevel = true, bool ignoreRespawnShuttle = false)
|
||||
/// <param name="teamType">If has value, the sub must match the team type.</param>
|
||||
public static Submarine FindClosest(Vector2 worldPosition, bool ignoreOutposts = false, bool ignoreOutsideLevel = true, bool ignoreRespawnShuttle = false, CharacterTeamType? teamType = null)
|
||||
{
|
||||
Submarine closest = null;
|
||||
float closestDist = 0.0f;
|
||||
@@ -1187,6 +1188,7 @@ namespace Barotrauma
|
||||
{
|
||||
if (sub == GameMain.NetworkMember?.RespawnManager?.RespawnShuttle) { continue; }
|
||||
}
|
||||
if (teamType.HasValue && sub.TeamID != teamType) { continue; }
|
||||
float dist = Vector2.DistanceSquared(worldPosition, sub.WorldPosition);
|
||||
if (closest == null || dist < closestDist)
|
||||
{
|
||||
@@ -1359,7 +1361,8 @@ namespace Barotrauma
|
||||
if (me.Submarine != this) { continue; }
|
||||
if (me is Item item)
|
||||
{
|
||||
item.SpawnedInOutpost = info.OutpostGenerationParams != null && !info.OutpostGenerationParams.AllowStealing;
|
||||
item.SpawnedInOutpost = info.OutpostGenerationParams != null;
|
||||
item.AllowStealing = info.OutpostGenerationParams?.AllowStealing ?? true;
|
||||
if (item.GetComponent<Repairable>() != null && indestructible)
|
||||
{
|
||||
item.Indestructible = true;
|
||||
|
||||
Reference in New Issue
Block a user