Skip to content

Commit

Permalink
Merge pull request #141 from JasonLandbridge/remote_interface_export
Browse files Browse the repository at this point in the history
Interface for exporting saved YARM global data
  • Loading branch information
narc0tiq authored Feb 28, 2022
2 parents 4f490c7 + 3c8d406 commit 1a56c28
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ require "remote"
-- if this ever happens, I'll be enormously surprised
if not resmon then error("{{MOD_NAME}} has become badly corrupted: the variable resmon should've been set!") end

-- Enable Lua API global Variable Viewer
-- https://mods.factorio.com/mod/gvv
if script.active_mods["gvv"] then
require("__gvv__.gvv")()
end

script.on_init(resmon.init_globals)
script.on_configuration_changed(resmon.init_globals)

Expand Down
4 changes: 4 additions & 0 deletions remote.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,8 @@ function interface.get_on_site_updated_event_id()
return on_site_updated
end

function interface.get_global_data()
return global
end

remote.add_interface("YARM", interface)

0 comments on commit 1a56c28

Please sign in to comment.