The trick is very simple and effective, adding an ideal diode to any voltage source with the Ilimit parameter set (along with Ron=0 for perfect ideal behavior) will limit the current sourced to the specified value.
To also limit the current sink add another diode in parallel but reversed.
The...