From 7a714cc457323bff6b4a73ec9e7b58c7a63381ec Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sun, 5 Mar 2023 14:55:25 +0000 Subject: Exit placement on the last battery --- src/Game/Entities/Pickup.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Game/Entities/Pickup.hs') diff --git a/src/Game/Entities/Pickup.hs b/src/Game/Entities/Pickup.hs index 7c1937c..a933efc 100644 --- a/src/Game/Entities/Pickup.hs +++ b/src/Game/Entities/Pickup.hs @@ -27,7 +27,7 @@ mkBattery sprites x y playerCollision = do updateBattery :: Collision -> Entity -> IO Entity updateBattery touchedPlayer e = do touched <- touchedPlayer e - pure $ if touched then e {destroy = True, actions = [ActionAddBattery]} else updateBatteryFrame + pure $ if touched then e {destroy = True, actions = [ActionAddBattery e.x e.y]} else updateBatteryFrame where updateBatteryFrame :: Entity updateBatteryFrame -- cgit v1.2.3