From db29feed11b846e9f6eb36018bb09789783017f8 Mon Sep 17 00:00:00 2001 From: tais <378873+tais@users.noreply.github.com> Date: Mon, 8 Jun 2026 17:18:07 +0200 Subject: [PATCH] Don't strip robot's installed components on mapscreen drop-all The mapscreen "drop everything" hotkey (Shift+W) looped over every inventory slot from HELMETPOS to NUM_INV_SLOTS and dumped each one. Madlab's robot stores its installed gear in those same slots - ammo (14), targeting (15), chassis/armour (16) and utility (17). Dropping these left the robot defenceless, and the player cannot re-install the components through normal inventory, so the loss was permanent. Skip the robot's component slots in the drop loop; only its general cargo slot (ROBOT_INVENTORY_SLOT) may still be emptied. Regular mercs are unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) --- Strategic/mapscreen.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Strategic/mapscreen.cpp b/Strategic/mapscreen.cpp index 1067b25c..e55e03d6 100644 --- a/Strategic/mapscreen.cpp +++ b/Strategic/mapscreen.cpp @@ -8472,6 +8472,12 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent ) if ( HandleNailsVestFetish( pSoldier, i, NOTHING ) ) continue; + // tais: never strip Madlab's robot of its installed components (ammo, + // targeting, chassis/armour, utility) - the player can't re-install them + // and the robot would be left defenceless. Only its cargo slot may be emptied. + if ( AM_A_ROBOT( pSoldier ) && i != ROBOT_INVENTORY_SLOT ) + continue; + AutoPlaceObjectInInventoryStash(&pSoldier->inv[i], pSoldier->sGridNo, pSoldier->pathing.bLevel); DeleteObj(&pSoldier->inv[i]); }