Skip to content

Commit

Permalink
Lib:
Browse files Browse the repository at this point in the history
- Seem to have gotten rid of anymore [C](-1) showing up for RetName.

github@choggi.org
  • Loading branch information
ChoGGi committed Jan 5, 2025
1 parent b331eaf commit 2494cae
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 24 deletions.
58 changes: 35 additions & 23 deletions ChoGGi's Library/Code/CommonFunctions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ do -- RetName

local function AddFuncToList(key, value, name)
if not lookup_table[value] then

if type(value) == "function" then
if DebugGetInfo(value) == "[C](-1)" then
lookup_table[value] = name .. "." .. key .. " *C"
Expand Down Expand Up @@ -193,19 +194,19 @@ do -- RetName
AddFuncToList(key, value, name)
end
end
local func_tables = {
"g_CObjectFuncs", "camera", "camera3p", "cameraMax", "cameraRTS",
"coroutine", "lpeg", "pf", "string", "table", "UIL", "editor",
"terrain", "terminal", "TFormat", "XInput",
}
if what_game == "Mars" then
func_tables[#func_tables+1] = "DTM"
func_tables[#func_tables+1] = "srp"
end
--~ local func_tables = {
--~ "g_CObjectFuncs", "camera", "camera3p", "cameraMax", "cameraRTS",
--~ "pf", "string", "table", "UIL", "editor",
--~ "terrain", "terminal", "TFormat", "XInput",
--~ }
--~ if what_game == "Mars" then
--~ func_tables[#func_tables+1] = "DTM"
--~ func_tables[#func_tables+1] = "srp"
--~ end

for i = 1, #func_tables do
AddFuncs(func_tables[i])
end
--~ for i = 1, #func_tables do
--~ AddFuncs(func_tables[i])
--~ end

local values_lookup = {
"title",
Expand Down Expand Up @@ -260,18 +261,29 @@ do -- RetName
lookup_table[g.empty_func] = "empty_func"
lookup_table[g.terminal.desktop] = "terminal.desktop"

AddFuncs("lfs")
AddFuncs("debug")
AddFuncs("io")
AddFuncs("os")
AddFuncs("package")
AddFuncs("package.searchers")
-- I was calling these too early, so they mostly showed up as [C](-1)
local func_tables = {
"lfs", "debug", "coroutine", "lpeg", "io", "os", "package",
"package.searchers", "camera", "camera3p", "cameraMax",
"cameraRTS", "pf", "string", "table", "UIL", "editor", "terminal",
"XInput",
}
if what_game == "Mars" then
func_tables[#func_tables+1] = "DTM"
func_tables[#func_tables+1] = "srp"
end

for i = 1, #func_tables do
AddFuncs(func_tables[i])
end

-- ECM func names (some are added by ecm, so we want to update list when it's called again)
AddFuncsChoGGi("Common")
AddFuncsChoGGi("Console")
AddFuncsChoGGi("InfoPane")
AddFuncsChoGGi("Menus")
AddFuncsChoGGi("Settings")
func_tables = {
"Common", "Console", "InfoPane", "Menus", "Settings",
}
for i = 1, #func_tables do
AddFuncsChoGGi(func_tables[i])
end
AddFuncsChoGGi("Original", true)

for key, value in pairs(g.ChoGGi) do
Expand Down
2 changes: 1 addition & 1 deletion ChoGGi's Library/metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ return PlaceObj("ModDef", {
"Code/OnMsgs.lua",
-- added/replaced functions
"Code/Functions.lua",
-- LXSH: https://github.com/xolox/lua-lxsh
-- https://github.com/xolox/lua-lxsh
"Code/LXSH.lua",
-- CSV export funcs
"Code/CSV.lua",
Expand Down

0 comments on commit 2494cae

Please sign in to comment.