Initial commit

This commit is contained in:
2026-03-15 14:54:49 +03:00
commit 64f8029c06
4027 changed files with 254888 additions and 0 deletions

32
lua/menu/util.lua Normal file
View File

@@ -0,0 +1,32 @@
concommand.Add( "whereis", function( _, _, _, path )
local absolutePath = util.RelativePathToFull_Menu( path, "GAME" )
if ( !absolutePath or !file.Exists( path, "GAME" ) ) then
MsgN( "File not found: ", path )
return
end
local relativePath = util.FullPathToRelative_Menu( absolutePath, "MOD" )
-- If the relative path is inside the workshop dir, it's part of a workshop addon
if ( relativePath && relativePath:match( "^workshop[\\/].*" ) ) then
local addonInfo = util.RelativePathToGMA_Menu( path )
-- Not here? Maybe somebody just put their own file in ./workshop
if ( addonInfo ) then
local addonRelativePath = util.RelativePathToFull_Menu( addonInfo.File )
MsgN( "'", addonInfo.Title, "' - ", addonRelativePath or addonInfo.File )
return
end
end
MsgN( absolutePath )
end, nil, "Searches for the highest priority instance of a file within the GAME mount path." )