OBT/1.2.0(Spring Update)

Sync with Upstream
This commit is contained in:
NotAlwaysTrue
2026-04-25 13:25:41 +08:00
committed by GitHub
parent 5207b381b7
commit 59bc21973a
421 changed files with 24090 additions and 11391 deletions
@@ -18,7 +18,7 @@ namespace Barotrauma.Networking
MultiPlayerCampaign campaign = GameMain.GameSession.GameMode as MultiPlayerCampaign;
foreach (Client c in networkMember.ConnectedClients)
{
if (GameMain.LuaCs.Game.overrideRespawnSub)
if (LuaCsSetup.Instance.Game.overrideRespawnSub)
continue;
if (!c.InGame) { continue; }
@@ -169,7 +169,7 @@ namespace Barotrauma.Networking
private bool ShouldStartRespawnCountdown(int characterToRespawnCount)
{
if (GameMain.LuaCs.Game.overrideRespawnSub)
if (LuaCsSetup.Instance.Game.overrideRespawnSub)
{
characterToRespawnCount = 0;
}
@@ -187,7 +187,7 @@ namespace Barotrauma.Networking
var teamId = teamSpecificState.TeamID;
var respawnShuttle = GetShuttle(teamId);
if (respawnShuttle != null && !GameMain.LuaCs.Game.overrideRespawnSub)
if (respawnShuttle != null && !LuaCsSetup.Instance.Game.overrideRespawnSub)
{
respawnShuttle.Velocity = Vector2.Zero;
}
@@ -240,7 +240,7 @@ namespace Barotrauma.Networking
if (RespawnShuttles.Any())
{
ResetShuttle(teamSpecificState);
if (GameMain.LuaCs.Game.overrideRespawnSub)
if (LuaCsSetup.Instance.Game.overrideRespawnSub)
{
teamSpecificState.CurrentState = State.Waiting;
}
@@ -596,6 +596,23 @@ namespace Barotrauma.Networking
teamSpecificState.RespawnItems.AddRange(AutoItemPlacer.RegenerateLoot(respawnShuttle, respawnContainer));
}
}
else if (character.InWater)
{
if (divingSuitPrefab != null)
{
var divingSuit = new Item(divingSuitPrefab, character.Position, respawnSub);
Spawner.CreateNetworkEvent(new EntitySpawner.SpawnEntity(divingSuit));
character.Inventory.TryPutItem(divingSuit, user: null, allowedSlots: divingSuit.AllowedSlots);
teamSpecificState.RespawnItems.Add(divingSuit);
if (oxyPrefab != null && divingSuit.GetComponent<ItemContainer>() != null)
{
var oxyTank = new Item(oxyPrefab, character.Position, respawnSub);
Spawner.CreateNetworkEvent(new EntitySpawner.SpawnEntity(oxyTank));
divingSuit.Combine(oxyTank, user: null);
teamSpecificState.RespawnItems.Add(oxyTank);
}
}
}
var characterData = campaign?.GetClientCharacterData(clients[i]);
// NOTE: This was where Reaper's tax got applied