Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
A Balatro sound loader.

_Developed by: [Goldenleaf](https://golden-leaf.itch.io), [JoglaCraft](https://github.com/Joglacraft), [BepisFever](https://github.com/bepisfever)._

Note: Please check rhe [Github Wiki](https://github.com/Goldofleaves/Tonsmith/wiki) if you find yourself troubled when making a soundpack.
Binary file added assets/1x/default_soundpack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/2x/default_soundpack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions config.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
return {
soundpack_priority = {},
display_menu_button = true,
loaded_packs = {},
menu_button = true,
rows = 2,
c_rows = 6
cols = 6
}
39 changes: 0 additions & 39 deletions localization/default.lua

This file was deleted.

108 changes: 108 additions & 0 deletions localization/en-us.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
return{
descriptions = {
SoundPack = {
sp_tnsmi_fools_gambit = {
name = "Fool's Gambit",
text = {
"{X:chips,C:white}Author{}",
"{C:attention,E:1}GoldenLeaf{}"
}
},
sp_tnsmi_dummy1 = {
name = "Dummy 1",
text = {
"[Dummy Text]"
}
},
sp_tnsmi_dummy2 = {
name = "Dummy 2",
text = {
"[Dummy Text]"
}
},
sp_tnsmi_dummy3 = {
name = "Dummy 3",
text = {
"[Dummy Text]"
}
},
sp_tnsmi_dummy4 = {
name = "Dummy 4",
text = {
"[Dummy Text]"
}
},
sp_tnsmi_dummy5 = {
name = "Dummy 5",
text = {
"[Dummy Text]"
}
},
sp_tnsmi_dummy6 = {
name = "Dummy 6",
text = {
"[Dummy Text]"
}
},
sp_tnsmi_dummy7 = {
name = "Dummy 7",
text = {
"[Dummy Text]"
}
},
sp_tnsmi_dummy8 = {
name = "Dummy 8",
text = {
"[Dummy Text]"
}
},
sp_tnsmi_dummy9 = {
name = "Dummy 9",
text = {
"[Dummy Text]"
}
},
sp_tnsmi_dummy10 = {
name = "Dummy 10",
text = {
"[Dummy Text]"
}
},
sp_tnsmi_dummy11 = {
name = "Dummy 11",
text = {
"[Dummy Text]"
}
},
}
},
misc = {
dictionary = {
-- config
k_soundpack = 'Sound Pack',
b_remove = 'Remove',
tnsmi_cfg_soundpack_manager = "Open soundpack manager",
tnsmi_cfg_rows = "Rows to display",
tnsmi_cfg_cols = "Packs per row",

-- manager
tnsmi_manager_pause = "Soundpacks",
tnsmi_manager_display_in_pause = "Display in pause menu",
tnsmi_manager_selected = "SELECTED",
tnsmi_manager_loaded = "DRAG FOR PRIORITY",
tnsmi_manager_click_select = "CLICK TO SELECT",
tnsmi_manager_active = "Soundpacks active",
tnsmi_manager_installed = "Soundpacks installed",

-- misc
tnsmi_filter_label = "FILTER",
tnsmi_close = "Close",
tnsmi_options = "Options",
tnsmi_version_label = "Version",

},
v_dictionary = {
tnsmi_search_text = "Showing #1#-#2# of #3# results"
}
},
}
28 changes: 0 additions & 28 deletions lovely/cardarea.toml

This file was deleted.

2 changes: 1 addition & 1 deletion lovely/malverk_override.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pattern = '''customize = {n=G.UIT.R, config={minw = 5, align='cl'}, nodes = {
}}'''
position = "after"
payload = '''
if Malverk and TNSMI and TNSMI.mod_config.display_menu_button then
if Malverk and TNSMI and TNSMI.config.menu_button then
customize = {n=G.UIT.R, config={minw = 5, align='cl'}, nodes = {
UIBox_button{ label = {localize('b_deck_skins')}, col = true, button = "customize_deck", minw = 3.4},
{ n = G.UIT.C, config = {minw = 0.2}},
Expand Down
21 changes: 0 additions & 21 deletions lovely/text_input.toml

This file was deleted.

15 changes: 15 additions & 0 deletions lovely/ui.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0

[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = '''customize,
credits'''
position = "at"
payload = '''customize,
UIBox_button{ label = {localize("tnsmi_manager_pause")}, button = "TNSMI_packs_button", minw = 5, colour = G.C.RED},
credits'''
match_indent = true
126 changes: 94 additions & 32 deletions main.lua
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
TNSMI = {
CARDAREAS = {},
row = 2,
card_per_row = 6,
page = 1,
max_pages = 1,
pagecounter = 0,
prompt_text_input = "",
menu_mod = "base",
mod_config = SMODS.current_mod.config,
filterpacks = {}
}
TNSMI = SMODS.current_mod
TNSMI.config.loaded_packs.replace_map = {}
TNSMI.cardareas = {}
TNSMI.prompt_text_input = ''
TNSMI.search_text = ''
SMODS.Atlas{key = "modicon", path = "modicon.png", px = 32, py = 32}

G.C.SECONDARY_SET.SoundPack = HEX("56A887")

local mod_contents = {
"utils",
"overrides",
Expand All @@ -21,20 +16,10 @@ local mod_contents = {
for k, v in pairs(mod_contents) do
assert(SMODS.load_file('/src/'..v..'.lua'))()
end
TNSMI.Pack{
name = "Fool's Gambit",
description = {
{
lan = 'en-us',
text = {
"This is the SFX Used in",
"Fool's Gambit."
},
},
},
mods = {"Vanilla"},
authors = {"GoldenLeaf"},
thumbnail = "thumb",

TNSMI.SoundPack({
key = 'fools_gambit',
atlas = 'thumb',
sound_table = {
{ key = "ambientFire1" },
{ key = "ambientFire2" },
Expand Down Expand Up @@ -111,10 +96,87 @@ TNSMI.Pack{
{ key = "whoosh1" },
{ key = "whoosh2" },
{ key = "win" },
{ key = "music1" , file = "main", pitch = 1},
{ key = "music2" , file = "arcana", pitch = 1},
{ key = "music3" , file = "celestial", pitch = 1},
{ key = "music4" , file = "shop", pitch = 1},
{ key = "music5" , file = "boss", pitch = 1}
{ key = "music1", path = 'main.ogg', pitch = 1},
{ key = "music2", path = 'arcana.ogg', pitch = 1},
{ key = "music3", path = 'celestial.ogg', pitch = 1},
{ key = "music4", path = 'shop.ogg', pitch = 1},
{ key = "music5", path = 'boss.ogg', pitch = 1}
},
})

TNSMI.SoundPack({
key = 'dummy1',
sound_table = {
{ key = "ambientFire1" },
},
})

TNSMI.SoundPack({
key = 'dummy2',
sound_table = {
{ key = "ambientFire1" },
},
})

TNSMI.SoundPack({
key = 'dummy3',
sound_table = {
{ key = "ambientFire1" },
},
})

TNSMI.SoundPack({
key = 'dummy4',
sound_table = {
{ key = "ambientFire1" },
},
})


TNSMI.SoundPack({
key = 'dummy5',
sound_table = {
{ key = "ambientFire1" },
},
})
TNSMI.SoundPack({
key = 'dummy6',
sound_table = {
{ key = "ambientFire1" },
},
})

TNSMI.SoundPack({
key = 'dummy7',
sound_table = {
{ key = "ambientFire1" },
},
}
})

TNSMI.SoundPack({
key = 'dummy8',
sound_table = {
{ key = "ambientFire1" },
},
})

TNSMI.SoundPack({
key = 'dummy9',
sound_table = {
{ key = "ambientFire1" },
},
})

TNSMI.SoundPack({
key = 'dummy10',
sound_table = {
{ key = "ambientFire1" },
},
})

local ref_post_splash = G.FUNCS.initPostSplash or function() end
G.FUNCS.initPostSplash = function()
local ret = ref_post_splash()
TNSMI.save_soundpacks()
return ret
end
Loading