diff --git a/Subsurface/Content/Items/Fabricators/fabricators.xml b/Subsurface/Content/Items/Fabricators/fabricators.xml index 08d3cf413..35644e088 100644 --- a/Subsurface/Content/Items/Fabricators/fabricators.xml +++ b/Subsurface/Content/Items/Fabricators/fabricators.xml @@ -131,7 +131,10 @@ - + + + + diff --git a/Subsurface/Content/Items/Medical/med.png b/Subsurface/Content/Items/Medical/med.png index e7d7adeb6..e873a14dd 100644 Binary files a/Subsurface/Content/Items/Medical/med.png and b/Subsurface/Content/Items/Medical/med.png differ diff --git a/Subsurface/Content/Items/Medical/medical.xml b/Subsurface/Content/Items/Medical/medical.xml index 44b7570a9..439778e0f 100644 --- a/Subsurface/Content/Items/Medical/medical.xml +++ b/Subsurface/Content/Items/Medical/medical.xml @@ -55,7 +55,7 @@ - + @@ -68,9 +68,9 @@ pickdistance="150" description="A mild stimulant which is used as an incredient in the manufacture of various medicines."> - + - + @@ -95,7 +95,7 @@ - + @@ -115,7 +115,7 @@ - + @@ -140,7 +140,7 @@ - + @@ -164,7 +164,7 @@ - + @@ -180,9 +180,9 @@ Tags="smallitem,chem,medical" pickdistance="150"> - + - + @@ -204,9 +204,9 @@ - + - + @@ -224,7 +224,7 @@ - + @@ -242,7 +242,7 @@ - + @@ -260,7 +260,7 @@ - + @@ -278,9 +278,9 @@ Tags="smallitem,chem,medical" pickdistance="150"> - + - + @@ -298,7 +298,7 @@ - + @@ -314,9 +314,9 @@ Tags="smallitem,chem,medical" pickdistance="150"> - + - + @@ -334,7 +334,7 @@ - + @@ -353,7 +353,7 @@ - + @@ -372,7 +372,7 @@ - + @@ -380,6 +380,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Subsurface/Source/Items/Item.cs b/Subsurface/Source/Items/Item.cs index 149b12a48..38f6c6eab 100644 --- a/Subsurface/Source/Items/Item.cs +++ b/Subsurface/Source/Items/Item.cs @@ -1,18 +1,18 @@ -using System.Collections.Generic; -using System.Linq; -using System.Xml.Linq; +using Barotrauma.Items.Components; +using Barotrauma.Networking; using FarseerPhysics; +using FarseerPhysics.Dynamics; +using FarseerPhysics.Dynamics.Contacts; using Lidgren.Network; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; -using Barotrauma.Networking; using System; -using Barotrauma.Items.Components; -using System.ComponentModel; +using System.Collections.Generic; using System.Collections.ObjectModel; -using FarseerPhysics.Dynamics; -using FarseerPhysics.Dynamics.Contacts; +using System.ComponentModel; +using System.Linq; +using System.Xml.Linq; namespace Barotrauma { @@ -648,7 +648,7 @@ namespace Barotrauma public AttackResult AddDamage(IDamageable attacker, Vector2 worldPosition, Attack attack, float deltaTime, bool playSound = true) { - float damageAmount = attack.GetDamage(deltaTime); + float damageAmount = attack.GetStructureDamage(deltaTime); Condition -= damageAmount; return new AttackResult(damageAmount, 0.0f, false); diff --git a/Subsurface/Source/Networking/GameServer.cs b/Subsurface/Source/Networking/GameServer.cs index 4b0669d40..e0b9f2234 100644 --- a/Subsurface/Source/Networking/GameServer.cs +++ b/Subsurface/Source/Networking/GameServer.cs @@ -1474,13 +1474,13 @@ namespace Barotrauma.Networking similarity += sender.ChatSpamSpeed * 0.05f; //the faster messages are being sent, the faster the filter will block for (int i = 0; i < sender.ChatMessages.Count; i++) { - float closeFactor = 1.0f / (20.0f - i); + float closeFactor = 1.0f / (sender.ChatMessages.Count - i); int levenshteinDist = ToolBox.LevenshteinDistance(message.Text, sender.ChatMessages[i]); similarity += Math.Max((message.Text.Length - levenshteinDist) / message.Text.Length * closeFactor, 0.0f); } - if (similarity > 6.0f) + if (similarity > 5.0f) { sender.ChatSpamCount++;