Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 24 additions & 18 deletions Cryptid.lua
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!
18 changes: 2 additions & 16 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
'''
]]