diff --git a/src/Profile.cpp b/src/Profile.cpp index 44d048a070..ae8f9c55d7 100644 --- a/src/Profile.cpp +++ b/src/Profile.cpp @@ -3870,7 +3870,15 @@ class LunaScoreGoal : public Luna return 1; } - static int SetPriority(T* p, lua_State *L) { p->priority = IArg(1); return 1; } + static int SetPriority(T* p, lua_State *L) { + if (!p->achieved) { + int newpriority = IArg(1); + CLAMP(newpriority, 0, 100); + p->priority = newpriority; + } + return 1; + } + static int SetComment(T* p, lua_State *L) { p->comment = SArg(1); return 1; } LunaScoreGoal()