From 777aa0ca755c170ba2b87ee0b9c95cf39e0c7b3a Mon Sep 17 00:00:00 2001 From: Emik Date: Thu, 5 Feb 2026 11:33:53 +0100 Subject: [PATCH] Migrate to SMODS.set_scoring_calculation --- manifest.json | 2 +- src/blind.lua | 38 +------------------------------------- 2 files changed, 2 insertions(+), 38 deletions(-) diff --git a/manifest.json b/manifest.json index 78d40d9..5515b92 100644 --- a/manifest.json +++ b/manifest.json @@ -17,5 +17,5 @@ "conflicts": [ "Jen" ], - "version": "1.5.19" + "version": "1.5.20" } \ No newline at end of file diff --git a/src/blind.lua b/src/blind.lua index 49d840c..96d1832 100644 --- a/src/blind.lua +++ b/src/blind.lua @@ -7,12 +7,6 @@ SMODS.Atlas { path = Jane.config.texture_pack .. "/bl_jane_blinds.png", } -local final_operations = { - [1] = {"+", "UI_CHIPS"}, - [2] = {"X", "UI_MULT"}, - [3] = {"^", G.C.jane_RGB}, -} - local function offset_operator(by) local function set(number) if G.GAME then @@ -23,37 +17,7 @@ local function offset_operator(by) local previous = Jane.get_operator() set(by + previous) by = Jane.get_operator() - local txt = final_operations[by][1] ---@diagnostic disable-next-line: cast-local-type - local col = type(final_operations[by][2]) == "table" and final_operations[by][2] or G.C[final_operations[by][2]] - - Jane.q(function() - local changed_text = false - - for _, outer in pairs(G.STAGE_OBJECTS) do - if type(outer) == "table" then - for _, inner in pairs(outer) do - if type(inner) == "table" and - type(inner.config) == "table" and - (inner.config.text == final_operations[previous][1] or - inner.config.text == final_operations[2][1]) and - inner.config.text_drawable then - if inner.config.text ~= txt then - changed_text = true - end - - inner.config.text = txt - inner.config.text_drawable:set(txt) - inner.config.colour = col - inner:juice_up(0.8, 0.5) - end - end - end - end - - if changed_text then - play_sound("button", 1.1, 0.65) - end - end) + SMODS.set_scoring_calculation(({"add", "multiply", "exponent"})[by]) end local function to_number(x)