Skip to content

Commit

Permalink
fix broken netplay menu elements and add number of songs loaded/favor…
Browse files Browse the repository at this point in the history
…ited to playerinfo
  • Loading branch information
MinaciousGrace committed Dec 18, 2016
1 parent 1dddd9c commit 630e753
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ playeroptions:Mini( 2 - playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).Rece
**Wife deviance tracker. Basically half the point of the theme.**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Logs deviance values and lets other dv reliant actors know whether or not to act.
For every doot there is an equal and opposite scoot.
]]

local t = Def.ActorFrame{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ local sortTable = {

t[#t+1] = Def.Quad{
Name="CurrentSort";
InitCommand=cmd(xy,frameX,frameY;halign,1;zoomto,frameWidth,frameHeight;diffuse,getMainColor(1););
InitCommand=cmd(xy,frameX,frameY;halign,1;zoomto,frameWidth,frameHeight;diffuse,getMainColor("positive"));
};

t[#t+1] = LoadFont("Common Normal") .. {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ t[#t+1] = Def.Actor{
end;
};
t[#t+1] = LoadActor("../_frame");
t[#t+1] = LoadActor("../_avatar");
t[#t+1] = LoadActor("../_PlayerInfo");
t[#t+1] = LoadActor("currentsort");
t[#t+1] = LoadFont("Common Large")..{
InitCommand=cmd(xy,5,32;halign,0;valign,1;zoom,0.55;diffuse,getMainColor(1);settext,"Select Music:";);
InitCommand=cmd(xy,5,32;halign,0;valign,1;zoom,0.55;diffuse,getMainColor("positive");settext,"Select Music:");
}

t[#t+1] = LoadActor("../_cursor");
Expand Down
22 changes: 21 additions & 1 deletion Themes/Til Death/BGAnimations/_PlayerInfo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ local profileName = "No Profile"
local playCount = 0
local playTime = 0
local noteCount = 0
local skillrating = 100
local skillrating = 0
local numfaves = 0

local AvatarX = 0
local AvatarY = SCREEN_HEIGHT-50
Expand All @@ -29,6 +30,7 @@ t[#t+1] = Def.Actor{
playTime = profile:GetTotalSessionSeconds()
noteCount = profile:GetTotalTapsAndHolds()
skillrating = profile:GetPlayerRating()
numfaves = profile:GetNumFaves()
else
profileName = "No Profile"
playCount = 0
Expand Down Expand Up @@ -126,6 +128,24 @@ t[#t+1] = Def.ActorFrame{
PlayerJoinedMessageCommand=cmd(queuecommand,"Set"),
PlayerUnjoinedMessageCommand=cmd(queuecommand,"Set"),
};
LoadFont("Common Normal") .. {
InitCommand=cmd(xy,SCREEN_WIDTH-5,AvatarY+7;halign,1;zoom,0.6;diffuse,getMainColor('positive')),
BeginCommand=cmd(queuecommand,"Set"),
SetCommand=function(self)
self:settextf("Songs Loaded: %i", #SONGMAN:GetAllSongs())
end,
PlayerJoinedMessageCommand=cmd(queuecommand,"Set"),
PlayerUnjoinedMessageCommand=cmd(queuecommand,"Set"),
};
LoadFont("Common Normal") .. {
InitCommand=cmd(xy,SCREEN_WIDTH-5,AvatarY+25;halign,1;zoom,0.6;diffuse,getMainColor('positive')),
BeginCommand=cmd(queuecommand,"Set"),
SetCommand=function(self)
self:settextf("Favorited Songs: %i", numfaves)
end,
PlayerJoinedMessageCommand=cmd(queuecommand,"Set"),
PlayerUnjoinedMessageCommand=cmd(queuecommand,"Set"),
};
};

local function Update(self)
Expand Down
2 changes: 2 additions & 0 deletions src/Profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2872,6 +2872,7 @@ class LunaProfile : public Luna<Profile>
static int GetTotalLifts( T* p, lua_State *L ) { lua_pushnumber(L, p->m_iTotalLifts ); return 1; }
DEFINE_METHOD(GetTotalDancePoints, m_iTotalDancePoints);
static int GetUserTable( T* p, lua_State *L ) { p->m_UserTable.PushSelf(L); return 1; }
static int GetNumFaves(T* p, lua_State *L) { lua_pushnumber(L, p->FavoritedCharts.size()); return 1; }
static int GetLastPlayedSong( T* p, lua_State *L )
{
Song *pS = p->m_lastSong.ToSong();
Expand Down Expand Up @@ -2963,6 +2964,7 @@ class LunaProfile : public Luna<Profile>
ADD_METHOD( GetLastPlayedCourse );
ADD_METHOD( GetGUID );
ADD_METHOD( GetPlayerRating );
ADD_METHOD( GetNumFaves );
}
};

Expand Down

0 comments on commit 630e753

Please sign in to comment.