Skwizzy / SPT-LootingBots

AI Looting mod for Singleplayer Tarkov
https://hub.sp-tarkov.com/files/file/1096-looting-bots/#overview
29 stars 11 forks source link

When playing as a scav and looting a container/corpse, other scavs will try to loot the same thing and take items off the player #96

Closed Skwizzy closed 5 months ago

Skwizzy commented 7 months ago

Scavs should not be allowed to loot things that the player is currently looting, we need to figure out a way to cancel a looting action if the player interacts with an item/container/corpse that is flagged as active loot

Skwizzy commented 6 months ago

I have decided to store the id of the container/item/corpse in the ActiveLootCache. When a player searches loot, any bot that is also currently trying to loot the object will have their looting logic canceled. They will scan again at their next specified interval and will ignore the object until the player has closed the inventory screen and finished looting

Skwizzy commented 6 months ago

I should clarify that this needs to apply to friendly bots only. Enemy bots should be able to try and loot the same object with the logic being that their combat layer should be initialized way before they get close enough to start looting

Skwizzy commented 6 months ago

Changes found here 76f71f7

Needs to adjust to apply to friendly bots only

Skwizzy commented 6 months ago

Follow up changes: 26c9c0d