v1.3.0.1 (Epic Store release)
This commit is contained in:
+1
-1
@@ -1561,7 +1561,7 @@ namespace Barotrauma
|
||||
if (wasCritical && target.Vitality > 0.0f && Timing.TotalTime > lastReviveTime + 10.0f)
|
||||
{
|
||||
character.Info?.ApplySkillGain(Tags.MedicalSkill, SkillSettings.Current.SkillIncreasePerCprRevive);
|
||||
SteamAchievementManager.OnCharacterRevived(target, character);
|
||||
AchievementManager.OnCharacterRevived(target, character);
|
||||
lastReviveTime = (float)Timing.TotalTime;
|
||||
#if SERVER
|
||||
GameMain.Server?.KarmaManager?.OnCharacterHealthChanged(target, character, damage: Math.Min(prevVitality - target.Vitality, 0.0f), stun: 0.0f);
|
||||
|
||||
@@ -1270,14 +1270,11 @@ namespace Barotrauma
|
||||
return newCharacter;
|
||||
}
|
||||
|
||||
private Character(Submarine submarine, ushort id): base(submarine, id)
|
||||
protected Character(CharacterPrefab prefab, Vector2 position, string seed, CharacterInfo characterInfo = null, ushort id = Entity.NullEntityID, bool isRemotePlayer = false, RagdollParams ragdollParams = null, bool spawnInitialItems = true)
|
||||
: base(null, id)
|
||||
{
|
||||
wallet = new Wallet(Option<Character>.Some(this));
|
||||
}
|
||||
|
||||
protected Character(CharacterPrefab prefab, Vector2 position, string seed, CharacterInfo characterInfo = null, ushort id = Entity.NullEntityID, bool isRemotePlayer = false, RagdollParams ragdollParams = null, bool spawnInitialItems = true)
|
||||
: this(null, id)
|
||||
{
|
||||
this.Seed = seed;
|
||||
this.Prefab = prefab;
|
||||
MTRandom random = new MTRandom(ToolBox.StringToInt(seed));
|
||||
@@ -2478,7 +2475,7 @@ namespace Barotrauma
|
||||
return false;
|
||||
}
|
||||
|
||||
public Item GetEquippedItem(Identifier? tagOrIdentifier = null, InvSlotType? slotType = null)
|
||||
public Item GetEquippedItem(Identifier tagOrIdentifier = default, InvSlotType? slotType = null)
|
||||
{
|
||||
if (Inventory == null) { return null; }
|
||||
for (int i = 0; i < Inventory.Capacity; i++)
|
||||
@@ -2493,7 +2490,7 @@ namespace Barotrauma
|
||||
}
|
||||
var item = Inventory.GetItemAt(i);
|
||||
if (item == null) { continue; }
|
||||
if (tagOrIdentifier == null || tagOrIdentifier.Value.IsEmpty || item.Prefab.Identifier == tagOrIdentifier || item.HasTag(tagOrIdentifier.Value))
|
||||
if (tagOrIdentifier.IsEmpty || item.Prefab.Identifier == tagOrIdentifier || item.HasTag(tagOrIdentifier))
|
||||
{
|
||||
return item;
|
||||
}
|
||||
@@ -4658,7 +4655,7 @@ namespace Barotrauma
|
||||
|
||||
if (GameMain.GameSession != null && Screen.Selected == GameMain.GameScreen)
|
||||
{
|
||||
SteamAchievementManager.OnCharacterKilled(this, CauseOfDeath);
|
||||
AchievementManager.OnCharacterKilled(this, CauseOfDeath);
|
||||
}
|
||||
|
||||
KillProjSpecific(causeOfDeath, causeOfDeathAffliction, log);
|
||||
|
||||
@@ -1459,7 +1459,7 @@ namespace Barotrauma
|
||||
|
||||
charElement.Add(new XAttribute("missionscompletedsincedeath", MissionsCompletedSinceDeath));
|
||||
|
||||
if (MinReputationToHire.factionId != default)
|
||||
if (!MinReputationToHire.factionId.IsEmpty)
|
||||
{
|
||||
charElement.Add(
|
||||
new XAttribute("factionId", MinReputationToHire.factionId),
|
||||
|
||||
@@ -570,7 +570,7 @@ namespace Barotrauma
|
||||
matchingAfflictions.RemoveAt(i);
|
||||
if (i == 0) { i = matchingAfflictions.Count; }
|
||||
if (i > 0) { reduceAmount += surplus / i; }
|
||||
SteamAchievementManager.OnAfflictionRemoved(matchingAffliction, Character);
|
||||
AchievementManager.OnAfflictionRemoved(matchingAffliction, Character);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -777,7 +777,7 @@ namespace Barotrauma
|
||||
Math.Min(newAffliction.Prefab.MaxStrength, newAffliction.Strength * (100.0f / MaxVitality) * (1f - GetResistance(newAffliction.Prefab))),
|
||||
newAffliction.Source);
|
||||
afflictions.Add(copyAffliction, limbHealth);
|
||||
SteamAchievementManager.OnAfflictionReceived(copyAffliction, Character);
|
||||
AchievementManager.OnAfflictionReceived(copyAffliction, Character);
|
||||
MedicalClinic.OnAfflictionCountChanged(Character);
|
||||
|
||||
Character.HealthUpdateInterval = 0.0f;
|
||||
@@ -818,7 +818,7 @@ namespace Barotrauma
|
||||
var affliction = kvp.Key;
|
||||
if (affliction.Strength <= 0.0f)
|
||||
{
|
||||
SteamAchievementManager.OnAfflictionRemoved(affliction, Character);
|
||||
AchievementManager.OnAfflictionRemoved(affliction, Character);
|
||||
if (!irremovableAfflictions.Contains(affliction)) { afflictionsToRemove.Add(affliction); }
|
||||
continue;
|
||||
}
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ namespace Barotrauma.Abilities
|
||||
{
|
||||
if (tags.None())
|
||||
{
|
||||
return character.GetEquippedItem(null) != null;
|
||||
return character.GetEquippedItem(Identifier.Empty) != null;
|
||||
}
|
||||
|
||||
if (requireAll)
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@ internal sealed class AbilityConditionHoldingItem : AbilityConditionDataless
|
||||
{
|
||||
if (tags.Count is 0)
|
||||
{
|
||||
return HasItemInHand(character, null);
|
||||
return HasItemInHand(character, Identifier.Empty);
|
||||
}
|
||||
|
||||
foreach (Identifier tag in tags)
|
||||
@@ -26,7 +26,7 @@ internal sealed class AbilityConditionHoldingItem : AbilityConditionDataless
|
||||
|
||||
return false;
|
||||
|
||||
static bool HasItemInHand(Character character, Identifier? tagOrIdentifier) =>
|
||||
static bool HasItemInHand(Character character, Identifier tagOrIdentifier) =>
|
||||
character.GetEquippedItem(tagOrIdentifier, InvSlotType.RightHand) is not null ||
|
||||
character.GetEquippedItem(tagOrIdentifier, InvSlotType.LeftHand) is not null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user