New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add small consumer battery rechargers #39772
Conversation
Why make it wireless? That's orthogonal to the functionality you want, and takes it outside the use case you're describing. |
The wireless part is the lack of wires between the device and the batteries being charged, not between the car and the device. I could rename it though; it's just descriptive of the real life object I modeled it from. |
Please do, those chargers are mostly integrated into phones, not standalone batteries. |
@kevingranade what would you like it to be called? Are you imagining a wall charger or a cigarette charger plug? Craft / disassemble with copper wire and an amplifier circuit? |
Maybe a copper wire? |
Shouldn't this be craft-able (given that "bigger and better" recharging station is)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thematically, don't see any problems in the code, but I haven't had a chance to do a quick test which is all this needs.
Reran the charging tests and it was able to charge a battery dropped into the attached cargo. |
It'd be in every home with a rechargeable battery and every desk that someone uses electronics at.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Summary
SUMMARY: Content "Adds consumer wireless charging device and vehicle attachment"
Purpose of change
There seems like there aren't early game options to recharge batteries, outside of the nearly useless hand crank charger.
Describe the solution
This PR adds a device
based on the Qi charging standard, which supplies 15 watts to batteries in the same tile as it's installed on. It's found in homes and offices, based on SUS groupsand an approximate 20% adoption rate of the devices according to the linked Wikipedia article.Describe alternatives you've considered
Attempted in #39391 to add the ability to wire up a hand crank charger as an alternative recharging option, but that proved difficult because it would have involved chatter between the map and the vehicle class to figure out when the crank can deliver power based on which engine its attached to, and so forth.
Testing
Spawned a humvee and verified that a battery in the proper recharging station is charging at 600 watts. Spawned a wireless charger and installed it, dropped a battery, got like 4 charge after 5 minutes of waiting a few times (300 s * 15 W = 4.5 kJ). Tested removing and adding wireless charger, especially that they can't both be on the same cargo.
Spawned an electric bicycle and installed wireless_charger on the cargo. Waited 30 minutes and saw 25 kJ consumed from the bike and 23 kJ added to the battery. Expected for that time was 27 kJ.
Crafted and disassembled a battery charger.
Additional context
The item looks terrible in tilesets right now, since a recharging station is a huge thing. I'd be happy to add
looks_like
if anyone can think of a good candidate.@mlangsdorf, you reviewed the previous PR and I'd appreciate it you can take a look at this version too.