Code: Select all
my_force.set_cease_fire(their_force, true)
Something like:
Code: Select all
my_force.set_interaction_permission(their_force, true)
Right now, I'm using a small workaround for trading:
Code: Select all
-- some entities are always neutral to allow for inter-faction trading
always_neutral = {
"wooden-chest",
"cargo-wagon",
-- "diesel-locomotive",
"straight-rail",
"curved-rail",
}
script.on_event(defines.events.on_built_entity, function (event)
local entity = event.created_entity
for _,neutral_entity in ipairs(always_neutral) do
if (entity.name == neutral_entity) then
entity.force = "neutral"
return
end
end
end)