Clear mutation points cache on infinite MP cheat used#6991
Conversation
|
How does this fix the infinite MP cheat not working if at low MP when enabling it? |
|
Well I didn't really look much into it, just tried clearing cache when using the cheat, and it kind of worked. Although it works, if you use up more MP than you had and turn off the cheat (so you have negative MP), you can't remove the organelles you placed, which might or might not be a bug, I don't know. |
I think that is caused by the actual underlying problem: #6696 I was kind of hoping that the infinite MP cheat would be fixed in a way that also fixed #6696 rather than doing a workaround like this, which needs to be done for all editors (I think this fix will actually not work at all in the multicellular editor). So I kind of want to leave this PR open for a while to see if we get a fix for the underlying issue first. If not then I suppose it will eventually be good to at least have a bandaid fix for the microbe and multicellular editors (as this fix doesn't fix the underlying issue, it has to be hooked up to each editor separately to keep working). |
|
It should now work for multicellular editor too now. |
|
Well I think the problem is unlikely in SpeciesComparer, because it doesn't know what max MP is so it just tallies up the changes. What I think the most likely place the bug is is that the editor code misinterprets data from the change calculation. It should be updated to tell the difference between the new action costing too much MP and the MP being already consumed but the new action doesn't make the situation worse. I think that would allow free actions when at 0 MP and maybe any action if cheats are enabled (though this might need a further small tweak depending on how changes are assumed to be free with the cheats on). |
Brief Description of What This PR Does
Extra cache was added, also microbe editor cheat panel now references microbe editor, and infinite MP cheat connects to another method (other method wasn't microbe editor cheat panel's specifically, but inherited from its base class instead, that's why)
Related Issues
Closes #6987
Progress Checklist
Note: before starting this checklist the PR should be marked as non-draft.
break existing features:
https://wiki.revolutionarygamesstudio.com/wiki/Testing_Checklist
(this is important as to not waste the time of Thrive team
members reviewing this PR). This includes gameplay testing by the PR author.
styleguide.
Before merging all CI jobs should finish on this PR without errors, if
there are automatically detected style issues they should be fixed by
the PR author. Merging must follow our
styleguide.