Skip to content

Commit

Permalink
add more skillsets
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Jan 7, 2017
1 parent e4fe142 commit 854dc2a
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,8 @@ local rankingX = capWideScale(75,90)
local rankingY = capWideScale(200,180)
local rankingTitleWidth = (rankingWidth/(#ms.SkillSets + 1))

local skillsets = {
Overall = 0,
Speed = 0,
Stam = 0,
Jack = 0,
Technical = 0
}


if GAMESTATE:IsPlayerEnabled(PLAYER_1) then
profile = GetPlayerOrMachineProfile(PLAYER_1)
if profile ~= nil then
skillsets.Overall = profile:GetPlayerRating()
skillsets.Speed = profile:GetPlayerSkillsetRating(2)
skillsets.Stam = profile:GetPlayerSkillsetRating(3)
skillsets.Jack = profile:GetPlayerSkillsetRating(4)
skillsets.Technical = profile:GetPlayerSkillsetRating(5)
end
end


Expand Down Expand Up @@ -201,8 +185,9 @@ local function littlebits(i)
InitCommand=cmd(xy,frameX+(frameWidth/2)+90,frameY+20 + 22*i;halign,1;zoom,0.5),
BeginCommand=cmd(queuecommand,"Set"),
SetCommand=function(self)
self:settextf("%5.2f",skillsets[ms.SkillSets[i]])
self:diffuse(ByMSD(skillsets[ms.SkillSets[i]]))
local rating = profile:GetPlayerSkillsetRating(i)
self:settextf("%5.2f",rating)
self:diffuse(ByMSD(rating))
end,
PlayerJoinedMessageCommand=cmd(queuecommand,"Set"),
PlayerUnjoinedMessageCommand=cmd(queuecommand,"Set"),
Expand Down
9 changes: 6 additions & 3 deletions Themes/Til Death/Scripts/WifeSundries.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@ ms.JudgeCountInverse = {

ms.SkillSets = {
"Overall",
"Speed",
"Stam",
"Jack",
"Stream",
"Jumpstream",
"Handstream",
"Stamina",
"Jack Speed",
"Jack Stamina",
"Technical"
}

Expand Down
Binary file modified extern/MinaCalc/MinaCalc.lib
Binary file not shown.
20 changes: 13 additions & 7 deletions src/GameConstantsAndTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,19 +274,25 @@ XToLocalizedString( HoldNoteScore );
// wtf is this shit - mina
static const char *SkillsetNames[] = {
"Overall",
"Speed",
"Stream",
"Jumpstream",
"Handstream",
"Stamina",
"Jack",
"Jack Speed",
"Jack Stamina",
"Technical",
};
XToString(Skillset);
LuaXType(Skillset);
Skillset StringToSkillset(const RString &s) {
if (s == "Overall") return Skill_Overall;
else if (s == "Speed") return Skill_Speed;
else if (s == "Stamina") return Skill_Stamina;
else if (s == "Jack") return Skill_Jack;
else if (s == "Technical") return Skill_Technical;
if (s == "Overall") return Skill_Overall;
else if (s == "Stream") return Skill_Stream;
else if (s == "Jumpstream") return Skill_Jumpstream;
else if (s == "Handstream") return Skill_Jumpstream;
else if (s == "Stamina") return Skill_Stamina;
else if (s == "Jack Speed") return Skill_JackSpeed;
else if (s == "Jack Stamina") return Skill_JackStamina;
else if (s == "Technical") return Skill_Technical;

return Skill_Overall;
}
Expand Down
7 changes: 5 additions & 2 deletions src/GameConstantsAndTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ const int MAX_NUM_CREDITS = 20;

enum Skillset {
Skill_Overall,
Skill_Speed,
Skill_Stream,
Skill_Jumpstream,
Skill_Handstream,
Skill_Stamina,
Skill_Jack,
Skill_JackSpeed,
Skill_JackStamina,
Skill_Technical,
NUM_Skillset,
Skillset_Invalid,
Expand Down

0 comments on commit 854dc2a

Please sign in to comment.