-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't convert artifact display name to enum value
Up until now, DFU was converting an artifact's display name into an enum type to determine offset for Info popups. This is not compatible with localized artifact names. Added artifactIndexBitfield to items. This is equal to artifactIndex << 1 | 1 when set. A 0 in lowest bit means this value is not valid / not set. DFU will attempt to generate this bitfield when loading an older DFU save or importing classic save when this value is missing for artifact items. This requires item name in older/classic save to be unchanged, but this was already an issue in DFU prior to now. This is the problem we're trying to move past. Any artifacts generated during play will now set their artifactIndexBitfield at creation time. This field is also serialized/deserialized with saves as normal. This approach should handle majority of past saves in addition to resolving core problem in new saves. If loading an older/classic save with an edited artifact name then Info text simply won't display properly as is already the case.
- Loading branch information
1 parent
0047824
commit 95209c0
Showing
5 changed files
with
70 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters