Ejemplo n.º 1
0
	void HGAssets::saveCurrentLocalProfile()
	{
		if(currentProfilePtr == nullptr) return;

		ssvuj::Obj profileRoot;
		ssvuj::arch(profileRoot, "version", Config::getVersion());
		ssvuj::arch(profileRoot, "name", getCurrentLocalProfile().getName());
		ssvuj::arch(profileRoot, "scores", getCurrentLocalProfile().getScores());
		for(const auto& n : getCurrentLocalProfile().getTrackedNames()) profileRoot["trackedNames"].append(n);
		ssvuj::writeToFile(profileRoot, getCurrentLocalProfileFilePath());
	}
Ejemplo n.º 2
0
 inline void pAddTrackedName(const std::string& mName)
 {
     if(!playingLocally)
     {
         Online::trySendAddFriend(mName);
         return;
     }
     getCurrentLocalProfile().addTrackedName(mName);
 }
Ejemplo n.º 3
0
 inline void pClearTrackedNames()
 {
     if(!playingLocally)
     {
         Online::trySendClearFriends();
         return;
     }
     getCurrentLocalProfile().clearTrackedNames();
 }
Ejemplo n.º 4
0
 inline const std::vector<std::string>& pGetTrackedNames() const
 {
     if(!playingLocally) return Online::getUserStats().trackedNames;
     return getCurrentLocalProfile().getTrackedNames();
 }
Ejemplo n.º 5
0
 inline std::string pGetName() const
 {
     if(!playingLocally) return Online::getCurrentUsername();
     return getCurrentLocalProfile().getName();
 }
Ejemplo n.º 6
0
	void HGAssets::setLocalScore(const string& mId, float mScore)	{ getCurrentLocalProfile().setScore(mId, mScore); }
Ejemplo n.º 7
0
	float HGAssets::getLocalScore(const string& mId) 				{ return getCurrentLocalProfile().getScore(mId); }