ModernUO/Projects/UOContent/Items/Misc
Kamron Batman ecbee17690
fix: Optimizes OPL using string interpolation (#1041)
## Breaking Changes (New API)
ObjectPropertyList supports the following API:
```cs
list.Add(500000);
list.Add(500001, stringArgument);
list.Add("Some text");
list.Add($"Some text with {argument}");
list.Add(500002, $"{arg1}\t{arg2}");
```

## Notes
1. All API uses that require a formatter like this:
    ```cs
    list.Add(500002, "{0}\t{1}", arg1, arg2);
    ```
    Should be changed to use string interpolation, for example:
    ```cs
    list.Add(500002, $"{arg1}\t{arg2}");
    ```
2. The following paradigm should no longer be used:
    ```cs
    list.Add(1061170, prop.ToString()); // strength requirement ~1_val~
    ```
    The new string interpolation API will avoid having to convert the argument to a string before writing it to the packet. Instead use the following:
    ```cs
    list.Add(1061170, $"{prop}"); // strength requirement ~1_val~
    ```

### Benchmarks
```cs
|                         Method |     Mean |   Error |  StdDev |  Gen 0 | Allocated |
|------------------------------- |---------:|--------:|--------:|-------:|----------:|
|                BenchmarkOldOPL | 241.0 ns | 0.56 ns | 0.47 ns | 0.0105 |      88 B |
| BenchmarkStringInterpolatedOPL | 199.9 ns | 2.44 ns | 2.39 ns |      - |         - |
```

### Changes
- [X] Removes crash in STArray.Return when array is null.
- [X] Fixes NPE in OPL when entity is null. Serial in packet will be 0 when entity is null.
- [X] Fixes NPE in AosAttributes when Parent is null.
- [X] Changes OPL to use string interpolation.
- [X] Introduces `IPropertyList` to allow extending PropertyList for other uses.
2022-06-02 10:09:53 -07:00
..
Bedlam Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
Blighted Grove fix: Optimizes OPL using string interpolation (#1041) 2022-06-02 10:09:53 -07:00
Corpses fix: Optimizes OPL using string interpolation (#1041) 2022-06-02 10:09:53 -07:00
Labyrinth Fixes brace style (#248) 2020-09-13 21:49:46 -07:00
Painted Caves Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
Palace of Paroxysmus Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
Prism of Light Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
The Citadel Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
Twisted Weald Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
ArcaneGem.cs fix: Converts BaseArmor and BaseClothing to use string crafter fields (#928) 2022-02-27 03:18:17 -08:00
BankCheck.cs fix: Optimizes OPL using string interpolation (#1041) 2022-06-02 10:09:53 -07:00
Beeswax.cs Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
Blocker.cs fix(core): Updates slice with range selectors (#583) 2021-04-23 20:57:24 -07:00
Blood.cs fix(core): Adds Hashed & Hierarchical Timer Wheel (#655) 2021-07-11 22:42:06 -07:00
Bola.cs chore: Cleans up pattern checks. (#892) 2021-12-24 15:53:59 -08:00
BolaBall.cs Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
ClockworkAssembly.cs Fixes brace style (#248) 2020-09-13 21:49:46 -07:00
CommunicationCrystals.cs fix: Optimizes OPL using string interpolation (#1041) 2022-06-02 10:09:53 -07:00
DeceitBrazier.cs feat(timers): Adds timer pooling, fixes timer related bugs, and changes timer api (#667) 2021-08-07 14:33:35 -07:00
EffectController.cs fix(core): Removes implicit cast between Serial and uint (#728) 2021-08-25 00:27:19 -07:00
EffectItem.cs fix(core): Adds Hashed & Hierarchical Timer Wheel (#655) 2021-07-11 22:42:06 -07:00
ExecutionersCap.cs Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
Firebomb.cs fix: Cleans up LINQ calls. (#965) 2022-03-20 19:20:54 -07:00
FlippableAddonAttribute.cs fix: Code gens items. Fixes code genning of ore (#684) 2021-08-14 22:16:42 -07:00
FlippableAttribute.cs fix: Codegens some decorations (#806) 2021-09-26 20:02:16 -07:00
GlassItems.cs Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
Gold.cs fix: Fixes bank checks falling to the floor. (#972) 2022-03-26 21:06:46 -07:00
Guillotine.cs chore: Cleans up pattern checks. (#892) 2021-12-24 15:53:59 -08:00
HairDye.cs C# 9 Cleanup (#325) 2020-11-27 00:29:21 -08:00
HoveringWisp.cs Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
IDurability.cs Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
InteriorDecorator.cs fix: Optimizes OPL using string interpolation (#1041) 2022-06-02 10:09:53 -07:00
Key.cs fix: Optimizes OPL using string interpolation (#1041) 2022-06-02 10:09:53 -07:00
KeyRing.cs chore: Cleans up pattern checks. (#892) 2021-12-24 15:53:59 -08:00
LOSBlocker.cs cleanup: Fixes bugs and cleans up code (#660) 2021-07-19 20:49:59 -07:00
Moonstone.cs Fixes brace style (#248) 2020-09-13 21:49:46 -07:00
MoonstoneGate.cs fix(core): Adds Hashed & Hierarchical Timer Wheel (#655) 2021-07-11 22:42:06 -07:00
MorphItem.cs fix: Various code cleanup (#756) 2021-09-03 19:41:12 -07:00
OilCloth.cs Removes literal variables (#257) 2020-09-18 18:41:26 -07:00
Origami.cs Removes literal variables (#257) 2020-09-18 18:41:26 -07:00
PlayerBulletinBoards.cs fix(core): Updates slice with range selectors (#583) 2021-04-23 20:57:24 -07:00
PlayerVendorDeed.cs Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
PoolOfAcid.cs fix: Updates pool of acid (#1028) 2022-05-18 17:53:53 -07:00
PowerCrystal.cs Removes literal variables (#257) 2020-09-18 18:41:26 -07:00
PowerGenerator.cs fix(core): Adds Hashed & Hierarchical Timer Wheel (#655) 2021-07-11 22:42:06 -07:00
PromotionalToken.cs fix: Optimizes OPL using string interpolation (#1041) 2022-06-02 10:09:53 -07:00
PublicMoongate.cs C# 9 Cleanup (#325) 2020-11-27 00:29:21 -08:00
Rares.cs Fixes brace style (#248) 2020-09-13 21:49:46 -07:00
Scales.cs Fixes brace style (#248) 2020-09-13 21:49:46 -07:00
SerpentPillar.cs fix: Cleanup IPoint3D calls (#704) 2021-08-19 09:11:48 -07:00
SpecialBeardDye.cs C# 9 Cleanup (#325) 2020-11-27 00:29:21 -08:00
SpecialHairDye.cs C# 9 Cleanup (#325) 2020-11-27 00:29:21 -08:00
Static.cs Fixes brace style (#248) 2020-09-13 21:49:46 -07:00
SwarmOfFlies.cs Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
Teleporter.cs fix: Optimizes OPL using string interpolation (#1041) 2022-06-02 10:09:53 -07:00
TrashBarrel.cs fix(core): Adds Hashed & Hierarchical Timer Wheel (#655) 2021-07-11 22:42:06 -07:00
TrashChest.cs Fixes brace style (#248) 2020-09-13 21:49:46 -07:00
TribalBerry.cs Fixes brace style (#248) 2020-09-13 21:49:46 -07:00
TribalPaint.cs Fixes brace style (#248) 2020-09-13 21:49:46 -07:00
UnholyBone.cs fix(core): Adds Hashed & Hierarchical Timer Wheel (#655) 2021-07-11 22:42:06 -07:00
WarningItem.cs feat(timers): Adds timer pooling, fixes timer related bugs, and changes timer api (#667) 2021-08-07 14:33:35 -07:00
WayPoint.cs fix: Fixes FastAStar (#788) 2021-09-16 23:38:51 -07:00
WindChimes.cs fix: Optimizes OPL using string interpolation (#1041) 2022-06-02 10:09:53 -07:00