v1.0.13.1 (first post-1.0 patch)

This commit is contained in:
Regalis11
2023-05-10 15:07:17 +03:00
parent 96fb49ba14
commit ee1db852b1
272 changed files with 5738 additions and 2413 deletions
@@ -24,7 +24,7 @@ namespace Barotrauma
}
[Serialize(-1, IsPropertySaveable.Yes), Editable(MinValueInt = -1, MaxValueInt = 10)]
[Serialize(-1, IsPropertySaveable.Yes, description: "Should this type of outpost be forced to the locations at the end of the campaign map? 0 = first end level, 1 = second end level, and so on."), Editable(MinValueInt = -1, MaxValueInt = 10)]
public int ForceToEndLocationIndex
{
get;
@@ -32,7 +32,7 @@ namespace Barotrauma
}
[Serialize(10, IsPropertySaveable.Yes), Editable(MinValueInt = 1, MaxValueInt = 50)]
[Serialize(10, IsPropertySaveable.Yes, description: "Total number of modules in the outpost."), Editable(MinValueInt = 1, MaxValueInt = 50)]
public int TotalModuleCount
{
get;
@@ -46,70 +46,70 @@ namespace Barotrauma
set;
}
[Serialize(200.0f, IsPropertySaveable.Yes), Editable(MinValueFloat = 0.0f, MaxValueFloat = 1000.0f)]
[Serialize(200.0f, IsPropertySaveable.Yes, description: "Minimum length of the hallways between modules. If 0, the generator will place the modules directly against each other assuming it can be done without making any modules overlap."), Editable(MinValueFloat = 0.0f, MaxValueFloat = 1000.0f)]
public float MinHallwayLength
{
get;
set;
}
[Serialize(false, IsPropertySaveable.Yes), Editable]
[Serialize(false, IsPropertySaveable.Yes, description: "Should this outpost always be destructible, regardless if damaging outposts is allowed by the server?"), Editable]
public bool AlwaysDestructible
{
get;
set;
}
[Serialize(false, IsPropertySaveable.Yes), Editable]
[Serialize(false, IsPropertySaveable.Yes, description: "Should this outpost always be rewireable, regardless if rewiring is allowed by the server?"), Editable]
public bool AlwaysRewireable
{
get;
set;
}
[Serialize(false, IsPropertySaveable.Yes), Editable]
[Serialize(false, IsPropertySaveable.Yes, description: "Should stealing from this outpost be always allowed?"), Editable]
public bool AllowStealing
{
get;
set;
}
[Serialize(true, IsPropertySaveable.Yes), Editable]
[Serialize(true, IsPropertySaveable.Yes, description: "Should the crew spawn inside the outpost (if not, they'll spawn in the submarine)."), Editable]
public bool SpawnCrewInsideOutpost
{
get;
set;
}
[Serialize(true, IsPropertySaveable.Yes), Editable]
[Serialize(true, IsPropertySaveable.Yes, description: "Should doors at the edges of an outpost module that didn't get connected to another module be locked?"), Editable]
public bool LockUnusedDoors
{
get;
set;
}
[Serialize(true, IsPropertySaveable.Yes), Editable]
[Serialize(true, IsPropertySaveable.Yes, description: "Should gaps at the edges of an outpost module that didn't get connected to another module be removed?"), Editable]
public bool RemoveUnusedGaps
{
get;
set;
}
[Serialize(false, IsPropertySaveable.Yes), Editable]
[Serialize(false, IsPropertySaveable.Yes, description: "Should the whole outpost render behind submarines? Only set this to true if the submarine is intended to go inside the outpost."), Editable]
public bool DrawBehindSubs
{
get;
set;
}
[Serialize(0.0f, IsPropertySaveable.Yes), Editable(MinValueFloat = 0.0f, MaxValueFloat = 100.0f)]
[Serialize(0.0f, IsPropertySaveable.Yes, description: "Minimum amount of water in the hulls of the outpost."), Editable(MinValueFloat = 0.0f, MaxValueFloat = 100.0f)]
public float MinWaterPercentage
{
get;
set;
}
[Serialize(0.0f, IsPropertySaveable.Yes), Editable(MinValueFloat = 0.0f, MaxValueFloat = 100.0f)]
[Serialize(0.0f, IsPropertySaveable.Yes, description: "Maximum amount of water in the hulls of the outpost."), Editable(MinValueFloat = 0.0f, MaxValueFloat = 100.0f)]
public float MaxWaterPercentage
{
get;
@@ -122,7 +122,7 @@ namespace Barotrauma
set;
}
[Serialize("", IsPropertySaveable.Yes), Editable]
[Serialize("", IsPropertySaveable.Yes, description: "Identifier of the outpost generation parameters that should be used if this outpost has become critically irradiated."), Editable]
public string ReplaceInRadiation { get; set; }
public ContentPath OutpostFilePath { get; set; }
@@ -306,7 +306,7 @@ namespace Barotrauma
}
idOffset = moduleEntities.Max(e => e.ID) + 1;
var wallEntities = moduleEntities.Where(e => e is Structure).Cast<Structure>();
var wallEntities = moduleEntities.Where(e => e is Structure s && s.HasBody).Cast<Structure>();
var hullEntities = moduleEntities.Where(e => e is Hull).Cast<Hull>();
// Tell the hulls what tags the module has, used to spawn NPCs on specific rooms
@@ -1440,27 +1440,7 @@ namespace Barotrauma
private static void EnableFactionSpecificEntities(Submarine sub, Location location)
{
foreach (MapEntity me in MapEntity.mapEntityList)
{
if (string.IsNullOrEmpty(me.Layer) || me.Submarine != sub) { continue; }
var layerAsIdentifier = me.Layer.ToIdentifier();
if (FactionPrefab.Prefabs.ContainsKey(layerAsIdentifier))
{
me.HiddenInGame =
location?.Faction?.Prefab != FactionPrefab.Prefabs[layerAsIdentifier];
#if CLIENT
//normally this is handled in LightComponent.OnMapLoaded, but this method is called after that
if (me.HiddenInGame && me is Item item)
{
foreach (var lightComponent in item.GetComponents<LightComponent>())
{
lightComponent.Light.Enabled = false;
}
}
#endif
}
}
sub.EnableFactionSpecificEntities(location?.Faction?.Prefab.Identifier ?? Identifier.Empty);
}
private static void LockUnusedDoors(IEnumerable<PlacedModule> placedModules, Dictionary<PlacedModule, List<MapEntity>> entities, bool removeUnusedGaps)
@@ -93,13 +93,11 @@ namespace Barotrauma
{
moduleFlags.Add("hallwayhorizontal".ToIdentifier());
if (newFlags.Contains("ruin".ToIdentifier())) { moduleFlags.Add("ruin".ToIdentifier()); }
return;
}
if (newFlags.Contains("hallwayvertical".ToIdentifier()))
{
moduleFlags.Add("hallwayvertical".ToIdentifier());
if (newFlags.Contains("ruin".ToIdentifier())) { moduleFlags.Add("ruin".ToIdentifier()); }
return;
}
if (!newFlags.Any())
{