derail-valley-modding / custom-car-loader

A Derail Valley mod that allows the addition of new cars and locomotive types to the game.
https://nexusmods.com/derailvalley/mods/324
MIT License
14 stars 6 forks source link

New proxy system #193

Closed WhistleWiz closed 10 months ago

WhistleWiz commented 10 months ago

Remade the proxy system to no longer use attributes and reflection (outside AutoMapper itself anyways). System is now integrated into AutoMapper's expressions and makes use of generics for type consistency, so it should not try to handle unsupported classes. To automatically map them, just use a class that inherits from Profile or in the mapper configuration, and call AutoCacheAndMap(). All existing proxies have also been converted to the new system.