This should be ItemPrefab, not Item, also add it the source code compat

This commit is contained in:
Evil Factory
2026-03-28 14:03:28 -03:00
parent b8f1642d9d
commit b358882016
3 changed files with 8 additions and 7 deletions
@@ -26,13 +26,13 @@ namespace Barotrauma
public static class ModUtils
{
public static class Item
public static class ItemPrefab
{
internal static ItemPrefab GetItemPrefab(string itemNameOrId)
internal static Barotrauma.ItemPrefab GetItemPrefab(string itemNameOrId)
{
ItemPrefab itemPrefab =
(MapEntityPrefab.Find(itemNameOrId, identifier: null, showErrorMessages: false) ??
MapEntityPrefab.Find(null, identifier: itemNameOrId, showErrorMessages: false)) as ItemPrefab;
Barotrauma.ItemPrefab itemPrefab =
(Barotrauma.MapEntityPrefab.Find(itemNameOrId, identifier: null, showErrorMessages: false) ??
Barotrauma.MapEntityPrefab.Find(null, identifier: itemNameOrId, showErrorMessages: false)) as Barotrauma.ItemPrefab;
return itemPrefab;
}