fix: Fixes bug with naming item back to default (#2331)
This commit is contained in:
parent
f7f1265216
commit
10f26c387e
1 changed files with 11 additions and 11 deletions
|
|
@ -599,19 +599,19 @@ public partial class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropert
|
||||||
get => LookupCompactInfo()?.m_Name ?? DefaultName;
|
get => LookupCompactInfo()?.m_Name ?? DefaultName;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value == null || value != DefaultName)
|
var info = LookupCompactInfo();
|
||||||
|
|
||||||
|
if (value == null || value == DefaultName)
|
||||||
{
|
{
|
||||||
var info = AcquireCompactInfo();
|
info?.m_Name = null;
|
||||||
|
VerifyCompactInfo();
|
||||||
info.m_Name = value;
|
|
||||||
|
|
||||||
if (info.m_Name == null)
|
|
||||||
{
|
|
||||||
VerifyCompactInfo();
|
|
||||||
}
|
|
||||||
|
|
||||||
InvalidateProperties();
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
(info ?? AcquireCompactInfo()).m_Name = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
InvalidateProperties();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue