Skip to content

Commit

Permalink
more thoroughly handle scoregoal priority setting
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Apr 29, 2017
1 parent 739fca2 commit 510d7be
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3870,7 +3870,15 @@ class LunaScoreGoal : public Luna<ScoreGoal>
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()
Expand Down

0 comments on commit 510d7be

Please sign in to comment.