1/2 revert revert, xd, bruh

This commit is contained in:
Van
2025-10-29 20:08:04 +03:00
parent ec3cde237c
commit 3306941c43
3 changed files with 101 additions and 102 deletions

View File

@@ -1,97 +1,96 @@
{
"completion": {
"enable": true,
"autoRequire": false,
"autoRequireFunction": "require",
"autoRequireNamingConvention": "keep",
"autoRequireSeparator": ".",
"callSnippet": false,
"postfix": "@"
},
"diagnostics": {
"disable": [
"unnecessary-if"
],
"enable": true,
"globals": [
"core",
"table",
"VoxelArea",
"VoxelManip",
"vector",
"Ensure",
"string",
"string_utf8"
],
"globalsRegex": [],
"severity": {},
"enables": [],
"diagnosticInterval": 1
},
"signature": {
"detailSignatureHelper": true
},
"hint": {
"enable": true,
"paramHint": true,
"indexHint": true,
"localHint": true,
"overrideHint": true
},
"runtime": {
"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
},
"references": {
"enable": true,
"fuzzySearch": true,
"shortStringSearch": false
},
"hover": {
"enable": true
},
"documentColor": {
"enable": true
},
"codeAction": {
"insertSpace": false
},
"workspace.library": [
"util/ide-helper"
]
}
"codeAction": {
"insertSpace": false
},
"codeLens": {
"enable": true
},
"completion": {
"autoRequire": false,
"autoRequireFunction": "require",
"autoRequireNamingConvention": "keep",
"autoRequireSeparator": ".",
"callSnippet": false,
"enable": true,
"postfix": "@"
},
"diagnostics": {
"diagnosticInterval": 1,
"disable": [
"unnecessary-if",
"redefined-local"
],
"enable": true,
"enables": [],
"globals": [
"core",
"table",
"VoxelArea",
"VoxelManip",
"vector",
"Ensure",
"string",
"string_utf8"
],
"globalsRegex": []
},
"documentColor": {
"enable": true
},
"hint": {
"enable": true,
"indexHint": true,
"localHint": true,
"overrideHint": true,
"paramHint": true
},
"hover": {
"enable": true
},
"references": {
"enable": true,
"fuzzySearch": true,
"shortStringSearch": false
},
"resource": {
"paths": []
},
"runtime": {
"classDefaultCall": {
"forceNonColon": false,
"forceReturnSelf": false,
"functionName": ""
},
"extensions": [],
"frameworkVersions": [],
"requireLikeFunction": [],
"requirePattern": [],
"version": "LuaJIT"
},
"semanticTokens": {
"enable": true
},
"signature": {
"detailSignatureHelper": true
},
"strict": {
"arrayIndex": true,
"docBaseConstMatchBaseType": true,
"metaOverrideFileDefine": true,
"requirePath": false,
"typeCall": false
},
"workspace": {
"enableReindex": false,
"encoding": "utf-8",
"ignoreDir": [],
"ignoreGlobs": [],
"library": [
"util/ide-helper"
],
"moduleMap": [],
"preloadFileSize": 0,
"reindexDuration": 5000,
"workspaceRoots": []
}
}

View File

@@ -3,7 +3,7 @@
---@field name string Technical name of the mod.
---@field shortName string
---@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
Mod = {}
@@ -17,9 +17,10 @@ local function getShortModName(name)
end
---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}
function Mod.getInfo()
local name = core.get_current_modname()
function Mod.getInfo(modname)
local name = modname or core.get_current_modname()
local shortName = getShortModName(name)
local path = core.get_modpath(name)
local require = Require.getModRequire(name, path)
@@ -61,4 +62,3 @@ function Mod:getModClassExtended(ChildClass)
return childClass
end

View File

@@ -1,5 +1,5 @@
local modInfo = Mod.getInfo()
local require = modInfo.require
local modInfo = Mod.getInfo()
local require = modInfo.require
local VisualEnum = require('Item.VisualEnum')