I can provide all the directions, but I probably won’t be writing the CBM myself.
We could simplify it to use the battery mount, because it is already a good connector for energy related stuff.
So we only need a CBM:
The CBM would be implemented in bionics.cpp. It would be an active-use CBM, with usage function working as follows:
Ask for direction
Check if there’s a vehicle part with a battery mount there, but with no mounted battery (ie. no part that has “NEEDS_BATTERY_MOUNT” flag)
Ask the player if we want to put power in or drain it, then ask how much
Drain/refill the vehicle with some penalty (say, 20% power loss), then return the unused power back to source
Drain some moves from the player, preferably proportional to power transfered
Optionally it could (eventually should) use long actions rather than draining moves from player directly.
It would be somewhat less OP (and more realistic too) if the charging time were slow but did not prevent the player from doing other stuff as long as he stands still.
E.g. Allowing driving, or crafting, or sleeping, as long as he does it over a battery mount.
This of course prevents draining moves and (iirc) long actions, but it would be possible to implement nevertheless:
As long as the CBM is activated and “hooked” (via a y/n dialog) to the charging port, there will be constant transfer of power from the car to the player, at a constant rate (extra points for making it charge faster at low power and slower as the player gets near to fully charged)
This will continue as long as the player is not fully charged and has not moved (so he is still over the charging port). In the event of any of the two, the CBM will shut off (maybe with a small move drain to the player to simulate disengaging from the charging port)
As for transfer rates, its open to discussion, but i would think something like 1000 Power/hr as reasonable.
(Or 2000/hr at low charge, and down to 500/hr when near 100% charged)
Either way your going to have to trickle it out. The human body couldn’t handle raw current. Or even big enough wires to push a lot of current.
It takes 7 milliamps over 3 seconds to kill a human with zero ohm resistance. Skin has 5-15k ohm resistance.
So the port from the vehicle would have to trickle it in so you wouldn’t overload the port/wires. DC is more likely to kill you due to the wave frequency interruption than AC.
Also the CBM would need good resistance/insulation if there was a spike. Remember electricity grounds. If your hanging onto something it will flow to the point of least resistance and ground there if the current. How much metal is in these survivor vehicles? Loads.
I’d make it the current from the vehicle maybe slightly better than the movement torq whatever CBM. That is it.
Hooking jumper cables to bionics from the vehicle battery would fry them, and kill you, as the amount of current in that gauge of wire is quite a bit. Your body just wouldn’t have enough to resist the flow of current. If your hanging onto something like metal then you complete the circuit, it hops across your heart and wam. Dead
You wouldn’t necessarily need to trickle charge something. Insulated wires lead to a cable on your skin. Cable plugs into vehicle battery charger port. At no point is the electricity ever going through your body, it’s going through the insulated wires under your skin/metal straight to the battery, no interaction with the rest of your body at all.