This commit is contained in:
Evil Factory
2021-02-28 16:27:12 -03:00
4 changed files with 21 additions and 9 deletions

View File

@@ -1257,10 +1257,7 @@ namespace Barotrauma.Networking
if (bannedClient != null)
{
Log("Client \"" + ClientLogName(sender) + "\" banned \"" + ClientLogName(bannedClient) + "\".", ServerLog.MessageType.ServerMessage);
if (durationSeconds > 0)
{
BanClient(bannedClient, string.IsNullOrEmpty(banReason) ? $"ServerMessage.BannedBy~[initiator]={sender.Name}" : banReason, range, banDuration);
}
BanClient(bannedClient, string.IsNullOrEmpty(banReason) ? $"ServerMessage.BannedBy~[initiator]={sender.Name}" : banReason, range, banDuration);
}
else
{

View File

@@ -46,7 +46,11 @@ namespace Barotrauma
{
get
{
yield return level.BeaconStation.WorldPosition;
if (level.BeaconStation == null)
{
yield break;
}
yield return level.BeaconStation.WorldPosition;
}
}

View File

@@ -812,10 +812,12 @@ namespace Barotrauma.Items.Components
if (e is Item projectileContainer)
{
var container = projectileContainer.GetComponent<ItemContainer>();
maxProjectileCount += container.Capacity;
int projectiles = projectileContainer.ContainedItems.Count(it => it.Condition > 0.0f);
usableProjectileCount += projectiles;
if (container != null)
{
maxProjectileCount += container.Capacity;
int projectiles = projectileContainer.ContainedItems.Count(it => it.Condition > 0.0f);
usableProjectileCount += projectiles;
}
}
}

View File

@@ -1,3 +1,12 @@
---------------------------------------------------------------------------------------------------------
v0.12.0.3
---------------------------------------------------------------------------------------------------------
- Fixed inability to permanently ban players who are currently in the server.
- Fixed scrap items failing to load in saves done prior to v0.12.
- Fixed bandage/plastiseal crafting exploit.
- Fixed crashing if a bot tries to operate a turret that's linked to some other item than a loader.
---------------------------------------------------------------------------------------------------------
v0.12.0.2
---------------------------------------------------------------------------------------------------------