ModernUO/Projects/UOContent/Items
Kamron Batman e1e30998ba
fix: Adds ReadType/Write(Type) and improves type referencing (#1172)
## Changes
* Improves type hashing by introducing xxHash3 (64bit)
* Removes individual `tdb` files in favor of a single `SerializedTypes.db` file. This file is only used to identify a type that is being deserialized, which doesn't exist.
* Adds duplicate type alias detection
* Adds `AssemblyHandler.FindTypeByHash`

View changed files whitespaces: https://github.com/modernuo/ModernUO/pull/1172/files?diff=split&w=1

## SerializedTypes.db
The serialized types file is used to get back the original name of a type in case it no longer exists in code. This can easily be necessary if a class is renamed in code and no `TypeAlias` is provided.

### Format
byte[4] - version
byte[4] - count
--array--
byte[8] - xxHash
byte[1] - flag, 0 - null, 1 - not null
byte[n] - Full class name in UTF8

### Example
<img width="472" alt="SerializedTypes_Example" src="https://user-images.githubusercontent.com/3953314/195255429-31d24293-6bd1-419e-811b-07874dd0f78d.png">

## Benchmarks
Serialized 500 Type fields. The 8192bytes comes from the _ConcurrentQueue_ that would later be used for SerializedTypes.
Note that the queue is never cleared, so it's size grew considerably.
```cs
|               Method |     Mean |    Error |   StdDev | Allocated |
|--------------------- |---------:|---------:|---------:|----------:|
|      BenchmarkXXHash | 18.44 us | 0.278 us | 0.260 us |    8192 B |
| BenchmarkTypeStrings | 25.09 us | 0.292 us | 0.259 us |         - |
```

TODO:
* Add support in the Serialization Generator for `ReadType()` and `Write(Type)`
* Remove `SetTypeRef` from Serialization Generator
2022-10-11 22:17:22 -07:00
..
Addons feat: Updates to Serialization Generator v2.2 (#1157) 2022-09-04 08:45:27 -07:00
Aquarium feat: Updates to Serialization Generator v2.2 (#1157) 2022-09-04 08:45:27 -07:00
Armor fix: Adds ReadType/Write(Type) and improves type referencing (#1172) 2022-10-11 22:17:22 -07:00
Body Parts fix: Fixes missing invalidate properties for default name (#1012) 2022-05-04 14:40:49 -07:00
Books fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
Bulletin Boards fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
Champion Artifacts fix: Updates serialization to use v2.0 (#998) 2022-04-17 08:02:15 -07:00
Clothing feat: Updates to Serialization Generator v2.2 (#1157) 2022-09-04 08:45:27 -07:00
Construction fix: Optimizes OPL using string interpolation (#1041) 2022-06-02 10:09:53 -07:00
Containers feat: Updates to Serialization Generator v2.2 (#1157) 2022-09-04 08:45:27 -07:00
Decoration Artifacts fix: Fixes localization corner cases with OPL (#1050) 2022-06-12 21:17:42 -07:00
Deeds feat: Updates to Serialization Generator v2.2 (#1157) 2022-09-04 08:45:27 -07:00
Facial Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
Farming fix: Codegens farmables (#1001) 2022-04-17 17:10:45 -07:00
Food feat: Updates to Serialization Generator v2.2 (#1157) 2022-09-04 08:45:27 -07:00
Games fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
Gems fix: Codegens gems (#1059) 2022-06-13 17:38:46 -07:00
Guilds fix: Fixes mobile titles not displaying properly (#1149) 2022-08-27 13:31:22 -07:00
Jewels feat: Updates to Serialization Generator v2.2 (#1157) 2022-09-04 08:45:27 -07:00
Lights feat: Implement Oil Flask & Refueling (#1165) 2022-09-07 00:35:47 -07:00
Maps fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
Minor Artifacts fix: Code gens artifacts (#1168) 2022-09-10 14:40:19 -07:00
Misc fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
New Haven Quest Rewards fix: Fixes spell mechanics and misc bugs (#1118) 2022-07-14 22:01:59 -07:00
PlantsFlowers/Potted Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
Quivers fix: Fixes localization corner cases with OPL (#1050) 2022-06-12 21:17:42 -07:00
Resources fix: Fixes ore stacking (#1162) 2022-09-05 18:11:27 -07:00
Shields fix: Updates serialization to use v2.0 (#998) 2022-04-17 08:02:15 -07:00
Skill Items feat: Adds magical barrier and ebolt counter ability (#1182) 2022-10-02 20:48:53 -07:00
Special fix: Fixes localization corner cases with OPL (#1050) 2022-06-12 21:17:42 -07:00
Suits chore: Cleans up pattern checks. (#892) 2021-12-24 15:53:59 -08:00
Talismans fix: Cleans up some comments and spell code (#1120) 2022-07-16 19:45:41 -07:00
Traps fix: Adds Poison to codegen (#1002) 2022-04-18 00:05:44 -07:00
TreasureChests fix: Updates serialization to use v2.0 (#998) 2022-04-17 08:02:15 -07:00
Wands fix: Optimizes OPL using string interpolation (#1041) 2022-06-02 10:09:53 -07:00
Weapons feat: Adds Monster Abilities (#1179) 2022-10-01 21:09:36 -07:00