cataclysmbnteam / Cataclysm-BN

Cataclysm: Bright Nights, A fork/variant of Cataclysm:DDA by CleverRaven.
https://docs.cataclysmbn.org
Other
665 stars 260 forks source link

Jumper Cables can't attach to active furniture in power grid #2220

Open KongMD-Steam opened 1 year ago

KongMD-Steam commented 1 year ago

Describe the bug

Jumper cables do not recognize active grid furniture as valid locations to attach the cable to.

Steps To Reproduce

Cable_System_Test.zip

A save is attached that does most of the 'setup' work described in the steps below. If you'd like to reproduce it from scratch, here is how to do so:

  1. Create a world with just the BN mod
  2. Begin a new game as an Industrial Cyborg
  3. Set all player skills to 10 via debug menu
  4. Spawn 2 sheet metal via debug menu and craft Steel drum (100L) using Integrated Toolset. Player's bionic power should drop to 350kJ.
  5. Add Debug Hammerspace mutation and 'Install Refrigerator' from construction menu
  6. Go onto roof of shelter and install 3 upgraded solar panels
  7. Install 2 Lg storage batteries inside shelter from construction menu
  8. Spawn jumper cable item
  9. Wait 5 hours to charge grid.
  10. Apply the jumper cable and attach it to yourself.
  11. Apply the cable again and attempt to attach it to the Lg storage battery. Observe the message 'There's no vehicle or grid connection there' even though it's a battery with ~8000kJ of power.

Screenshots

Screenshot - 12_3_2022 , 6_03_50 AM

Versions and configuration

Additional context

No response

olanti-p commented 1 year ago

This is intended behavior. Charger cable is supposed to be attached to the grid connector, as the message says, and grid connector must be built separately through the construction menu.

What is not intended, however, is how the connectors are currently broken (at least on game version 3d29308de6ae620806fd3b11e4146d89ba06a2aa) and the cable comes loose as soon as you attach it.

chaosvolt commented 1 year ago

See also https://github.com/cataclysmbnteam/Cataclysm-BN/issues/1189 for discussion on why it has to be vehicle first, then connector second, and why the code can't yet support connector-to-connector.

One idea that also got floated was that of junction/breaker boxes that'll generate connections innately, which will not only make constructing grid connections on-site much more intuitive to the player, but also allow for mapgen to plonk down a building that has exactly what grid connections we want, instead of only being able to pre-generate magic grid connections for an entire overmap special or city building. That would enable complex stuff like having a farmhouse gridded up without the farm fields also being electrified like they are currently.