-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiplayer "Neutral Chest" Bug #22
Labels
bug
Something isn't working
Comments
I can't seem to find this setting. I've written a possible fix, not enabled yet, at line 2042 of control.lua. Is this setting through a mod? |
This is still issue, any ways to fix this? |
Fix for chests at least I created mod with this in Now it works ^^ if someone need just insert other ids in list below.
|
Do you want to open a PR?
…On Fri, Nov 15, 2024 at 2:03 AM, moullcz < ***@***.*** > wrote:
*Fix for chests at least*
I created mod with this in
-> control.lua
Not it works ^^ if someone need just insert other ids in list below.
-- Seznam truhel, které mají být při položení vázány k frakci hráče
local
trader_chest_ids = {
"trader-chst-sel",
"trader-chst-buy",
"trader-chst-sel-mk2",
"trader-chst-buy-mk2",
"trader-chst-sel-mk3",
"trader-chst-buy-mk3",
"trader-chst-sel-mk4",
"trader-chst-buy-mk4",
}
-- Funkce pro
kontrolu, zda je položena správná truhla
local function
is_trader_chest(name)
for _, id in ipairs(trader_chest_ids) do
if name == id then
return true
end
end
return
false
end
-- Event pro položení entity
script.on_event({ defines. events. on_built_entity (
http://defines.events.on_built_entity/ ) , defines. events. on_robot_built_entity
( http://defines.events.on_robot_built_entity/ ) }, function(event)
local entity = event.created_entity or event.entity
if entity and
entity.valid and is_trader_chest( entity. name ( http://entity.name/ ) )
then
local player = game.get_player(event.player_index)
if
player and player.valid then
entity.force = player.force
end
end
end)
—
Reply to this email directly, view it on GitHub (
#22 (comment)
) , or unsubscribe (
https://github.com/notifications/unsubscribe-auth/AGZNIXAS3C3EECYU2EFW3KT2AXBIFAVCNFSM6AAAAABRQQI5GSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZYGQ2TQOJZG4
).
You are receiving this because you were assigned. Message ID: <djmango/BlackMarket2/issues/22/2478458997
@ github. com>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I ran into an issue in multiplayer where items in a chest would disappear, I would receive no money, and the UI to edit the buy or sell settings did not show when opening a trade chest.
I have done the legwork of finding out why. In multiplayer, there is an option for "neutral chests" to allow the looting of each others goods.
Enabling this setting creates a scenario where items will be sold at the default "every hour" interval (which cannot be changed by the player) - and the money will be awarded to the "neutral" faction instead of any players.
If the mod could be tweaked such that trade chests were able to ignore the "Neutral faction" setting to allow looting AND trading in multiplayer games -- that would be great.
However, if not, I am simply placing this here to let everyone know that BlackMarket2 trade mod is not compatible with the "neutral chests" multiplayer setting.
The text was updated successfully, but these errors were encountered: