Blood in the Water Hotfix 2 - 1.4.6.0

This commit is contained in:
Markus Isberg
2024-05-02 14:08:04 +03:00
parent ff1b8951a7
commit 0a0a9784c5
26 changed files with 304 additions and 191 deletions

View File

@@ -868,12 +868,8 @@ namespace Barotrauma
string prefabTags = GetPrefabTags(it);
if (string.IsNullOrEmpty(text) || string.IsNullOrEmpty(prefabTags)) { return text; }
text = text.Remove(prefabTags);
if (text.StartsWith(","))
{
text = text.Remove(0, 1);
}
return text;
string[] splitTags = text.Split(',');
return string.Join(',', splitTags.Where(t => !it.Prefab.Tags.Contains(t)));
}
static string GetPrefabTags(Item it) => string.Join(',', it.Prefab.Tags);