ak86 / Milk-Mod-Economy

http://www.loverslab.com/files/file/1382-milk-mod-economy/
2 stars 0 forks source link

please review condition: a == ( b || c ) #22

Closed ghost closed 8 years ago

ghost commented 8 years ago

I don't think the condition does what it's supposed to do. Line 1979 & 1980 always trigger regardless whether the actor is currently wearing a TITS# or something else. The currently worn armor will be lost.

There are multiple occurrences for this syntax:

00_Core/Scripts/Source/MilkQUEST.psc:1959: if cuirass == (TITS4 || TITS6 || TITS8)
00_Core/Scripts/Source/MilkQUEST.psc:1979: if cuirass == (TITS4 || TITS6 || TITS8)
00_Core/Scripts/Source/MilkQUEST.psc:1980: if cuirass == ((TITS4 && BreastRows != 2) || (TITS6 && BreastRows != 3) || (TITS8 && BreastRows != 4))
00_Core/Scripts/Source/MilkQUEST.psc:1987: if BreastRows != ( 2 || 3 || 4 )
00_Core/Scripts/Source/MilkQUEST.psc:2763: Elseif nodeName == ("NPC L Breast" || "NPC R Breast" || "NPC L Breast01" || "NPC R Breast01")

Please rewrite all of these as "(a == b) || (a == c)". It's less concise, but definitely working as expected.

ak86 commented 8 years ago

ill look