Skip to content

Comments

Earlier injection point#1

Closed
brianries wants to merge 3 commits intojanxious:masterfrom
brianries:earlier_injection_point
Closed

Earlier injection point#1
brianries wants to merge 3 commits intojanxious:masterfrom
brianries:earlier_injection_point

Conversation

@brianries
Copy link
Collaborator

This code moves the BTML injection point up earlier -- from BattleTech.GameInstance.ctor() into BattleTech.Main.Start()

Code-wise there is barely any difference between these points. It does however allow ModTek to run and temporarily disable further loading -- giving it control to animate on the draw thread, and then resume the normal BattleTech load sequence.

Brian Ries added 2 commits June 24, 2018 12:43
Copy link
Owner

@janxious janxious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least initial results are good. reinjecting with current BT (1.1.2) got the game into a modded state. Gonna test with the new modtek w/ loading bits and see what happens.

@janxious
Copy link
Owner

So https://github.com/brianries/BattleTechModLoader/blob/9c3aaf06f5849f20c454a05cfdb6e4ea454e1d55/BattleTechModLoaderInjector/BTMLInjector.cs#L156 I think that method needs some love for this changeset. It may be worth spitting out something that is like "you have the old injection, you should restore original dll" if the old injection point exists. I believe I had an old-style injected DLL and ran the new injector and it happily went on with two BTML injection points, which is what happened here: janxious/ModTek#1

The second loading screen in the overlay and the weird version thing are almost certainly both just because BTML happened twice. Log came out fine, too.

… points and not allow the .dll to be double injected. It will also explicitly tell you if it's updated with the older BTML.
@brianries
Copy link
Collaborator Author

Added support for preventing double injections, and informing of old ones.

@janxious
Copy link
Owner

janxious commented Aug 7, 2018

7221240 is where I got with the code today. It's not as generic as what you had but it also ran okay for me. 🤷‍♀️

Thoughts?

@janxious
Copy link
Owner

janxious commented Aug 8, 2018

Closing this as https://github.com/janxious/BattleTechModLoader/releases/tag/v0.3.0 has most of this code in it now.

@janxious janxious closed this Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants