increased readability

This commit is contained in:
Chr1Z93 2023-09-09 12:54:36 +02:00
parent 7e0bf739a4
commit 9d6e116a36
2 changed files with 12 additions and 10 deletions

View File

@ -6,9 +6,9 @@
}, },
"Autoraise": true, "Autoraise": true,
"ColorDiffuse": { "ColorDiffuse": {
"b": 0.87451, "b": 1,
"g": 0.87451, "g": 1,
"r": 0.87451 "r": 1
}, },
"CustomImage": { "CustomImage": {
"CustomToken": { "CustomToken": {
@ -48,9 +48,9 @@
"rotX": 0, "rotX": 0,
"rotY": 270, "rotY": 270,
"rotZ": 0, "rotZ": 0,
"scaleX": 0.4, "scaleX": 0.42,
"scaleY": 1, "scaleY": 1,
"scaleZ": 0.4 "scaleZ": 0.42
}, },
"Value": 0, "Value": 0,
"XmlUI": "" "XmlUI": ""

View File

@ -1,7 +1,9 @@
local playmatApi = require("playermat/PlaymatApi")
-- variables are intentionally global to be accessible
count = 0 count = 0
useClickableCounters = false useClickableCounters = false
local playmatAPI = require("playermat/PlaymatApi")
function onSave() return JSON.encode(useClickableCounters) end function onSave() return JSON.encode(useClickableCounters) end
function onLoad(savedData) function onLoad(savedData)
@ -17,8 +19,8 @@ function onLoad(savedData)
height = 900, height = 900,
width = 900, width = 900,
scale = { 1.5, 1.5, 1.5 }, scale = { 1.5, 1.5, 1.5 },
font_size = 600, font_size = 650,
font_color = { 1, 1, 1, 100 }, font_color = { 0, 0, 0, 100 },
color = { 0, 0, 0, 0 } color = { 0, 0, 0, 0 }
}) })
@ -28,12 +30,12 @@ end
-- removes all player clues by calling the respective function from the counting bowls / clickers -- removes all player clues by calling the respective function from the counting bowls / clickers
function removeAllPlayerClues() function removeAllPlayerClues()
printToAll(count .. " clue(s) from playermats removed.", "White") printToAll(count .. " clue(s) from playermats removed.", "White")
playmatAPI.removeClues("All") playmatApi.removeClues("All")
self.editButton({ index = 0, label = "0" }) self.editButton({ index = 0, label = "0" })
end end
-- gets the counted values from the counting bowls / clickers and sums them up -- gets the counted values from the counting bowls / clickers and sums them up
function sumClues() function sumClues()
count = playmatAPI.getClueCount(useClickableCounters, "All") count = playmatApi.getClueCount(useClickableCounters, "All")
self.editButton({ index = 0, label = tostring(count) }) self.editButton({ index = 0, label = tostring(count) })
end end