Skip to content

Commit

Permalink
Fix reprogram requiring wrong inventory
Browse files Browse the repository at this point in the history
Fixes the mistake introduces in #373.
  • Loading branch information
xsebek committed Jun 22, 2022
1 parent bbcdfbc commit 1af512f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Swarm/Game/Step.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ execConst c vs s k = do
(creative || (childRobot ^. robotLocation) `manhattan` loc <= 1)
`holdsOrFail` ["You can only reprogram an adjacent robot."]

_ <- checkRequiredDevices (childRobot ^. robotInventory) cmd "The target robot" FixByInstall
_ <- checkRequiredDevices (childRobot ^. installedDevices) cmd "The target robot" FixByInstall

-- update other robot's CESK machine, environment and context
-- the childRobot inherits the parent robot's environment
Expand Down

0 comments on commit 1af512f

Please sign in to comment.