Refactor crPos to be a V3
This commit is contained in:
@@ -383,7 +383,7 @@ updateKeysInTerminal :: Int -> Universe -> Universe
|
||||
updateKeysInTerminal tmid u = fromMaybe deactivate $ do
|
||||
tm <- u ^? uvWorld . cWorld . lWorld . terminals . ix tmid
|
||||
x <- u ^? uvWorld . cWorld . lWorld . buttons . ix (tm ^. tmButtonID) . btPos
|
||||
y <- u ^? uvWorld . cWorld . lWorld . creatures . ix 0 . crPos
|
||||
y <- u ^? uvWorld . cWorld . lWorld . creatures . ix 0 . crPos . _xy
|
||||
case tm ^. tmStatus of
|
||||
_ | dist x y > 40 || not (hasButtonLOS x y (u ^. uvWorld)) -> Nothing
|
||||
TerminalDeactivated -> Nothing
|
||||
@@ -553,7 +553,7 @@ tryCombine (i, j) w = fromMaybe w $ do
|
||||
. ix j
|
||||
. siPayload
|
||||
. _Just
|
||||
p <- w ^? cWorld . lWorld . creatures . ix 0 . crPos
|
||||
p <- w ^? cWorld . lWorld . creatures . ix 0 . crPos . _xy
|
||||
return $
|
||||
createItemYou it (foldr (destroyInvItem 0 . NInt) w (sort is))
|
||||
& soundStart InventorySound p wrench1S Nothing
|
||||
|
||||
Reference in New Issue
Block a user