Open Regularitee opened 6 years ago
Yup, I can confirm with a quick code read at https://github.com/CleverRaven/Cataclysm-DDA/blob/86ff32930b80bd705ce2e1801aebb429a715b130/src/item.cpp#L6173-L6188 This should only ever happen while you're carrying the cable yourself: https://github.com/CleverRaven/Cataclysm-DDA/blob/86ff32930b80bd705ce2e1801aebb429a715b130/src/item.cpp#L6164
It's consuming 30 or 200 moves every time the cable is reset, regardless of how extended it was (this should nominally translate to about 0.3/2 turns, but depends on character speed). A nicer solution would be to use max_charges - charges
(saved before resetting the item data), though of course for an actually over-extended cable, this won't make much difference.
Someone should definitely double-check that consuming p->moves
correctly deducts just the 30/200 moves expected.
I wonder it it was intended. If you'd drive a car fixed to a cable it would pull you before breaking and that might make vehicle uncontrollable for a moment, although it's true when it comes to tug cable and not jumper cable.
I wonder it it was intended.
Not really; I don't recall exactly what I was thinking at the time, but I'm pretty sure it was simply an expedient solution (as distinct from correct).
The vision was that, after affixing the cable to something, you would walk away (holding the other end of the cable, and paying it out) until you got too far -- at which point, the fixed end of the cable will have gotten disconnected[*] and you would have a cable dragging on the floor behind you.
Since I didn't want to deal with simulating a dragged cable, I forced the player character to reel it back in and/or coil it up, which obviously had to consume some moves.
So imagine the player with a cable snaking behind them, getting into a car (presumably making sure to put the cable through the car door's window, so they can shut the door) and driving off. The cable keeps paying out until it reaches its maximum extension, it stretches a bit... and comes loose from its other end!
At that point, and as a matter of the utmost urgency, the player lets go of the steering wheel and takes the time to reel in the (now loose) cable and painstakingly coil it back up, and only after this critically important task is completed do they look up and see where they're driving to.
[] Re: cable comes loose*: The alternative was to warn the player that they're overextending the cable and ask them to choose what to do (drop the cable where it is, or tug it loose and re-spool it). At the time, I wasn't too terribly aware of the uimenu system (which wasn't nearly as advanced as it is now), so I picked the simpler option.
Related #17772, #22529.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not \'bump\' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.
If the player is driving a vehicle connecting to something else by jumper cable, and the jumper cable becomes overextended and breaks loose, the player briefly loses control of the vehicle. It's similar to what you would experience if you hit the "wait" key several times in a row: you cannot steer the vehicle, and instead continue forward at whatever speed cruise control is set at.