Black Market 2

by djmango

Sell and buy items/fluids/energy on the black market using trading chests/tanks/accumulators, choosing the frequency of exchanges and related fees. You can now sell your overproduction and buy things that you don't want to craft by yourself. You can also use these trading units as a paying shipment system.

10 days ago
0.17 - 2.1
26.2K

i Proposal: Compatibility Fix Between Black Market 2 and Transport Drones

1 year, 4 months ago

Hi,
Thanks for your great mod.
While using Black Market 2 with the Transport Drones mod, I encountered an issue where recipe names starting with "request-" caused calculation problems or script errors.

To ensure compatibility, I added the following exclusion filter:

local function is_excluded_recipe(recipe)
return recipe.name and string.sub(recipe.name, 1, 8) == "request-"
end

And applied this check where appropriate, like so:

if is_excluded_recipe(recipe) then
goto continue
end

This small addition prevents request- recipes from interfering with the price computation and seems to work fine.

I hope this helps improve compatibility for other users as well.
I'm not familiar with GitHub pull requests, so I’m sharing this here directly.
Thanks again for your hard work!

13 days ago
(updated 13 days ago)

Your filter is in, thank you. 2.2.21 skips every recipe whose name starts with request- when it compares recipes for the price. One of them was winning the purity comparison for its product and dragging that product's price down to the cost of the request token.

How to test: load Transport Drones and Black Market 2, sell one stack of iron plates and check the price per plate matches a save without Transport Drones. In my test the price stayed at 72.8 credits per plate with the request- recipes loaded.

New response