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

View File

@@ -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

View File

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