Closed Vlad-00003 closed 6 years ago
Changing the code to this:
class MapRoomFunctionality_getMapScale_Patch
{
public static bool Prefix(MapRoomFunctionality __instance, ref float __result)
{
FileLog.Log("get_mapScale called!");
__result = __instance.hologramRadius / QMultiModSettings.Instance.ScannerBlipRange;
return false;
}
}
Does nothing, and the actuall map in the scanning room is clipping outside of the room...
I'm not sure what issue you're having with that patch, it's working
Make sure you change the config.json file, not just the code?
Here is 50f scale
@Qwiso, wired af. As you can see the code I gave you - the FileLog.Log("get_mapScale called!"); isn't even being called for me... I was expiriancing this even then I was making my own version, so.... If everything is working for you - it looks like I have some problems on my side.
I'm not sure what method you're using to setup your patches but this is the important part
[HarmonyPatch(typeof(MapRoomFunctionality))]
[HarmonyPatch("mapScale", PropertyMethod.Getter)] //PropertyMethod.Getter
class MapRoomFunctionality_getMapScale_Patch {...}
@Qwiso, dude, are you kidding me? I'm talking about your code. I've just added debug messages to this part, and that's it. It doesn't work for me for some reason.
And, as You can see in the post I've mentioned - it also doesn't work with over way of patching. I have no idea why.
So, I was fighting with it for a while, but I used the different way for patching. Your way doesn't seems to work either.
https://github.com/pardeike/Harmony/issues/70