FakeFishGames / Barotrauma

A 2D online multiplayer game taking place in a submarine travelling through the icy depths of Jupiter's moon Europa.
http://www.barotraumagame.com/
1.76k stars 406 forks source link

Bots steal batteries from Portable Pumps #12388

Closed JaydenCallan closed 1 year ago

JaydenCallan commented 1 year ago

Disclaimers

What happened?

In a singleplayer campaign (though it should work in multiplayer, I haven't tested), if you have a portable pump with a battery that isn't at 100% charge, bots will steal the battery out and won't replace it, even while the pump is going.

This effectively means you can't use a portable pump if a bot has the "Recharge Batteries" command active.

Reproduction steps

  1. Place a portable pump
  2. Place in a battery and turn the pump on
  3. Give a bot the "Recharge Batteries" command
  4. Watch the bot steal the battery, disabling the pump

Bug prevalence

Happens every now and then

Single player or multiplayer?

Happens in both single player and multiplayer

-

No response

Version

v1.0.21.0

-

No response

Which operating system did you encounter this bug on?

Windows

Relevant error messages and crash reports

No response

G-M-twostay commented 1 year ago

for me bots don't replace battery for anything. The recharge battery command makes them recharge batteries according to some random mechanism(sometimes they recharge immediately when the battery isn't full, other times they ignore the battery until it's less than 50%), but they never put new batteries back into the devices. When replacing, they usually first drop the full batteries on the ground, they then pick it up and put it into some random cabinets.

itchyOwl commented 1 year ago

Fixed in Regalis11/Barotrauma-development@ffc4454. Based on a quick test, didn't spot any inconsistencies on how replacing the batteries work: items with 80 or less condition are targeted and placed for recharging. The bots won't immediately target every battery on the sub and they might not right away notice if the status of some battery has just changed.

Jasontti commented 1 year ago

Tested. Bots ignore now batteries in pumps completely, but will put new one in if slot is empty in pump. Closing ticket.