Skip to content

Commit

Permalink
add shitty way to delete goals
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Apr 28, 2017
1 parent 8d806ff commit ca7ec56
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/Profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3711,6 +3711,21 @@ class LunaProfile : public Luna<Profile>
return 1;
}

// make unshit -mina
static int RemoveGoalsByKey(T* p, lua_State *L) {
RString ck = SArg(1);
auto it = p->goalmap.find(ck);
if (it == p->goalmap.end()) {
lua_pushnil(L);
}
else {
p->goalmap.erase(ck);
SONGMAN->SetHasGoal(p->goalmap);
}

return 1;
}

static int GetAllGoals(T* p, lua_State *L) {
lua_newtable(L);
int idx = 0;
Expand Down Expand Up @@ -3810,6 +3825,7 @@ class LunaProfile : public Luna<Profile>
ADD_METHOD( GetPBHighScoreByKey );
ADD_METHOD( ValidateAllScores );
ADD_METHOD( GetGoalByKey );
ADD_METHOD( RemoveGoalsByKey );
ADD_METHOD( GetAllGoals );
}
};
Expand Down Expand Up @@ -3853,6 +3869,7 @@ class LunaScoreGoal : public Luna<ScoreGoal>
}
return 1;
}

static int SetPriority(T* p, lua_State *L) { p->priority = IArg(1); return 1; }
static int SetComment(T* p, lua_State *L) { p->comment = SArg(1); return 1; }

Expand Down

0 comments on commit ca7ec56

Please sign in to comment.