- some more medicine value tweaking
- medicine & toxic cabinet items (added to vanilla subs) - updating the positions of items inside a moving container (caused explosions to happen in the wrong position if the explosive inside something like a grenade) - renamed doctors as medical doctors
This commit is contained in:
@@ -67,6 +67,8 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
public ItemComponent Parent;
|
||||
|
||||
private string msg;
|
||||
|
||||
[HasDefaultValue(0.0f, false)]
|
||||
public float PickingTime
|
||||
{
|
||||
@@ -164,9 +166,7 @@ namespace Barotrauma.Items.Components
|
||||
get { return msg; }
|
||||
set { msg = value; }
|
||||
}
|
||||
|
||||
private string msg;
|
||||
|
||||
|
||||
public ItemComponent(Item item, XElement element)
|
||||
{
|
||||
this.item = item;
|
||||
|
||||
@@ -132,12 +132,20 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
public override void Update(float deltaTime, Camera cam)
|
||||
{
|
||||
if (item.body != null && item.body.FarseerBody.Awake)
|
||||
{
|
||||
foreach (Item contained in Inventory.Items)
|
||||
{
|
||||
if (contained == null) continue;
|
||||
contained.SetTransform(item.SimPosition, 0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasStatusEffects) return;
|
||||
|
||||
foreach (Item contained in Inventory.Items)
|
||||
{
|
||||
if (contained == null || contained.Condition <= 0.0f) continue;
|
||||
//if (contained.body != null) contained.body.Enabled = false;
|
||||
|
||||
RelatedItem ri = containableItems.Find(x => x.MatchesItem(contained));
|
||||
if (ri == null) continue;
|
||||
@@ -161,7 +169,7 @@ namespace Barotrauma.Items.Components
|
||||
Vector2 transformedItemPos = itemPos;
|
||||
Vector2 transformedItemInterval = itemInterval;
|
||||
float currentRotation = itemRotation;
|
||||
//float transformedItemRotation = itemRotation;
|
||||
|
||||
if (item.body == null)
|
||||
{
|
||||
transformedItemPos = new Vector2(item.Rect.X, item.Rect.Y);
|
||||
|
||||
@@ -368,10 +368,16 @@ namespace Barotrauma
|
||||
if (prefab.sprite == null) return;
|
||||
|
||||
Color color = (isHighlighted) ? Color.Orange : Color.White;
|
||||
if (isSelected && editing) color = Color.Red;
|
||||
if (isSelected && editing)
|
||||
{
|
||||
color = Color.Red;
|
||||
|
||||
GUI.DrawRectangle(spriteBatch, new Rectangle(rect.X, -rect.Y, rect.Width, rect.Height), color);
|
||||
}
|
||||
|
||||
Vector2 drawOffset = Submarine == null ? Vector2.Zero : Submarine.DrawPosition;
|
||||
prefab.sprite.DrawTiled(spriteBatch, new Vector2(rect.X + drawOffset.X, -(rect.Y + drawOffset.Y)), new Vector2(rect.Width, rect.Height), Vector2.Zero, color);
|
||||
prefab.sprite.DrawTiled(spriteBatch, new Vector2(rect.X + drawOffset.X, -(rect.Y + drawOffset.Y)), new Vector2(rect.Width, rect.Height), Vector2.Zero, color);
|
||||
|
||||
|
||||
foreach (WallSection s in sections)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user