v1.4.5
This commit is contained in:
29
src/token.js
29
src/token.js
@@ -210,6 +210,21 @@ export class TokenControl{
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (settings.onClick == 'valuedCondition') { //modify valued condition
|
||||
if (MODULE.getPermission('TOKEN','CONDITIONS') == false ) {
|
||||
streamDeck.noPermission(context,device);
|
||||
return;
|
||||
}
|
||||
ring = 1;
|
||||
overlay = true;
|
||||
if (icon == 'stats') {
|
||||
iconSrc = tokenHelper.getConditionIcon(settings.valuedCondition);
|
||||
if (tokenHelper.getValuedCondition(token,settings.valuedCondition)) {
|
||||
ring = 2;
|
||||
ringColor = "#FF7B00";
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (settings.onClick == 'cubCondition') { //Combat Utility Belt conditions
|
||||
if (MODULE.getPermission('TOKEN','CONDITIONS') == false ) {
|
||||
streamDeck.noPermission(context,device);
|
||||
@@ -344,6 +359,15 @@ export class TokenControl{
|
||||
overlay = true;
|
||||
if (icon == 'stats') iconSrc = tokenHelper.getConditionIcon(settings.condition);
|
||||
}
|
||||
else if (settings.onClick == 'valuedCondition') { //modify condition value
|
||||
if (MODULE.getPermission('TOKEN','CONDITIONS') == false ) {
|
||||
streamDeck.noPermission(context,device);
|
||||
return;
|
||||
}
|
||||
ring = 1;
|
||||
overlay = true;
|
||||
if (icon == 'stats') iconSrc = tokenHelper.getConditionIcon(settings.condition);
|
||||
}
|
||||
else if (settings.onClick == 'cubCondition') { //Combat Utility Belt conditions
|
||||
if (MODULE.getPermission('TOKEN','CONDITIONS') == false ) {
|
||||
streamDeck.noPermission(context,device);
|
||||
@@ -507,6 +531,11 @@ export class TokenControl{
|
||||
await tokenHelper.toggleCondition(token,settings.condition);
|
||||
this.update(tokenId);
|
||||
}
|
||||
else if (onClick == 'valuedCondition') { //Modify Valued condition
|
||||
if (MODULE.getPermission('TOKEN','CONDITIONS') == false ) return;
|
||||
await tokenHelper.modifyValuedCondition(token,settings.valuedCondition,settings.valuedConditionDelta);
|
||||
this.update(tokenId);
|
||||
}
|
||||
else if (onClick == 'cubCondition') { //Combat Utility Belt conditions
|
||||
if (MODULE.getPermission('TOKEN','CONDITIONS') == false ) return;
|
||||
const condition = settings.cubConditionName;
|
||||
|
||||
Reference in New Issue
Block a user