Merge branch 'dev' of https://github.com/Regalis11/Barotrauma into unstable

This commit is contained in:
EvilFactory
2022-09-29 12:13:55 -03:00
602 changed files with 19759 additions and 16312 deletions
@@ -340,7 +340,7 @@ namespace Barotrauma
/// </summary>
public virtual bool AddUpgrade(Upgrade upgrade, bool createNetworkEvent = false)
{
if (this is Item item && !upgrade.Prefab.UpgradeCategories.Any(category => category.CanBeApplied(item, upgrade.Prefab)))
if (!upgrade.Prefab.UpgradeCategories.Any(category => category.CanBeApplied(this, upgrade.Prefab)))
{
return false;
}
@@ -361,16 +361,6 @@ namespace Barotrauma
Upgrades.Add(upgrade);
}
// not used anymore
#if SERVER
// if (createNetworkEvent)
// {
// if (this is IServerSerializable serializable)
// {
// GameMain.Server.CreateEntityEvent(serializable, new object[] { NetEntityEvent.Type.Upgrade, upgrade });
// }
// }
#endif
return true;
}