Skip to content

fix(ranked): use require for lovely version check#361

Closed
stephenkirk wants to merge 2 commits intomainfrom
fix-lovely-version-check
Closed

fix(ranked): use require for lovely version check#361
stephenkirk wants to merge 2 commits intomainfrom
fix-lovely-version-check

Conversation

@stephenkirk
Copy link
Member

@stephenkirk stephenkirk commented Feb 24, 2026

Why

lovely is a preloaded module, not a global. The existing check (lovely and lovely.version) always evaluates to nil, so the version gate never actually works.

What this does

pcall(require, "lovely") to safely load the module in both ranked.lua and legacy_ranked.lua. Falls back to "" if lovely isn't available.

Test plan

  • Correct lovely version — ranked enabled
  • Wrong lovely version — shows version mismatch
  • Same for legacy ranked
  • SMODS version check still works independently

@V-rtualized
Copy link
Collaborator

I actually make a commit for this last night and forgot to push the change, but it is live with PreRelease 2, and should be on main now

@stephenkirk stephenkirk closed this Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants