Build 0.20.8.0
This commit is contained in:
@@ -318,7 +318,7 @@ namespace Barotrauma
|
||||
var characters = GameSession.GetSessionCrewCharacters(CharacterType.Both);
|
||||
if (characters.Any())
|
||||
{
|
||||
price *= 1f + characters.Max(static c => c.GetStatValue(StatTypes.StoreSellMultiplier));
|
||||
price *= 1f + characters.Max(static c => c.GetStatValue(StatTypes.StoreSellMultiplier, includeSaved: false));
|
||||
price *= 1f + characters.Max(c => item.Tags.Sum(tag => c.Info.GetSavedStatValue(StatTypes.StoreSellMultiplier, tag)));
|
||||
}
|
||||
|
||||
@@ -659,7 +659,7 @@ namespace Barotrauma
|
||||
return new Location(position, zone, rand, requireOutpost, forceLocationType, existingLocations);
|
||||
}
|
||||
|
||||
public void ChangeType(LocationType newType)
|
||||
public void ChangeType(LocationType newType, bool createStores = true)
|
||||
{
|
||||
if (newType == Type) { return; }
|
||||
|
||||
@@ -683,7 +683,10 @@ namespace Barotrauma
|
||||
UnlockMissionByTag(Type.MissionTags.GetRandomUnsynced());
|
||||
}
|
||||
|
||||
CreateStores(force: true);
|
||||
if (createStores)
|
||||
{
|
||||
CreateStores(force: true);
|
||||
}
|
||||
}
|
||||
|
||||
public void UnlockInitialMissions()
|
||||
|
||||
@@ -552,7 +552,8 @@ namespace Barotrauma
|
||||
Connections[i].Locations[1];
|
||||
if (!leftMostLocation.Type.HasOutpost || leftMostLocation.Type.Identifier == "abandoned")
|
||||
{
|
||||
leftMostLocation.ChangeType(LocationType.Prefabs.OrderBy(lt => lt.Identifier).First(lt => lt.HasOutpost && lt.Identifier != "abandoned"));
|
||||
leftMostLocation.ChangeType(LocationType.Prefabs.OrderBy(lt => lt.Identifier).First(lt => lt.HasOutpost && lt.Identifier != "abandoned"),
|
||||
createStores: false);
|
||||
}
|
||||
leftMostLocation.IsGateBetweenBiomes = true;
|
||||
Connections[i].Locked = true;
|
||||
@@ -628,6 +629,7 @@ namespace Barotrauma
|
||||
foreach (Location location in Locations)
|
||||
{
|
||||
location.LevelData = new LevelData(location, CalculateDifficulty(location.MapPosition.X, location.Biome));
|
||||
location.CreateStores(force: true);
|
||||
}
|
||||
foreach (LocationConnection connection in Connections)
|
||||
{
|
||||
@@ -734,7 +736,7 @@ namespace Barotrauma
|
||||
|
||||
if (LocationType.Prefabs.TryGet("none", out LocationType locationType))
|
||||
{
|
||||
previousToEndLocation.ChangeType(locationType);
|
||||
previousToEndLocation.ChangeType(locationType, createStores: false);
|
||||
}
|
||||
|
||||
//remove all locations from the end biome except the end location
|
||||
|
||||
Reference in New Issue
Block a user