-- On Init - only runs once the first
-- time the game starts
script.on_init(function(event)
storage.ocfg = {}
storage.ocfg.notify_assembler_explode_notification = {} -- players
storage.ocfg.assembler_explodes = true
storage.ocfg.surface_index = 1
storage.ocfg.assembling_machine = {}
end)
script.on_load(function(event)
end)
script.on_configuration_changed(function(event)
if storage.ocfg then
if storage.ocfg.bno_assembler_explodes ~= nil then
storage.ocfg.assembler_explodes = storage.ocfg.bno_assembler_explodes
storage.ocfg.bno_assembler_explodes = nil
end
if storage.ocfg.assembling_machine_bno ~= nil then
storage.ocfg.assembling_machine = storage.ocfg.assembling_machine_bno
storage.ocfg.assembling_machine_bno = nil
end
end
end)
script.on_event(defines.events.on_player_joined_game, function(event)
if (not script.active_mods["brave-new-oarc"]) and #game.forces[event.player_index].players < 1 then
game.players[event.player_index].force.share_chart = true -- this should be on by default for every player. BNO enables turning it on/off
end
end)