Unstable 0.1300.0.8
This commit is contained in:
@@ -617,7 +617,7 @@ namespace Barotrauma
|
||||
}
|
||||
else if (bossHealthBar.Character.AIController is EnemyAIController enemyAI && !enemyAI.IsTargetingPlayerTeam)
|
||||
{
|
||||
bossHealthBar.FadeTimer = Math.Min(bossHealthBar.FadeTimer, 10.0f);
|
||||
bossHealthBar.FadeTimer = Math.Min(bossHealthBar.FadeTimer, 60.0f);
|
||||
}
|
||||
bossHealthBar.FadeTimer -= deltaTime;
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ namespace Barotrauma
|
||||
|
||||
// onstartedinteracting.lootingisstealing
|
||||
if (item.Submarine?.Info?.Type == SubmarineType.Outpost &&
|
||||
item.ContainedItems.Any(i => i.SpawnedInOutpost))
|
||||
item.ContainedItems.Any(i => !i.AllowStealing))
|
||||
{
|
||||
if (DisplayHint($"{hintIdentifierBase}.lootingisstealing")) { return; }
|
||||
}
|
||||
@@ -379,7 +379,7 @@ namespace Barotrauma
|
||||
{
|
||||
if (!CanDisplayHints()) { return; }
|
||||
if (character != Character.Controlled) { return; }
|
||||
if (item == null || !item.SpawnedInOutpost || !item.StolenDuringRound) { return; }
|
||||
if (item == null || item.AllowStealing || !item.StolenDuringRound) { return; }
|
||||
DisplayHint("onstoleitem", onUpdate: () =>
|
||||
{
|
||||
if (item == null || item.Removed || item.GetRootInventoryOwner() != character)
|
||||
|
||||
@@ -70,17 +70,15 @@ namespace Barotrauma.Items.Components
|
||||
public override void ClientRead(ServerNetObject type, IReadMessage msg, float sendingTime)
|
||||
{
|
||||
base.ClientRead(type, msg, sendingTime);
|
||||
|
||||
bool readAttachData = msg.ReadBoolean();
|
||||
if (!readAttachData) { return; }
|
||||
|
||||
bool shouldBeAttached = msg.ReadBoolean();
|
||||
Vector2 simPosition = new Vector2(msg.ReadSingle(), msg.ReadSingle());
|
||||
UInt16 submarineID = msg.ReadUInt16();
|
||||
Submarine sub = Entity.FindEntityByID(submarineID) as Submarine;
|
||||
|
||||
if (!attachable)
|
||||
{
|
||||
DebugConsole.ThrowError("Received an attachment event for an item that's not attachable.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (shouldBeAttached)
|
||||
{
|
||||
if (!attached)
|
||||
@@ -96,7 +94,6 @@ namespace Barotrauma.Items.Components
|
||||
if (attached)
|
||||
{
|
||||
DropConnectedWires(null);
|
||||
|
||||
if (body != null)
|
||||
{
|
||||
item.body = body;
|
||||
|
||||
@@ -288,7 +288,7 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
string colorStr = XMLExtensions.ColorToString(item.SpawnedInOutpost ? GUI.Style.Red : Color.White);
|
||||
string colorStr = XMLExtensions.ColorToString(!item.AllowStealing ? GUI.Style.Red : Color.White);
|
||||
|
||||
toolTip = $"‖color:{colorStr}‖{item.Name}‖color:end‖";
|
||||
if (itemsInSlot.All(it => it.NonInteractable || it.NonPlayerTeamInteractable))
|
||||
@@ -1552,7 +1552,7 @@ namespace Barotrauma
|
||||
}
|
||||
sprite.Draw(spriteBatch, itemPos, spriteColor, rotation, scale);
|
||||
|
||||
if (item.SpawnedInOutpost && CharacterInventory.LimbSlotIcons.ContainsKey(InvSlotType.LeftHand))
|
||||
if (!item.AllowStealing && CharacterInventory.LimbSlotIcons.ContainsKey(InvSlotType.LeftHand))
|
||||
{
|
||||
var stealIcon = CharacterInventory.LimbSlotIcons[InvSlotType.LeftHand];
|
||||
Vector2 iconSize = new Vector2(25 * GUI.Scale);
|
||||
|
||||
@@ -1464,6 +1464,7 @@ namespace Barotrauma
|
||||
|
||||
byte bodyType = msg.ReadByte();
|
||||
bool spawnedInOutpost = msg.ReadBoolean();
|
||||
bool allowStealing = msg.ReadBoolean();
|
||||
byte teamID = msg.ReadByte();
|
||||
bool tagsChanged = msg.ReadBoolean();
|
||||
string tags = "";
|
||||
@@ -1535,7 +1536,8 @@ namespace Barotrauma
|
||||
|
||||
var item = new Item(itemPrefab, pos, sub, id: itemId)
|
||||
{
|
||||
SpawnedInOutpost = spawnedInOutpost
|
||||
SpawnedInOutpost = spawnedInOutpost,
|
||||
AllowStealing = allowStealing
|
||||
};
|
||||
|
||||
if (item.body != null)
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Barotrauma
|
||||
campaign.Map.OnLocationSelected += SelectLocation;
|
||||
campaign.Map.OnMissionSelected += (connection, mission) =>
|
||||
{
|
||||
missionList.Select(mission);
|
||||
missionList?.Select(mission);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user