It's not so hard to wrap one's mind around, check it-
Approach ze first:
In trader UI, there's a "Buy Shield" button down by the "Buy/Repair Armor" button. I mean, is it too much a stretch to stipulate that if you buy it, you're stuck with it equipped unless you drop or sell it? Add a new assignable hotkey for "Block" and boom, there it is.
Restrict shield to 1hand weapons only. Not only for balance reasons, but so new anims/models aren't needed. In the "I've been purchased" code for the shield, it parses the player's inventory and drops any 2-hand weapons, similar to how dropping weapons is already handled in existing code when a support carrying more than 15 weight switches to another perk during trader time.
If tackled in this manner [if you have a shield, it is equipped until you drop or sell it] there's no need for weird shield+<weapon> object tomfoolery or new overloaded functions to deal with player input in a different way than if they didn't have a shield. When the player switches weapons, the code that's already there handles it, because we ensure the player doesn't have any 2-handed weapons already when the player picked up this shield (if they had enough available weight to pick up this shield)- so there's no animation weirdness where players sprout extra arms and carry shield + a bullpup in two hands or whatever.
Approach ze second:
The "I'm now equipped" function for one-handed weapons is updated to check if the player has a shield in their inventory. If they do, the shield also comes out with the 1-handed weapon the player has switched to.
Approach ze third:
The shield becomes its own "weapon" and does not pair with 1-handed weapons. Primary fire blocks, secondary fire bashes. Put a ~1 second weapon wield/unwield animation on it and you can easily switch to it in time when a zed gets too close for comfort, then switch back to a different weapon when the range opens up. Absolutely the easiest to code- requiring nothing beyond making the object itself, and this solution still works absolutely fine from my perspective as a player as long as you can switch to/from it in a second or so, with the added flexibility of still being able to switch to/from 2-handed weapons normally (assuming you had the carry capacity to pack them).