Faction Test 100.6.0.0
This commit is contained in:
@@ -141,6 +141,8 @@ namespace Barotrauma
|
||||
private readonly bool[] hasStatusEffectsOfType = new bool[Enum.GetValues(typeof(ActionType)).Length];
|
||||
private readonly Dictionary<ActionType, List<StatusEffect>> statusEffectLists;
|
||||
|
||||
public Action OnInteract;
|
||||
|
||||
public Dictionary<Identifier, SerializableProperty> SerializableProperties { get; protected set; }
|
||||
|
||||
private bool? hasInGameEditableProperties;
|
||||
@@ -867,6 +869,8 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
public Action<Character> OnDeselect;
|
||||
|
||||
public Item(ItemPrefab itemPrefab, Vector2 position, Submarine submarine, ushort id = Entity.NullEntityID, bool callOnItemLoaded = true)
|
||||
: this(new Rectangle(
|
||||
(int)(position.X - itemPrefab.Sprite.size.X / 2 * itemPrefab.Scale),
|
||||
@@ -2166,12 +2170,15 @@ namespace Barotrauma
|
||||
if (projectile.ShouldIgnoreSubmarineCollision(f2, contact)) { return false; }
|
||||
}
|
||||
|
||||
contact.GetWorldManifold(out Vector2 normal, out _);
|
||||
if (contact.FixtureA.Body == f1.Body) { normal = -normal; }
|
||||
float impact = Vector2.Dot(f1.Body.LinearVelocity, -normal);
|
||||
if (GameMain.GameSession == null || GameMain.GameSession.RoundDuration > 1.0f)
|
||||
{
|
||||
contact.GetWorldManifold(out Vector2 normal, out _);
|
||||
if (contact.FixtureA.Body == f1.Body) { normal = -normal; }
|
||||
float impact = Vector2.Dot(f1.Body.LinearVelocity, -normal);
|
||||
impactQueue ??= new ConcurrentQueue<float>();
|
||||
impactQueue.Enqueue(impact);
|
||||
}
|
||||
|
||||
impactQueue ??= new ConcurrentQueue<float>();
|
||||
impactQueue.Enqueue(impact);
|
||||
isActive = true;
|
||||
|
||||
return true;
|
||||
@@ -2611,12 +2618,14 @@ namespace Barotrauma
|
||||
if (user == Character.Controlled) { GUI.ForceMouseOn(null); }
|
||||
if (tempRequiredSkill != null) { requiredSkill = tempRequiredSkill; }
|
||||
#endif
|
||||
if (ic.CanBeSelected && !(ic is Door)) { selected = true; }
|
||||
if (ic.CanBeSelected && ic is not Door) { selected = true; }
|
||||
}
|
||||
}
|
||||
|
||||
if (!picked) { return false; }
|
||||
|
||||
OnInteract?.Invoke();
|
||||
|
||||
if (user != null)
|
||||
{
|
||||
if (user.SelectedItem == this)
|
||||
@@ -2785,6 +2794,7 @@ namespace Barotrauma
|
||||
if (GameMain.NetworkMember is { IsServer: true })
|
||||
{
|
||||
GameMain.NetworkMember.CreateEntityEvent(this, new ApplyStatusEffectEventData(conditionalActionType, ic, character, targetLimb));
|
||||
GameMain.NetworkMember.CreateEntityEvent(this, new ApplyStatusEffectEventData(ActionType.OnUse, ic, character, targetLimb));
|
||||
}
|
||||
|
||||
if (ic.DeleteOnUse) { remove = true; }
|
||||
|
||||
Reference in New Issue
Block a user