27 lines
690 B
JavaScript
27 lines
690 B
JavaScript
on("clicked:togedge", function() {
|
|
getAttrs(["edgeroll","gmroll"], function(values) {
|
|
let currentVal = values.edgeroll ?? "";
|
|
let newVal = "";
|
|
if (currentVal === "") {
|
|
newVal = "!/";
|
|
}
|
|
console.log("Setting Edge Value to: " + newVal);
|
|
setAttrs({
|
|
"edgeroll": newVal
|
|
});
|
|
});
|
|
});
|
|
|
|
on("clicked:toggmroll", function() {
|
|
getAttrs(["gmroll","edgeroll"], function(values) {
|
|
let currentVal = values.gmroll ?? "";
|
|
let newVal = "";
|
|
if (currentVal === "") {
|
|
newVal = "/w gm ";
|
|
}
|
|
console.log("Setting GM roll Value to: " + newVal);
|
|
setAttrs({
|
|
"gmroll": newVal
|
|
});
|
|
});
|
|
});
|