Skip to content

Commit

Permalink
add hint when is enabled to use localRaing mod but mod is not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
sl5net committed Aug 22, 2023
1 parent bbaaee4 commit 27588c3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 0 additions & 2 deletions gui/gamesetup/gamesetup~autociv.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,6 @@ function setCaption_when_JoinOrStart_Setup_suggestRestoreMods_when_modsChanged()
// g_NetworkCommands["/pRestoreLastProfile"]();
// pRestoreLastProfile();



if(g_selfIsHost){
const difference =getDifference(modsFromUserCfg, modsFromUserCfg_backup).trim()

Expand Down
13 changes: 10 additions & 3 deletions gui/gamesetup_mp/gamesetup_mp.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,16 @@ function init (attribs) {

const hasLocalRatings = typeof init_LocalRatings != 'undefined';


info('showLocalRatingsDropdown:', showLocalRatingsDropdown,'showLocalRatingsDropdown:', showLocalRatingsDropdown, 'hasLocalRatings:', hasLocalRatings);

if (hasLocalRatings && (useLocalRatings || showLocalRatingsDropdown)) {

if(!hasLocalRatings){
if ( (useLocalRatings || showLocalRatingsDropdown) ){
error(`for using local ratings you need to enable to LocalRatings mod`);
}
}
else if (hasLocalRatings && (useLocalRatings || showLocalRatingsDropdown)) {
info('try to use local ratings database, with user: ', g_selfNick);
g_LocalRatingsUser = init_LocalRatings()[g_selfNick];

Expand All @@ -77,8 +84,8 @@ function init (attribs) {

}

// warn(`g_LocalRatingsUser: ${g_LocalRatingsUser}`);
// warn(`showLocalRatingsDropdown: ${showLocalRatingsDropdown}`);
warn(`g_LocalRatingsUser: ${g_LocalRatingsUser}`);
warn(`showLocalRatingsDropdown: ${showLocalRatingsDropdown}`);

info('g_LocalRatingUser:', g_LocalRatingsUser);
}
Expand Down

0 comments on commit 27588c3

Please sign in to comment.