SRL / SRL-5

SRL 5
https://villavu.com
GNU General Public License v3.0
32 stars 34 forks source link

Update SRL/core/antirandoms/antirandoms.simba #86

Closed riwu closed 12 years ago

riwu commented 12 years ago

Skip findSpinTicket if checkInv is true (for efficiency) Remove unnecessary parenthesis (what are they for?)

brart commented 12 years ago

I prefer FunctionX(); over Functionx;

riwu commented 12 years ago

I had thought the extra parenthesis looks weird. Reverted it, just update the spin ticket.

cohenadair commented 12 years ago

What is checkInv? I can't find it anywhere in SRL.

riwu commented 12 years ago

It is the parameter of _FindAllRandoms.

FindSpinTicket searches for the spin ticket DTM in inventory (i'm not sure why it also says it exits the squeal pop up, because that's what ExitSquealOfFortune does), and it doesn't check whether we are currently on tab_Inv, likely because it is called after those inv random checks. But if checkInv is false (i.e. FindNonInventoryRandoms is called instead as the scripter do not want to switch to tab_Inv), it shouldn't be called (since it belongs to isInvRandom).

Another solution would be to add if (GetCurrentTab <> tab_Inv) then Exit; to FindSpinTicket. But it just makes no sense currently to continue with FindSpinTicket even when we are not at tab_Inv.

cohenadair commented 12 years ago

Ah okay. Nice catch.