You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A plugin to allow [ReturnOfModding](https://github.com/SGG-Modding/Hell2Modding) plugins greater control of their environment, helpful when you need to share information between multiple files in your plugin.
2
+
A plugin to allow ReturnOfModding plugins greater control of their environment, helpful when you need to share information between multiple files in your plugin.
---@paramenvtable environment (typically a plugin)
114
-
---@paramfileSGG_Modding-ENVY*file path relative to plugin, absolute path, file handle, chunk function, or module table
114
+
---@paramfileLuaENVY-ENVY*file path relative to plugin, absolute path, file handle, chunk function, or module table
115
115
---@paramfenvtable? environment to give the function (not relevant if a module table was given)
116
116
---@paramlevelinteger? stack level to send errors to <br/>
117
117
functionenvy.import_as_shared(env,file,fenv,level,...) end
118
-
---@aliasSGG_Modding-ENVY.import_as_shared...
118
+
---@aliasLuaENVY-ENVY.import_as_shared...
119
119
120
120
--[[
121
121
The extras are:
@@ -128,11 +128,11 @@ function envy.import_as_shared(env,file,fenv,level,...) end
128
128
local _ENV, ext = setup(_ENV)
129
129
import_all(_ENV,ext)
130
130
--]]
131
-
---@classSGG_Modding-ENVY*extras:table
132
-
---@fieldpublicimport fun(file: SGG_Modding-ENVY*file, fenv: table?,...): table loads a lua file/module relative to *your* plugin.
133
-
---@fieldpublicimport_all fun(file: SGG_Modding-ENVY*file, fenv: table?,...) uses `import` to get the data from a lua file/module (shallow copied into *your* environment).
134
-
---@fieldpublicimport_as_shared fun(file: SGG_Modding-ENVY*file, fenv: table?,...) uses `import` to get the data from a lua file/module (as fallback to *your* environment).
135
-
---@fieldpublicimport_as_fallback fun(file: SGG_Modding-ENVY*file, fenv: table?,...) uses `import` to get the data from a lua file/module (as a fallback with linked writes from *your* environment).
131
+
---@classLuaENVY-ENVY*extras:table
132
+
---@fieldpublicimport fun(file: LuaENVY-ENVY*file, fenv: table?,...): table loads a lua file/module relative to *your* plugin.
133
+
---@fieldpublicimport_all fun(file: LuaENVY-ENVY*file, fenv: table?,...) uses `import` to get the data from a lua file/module (shallow copied into *your* environment).
134
+
---@fieldpublicimport_as_shared fun(file: LuaENVY-ENVY*file, fenv: table?,...) uses `import` to get the data from a lua file/module (as fallback to *your* environment).
135
+
---@fieldpublicimport_as_fallback fun(file: LuaENVY-ENVY*file, fenv: table?,...) uses `import` to get the data from a lua file/module (as a fallback with linked writes from *your* environment).
136
136
---@fieldpublicexport fun(binder: function|integer?): result: table exports locals by using a function bound to them as upvalues.
137
137
---@fieldpublicprivate table the new 'private' environment
138
138
---@fieldpublicpublic table the original 'public' environment
@@ -160,28 +160,28 @@ function envy.import_as_shared(env,file,fenv,level,...) end
160
160
local _ENV, ext = setup(_ENV)
161
161
import_all(_ENV,ext)
162
162
--]]
163
-
---@seeSGG_Modding-ENVY*extras
164
-
---@seeSGG_Modding-ENVY.auto
165
-
---@seeSGG_Modding-ENVY.import_all
163
+
---@seeLuaENVY-ENVY*extras
164
+
---@seeLuaENVY-ENVY.auto
165
+
---@seeLuaENVY-ENVY.import_all
166
166
---@returntable newenv
167
-
---@returnSGG_Modding-ENVY*extras extras
167
+
---@returnLuaENVY-ENVY*extras extras
168
168
functionenvy.setup(env) end
169
-
---@aliasSGG_Modding-ENVY.setup...
169
+
---@aliasLuaENVY-ENVY.setup...
170
170
171
171
--[[
172
172
Finds the caller (at the stack `level`) to `setup` its environment and `import` all `extras`.
0 commit comments