OBT/1.2.1(Summer update)
Sync with upstream
This commit is contained in:
@@ -997,6 +997,9 @@ namespace Barotrauma
|
||||
public bool IsForceRagdolled;
|
||||
public bool FollowCursor = true;
|
||||
|
||||
/// <summary>
|
||||
/// Is the character currently dead, unconscious or paralyzed?
|
||||
/// </summary>
|
||||
public bool IsIncapacitated
|
||||
{
|
||||
get
|
||||
@@ -1006,6 +1009,9 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is the character dead or below 0 vitality and not able to stay conscious?
|
||||
/// </summary>
|
||||
public bool IsUnconscious
|
||||
{
|
||||
get { return CharacterHealth.IsUnconscious; }
|
||||
@@ -1673,7 +1679,8 @@ namespace Barotrauma
|
||||
AnimController.FindHull(setInWater: true);
|
||||
if (AnimController.CurrentHull != null) { Submarine = AnimController.CurrentHull.Submarine; }
|
||||
|
||||
IsContainable = prefab.ConfigElement.GetAttributeBool(nameof(IsContainable), def: Mass <= 30.0f);
|
||||
//mass < 35 = husk chimera is the largest vanilla monster that can be contained by default
|
||||
IsContainable = prefab.ConfigElement.GetAttributeBool(nameof(IsContainable), def: Mass < 35.0f);
|
||||
|
||||
CharacterList.Add(this);
|
||||
|
||||
@@ -2262,7 +2269,10 @@ namespace Barotrauma
|
||||
{
|
||||
Vector2 targetMovement = GetTargetMovement();
|
||||
AnimController.TargetMovement = targetMovement;
|
||||
AnimController.IgnorePlatforms = AnimController.TargetMovement.Y < -0.1f;
|
||||
if (SelectedItem?.GetComponent<Controller>() is not { ControlCharacterPose: true })
|
||||
{
|
||||
AnimController.IgnorePlatforms = AnimController.TargetMovement.Y < -0.1f;
|
||||
}
|
||||
}
|
||||
|
||||
if (AnimController is HumanoidAnimController humanAnimController)
|
||||
@@ -3508,9 +3518,11 @@ namespace Barotrauma
|
||||
|
||||
UpdateAttackers(deltaTime);
|
||||
|
||||
foreach (var characterTalent in characterTalents)
|
||||
//use a for loop instead of foreach because talents can unlock other talents via StatusEffectAction (see #17328)
|
||||
//this way we'll just add them to the end of the list without causing a collection was modified exception
|
||||
for (int i = 0; i < characterTalents.Count; i++)
|
||||
{
|
||||
characterTalent.UpdateTalent(deltaTime);
|
||||
characterTalents[i].UpdateTalent(deltaTime);
|
||||
}
|
||||
|
||||
if (IsDead) { return; }
|
||||
@@ -5801,6 +5813,12 @@ namespace Barotrauma
|
||||
return info.UnlockedTalents.Contains(identifier);
|
||||
}
|
||||
|
||||
public bool IsTalentLocked(Identifier talentIdentifier)
|
||||
{
|
||||
if (info == null) { return true; }
|
||||
return Info.GetSavedStatValue(StatTypes.LockedTalents, talentIdentifier) >= 1;
|
||||
}
|
||||
|
||||
public bool HasUnlockedAllTalents()
|
||||
{
|
||||
if (TalentTree.JobTalentTrees.TryGet(Info.Job.Prefab.Identifier, out TalentTree talentTree))
|
||||
|
||||
Reference in New Issue
Block a user