add an option to select who scores: last player or player who pressed on the button
This commit is contained in:
parent
8fce6213ca
commit
f5f53ac7a8
|
@ -38,6 +38,9 @@ window.TrivabbleConf = {
|
|||
// The default premium for playing seven tiles on a turn
|
||||
PREMIUM_SEVEN_TILES: 50,
|
||||
|
||||
// Score is automically affected to last player. If false, score is automatically affected to the player who pressed the Score button
|
||||
SCORE_LAST_PLAYER: true,
|
||||
|
||||
// I don't like trailing commas, here is a nice message for you reading this file :-)
|
||||
HAVE_FUN: true
|
||||
};
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
setConf("FLASH_LIGHT_COLOR", "#ee6633");
|
||||
setConf("API_ENTRY_POINT", Conf.APP_PATH + "/:trivabble");
|
||||
setConf("PREMIUM_SEVEN_TILES", 50);
|
||||
setConf("SCORE_LAST_PLAYER", true);
|
||||
|
||||
function getSetting(key) {
|
||||
let type;
|
||||
|
@ -1920,6 +1921,11 @@
|
|||
totalScore += getSetting("PREMIUM_SEVEN_TILES");
|
||||
}
|
||||
|
||||
/* Ѕcore player who pressed the button */
|
||||
if (!getSetting("SCORE_LAST_PLAYER")) {
|
||||
lastPlayer = getSetting("PlayerName");
|
||||
}
|
||||
|
||||
myChoice(
|
||||
format(_("{0} points will be added to:"), totalScore), {
|
||||
choices: Object.keys(tablePlayers),
|
||||
|
|
Loading…
Reference in New Issue