renaming tracker to "Investigator Skill Tracker"

This commit is contained in:
Chr1Z93 2022-11-12 15:50:28 +01:00
parent c8462f664d
commit 61e8e0d2e0
15 changed files with 16 additions and 148 deletions

View File

@ -243,10 +243,10 @@
"AllPlayerCards.15bb07",
"Search-A-Card.24051a",
"231Notes-10152022.268764",
"StatTracker.af7ed7",
"StatTracker.e598c2",
"StatTracker.b4a5f7",
"StatTracker.e74881"
"InvestigatorSkillTracker.af7ed7",
"InvestigatorSkillTracker.e598c2",
"InvestigatorSkillTracker.b4a5f7",
"InvestigatorSkillTracker.e74881"
],
"PlayArea": 1,
"PlayerCounts": [

View File

@ -34,10 +34,10 @@
"LayoutGroupSortIndex": 0,
"Locked": true,
"LuaScriptState": "[1,1,1,1]",
"LuaScript_path": "StatTracker.af7ed7.ttslua",
"LuaScript_path": "InvestigatorSkillTracker.af7ed7.ttslua",
"MeasureMovement": false,
"Name": "Custom_Token",
"Nickname": "Stat Tracker",
"Nickname": "Investigator Skill Tracker",
"Snap": true,
"Sticky": true,
"Tags": [

View File

@ -0,0 +1 @@
require("playermat/InvestigatorSkillTracker")

View File

@ -34,10 +34,10 @@
"LayoutGroupSortIndex": 0,
"Locked": true,
"LuaScriptState": "[1,1,1,1]",
"LuaScript_path": "StatTracker.b4a5f7.ttslua",
"LuaScript_path": "InvestigatorSkillTracker.b4a5f7.ttslua",
"MeasureMovement": false,
"Name": "Custom_Token",
"Nickname": "Stat Tracker",
"Nickname": "Investigator Skill Tracker",
"Snap": true,
"Sticky": true,
"Tags": [

View File

@ -0,0 +1 @@
require("playermat/InvestigatorSkillTracker")

View File

@ -34,10 +34,10 @@
"LayoutGroupSortIndex": 0,
"Locked": true,
"LuaScriptState": "[1,1,1,1]",
"LuaScript_path": "StatTracker.e598c2.ttslua",
"LuaScript_path": "InvestigatorSkillTracker.e598c2.ttslua",
"MeasureMovement": false,
"Name": "Custom_Token",
"Nickname": "Stat Tracker",
"Nickname": "Investigator Skill Tracker",
"Snap": true,
"Sticky": true,
"Tags": [

View File

@ -0,0 +1 @@
require("playermat/InvestigatorSkillTracker")

View File

@ -34,10 +34,10 @@
"LayoutGroupSortIndex": 0,
"Locked": true,
"LuaScriptState": "[1,1,1,1]",
"LuaScript_path": "StatTracker.e74881.ttslua",
"LuaScript_path": "InvestigatorSkillTracker.e74881.ttslua",
"MeasureMovement": false,
"Name": "Custom_Token",
"Nickname": "Stat Tracker",
"Nickname": "Investigator Skill Tracker",
"Snap": true,
"Sticky": true,
"Tags": [

View File

@ -0,0 +1 @@
require("playermat/InvestigatorSkillTracker")

View File

@ -1 +0,0 @@
require("playermat/statTracker")

View File

@ -1 +0,0 @@
require("playermat/statTracker")

View File

@ -1 +0,0 @@
require("playermat/statTracker")

View File

@ -1 +0,0 @@
require("playermat/statTracker")

View File

@ -1,132 +0,0 @@
MIN_VALUE = -99
MAX_VALUE = 999
function onload(saved_data)
light_mode = false
val = 0
if saved_data ~= "" then
local loaded_data = JSON.decode(saved_data)
light_mode = loaded_data[1]
val = loaded_data[2]
end
createAll()
end
function updateSave()
local data_to_save = {light_mode, val}
saved_data = JSON.encode(data_to_save)
self.script_state = saved_data
end
function createAll()
s_color = {0.5, 0.5, 0.5, 95}
if light_mode then
f_color = {1,1,1,95}
else
f_color = {0,0,0,100}
end
self.createButton({
label=tostring(val),
click_function="add_subtract",
function_owner=self,
position={0,0.05,0},
height=600,
width=1000,
alignment = 3,
scale={x=1.5, y=1.5, z=1.5},
font_size=600,
font_color=f_color,
color={0,0,0,0}
})
if light_mode then
lightButtonText = "[ Set dark ]"
else
lightButtonText = "[ Set light ]"
end
end
function removeAll()
self.removeInput(0)
self.removeInput(1)
self.removeButton(0)
self.removeButton(1)
self.removeButton(2)
end
function reloadAll()
removeAll()
createAll()
updateSave()
end
function swap_fcolor(_obj, _color, alt_click)
light_mode = not light_mode
reloadAll()
end
function swap_align(_obj, _color, alt_click)
center_mode = not center_mode
reloadAll()
end
function editName(_obj, _string, value)
self.setName(value)
setTooltips()
end
function add_subtract(_obj, _color, alt_click)
mod = alt_click and -1 or 1
new_value = math.min(math.max(val + mod, MIN_VALUE), MAX_VALUE)
if val ~= new_value then
val = new_value
updateVal()
updateSave()
end
end
function updateVal()
self.editButton({
index = 0,
label = tostring(val),
})
end
function reset_val()
val = 0
updateVal()
updateSave()
end
function setTooltips()
self.editInput({
index = 0,
value = self.getName(),
tooltip = ttText
})
self.editButton({
index = 0,
value = tostring(val),
tooltip = ttText
})
end
function null()
end
function keepSample(_obj, _string, value)
reloadAll()
end