Skip to content

[4.1] CreateItemFromClone issues #723

@acidphantasm

Description

@acidphantasm

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions