Major item refactor, still broken
This commit is contained in:
@@ -92,15 +92,18 @@ itemExternalValue itm w cr
|
||||
= Just (Right "ON")
|
||||
| BINGATE <- itm ^. itType = do
|
||||
invid <- itm ^? itLocation . ilInvID
|
||||
litm <- cr ^? crInv . ix (invid -2)
|
||||
ritm <- cr ^? crInv . ix (invid -1)
|
||||
litid <- cr ^? crInv . ix (invid -2)
|
||||
ritid <- cr ^? crInv . ix (invid -1)
|
||||
litm <- w ^? cWorld . lWorld . items . ix litid
|
||||
ritm <- w ^? cWorld . lWorld . items . ix ritid
|
||||
x <- itm ^? itScroll . itsRangeInt
|
||||
l <- getItemValue litm w cr ^? _Just . _Left
|
||||
r <- getItemValue ritm w cr ^? _Just . _Left
|
||||
Just . Left $ bgateCalc x l r
|
||||
| UNIGATE <- itm ^. itType = do
|
||||
invid <- itm ^? itLocation . ilInvID
|
||||
itm' <- cr ^? crInv . ix (invid -1)
|
||||
itid' <- cr ^? crInv . ix (invid -1)
|
||||
itm' <- w ^? cWorld . lWorld . items . ix itid'
|
||||
x <- itm ^? itScroll . itsRangeInt
|
||||
y <- getItemValue itm' w cr ^? _Just . _Left
|
||||
Just . Left $ ugateCalc x y
|
||||
|
||||
Reference in New Issue
Block a user