Merge remote-tracking branch 'upstream/master' into develop
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@
|
||||
AttachedByDefault="true" DisallowAttachingOverTags="container,planter,refuelableitem" DisallowAttachingOverSize="115,130">
|
||||
</Holdable>
|
||||
|
||||
<ItemContainer hideitems="false" drawinventory="true" ItemsUseInventoryPlacement="true" capacity="1" maxstacksize="1" canbeselected="true" itempos="-25,-20" iteminterval="0,0" itemrotation="0" msg="ItemMsgOxygenRefill" containedspritedepth="0.1">
|
||||
<ItemContainer hideitems="false" drawinventory="true" ItemsUseInventoryPlacement="true" capacity="1" maxstacksize="1" canbeselected="true" itempos="32,-83" iteminterval="0,0" itemrotation="0" msg="ItemMsgOxygenRefill" containedspritedepth="0.1">
|
||||
<GuiFrame relativesize="0.2,0.25" anchor="Center" minsize="140,170" maxsize="280,280" style="ItemUI" />
|
||||
<SlotIcon slotindex="0" texture="Content/UI/StatusMonitorUI.png" sourcerect="64,448,64,64" origin="0.5,0.5" />
|
||||
<Containable items="oxygensource" />
|
||||
|
||||
BIN
Binary file not shown.
@@ -242,10 +242,13 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The monster won't try to damage these submarines
|
||||
/// The monster won't try to damage these submarines. Applies to hulls, structures and static items (items without a physics body) belonging to these submarines. Does not apply to non-static items, e.g. flares or other provocative items.
|
||||
/// </summary>
|
||||
private readonly HashSet<Submarine> unattackableSubmarines = [];
|
||||
|
||||
/// <summary>
|
||||
/// Set the submarine(s) the monster won't attack. Applies to hulls, structures and static items (items without a physics body) belonging to these submarines. Does not apply to non-static items, e.g. flares or other provocative items.
|
||||
/// </summary>
|
||||
private readonly HashSet<Submarine> unattackableSubmarines = new HashSet<Submarine>();
|
||||
|
||||
public void SetUnattackableSubmarines(Submarine submarine, bool includeOwnSub = true, bool includeConnectedSubs = true, bool clearExisting = true)
|
||||
{
|
||||
if (clearExisting)
|
||||
@@ -3075,11 +3078,17 @@ namespace Barotrauma
|
||||
}
|
||||
else
|
||||
{
|
||||
// Ignore all structures, items, and hulls inside these subs.
|
||||
if (aiTarget.Entity.Submarine != null)
|
||||
if (aiTarget.Entity.Submarine != null)
|
||||
{
|
||||
//ignore all items, structures and hulls in wrecks and beacon stations
|
||||
//(we don't want monsters to be distracted by them during missions,
|
||||
//nor have monsters inside them attack "their home" rather than the player)
|
||||
if (aiTarget.Entity.Submarine.Info.IsWreck ||
|
||||
aiTarget.Entity.Submarine.Info.IsBeacon ||
|
||||
aiTarget.Entity.Submarine.Info.IsBeacon)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (aiTarget.Entity is Structure or Hull or Item { body: null } &&
|
||||
unattackableSubmarines.Contains(aiTarget.Entity.Submarine))
|
||||
{
|
||||
continue;
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
}
|
||||
|
||||
[Serialize("0.0,0.0", IsPropertySaveable.No, description: "The position where the contained items get drawn at. In the case of items with a physics body, the offset is from the center of the body, on items without one from the top-left corner of the sprite. In pixels.")]
|
||||
[Serialize("0.0,0.0", IsPropertySaveable.No, description: "The position where the contained items get drawn at (offset from the upper left corner of the sprite in pixels).")]
|
||||
public Vector2 ItemPos { get; set; }
|
||||
|
||||
[Serialize("0.0,0.0", IsPropertySaveable.No, description: "The interval at which the contained items are spaced apart from each other (in pixels).")]
|
||||
@@ -1093,25 +1093,21 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
if (item.body == null)
|
||||
{
|
||||
//if the item is a holdable item currently attached to a wall (i.e. normally has a physics body, but the body is now disabled),
|
||||
//we must position the contained items using the center as the origin since the item positions have been configured with the assumption the item has a body
|
||||
bool isAttachedHoldable = item.GetComponent<Holdable>() is { Attached: true };
|
||||
bool useCenterAsOrigin = isAttachedHoldable;
|
||||
if (flippedX)
|
||||
{
|
||||
transformedItemPos.X = -transformedItemPos.X;
|
||||
if (!useCenterAsOrigin) { transformedItemPos.X += item.Rect.Width; }
|
||||
transformedItemPos.X += item.Rect.Width;
|
||||
transformedItemInterval.X = -transformedItemInterval.X;
|
||||
transformedItemIntervalHorizontal.X = -transformedItemIntervalHorizontal.X;
|
||||
}
|
||||
if (flippedY)
|
||||
{
|
||||
transformedItemPos.Y = -transformedItemPos.Y;
|
||||
if (!useCenterAsOrigin) { transformedItemPos.Y -= item.Rect.Height; }
|
||||
transformedItemPos.Y -= item.Rect.Height;
|
||||
transformedItemInterval.Y = -transformedItemInterval.Y;
|
||||
transformedItemIntervalVertical.Y = -transformedItemIntervalVertical.Y;
|
||||
}
|
||||
transformedItemPos += useCenterAsOrigin ? item.Position : new Vector2(item.Rect.X, item.Rect.Y);
|
||||
transformedItemPos += new Vector2(item.Rect.X, item.Rect.Y);
|
||||
if (drawPosition)
|
||||
{
|
||||
if (item.Submarine != null) { transformedItemPos += item.Submarine.DrawPosition; }
|
||||
@@ -1129,6 +1125,16 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
else
|
||||
{
|
||||
if (item.GetComponent<Holdable>() is { Attachable: true })
|
||||
{
|
||||
//if the item is attachable to walls, we need a bit of special logic because the item can either
|
||||
//have or not have a body depending on whether it's attached.
|
||||
|
||||
//since it seems previously the contained item positions have always been configured as if the item had no body (using the top-left corner as the origin),
|
||||
//let's modify the position here to position the items correctly even when the body is active (moving the origin from the center of the body to the top-left corner)
|
||||
transformedItemPos -= item.Rect.Size.FlipY().ToVector2() / 2;
|
||||
}
|
||||
|
||||
Matrix transform = Matrix.CreateRotationZ(drawPosition ? item.body.DrawRotation : item.body.Rotation);
|
||||
if (bodyFlipped)
|
||||
{
|
||||
|
||||
@@ -862,10 +862,6 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
else if (CanBeSelectedByCharacters)
|
||||
{
|
||||
#if SERVER
|
||||
GameServer.Log($"{GameServer.CharacterLogName(activator)} entered {item.Name}", ServerLog.MessageType.ItemInteraction);
|
||||
#endif
|
||||
|
||||
activator.DeselectCharacter();
|
||||
|
||||
User = activator;
|
||||
|
||||
@@ -816,7 +816,7 @@ namespace Barotrauma
|
||||
|
||||
public static float GetDistanceFactor(PhysicsBody triggererBody, PhysicsBody triggerBody, float colliderRadius)
|
||||
{
|
||||
return 1.0f - ConvertUnits.ToDisplayUnits(Vector2.Distance(triggererBody.SimPosition, triggerBody.SimPosition)) / colliderRadius;
|
||||
return 1.0f - ConvertUnits.ToDisplayUnits(Vector2.Distance(triggererBody.SimPosition, triggerBody.SimPosition) - triggererBody.GetMaxExtent() / 2) / colliderRadius;
|
||||
}
|
||||
|
||||
public Vector2 GetWaterFlowVelocity(Vector2 viewPosition)
|
||||
|
||||
@@ -1,4 +1,17 @@
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
v1.12.7.0
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
- Reduced how much the new weak points in the reworked subs push bots around to make them more capable of fixing broken weak points.
|
||||
- Fixed selecting any item that forces the character to some pose (chairs, periscopes) getting logged in the server console.
|
||||
- Mac only: added a button for settings mic permissions to the audio settings. It seems that on Mac, the game updates may cause the OS to revoke the permissions.
|
||||
- Fixed some of the Workshop tags you can choose in-game not working on Steam's side.
|
||||
|
||||
Modding:
|
||||
- Fixed contained items being misaligned on attachable items (e.g. in mods that make diving suit cabinets attachable).
|
||||
- Fixed monsters spawned by an event inside an outpost being unable to attack any items inside that outpost. To our knowledge, didn't affect vanilla events, but caused issues in certain mods.
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
v1.12.6.2
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -439,7 +452,6 @@ v1.8.8.1
|
||||
|
||||
Modding:
|
||||
- Fixed transferring afflictions to a newly spawned character using status effects causing a crash if the original character had already been removed. Didn't affect any vanilla content.
|
||||
>>>>>>> master
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
v1.8.7.0
|
||||
|
||||
Reference in New Issue
Block a user