Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop

This commit is contained in:
EvilFactory
2023-05-10 11:55:46 -03:00
273 changed files with 5739 additions and 2421 deletions
@@ -39,16 +39,10 @@ namespace Barotrauma
public DelayedEffect(ContentXElement element, string parentDebugName)
: base(element, parentDebugName)
{
string delayTypeStr = element.GetAttributeString("delaytype", "timer");
if (!Enum.TryParse(typeof(DelayTypes), delayTypeStr, ignoreCase: true, out var delayType))
DelayTypes delayTypeAttr = element.GetAttributeEnum("delaytype", DelayTypes.Timer);
if (delayTypeAttr is DelayTypes.Timer)
{
DebugConsole.ThrowError("Invalid delay type \"" + delayTypeStr + "\" in StatusEffect (" + parentDebugName + ")");
}
switch (delayType)
{
case DelayTypes.Timer:
delay = element.GetAttributeFloat("delay", 1.0f);
break;
delay = element.GetAttributeFloat("delay", 1.0f);
}
}
@@ -904,7 +904,8 @@ namespace Barotrauma
if (HasTargetType(TargetType.NearbyItems))
{
//optimization for powered components that can be easily fetched from Powered.PoweredList
if (TargetIdentifiers.Count == 1 &&
if (TargetIdentifiers != null &&
TargetIdentifiers.Count == 1 &&
(TargetIdentifiers.Contains("powered") || TargetIdentifiers.Contains("junctionbox") || TargetIdentifiers.Contains("relaycomponent")))
{
foreach (Powered powered in Powered.PoweredList)
@@ -2222,7 +2223,7 @@ namespace Barotrauma
{
if (affliction.Prefab.IsBuff)
{
afflictionMultiplier *= 1 + user.GetStatValue(StatTypes.MedicalItemDurationMultiplier);
afflictionMultiplier *= 1 + user.GetStatValue(StatTypes.BuffItemApplyingMultiplier);
}
else if (affliction.Prefab.Identifier == "organdamage" && targetCharacter.CharacterHealth.GetActiveAfflictionTags().Any(t => t == "poisoned"))
{