joaofarias / csl-traffic

A WIP mod for Cities: Skylines to improve traffic.
91 stars 30 forks source link

CustomTransportTool detouring? #13

Closed originalfoo closed 9 years ago

originalfoo commented 9 years ago

Quite a few people are trying out a new mod and asset combo that enables double platform rail stations. Mod is here: http://steamcommunity.com/sharedfiles/filedetails/?id=442957897

Sims Firehouse wrote on Steam:

Sims firehouse [author] 10 hours ago

Traffic++ uses a CustomTransportTool class which completely overrides the original TransportTool class. I only detour a method call to my FakeTransportTool class, but the Traffic++ completely rebuilds the TransportTool. Then of course it will not be compatible with any other mod that alter the TransportTool class.

Sims firehouse [author] 10 hours ago This is the point of conflict, the GetStopPosition method used in the TransportTool class.

Traffic++ : https://github.com/joaofarias/csl-traffic/blob/master/CSL-Traffic/Tools/CustomTransportTool.cs#L451

This mod: https://github.com/SkylinesSimsfirehouse/Skylines-MultiTrackStationEnabler/blob/master/MultiTrackStationEnabler/FakeTransportTool.cs#L8

originalfoo commented 9 years ago

Sims firehouse [author] Just now @aubergine18: What's better, let's just share the code together. You can ask the developer of Traffic++ to adopt my code and include this functionality. I am glad if I can help the Traffic++ (which has many advocates) become better.

joaofarias commented 9 years ago

Sounds cool. I'll add Sims on steam and have a chat with him. :)

joaofarias commented 9 years ago

Ready for next update. Closing.