CreateItemFromClone method should be updated to update the _name of the Item as well as ID & Parent. This would additionally come with the changes to the record for NewItemFromCloneDetails.
NewItemFromCloneDetails should not allow ItemTplToClone, ParentId, or NewId to be nullable as they are required to process in the first place.
In 4.0 and prior, every cloned item would retain the _name of the item it's cloning.. This causes many little issues, but is most apparent in logging as items would seem to be a vanilla item throwing issues but is in fact the modded item that is cloned from the original item.
This change can't be made in 4.0 as it would be a breaking change for many mods, so should be made in 4.1
[Record]
|
public record NewItemFromCloneDetails : NewItemDetailsBase |
- Update ItemTplToClone to non-nullable
- Update ParentId to non-nullable
- Update NewId to non-nullable
- Add string NewName (non-nullable)
[Method]
|
public CreateItemResult CreateItemFromClone(NewItemFromCloneDetails newItemDetails) |
- Update method for record changes, and add functionality for NewName
CreateItemFromClone method should be updated to update the _name of the Item as well as ID & Parent. This would additionally come with the changes to the record for NewItemFromCloneDetails.
NewItemFromCloneDetails should not allow ItemTplToClone, ParentId, or NewId to be nullable as they are required to process in the first place.
In 4.0 and prior, every cloned item would retain the _name of the item it's cloning.. This causes many little issues, but is most apparent in logging as items would seem to be a vanilla item throwing issues but is in fact the modded item that is cloned from the original item.
This change can't be made in 4.0 as it would be a breaking change for many mods, so should be made in 4.1
[Record]
server-csharp/Libraries/SPTarkov.Server.Core/Models/Spt/Mod/NewItemDetails.cs
Line 13 in 895d532
[Method]
server-csharp/Libraries/SPTarkov.Server.Core/Services/Mod/CustomItemService.cs
Line 33 in 30eee02