From 752d9a8b431b836c919d2d36fe6a0f21aff89474 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Wed, 16 Nov 2022 19:08:19 +0100 Subject: [PATCH] clean up of skill tracker --- src/playermat/InvestigatorSkillTracker.ttslua | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/playermat/InvestigatorSkillTracker.ttslua b/src/playermat/InvestigatorSkillTracker.ttslua index 068c3893..07e61666 100644 --- a/src/playermat/InvestigatorSkillTracker.ttslua +++ b/src/playermat/InvestigatorSkillTracker.ttslua @@ -1,20 +1,15 @@ -- Stat Tracker -- made by: Chr1Z -- description: helps tracking the stats of your investigator -information = { - version = "1.1", - last_updated = "12.11.2022" -} local BUTTON_PARAMETERS = {} BUTTON_PARAMETERS.function_owner = self BUTTON_PARAMETERS.height = 650 BUTTON_PARAMETERS.width = 700 -BUTTON_PARAMETERS.position = { -4.775, 0.1, -0.03 } +BUTTON_PARAMETERS.position = { x = -4.775, y = 0.1, z = -0.03 } BUTTON_PARAMETERS.color = { 0, 0, 0, 0 } BUTTON_PARAMETERS.font_color = { 0, 0, 0, 100 } BUTTON_PARAMETERS.font_size = 450 -X_OFFSET = 1.91 function onSave() return JSON.encode(stats) end @@ -23,17 +18,12 @@ function onLoad(saved_data) stats = JSON.decode(saved_data) or { 1, 1, 1, 1 } for i = 1, 4 do - BUTTON_PARAMETERS.position[1] = BUTTON_PARAMETERS.position[1] + X_OFFSET BUTTON_PARAMETERS.label = stats[i] .. " " + BUTTON_PARAMETERS.position.x = BUTTON_PARAMETERS.position.x + 1.91 BUTTON_PARAMETERS.click_function = attachIndex("button_click", i) self.createButton(BUTTON_PARAMETERS) end - self.addContextMenuItem("More Information", function() - printToAll("------------------------------", "White") - printToAll("Stat Tracker v" .. information["version"] .. " by Chr1Z", "Orange") - printToAll("last updated: " .. information["last_updated"], "White") - end) self.addContextMenuItem("Reset to 1s", function() updateStats({ 1, 1, 1, 1 }) end) end