1/2 revert revert, xd, bruh
This commit is contained in:
109
.emmyrc.json
109
.emmyrc.json
@@ -1,18 +1,27 @@
|
|||||||
{
|
{
|
||||||
|
"codeAction": {
|
||||||
|
"insertSpace": false
|
||||||
|
},
|
||||||
|
"codeLens": {
|
||||||
|
"enable": true
|
||||||
|
},
|
||||||
"completion": {
|
"completion": {
|
||||||
"enable": true,
|
|
||||||
"autoRequire": false,
|
"autoRequire": false,
|
||||||
"autoRequireFunction": "require",
|
"autoRequireFunction": "require",
|
||||||
"autoRequireNamingConvention": "keep",
|
"autoRequireNamingConvention": "keep",
|
||||||
"autoRequireSeparator": ".",
|
"autoRequireSeparator": ".",
|
||||||
"callSnippet": false,
|
"callSnippet": false,
|
||||||
|
"enable": true,
|
||||||
"postfix": "@"
|
"postfix": "@"
|
||||||
},
|
},
|
||||||
"diagnostics": {
|
"diagnostics": {
|
||||||
|
"diagnosticInterval": 1,
|
||||||
"disable": [
|
"disable": [
|
||||||
"unnecessary-if"
|
"unnecessary-if",
|
||||||
|
"redefined-local"
|
||||||
],
|
],
|
||||||
"enable": true,
|
"enable": true,
|
||||||
|
"enables": [],
|
||||||
"globals": [
|
"globals": [
|
||||||
"core",
|
"core",
|
||||||
"table",
|
"table",
|
||||||
@@ -23,58 +32,19 @@
|
|||||||
"string",
|
"string",
|
||||||
"string_utf8"
|
"string_utf8"
|
||||||
],
|
],
|
||||||
"globalsRegex": [],
|
"globalsRegex": []
|
||||||
"severity": {},
|
|
||||||
"enables": [],
|
|
||||||
"diagnosticInterval": 1
|
|
||||||
},
|
},
|
||||||
"signature": {
|
"documentColor": {
|
||||||
"detailSignatureHelper": true
|
"enable": true
|
||||||
},
|
},
|
||||||
"hint": {
|
"hint": {
|
||||||
"enable": true,
|
"enable": true,
|
||||||
"paramHint": true,
|
|
||||||
"indexHint": true,
|
"indexHint": true,
|
||||||
"localHint": true,
|
"localHint": true,
|
||||||
"overrideHint": true
|
"overrideHint": true,
|
||||||
|
"paramHint": true
|
||||||
},
|
},
|
||||||
"runtime": {
|
"hover": {
|
||||||
"version": "LuaJIT",
|
|
||||||
"requireLikeFunction": [],
|
|
||||||
"frameworkVersions": [],
|
|
||||||
"extensions": [],
|
|
||||||
"requirePattern": [],
|
|
||||||
"classDefaultCall": {
|
|
||||||
"functionName": "",
|
|
||||||
"forceNonColon": false,
|
|
||||||
"forceReturnSelf": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"workspace": {
|
|
||||||
"ignoreDir": [],
|
|
||||||
"ignoreGlobs": [],
|
|
||||||
"library": [],
|
|
||||||
"workspaceRoots": [],
|
|
||||||
"preloadFileSize": 0,
|
|
||||||
"encoding": "utf-8",
|
|
||||||
"moduleMap": [],
|
|
||||||
"reindexDuration": 5000,
|
|
||||||
"enableReindex": false
|
|
||||||
},
|
|
||||||
"resource": {
|
|
||||||
"paths": []
|
|
||||||
},
|
|
||||||
"codeLens": {
|
|
||||||
"enable": true
|
|
||||||
},
|
|
||||||
"strict": {
|
|
||||||
"requirePath": false,
|
|
||||||
"typeCall": false,
|
|
||||||
"arrayIndex": true,
|
|
||||||
"metaOverrideFileDefine": true,
|
|
||||||
"docBaseConstMatchBaseType": true
|
|
||||||
},
|
|
||||||
"semanticTokens": {
|
|
||||||
"enable": true
|
"enable": true
|
||||||
},
|
},
|
||||||
"references": {
|
"references": {
|
||||||
@@ -82,16 +52,45 @@
|
|||||||
"fuzzySearch": true,
|
"fuzzySearch": true,
|
||||||
"shortStringSearch": false
|
"shortStringSearch": false
|
||||||
},
|
},
|
||||||
"hover": {
|
"resource": {
|
||||||
|
"paths": []
|
||||||
|
},
|
||||||
|
"runtime": {
|
||||||
|
"classDefaultCall": {
|
||||||
|
"forceNonColon": false,
|
||||||
|
"forceReturnSelf": false,
|
||||||
|
"functionName": ""
|
||||||
|
},
|
||||||
|
"extensions": [],
|
||||||
|
"frameworkVersions": [],
|
||||||
|
"requireLikeFunction": [],
|
||||||
|
"requirePattern": [],
|
||||||
|
"version": "LuaJIT"
|
||||||
|
},
|
||||||
|
"semanticTokens": {
|
||||||
"enable": true
|
"enable": true
|
||||||
},
|
},
|
||||||
"documentColor": {
|
"signature": {
|
||||||
"enable": true
|
"detailSignatureHelper": true
|
||||||
},
|
},
|
||||||
"codeAction": {
|
"strict": {
|
||||||
"insertSpace": false
|
"arrayIndex": true,
|
||||||
|
"docBaseConstMatchBaseType": true,
|
||||||
|
"metaOverrideFileDefine": true,
|
||||||
|
"requirePath": false,
|
||||||
|
"typeCall": false
|
||||||
},
|
},
|
||||||
"workspace.library": [
|
"workspace": {
|
||||||
|
"enableReindex": false,
|
||||||
|
"encoding": "utf-8",
|
||||||
|
"ignoreDir": [],
|
||||||
|
"ignoreGlobs": [],
|
||||||
|
"library": [
|
||||||
"util/ide-helper"
|
"util/ide-helper"
|
||||||
]
|
],
|
||||||
}
|
"moduleMap": [],
|
||||||
|
"preloadFileSize": 0,
|
||||||
|
"reindexDuration": 5000,
|
||||||
|
"workspaceRoots": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
---@field name string Technical name of the mod.
|
---@field name string Technical name of the mod.
|
||||||
---@field shortName string
|
---@field shortName string
|
||||||
---@field path string Path to the mod folder.
|
---@field path string Path to the mod folder.
|
||||||
---@field Class table A public class that provides a mod.
|
---@field Class any A public class that provides a mod.
|
||||||
---@field require fun(FileName:string):table
|
---@field require fun(FileName:string):table
|
||||||
Mod = {}
|
Mod = {}
|
||||||
|
|
||||||
@@ -17,9 +17,10 @@ local function getShortModName(name)
|
|||||||
end
|
end
|
||||||
|
|
||||||
---Return table with mod name, path and require function.
|
---Return table with mod name, path and require function.
|
||||||
|
---@param modname? string Specify a name of mod to get its info
|
||||||
---@return {name: string, shortName: string, path: string, require: fun(FileName : string): table}
|
---@return {name: string, shortName: string, path: string, require: fun(FileName : string): table}
|
||||||
function Mod.getInfo()
|
function Mod.getInfo(modname)
|
||||||
local name = core.get_current_modname()
|
local name = modname or core.get_current_modname()
|
||||||
local shortName = getShortModName(name)
|
local shortName = getShortModName(name)
|
||||||
local path = core.get_modpath(name)
|
local path = core.get_modpath(name)
|
||||||
local require = Require.getModRequire(name, path)
|
local require = Require.getModRequire(name, path)
|
||||||
@@ -61,4 +62,3 @@ function Mod:getModClassExtended(ChildClass)
|
|||||||
|
|
||||||
return childClass
|
return childClass
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user