Misunderstood-Wookiee / Mules-and-Warehouses-Extended

Compliation and Maintenace for the famous mule mods.
Creative Commons Attribution 4.0 International
12 stars 12 forks source link

[FEATURE]: new cargo emptying routine #144

Closed bhayden53 closed 2 years ago

bhayden53 commented 2 years ago

All of the mules need a new cargo emptying routine. I will likely write a new lib file to avoid the duplicate code that's already out there.

The current behavior here has repeatedly proven to be confusing for users. Occasionally the game cancels a trade once the mule has already picked up the wares and is on it's way, despite reservations and all of that. In that case, the mule aiscript is started over from scratch without any knowledge of the previous state; it simply sees that the mule has cargo and first must dump it. The routine for dumping cargo looks for anybody who wants the stuff we have; including AI, regardless of what your mule settings are. A mule can't do it's job with any cargo.

(side note: it may be possible to somehow get some information about previous failed orders via some md/lua hook proposed in discord. I consider that far out of scope for the time being as I'm not sure it's worth the effort based on the frequency of the issue and the likelihood of it significantly affecting user's empires)

Users (rightfully, probably) view this as a mules bug when in truth it's working as I intended. I gotta get rid of the stuff in the hold.

A proposed solution has come up, which is to simply delete the cargo and give the player money for it. This may occasionally cause players to lose some cargo, but usually the vanilla cancelling only happens when you're moving stuff around at very high storage levels.

bhayden53 commented 2 years ago

currently stuck trying to figure out how to completely delete a ware instead of just dropping it

Vectorial1024 commented 2 years ago

I dont remember the details, but <remove_cargo /> might work.

bhayden53 commented 2 years ago

yeah I found that function with the help of DeadAir on discord, thanks!

bhayden53 commented 2 years ago

addressed via #147