From 1af512f05e90bbb786923c37e6c6dc00df07e815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C5=A0ebek?= Date: Wed, 22 Jun 2022 16:19:47 +0200 Subject: [PATCH] Fix reprogram requiring wrong inventory Fixes the mistake introduces in #373. --- src/Swarm/Game/Step.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Swarm/Game/Step.hs b/src/Swarm/Game/Step.hs index e8c3d2435..94ec2a7f4 100644 --- a/src/Swarm/Game/Step.hs +++ b/src/Swarm/Game/Step.hs @@ -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