From d67971f42166f3fcd2d0a72e49ef5a86436e635b Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Fri, 9 Feb 2024 14:05:12 +0100 Subject: [PATCH] added offering token --- .../TokenSource.124381/Resource.910e09.json | 58 +++++++++++++++++++ src/core/token/TokenManager.ttslua | 11 ++-- src/util/TokenSpawnTool.ttslua | 11 ++-- 3 files changed, 70 insertions(+), 10 deletions(-) diff --git a/objects/TokenSource.124381/Resource.910e09.json b/objects/TokenSource.124381/Resource.910e09.json index e1584e01..317ff9a7 100644 --- a/objects/TokenSource.124381/Resource.910e09.json +++ b/objects/TokenSource.124381/Resource.910e09.json @@ -388,6 +388,64 @@ }, "Value": 0, "XmlUI": "" + }, + "8": { + "AltLookAngle": { + "x": 0, + "y": 0, + "z": 0 + }, + "Autoraise": true, + "ColorDiffuse": { + "b": 1, + "g": 1, + "r": 1 + }, + "CustomImage": { + "CustomToken": { + "MergeDistancePixels": 10, + "Stackable": true, + "StandUp": false, + "Thickness": 0.3 + }, + "ImageScalar": 1, + "ImageSecondaryURL": "", + "ImageURL": "http://cloud-3.steamusercontent.com/ugc/2342503777954079997/156B97A89D6168F1199EE2E0FE155839627C8BCD/", + "WidthScale": 0 + }, + "Description": "", + "DragSelectable": true, + "GMNotes": "", + "GUID": "2b4348", + "Grid": true, + "GridProjection": false, + "Hands": false, + "HideWhenFaceDown": false, + "IgnoreFoW": false, + "LayoutGroupSortIndex": 0, + "Locked": false, + "LuaScript": "", + "LuaScriptState": "", + "MeasureMovement": false, + "Memo": "offering", + "Name": "Custom_Token", + "Nickname": "Offering", + "Snap": false, + "Sticky": true, + "Tooltip": true, + "Transform": { + "posX": 44, + "posY": 1.5, + "posZ": 8, + "rotX": 0, + "rotY": 270, + "rotZ": 0, + "scaleX": 0.17, + "scaleY": 0.17, + "scaleZ": 0.17 + }, + "Value": 0, + "XmlUI": "" } }, "Sticky": true, diff --git a/src/core/token/TokenManager.ttslua b/src/core/token/TokenManager.ttslua index b216a8bd..a6cee2dc 100644 --- a/src/core/token/TokenManager.ttslua +++ b/src/core/token/TokenManager.ttslua @@ -113,12 +113,13 @@ do -- stateIDs for the multi-stated resource tokens local stateTable = { ["resource"] = 1, - ["ammo"] = 2, - ["bounty"] = 3, - ["charge"] = 4, + ["ammo"] = 2, + ["bounty"] = 3, + ["charge"] = 4, ["evidence"] = 5, - ["secret"] = 6, - ["supply"] = 7 + ["secret"] = 6, + ["supply"] = 7, + ["offering"] = 8 } -- Table of data extracted from the token source bag, keyed by the Memo on each token which diff --git a/src/util/TokenSpawnTool.ttslua b/src/util/TokenSpawnTool.ttslua index 65b0f6d1..96f8b795 100644 --- a/src/util/TokenSpawnTool.ttslua +++ b/src/util/TokenSpawnTool.ttslua @@ -11,12 +11,13 @@ TOKEN_INDEX[9] = "resource" local stateTable = { ["resource"] = 1, - ["ammo"] = 2, - ["bounty"] = 3, - ["charge"] = 4, + ["ammo"] = 2, + ["bounty"] = 3, + ["charge"] = 4, ["evidence"] = 5, - ["secret"] = 6, - ["supply"] = 7 + ["secret"] = 6, + ["supply"] = 7, + ["offering"] = 8 } ---@param index number Index of the pressed key