Added AddUpd extension method

This commit is contained in:
Chomp
2025-08-05 14:09:54 +01:00
parent 98eae09034
commit 460d359a0d
@@ -449,4 +449,22 @@ public static class ItemExtensions
}
}
}
/// <summary>
/// Add a blank Upd object to an item
/// </summary>
/// <param name="item"></param>
/// <returns>True = Upd added</returns>
public static bool AddUpd(this Item item)
{
if (item.Upd is not null)
{
// Already exists, exit early
return false;
}
item.Upd = new Upd();
return true;
}
}