diff --git a/Cryptid.lua b/Cryptid.lua index ac63fe921..bd4e3b47c 100644 --- a/Cryptid.lua +++ b/Cryptid.lua @@ -1,10 +1,10 @@ -- Welcome to the Cryptid source code! -- This is the main file for the mod, where everything is loaded and initialized. --- If you're looking for a specific feature, browse the items folder to see how it is implemented. --- If you're looking for a specific function, check the lib folder to see if it is there. +-- If you're looking for a specific feature (like jokers or consumables), browse the items folder to see how it is implemented. +-- If you're looking for a specific function (like ascended hands or https), check the lib folder to see if it is there. if not Cryptid then - Cryptid = {} + Cryptid = {} -- if it works it works end local mod_path = "" .. SMODS.current_mod.path -- this path changes when each mod is loaded, but the local variable will retain Cryptid's path Cryptid.path = mod_path @@ -32,12 +32,14 @@ SMODS.current_mod.optional_features = { --Load Library Files local files = NFS.getDirectoryItems(mod_path .. "lib") for _, file in ipairs(files) do - print("[CRYPTID] Loading library file " .. file) - local f, err = SMODS.load_file("lib/" .. file) - if err then - error(err) --Steamodded actually does a really good job of displaying this info! So we don't need to do anything else. + if string.match(file, "%.lua$") then -- fix the index local ret thing cuz its annoying when other files exist and cryptid tries to read em + print("[CRYPTID] Loading library file " .. file) + local f, err = SMODS.load_file("lib/" .. file) + if err then + error(err) --Steamodded actually does a really good job of displaying this info! So we don't need to do anything else. + end + f() end - f() end local function process_items(f, mod) local ret = f() @@ -110,12 +112,14 @@ Cryptid.object_registry = {} Cryptid.object_buffer = {} local files = NFS.getDirectoryItems(mod_path .. "items") for _, file in ipairs(files) do - print("[CRYPTID] Loading file " .. file) - local f, err = SMODS.load_file("items/" .. file) - if err then - error(err) --Steamodded actually does a really good job of displaying this info! So we don't need to do anything else. + if string.match(file, "%.lua$") then -- fix the index local ret thing cuz its annoying when other files exist and cryptid tries to read em + print("[CRYPTID] Loading file " .. file) + local f, err = SMODS.load_file("items/" .. file) + if err then + error(err) --Steamodded actually does a really good job of displaying this info! So we don't need to do anything else. + end + process_items(f) end - process_items(f) end -- Check for files in other mods @@ -137,12 +141,14 @@ for _, mod in pairs(SMODS.Mods) do if file == "Cryptid" and path .. "Cryptid/" ~= Cryptid.path then local files = NFS.getDirectoryItems(path .. "Cryptid") for _, file in ipairs(files) do - print("[CRYPTID] Loading file " .. file .. " from " .. mod.id) - local f, err = SMODS.load_file("Cryptid/" .. file, mod.id) - if err then - error(err) --Steamodded actually does a really good job of displaying this info! So we don't need to do anything else. + if string.match(file, "%.lua$") then + print("[CRYPTID] Loading file " .. file .. " from " .. mod.id) + local f, err = SMODS.load_file("Cryptid/" .. file, mod.id) + if err then + error(err) --Steamodded actually does a really good job of displaying this info! So we don't need to do anything else. + end + process_items(f, mod) end - process_items(f, mod) end end end diff --git a/README.md b/README.md index d19e5172c..844e579fc 100644 --- a/README.md +++ b/README.md @@ -46,5 +46,5 @@ Talisman may not be configured to be on **Omeganum** mode, which has a maximum l > *I've experienced a crash/bug!* -Be sure to give us as much information about the bug/crash as possible. A way to reproduce the bug/crash is also especially useful information to help us fix it. +Be sure to give us as much information about the bug/crash as possible in our [Discord](https://discord.com/invite/eUf9Ur6RyB). A way to reproduce the bug/crash is also especially useful information to help us fix it. Remember; just saying you're crashing doesn't tell us anything. We need to know the details! diff --git a/config.lua b/config.lua index c3d5d3b24..af48d1bed 100644 --- a/config.lua +++ b/config.lua @@ -8,21 +8,7 @@ return { }, ["family_mode"] = false, -- removes f*ck ["experimental"] = false, -- experimental stuff - ["force_tooltips"] = true, -- acivates lovely patch to always show the desc + ["force_tooltips"] = true, -- acivates lovely patch to always show the desc of jokers and stuff ["HTTPS"] = true, -- your internet connection - ["menu"] = true, -- 99% sure it makes the ace of spades in the menu glitched + ["menu"] = true, -- Restart game and the main menu is now blue } --- force tooltips: ---[[ -# Make description UI always appear if card is highlighted -[[patches]] ---[[ -[patches.pattern] -target = "engine/node.lua" -pattern = "if self.children.h_popup then" -position = 'at' -match_indent = true -payload = ''' -if self.children.h_popup and not (self.force_popup and self:force_popup() and Cryptid["force_tooltips"]) then -''' -]]