Add sound and improve quality-of-life

This commit is contained in:
Emik 2026-06-05 20:31:49 +02:00
parent 3967afba48
commit 66a1a62cad
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
8 changed files with 31 additions and 11 deletions

BIN
assets/1x/unicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
assets/2x/unicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

BIN
assets/sounds/phone.ogg Executable file

Binary file not shown.

View file

@ -1,4 +1,5 @@
return { return {
animated_icon = true,
equinox_assist = false, equinox_assist = false,
faster_planets = false, faster_planets = false,
harsh_ante_scaling = false, harsh_ante_scaling = false,

View file

@ -436,6 +436,7 @@ return {
}, },
v_dictionary = { v_dictionary = {
b_Roland_add = "ADD", b_Roland_add = "ADD",
b_Roland_animated_icon = "Animated Icon (requires restart)",
b_Roland_bye = "Bye!", b_Roland_bye = "Bye!",
b_Roland_comma = ", ", b_Roland_comma = ", ",
b_Roland_debuffed = "DEBUFFED", b_Roland_debuffed = "DEBUFFED",

View file

@ -3,7 +3,7 @@
"id": "Roland", "id": "Roland",
"name": "Roland", "name": "Roland",
"prefix": "Roland", "prefix": "Roland",
"version": "2.8.14", "version": "2.8.15",
"badge_colour": "8BE9FD", "badge_colour": "8BE9FD",
"display_name": "Roland", "display_name": "Roland",
"main_file": "src/main.lua", "main_file": "src/main.lua",

View file

@ -8,10 +8,15 @@ SMODS.Atlas {
py = 68, py = 68,
} }
SMODS.Sound {
key = "phone",
path = "phone.ogg",
}
local charm = (function() local charm = (function()
local x = 0 local x = 0
---@param tbl SMODS.Joker|{alerted?: boolean} ---@param tbl SMODS.Joker|{alerted?: boolean, equip?: fun(self: self, card: Card)}
return function(tbl) return function(tbl)
q(function() q(function()
local current_mod = SMODS.current_mod local current_mod = SMODS.current_mod
@ -22,8 +27,18 @@ local charm = (function()
tbl.unlocked = true tbl.unlocked = true
tbl.discovered = true tbl.discovered = true
tbl.pos = {x = x, y = 0} tbl.pos = {x = x, y = 0}
x = x + 1
tbl.atlas = "charm" tbl.atlas = "charm"
x = x + 1
local orig_equip = tbl.equip
function tbl.equip(...)
play_sound("Roland_phone", 1, 0.5)
if orig_equip then
return orig_equip(...)
end
end
local charm = Bakery_API.Charm(tbl) local charm = Bakery_API.Charm(tbl)
charm:inject() charm:inject()

View file

@ -49,14 +49,16 @@ local function toggle(id)
} }
end end
local animated = SMODS.Mods.Roland.config.animated_icon
SMODS.Atlas { SMODS.Atlas {
px = 256, px = 256,
py = 256, py = 256,
fps = 12,
frames = 12,
key = "modicon", key = "modicon",
path = "icon.png", fps = animated and 12 or nil,
atlas_table = "ANIMATION_ATLAS", frames = animated and 12 or nil,
path = animated and "icon.png" or "unicon.png",
atlas_table = animated and "ANIMATION_ATLAS" or "ASSET_ATLAS",
} }
SMODS.current_mod.qol = qol SMODS.current_mod.qol = qol
@ -69,13 +71,14 @@ function SMODS.current_mod.config_tab()
n = G.UIT.C, n = G.UIT.C,
config = {minw = 1, minh = 1, align = "tl", padding = 0.1, colour = G.C.CLEAR}, config = {minw = 1, minh = 1, align = "tl", padding = 0.1, colour = G.C.CLEAR},
nodes = { nodes = {
toggle "animated_icon",
toggle "faster_planets", toggle "faster_planets",
toggle "illusion_seal",
toggle "no_wild_debuff",
_G["Talisman"] and toggle "harsh_ante_scaling", _G["Talisman"] and toggle "harsh_ante_scaling",
G.P_CENTERS.c_Bakery_Scribe and toggle "scribable_basket", toggle "illusion_seal",
toggle "equinox_assist",
SMODS.Mods.DebugPlus and toggle "import_funky", SMODS.Mods.DebugPlus and toggle "import_funky",
toggle "no_wild_debuff",
toggle "equinox_assist",
G.P_CENTERS.c_Bakery_Scribe and toggle "scribable_basket",
}, },
}}, }},
} }